runlify 0.0.375 → 0.0.376
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/projectsGeneration/generators/fileTemplates/ui/environment/src/i18nProvider/index.js
CHANGED
|
@@ -6,9 +6,9 @@ var utils_1 = require("../../../../../../utils");
|
|
|
6
6
|
var uiI18nProviderTmpl = function (_a, options) {
|
|
7
7
|
var defaultLanguage = _a.system.defaultLanguage;
|
|
8
8
|
if (options === void 0) { options = types_1.defaultBootstrapEntityOptions; }
|
|
9
|
-
return "import
|
|
9
|
+
return "import polyglotI18nProvider from 'ra-i18n-polyglot';\nimport defaultMessages from '../i18n/ru';\nimport log from '../utils/log';\n".concat(options.skipWarningThisIsGenerated
|
|
10
10
|
? ''
|
|
11
|
-
: "\n// ".concat(utils_1.generatedWarning, "\n"), "\
|
|
11
|
+
: "\n// ".concat(utils_1.generatedWarning, "\n"), "\nconst i18nProvider = polyglotI18nProvider(locale => {\n switch (locale) {\n case 'en':\n return import('./i18n/en').then(messages => messages.default);\n case 'ru':\n return defaultMessages;\n default:\n log.error(`Unknown locale: \"${locale}\"`);\n return defaultMessages;\n }\n}, 'ru');\n\nexport default i18nProvider;\n");
|
|
12
12
|
};
|
|
13
13
|
exports.uiI18nProviderTmpl = uiI18nProviderTmpl;
|
|
14
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
14
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvcHJvamVjdHNHZW5lcmF0aW9uL2dlbmVyYXRvcnMvZmlsZVRlbXBsYXRlcy91aS9lbnZpcm9ubWVudC9zcmMvaTE4blByb3ZpZGVyL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUNBLGlEQUdnQztBQUNoQyxpREFBMEQ7QUFFbkQsSUFBTSxrQkFBa0IsR0FBRyxVQUNoQyxFQUEwRCxFQUMxRCxPQUErRDtRQURuRCxlQUFlLDRCQUFBO0lBQzNCLHdCQUFBLEVBQUEsVUFBa0MscUNBQTZCO0lBQzVELE9BQUEsNElBSUgsT0FBTyxDQUFDLDBCQUEwQjtRQUNoQyxDQUFDLENBQUMsRUFBRTtRQUNKLENBQUMsQ0FBQyxlQUNELHdCQUFnQixPQUNwQiwwVkFlQTtBQXZCSSxDQXVCSixDQUFBO0FBMUJZLFFBQUEsa0JBQWtCLHNCQTBCOUIifQ==
|