lecom-ui 3.9.7 → 3.9.9

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.
@@ -19,13 +19,22 @@ const i18nConfig = {
19
19
  escapeValue: false
20
20
  }
21
21
  };
22
- console.log("i18n.isInitialized 0");
23
22
  if (!i18n.isInitialized) {
24
- console.log("i18n.isInitialized 1");
25
23
  i18n.use(initReactI18next).init(i18nConfig);
26
24
  }
27
- const initializeI18n = (config) => {
28
- i18n.use(initReactI18next).init({ ...i18nConfig, ...config });
25
+ const initializeI18n = ({
26
+ resources,
27
+ lng = "pt_BR" /* PT_BR */
28
+ }) => {
29
+ let mappedResources = {};
30
+ if (resources) {
31
+ mappedResources = {
32
+ ...i18nConfig.resources,
33
+ resources
34
+ };
35
+ }
36
+ console.log(i18nConfig, mappedResources, resources);
37
+ i18n.use(initReactI18next).init({ ...i18nConfig, ...mappedResources, lng });
29
38
  };
30
39
 
31
40
  export { Translations, initializeI18n };
package/dist/index.d.ts CHANGED
@@ -275,7 +275,11 @@ declare enum Translations {
275
275
  EN_US = "en_US",
276
276
  ES_ES = "es_ES"
277
277
  }
278
- declare const initializeI18n: (config?: InitOptions) => void;
278
+ interface InitializeI18n {
279
+ resources?: InitOptions['resources'];
280
+ lng?: Translations;
281
+ }
282
+ declare const initializeI18n: ({ resources, lng, }: InitializeI18n) => void;
279
283
 
280
284
  type PaginationButtonProps = {
281
285
  className?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lecom-ui",
3
- "version": "3.9.7",
3
+ "version": "3.9.9",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "module": "dist/index.js",