wekan/imports/i18n/blaze.js
2022-04-18 18:02:14 +03:00

8 lines
237 B
JavaScript

import { Blaze } from 'meteor/blaze';
import { TAPi18n } from './tap';
Blaze.registerHelper('_', (...args) => {
const { hash } = args.pop();
const [key] = args.splice(0, 1);
return TAPi18n.__(key, { ...hash, sprintf: args });
});