discourse/app/assets/javascripts/discourse-common/addon/helpers/i18n.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

12 lines
302 B
JavaScript
Raw Normal View History

import { registerUnbound } from "discourse-common/lib/helpers";
import I18n from "I18n";
2016-08-26 01:14:56 +08:00
export default function i18n(key, params) {
return I18n.t(key, params);
}
registerUnbound("i18n", i18n);
2016-12-28 18:45:41 +08:00
registerUnbound("i18n-yes-no", (value, params) =>
I18n.t(value ? "yes_value" : "no_value", params)
);