lecom-ui 3.9.7 → 3.9.8
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/dist/i18n/index.js +12 -2
- package/dist/index.d.ts +5 -1
- package/package.json +1 -1
package/dist/i18n/index.js
CHANGED
|
@@ -24,8 +24,18 @@ if (!i18n.isInitialized) {
|
|
|
24
24
|
console.log("i18n.isInitialized 1");
|
|
25
25
|
i18n.use(initReactI18next).init(i18nConfig);
|
|
26
26
|
}
|
|
27
|
-
const initializeI18n = (
|
|
28
|
-
|
|
27
|
+
const initializeI18n = ({
|
|
28
|
+
resources,
|
|
29
|
+
lng = "pt_BR" /* PT_BR */
|
|
30
|
+
}) => {
|
|
31
|
+
let mappedResources = {};
|
|
32
|
+
if (resources) {
|
|
33
|
+
mappedResources = {
|
|
34
|
+
...i18nConfig.resources,
|
|
35
|
+
resources
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
i18n.use(initReactI18next).init({ ...i18nConfig, ...mappedResources, lng });
|
|
29
39
|
};
|
|
30
40
|
|
|
31
41
|
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
|
-
|
|
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;
|