@next-core/brick-kit 2.195.0 → 2.195.1

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.
@@ -7082,6 +7082,28 @@
7082
7082
  };
7083
7083
  }();
7084
7084
 
7085
+ function setAppLocales(app) {
7086
+ var _locales, _app$config, _app$config$settings;
7087
+ var locales = (_locales = (_app$config = app.config) === null || _app$config === void 0 ? void 0 : (_app$config$settings = _app$config.settings) === null || _app$config$settings === void 0 ? void 0 : _app$config$settings.locales) !== null && _locales !== void 0 ? _locales : app.locales;
7088
+ if (locales) {
7089
+ // Prefix to avoid conflict between brick package's i18n namespace.
7090
+ var ns = "$tmp-".concat(app.id);
7091
+ // Support any languages in `app.locales`.
7092
+ Object.entries(locales).forEach(_ref => {
7093
+ var [lang, resources] = _ref;
7094
+ i18next__default["default"].addResourceBundle(lang, ns, resources);
7095
+ });
7096
+ // Use `app.name` as the fallback `app.localeName`.
7097
+ app.localeName = i18next__default["default"].getFixedT(null, ns)("name", app.name);
7098
+ // Remove the temporary i18n resource bundles.
7099
+ Object.keys(locales).forEach(lang => {
7100
+ i18next__default["default"].removeResourceBundle(lang, ns);
7101
+ });
7102
+ } else {
7103
+ app.localeName = app.name;
7104
+ }
7105
+ }
7106
+
7085
7107
  /**
7086
7108
  * Merge `app.defaultConfig` and `app.userConfig` to `app.config`.
7087
7109
  *
@@ -7092,6 +7114,7 @@
7092
7114
  var app = storyboard.app;
7093
7115
  if (app) {
7094
7116
  app.config = brickUtils.deepFreeze(_.merge({}, app.defaultConfig, app.userConfig));
7117
+ setAppLocales(storyboard.app);
7095
7118
  }
7096
7119
  }
7097
7120
  if (bootstrapResponse.settings) {
@@ -11846,28 +11869,6 @@
11846
11869
  }
11847
11870
  }
11848
11871
 
11849
- function setAppLocales(app) {
11850
- var _locales, _app$config, _app$config$settings;
11851
- var locales = (_locales = (_app$config = app.config) === null || _app$config === void 0 ? void 0 : (_app$config$settings = _app$config.settings) === null || _app$config$settings === void 0 ? void 0 : _app$config$settings.locales) !== null && _locales !== void 0 ? _locales : app.locales;
11852
- if (locales) {
11853
- // Prefix to avoid conflict between brick package's i18n namespace.
11854
- var ns = "$tmp-".concat(app.id);
11855
- // Support any languages in `app.locales`.
11856
- Object.entries(locales).forEach(_ref => {
11857
- var [lang, resources] = _ref;
11858
- i18next__default["default"].addResourceBundle(lang, ns, resources);
11859
- });
11860
- // Use `app.name` as the fallback `app.localeName`.
11861
- app.localeName = i18next__default["default"].getFixedT(null, ns)("name", app.name);
11862
- // Remove the temporary i18n resource bundles.
11863
- Object.keys(locales).forEach(lang => {
11864
- i18next__default["default"].removeResourceBundle(lang, ns);
11865
- });
11866
- } else {
11867
- app.localeName = app.name;
11868
- }
11869
- }
11870
-
11871
11872
  class Router {
11872
11873
  constructor(kernel) {
11873
11874
  _defineProperty__default["default"](this, "defaultCollapsed", false);
@@ -16774,6 +16775,7 @@
16774
16775
  exports.property = property;
16775
16776
  exports.reTransformForDevtools = reTransformForDevtools;
16776
16777
  exports.renderEasyopsEmpty = renderEasyopsEmpty;
16778
+ exports.setAppLocales = setAppLocales;
16777
16779
  exports.transformElementProperties = transformElementProperties;
16778
16780
  exports.transformIntermediateData = transformIntermediateData;
16779
16781
  exports.transformProperties = transformProperties;