Sha256: 762663bbe88d69b3eb85b9f990609af383b86491af990f79bcde1ce77141eccd
Contents?: true
Size: 454 Bytes
Versions: 11
Compression:
Stored size: 454 Bytes
Contents
var I18n = { locale: null, translations: null, init(locale, translations) { this.locale = locale; this.translations = translations; if (typeof this.translations === "string") { this.translations = JSON.parse(this.translations); } }, t(key) { var humanize; humanize = key.charAt(0).toUpperCase() + key.replace(/_/g, " ").slice(1); return this.translations[key] || humanize; }, }; export { I18n as default };
Version data entries
11 entries across 11 versions & 1 rubygems