@next-core/i18n 1.0.91 → 1.0.93

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/cjs/index.js CHANGED
@@ -33,5 +33,5 @@ Object.keys(_text).forEach(function (key) {
33
33
  }
34
34
  });
35
35
  });
36
- const i18n = exports.i18n = process.env.NODE_ENV === "test" ? _i18next.default : /* istanbul ignore next */_i18next.default.default;
36
+ const i18n = exports.i18n = process.env.NODE_ENV === "test" ? _i18next.default : /* istanbul ignore next */_i18next.default.default || _i18next.default;
37
37
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_i18next","_interopRequireDefault","require","_init","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_text","i18n","process","env","NODE_ENV","i18next","default"],"sources":["../../src/index.ts"],"sourcesContent":["import i18next, { i18n as I18n } from \"i18next\";\n\nexport const i18n: I18n =\n process.env.NODE_ENV === \"test\"\n ? (i18next as unknown as typeof i18next.default)\n : /* istanbul ignore next */ i18next.default;\n\nexport * from \"./init.js\";\nexport * from \"./text.js\";\n"],"mappings":";;;;;;;;;;AAAA,IAAAA,QAAA,GAAAC,sBAAA,CAAAC,OAAA;AAOA,IAAAC,KAAA,GAAAD,OAAA;AAAAE,MAAA,CAAAC,IAAA,CAAAF,KAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAJ,KAAA,CAAAI,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAZ,KAAA,CAAAI,GAAA;IAAA;EAAA;AAAA;AACA,IAAAS,KAAA,GAAAd,OAAA;AAAAE,MAAA,CAAAC,IAAA,CAAAW,KAAA,EAAAV,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAS,KAAA,CAAAT,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,KAAA,CAAAT,GAAA;IAAA;EAAA;AAAA;AANO,MAAMU,IAAU,GAAAL,OAAA,CAAAK,IAAA,GACrBC,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,MAAM,GAC1BC,gBAAO,GACR,0BAA2BA,gBAAO,CAACC,OAAO","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["_i18next","_interopRequireDefault","require","_init","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_text","i18n","process","env","NODE_ENV","i18next","default"],"sources":["../../src/index.ts"],"sourcesContent":["import i18next, { i18n as I18n } from \"i18next\";\n\ndeclare module \"i18next\" {\n interface CustomTypeOptions {\n returnNull: false;\n }\n}\n\nexport const i18n: I18n =\n process.env.NODE_ENV === \"test\"\n ? (i18next as unknown as typeof i18next.default)\n : /* istanbul ignore next */ i18next.default || i18next;\n\nexport * from \"./init.js\";\nexport * from \"./text.js\";\n"],"mappings":";;;;;;;;;;AAAA,IAAAA,QAAA,GAAAC,sBAAA,CAAAC,OAAA;AAaA,IAAAC,KAAA,GAAAD,OAAA;AAAAE,MAAA,CAAAC,IAAA,CAAAF,KAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAJ,KAAA,CAAAI,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAZ,KAAA,CAAAI,GAAA;IAAA;EAAA;AAAA;AACA,IAAAS,KAAA,GAAAd,OAAA;AAAAE,MAAA,CAAAC,IAAA,CAAAW,KAAA,EAAAV,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAS,KAAA,CAAAT,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,KAAA,CAAAT,GAAA;IAAA;EAAA;AAAA;AANO,MAAMU,IAAU,GAAAL,OAAA,CAAAK,IAAA,GACrBC,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,MAAM,GAC1BC,gBAAO,GACR,0BAA2BA,gBAAO,CAACC,OAAO,IAAID,gBAAO","ignoreList":[]}
package/dist/cjs/init.js CHANGED
@@ -29,6 +29,7 @@ function initializeI18n(NS, locales) {
29
29
  react: {
30
30
  useSuspense: false
31
31
  },
32
+ returnNull: false,
32
33
  compatibilityJSON: "v3",
33
34
  resources: {}
34
35
  });
@@ -1 +1 @@
1
- {"version":3,"file":"init.js","names":["_i18n","require","_i18nextBrowserLanguagedetector","_interopRequireDefault","initialized","initializedNamespaces","Set","initializeI18n","NS","locales","i18n","use","process","env","NODE_ENV","LanguageDetector","default","init","fallbackLng","debug","supportedLngs","nonExplicitSupportedLngs","interpolation","escapeValue","react","useSuspense","compatibilityJSON","resources","has","add","lang","Object","entries","addResourceBundle"],"sources":["../../src/init.ts"],"sourcesContent":["import { i18n } from \"@next-core/i18n\";\nimport LanguageDetector from \"i18next-browser-languagedetector\";\n\nlet initialized = false;\nconst initializedNamespaces = new Set<string>();\n\nexport type Locales = Record<string, Record<string, string | undefined>>;\n\nexport function initializeI18n(): void;\nexport function initializeI18n(NS: string, locales: Locales): void;\nexport function initializeI18n(NS?: string, locales?: Locales) {\n if (!initialized) {\n initialized = true;\n i18n\n // learn more: https://github.com/i18next/i18next-xhr-backend\n // .use(Backend)\n // learn more: https://github.com/i18next/i18next-browser-languageDetector\n .use(\n process.env.NODE_ENV === \"test\"\n ? LanguageDetector\n : /* istanbul ignore next */ (\n LanguageDetector as unknown as { default: LanguageDetector }\n ).default\n )\n // for all options read: https://www.i18next.com/overview/configuration-options\n .init({\n fallbackLng: \"zh\",\n debug: process.env.NODE_ENV === \"development\",\n supportedLngs: [\"zh\", \"en\"],\n nonExplicitSupportedLngs: true,\n interpolation: {\n escapeValue: false, // not needed for react as it escapes by default\n },\n react: {\n useSuspense: false,\n },\n compatibilityJSON: \"v3\",\n resources: {},\n });\n }\n\n if (!NS || !locales || initializedNamespaces.has(NS)) {\n return;\n }\n initializedNamespaces.add(NS);\n for (const [lang, resources] of Object.entries(locales)) {\n i18n.addResourceBundle(lang, NS, resources);\n }\n}\n"],"mappings":";;;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,+BAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAIG,WAAW,GAAG,KAAK;AACvB,MAAMC,qBAAqB,GAAG,IAAIC,GAAG,CAAS,CAAC;AAMxC,SAASC,cAAcA,CAACC,EAAW,EAAEC,OAAiB,EAAE;EAC7D,IAAI,CAACL,WAAW,EAAE;IAChBA,WAAW,GAAG,IAAI;IAClBM;IACE;IACA;IACA;IAAA,CACCC,GAAG,CACFC,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,MAAM,GAC3BC,uCAAgB,GAChB,0BACEA,uCAAgB,CAChBC,OACR;IACA;IAAA,CACCC,IAAI,CAAC;MACJC,WAAW,EAAE,IAAI;MACjBC,KAAK,EAAEP,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,aAAa;MAC7CM,aAAa,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC;MAC3BC,wBAAwB,EAAE,IAAI;MAC9BC,aAAa,EAAE;QACbC,WAAW,EAAE,KAAK,CAAE;MACtB,CAAC;MACDC,KAAK,EAAE;QACLC,WAAW,EAAE;MACf,CAAC;MACDC,iBAAiB,EAAE,IAAI;MACvBC,SAAS,EAAE,CAAC;IACd,CAAC,CAAC;EACN;EAEA,IAAI,CAACnB,EAAE,IAAI,CAACC,OAAO,IAAIJ,qBAAqB,CAACuB,GAAG,CAACpB,EAAE,CAAC,EAAE;IACpD;EACF;EACAH,qBAAqB,CAACwB,GAAG,CAACrB,EAAE,CAAC;EAC7B,KAAK,MAAM,CAACsB,IAAI,EAAEH,SAAS,CAAC,IAAII,MAAM,CAACC,OAAO,CAACvB,OAAO,CAAC,EAAE;IACvDC,UAAI,CAACuB,iBAAiB,CAACH,IAAI,EAAEtB,EAAE,EAAEmB,SAAS,CAAC;EAC7C;AACF","ignoreList":[]}
1
+ {"version":3,"file":"init.js","names":["_i18n","require","_i18nextBrowserLanguagedetector","_interopRequireDefault","initialized","initializedNamespaces","Set","initializeI18n","NS","locales","i18n","use","process","env","NODE_ENV","LanguageDetector","default","init","fallbackLng","debug","supportedLngs","nonExplicitSupportedLngs","interpolation","escapeValue","react","useSuspense","returnNull","compatibilityJSON","resources","has","add","lang","Object","entries","addResourceBundle"],"sources":["../../src/init.ts"],"sourcesContent":["import { i18n } from \"@next-core/i18n\";\nimport LanguageDetector from \"i18next-browser-languagedetector\";\n\nlet initialized = false;\nconst initializedNamespaces = new Set<string>();\n\nexport type Locales = Record<string, Record<string, string | undefined>>;\n\nexport function initializeI18n(): void;\nexport function initializeI18n(NS: string, locales: Locales): void;\nexport function initializeI18n(NS?: string, locales?: Locales) {\n if (!initialized) {\n initialized = true;\n i18n\n // learn more: https://github.com/i18next/i18next-xhr-backend\n // .use(Backend)\n // learn more: https://github.com/i18next/i18next-browser-languageDetector\n .use(\n process.env.NODE_ENV === \"test\"\n ? LanguageDetector\n : /* istanbul ignore next */ (\n LanguageDetector as unknown as { default: LanguageDetector }\n ).default\n )\n // for all options read: https://www.i18next.com/overview/configuration-options\n .init({\n fallbackLng: \"zh\",\n debug: process.env.NODE_ENV === \"development\",\n supportedLngs: [\"zh\", \"en\"],\n nonExplicitSupportedLngs: true,\n interpolation: {\n escapeValue: false, // not needed for react as it escapes by default\n },\n react: {\n useSuspense: false,\n },\n returnNull: false,\n compatibilityJSON: \"v3\",\n resources: {},\n });\n }\n\n if (!NS || !locales || initializedNamespaces.has(NS)) {\n return;\n }\n initializedNamespaces.add(NS);\n for (const [lang, resources] of Object.entries(locales)) {\n i18n.addResourceBundle(lang, NS, resources);\n }\n}\n"],"mappings":";;;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,+BAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAIG,WAAW,GAAG,KAAK;AACvB,MAAMC,qBAAqB,GAAG,IAAIC,GAAG,CAAS,CAAC;AAMxC,SAASC,cAAcA,CAACC,EAAW,EAAEC,OAAiB,EAAE;EAC7D,IAAI,CAACL,WAAW,EAAE;IAChBA,WAAW,GAAG,IAAI;IAClBM;IACE;IACA;IACA;IAAA,CACCC,GAAG,CACFC,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,MAAM,GAC3BC,uCAAgB,GAChB,0BACEA,uCAAgB,CAChBC,OACR;IACA;IAAA,CACCC,IAAI,CAAC;MACJC,WAAW,EAAE,IAAI;MACjBC,KAAK,EAAEP,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,aAAa;MAC7CM,aAAa,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC;MAC3BC,wBAAwB,EAAE,IAAI;MAC9BC,aAAa,EAAE;QACbC,WAAW,EAAE,KAAK,CAAE;MACtB,CAAC;MACDC,KAAK,EAAE;QACLC,WAAW,EAAE;MACf,CAAC;MACDC,UAAU,EAAE,KAAK;MACjBC,iBAAiB,EAAE,IAAI;MACvBC,SAAS,EAAE,CAAC;IACd,CAAC,CAAC;EACN;EAEA,IAAI,CAACpB,EAAE,IAAI,CAACC,OAAO,IAAIJ,qBAAqB,CAACwB,GAAG,CAACrB,EAAE,CAAC,EAAE;IACpD;EACF;EACAH,qBAAqB,CAACyB,GAAG,CAACtB,EAAE,CAAC;EAC7B,KAAK,MAAM,CAACuB,IAAI,EAAEH,SAAS,CAAC,IAAII,MAAM,CAACC,OAAO,CAACxB,OAAO,CAAC,EAAE;IACvDC,UAAI,CAACwB,iBAAiB,CAACH,IAAI,EAAEvB,EAAE,EAAEoB,SAAS,CAAC;EAC7C;AACF","ignoreList":[]}
package/dist/esm/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import i18next from "i18next";
2
- export const i18n = process.env.NODE_ENV === "test" ? i18next : /* istanbul ignore next */i18next.default;
2
+ export const i18n = process.env.NODE_ENV === "test" ? i18next : /* istanbul ignore next */i18next.default || i18next;
3
3
  export * from "./init.js";
4
4
  export * from "./text.js";
5
5
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["i18next","i18n","process","env","NODE_ENV","default"],"sources":["../../src/index.ts"],"sourcesContent":["import i18next, { i18n as I18n } from \"i18next\";\n\nexport const i18n: I18n =\n process.env.NODE_ENV === \"test\"\n ? (i18next as unknown as typeof i18next.default)\n : /* istanbul ignore next */ i18next.default;\n\nexport * from \"./init.js\";\nexport * from \"./text.js\";\n"],"mappings":"AAAA,OAAOA,OAAO,MAAwB,SAAS;AAE/C,OAAO,MAAMC,IAAU,GACrBC,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,MAAM,GAC1BJ,OAAO,GACR,0BAA2BA,OAAO,CAACK,OAAO;AAEhD,cAAc,WAAW;AACzB,cAAc,WAAW","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["i18next","i18n","process","env","NODE_ENV","default"],"sources":["../../src/index.ts"],"sourcesContent":["import i18next, { i18n as I18n } from \"i18next\";\n\ndeclare module \"i18next\" {\n interface CustomTypeOptions {\n returnNull: false;\n }\n}\n\nexport const i18n: I18n =\n process.env.NODE_ENV === \"test\"\n ? (i18next as unknown as typeof i18next.default)\n : /* istanbul ignore next */ i18next.default || i18next;\n\nexport * from \"./init.js\";\nexport * from \"./text.js\";\n"],"mappings":"AAAA,OAAOA,OAAO,MAAwB,SAAS;AAQ/C,OAAO,MAAMC,IAAU,GACrBC,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,MAAM,GAC1BJ,OAAO,GACR,0BAA2BA,OAAO,CAACK,OAAO,IAAIL,OAAO;AAE3D,cAAc,WAAW;AACzB,cAAc,WAAW","ignoreList":[]}
package/dist/esm/init.js CHANGED
@@ -22,6 +22,7 @@ export function initializeI18n(NS, locales) {
22
22
  react: {
23
23
  useSuspense: false
24
24
  },
25
+ returnNull: false,
25
26
  compatibilityJSON: "v3",
26
27
  resources: {}
27
28
  });
@@ -1 +1 @@
1
- {"version":3,"file":"init.js","names":["i18n","LanguageDetector","initialized","initializedNamespaces","Set","initializeI18n","NS","locales","use","process","env","NODE_ENV","default","init","fallbackLng","debug","supportedLngs","nonExplicitSupportedLngs","interpolation","escapeValue","react","useSuspense","compatibilityJSON","resources","has","add","lang","Object","entries","addResourceBundle"],"sources":["../../src/init.ts"],"sourcesContent":["import { i18n } from \"@next-core/i18n\";\nimport LanguageDetector from \"i18next-browser-languagedetector\";\n\nlet initialized = false;\nconst initializedNamespaces = new Set<string>();\n\nexport type Locales = Record<string, Record<string, string | undefined>>;\n\nexport function initializeI18n(): void;\nexport function initializeI18n(NS: string, locales: Locales): void;\nexport function initializeI18n(NS?: string, locales?: Locales) {\n if (!initialized) {\n initialized = true;\n i18n\n // learn more: https://github.com/i18next/i18next-xhr-backend\n // .use(Backend)\n // learn more: https://github.com/i18next/i18next-browser-languageDetector\n .use(\n process.env.NODE_ENV === \"test\"\n ? LanguageDetector\n : /* istanbul ignore next */ (\n LanguageDetector as unknown as { default: LanguageDetector }\n ).default\n )\n // for all options read: https://www.i18next.com/overview/configuration-options\n .init({\n fallbackLng: \"zh\",\n debug: process.env.NODE_ENV === \"development\",\n supportedLngs: [\"zh\", \"en\"],\n nonExplicitSupportedLngs: true,\n interpolation: {\n escapeValue: false, // not needed for react as it escapes by default\n },\n react: {\n useSuspense: false,\n },\n compatibilityJSON: \"v3\",\n resources: {},\n });\n }\n\n if (!NS || !locales || initializedNamespaces.has(NS)) {\n return;\n }\n initializedNamespaces.add(NS);\n for (const [lang, resources] of Object.entries(locales)) {\n i18n.addResourceBundle(lang, NS, resources);\n }\n}\n"],"mappings":"AAAA,SAASA,IAAI,QAAQ,iBAAiB;AACtC,OAAOC,gBAAgB,MAAM,kCAAkC;AAE/D,IAAIC,WAAW,GAAG,KAAK;AACvB,MAAMC,qBAAqB,GAAG,IAAIC,GAAG,CAAS,CAAC;AAM/C,OAAO,SAASC,cAAcA,CAACC,EAAW,EAAEC,OAAiB,EAAE;EAC7D,IAAI,CAACL,WAAW,EAAE;IAChBA,WAAW,GAAG,IAAI;IAClBF;IACE;IACA;IACA;IAAA,CACCQ,GAAG,CACFC,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,MAAM,GAC3BV,gBAAgB,GAChB,0BACEA,gBAAgB,CAChBW,OACR;IACA;IAAA,CACCC,IAAI,CAAC;MACJC,WAAW,EAAE,IAAI;MACjBC,KAAK,EAAEN,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,aAAa;MAC7CK,aAAa,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC;MAC3BC,wBAAwB,EAAE,IAAI;MAC9BC,aAAa,EAAE;QACbC,WAAW,EAAE,KAAK,CAAE;MACtB,CAAC;MACDC,KAAK,EAAE;QACLC,WAAW,EAAE;MACf,CAAC;MACDC,iBAAiB,EAAE,IAAI;MACvBC,SAAS,EAAE,CAAC;IACd,CAAC,CAAC;EACN;EAEA,IAAI,CAACjB,EAAE,IAAI,CAACC,OAAO,IAAIJ,qBAAqB,CAACqB,GAAG,CAAClB,EAAE,CAAC,EAAE;IACpD;EACF;EACAH,qBAAqB,CAACsB,GAAG,CAACnB,EAAE,CAAC;EAC7B,KAAK,MAAM,CAACoB,IAAI,EAAEH,SAAS,CAAC,IAAII,MAAM,CAACC,OAAO,CAACrB,OAAO,CAAC,EAAE;IACvDP,IAAI,CAAC6B,iBAAiB,CAACH,IAAI,EAAEpB,EAAE,EAAEiB,SAAS,CAAC;EAC7C;AACF","ignoreList":[]}
1
+ {"version":3,"file":"init.js","names":["i18n","LanguageDetector","initialized","initializedNamespaces","Set","initializeI18n","NS","locales","use","process","env","NODE_ENV","default","init","fallbackLng","debug","supportedLngs","nonExplicitSupportedLngs","interpolation","escapeValue","react","useSuspense","returnNull","compatibilityJSON","resources","has","add","lang","Object","entries","addResourceBundle"],"sources":["../../src/init.ts"],"sourcesContent":["import { i18n } from \"@next-core/i18n\";\nimport LanguageDetector from \"i18next-browser-languagedetector\";\n\nlet initialized = false;\nconst initializedNamespaces = new Set<string>();\n\nexport type Locales = Record<string, Record<string, string | undefined>>;\n\nexport function initializeI18n(): void;\nexport function initializeI18n(NS: string, locales: Locales): void;\nexport function initializeI18n(NS?: string, locales?: Locales) {\n if (!initialized) {\n initialized = true;\n i18n\n // learn more: https://github.com/i18next/i18next-xhr-backend\n // .use(Backend)\n // learn more: https://github.com/i18next/i18next-browser-languageDetector\n .use(\n process.env.NODE_ENV === \"test\"\n ? LanguageDetector\n : /* istanbul ignore next */ (\n LanguageDetector as unknown as { default: LanguageDetector }\n ).default\n )\n // for all options read: https://www.i18next.com/overview/configuration-options\n .init({\n fallbackLng: \"zh\",\n debug: process.env.NODE_ENV === \"development\",\n supportedLngs: [\"zh\", \"en\"],\n nonExplicitSupportedLngs: true,\n interpolation: {\n escapeValue: false, // not needed for react as it escapes by default\n },\n react: {\n useSuspense: false,\n },\n returnNull: false,\n compatibilityJSON: \"v3\",\n resources: {},\n });\n }\n\n if (!NS || !locales || initializedNamespaces.has(NS)) {\n return;\n }\n initializedNamespaces.add(NS);\n for (const [lang, resources] of Object.entries(locales)) {\n i18n.addResourceBundle(lang, NS, resources);\n }\n}\n"],"mappings":"AAAA,SAASA,IAAI,QAAQ,iBAAiB;AACtC,OAAOC,gBAAgB,MAAM,kCAAkC;AAE/D,IAAIC,WAAW,GAAG,KAAK;AACvB,MAAMC,qBAAqB,GAAG,IAAIC,GAAG,CAAS,CAAC;AAM/C,OAAO,SAASC,cAAcA,CAACC,EAAW,EAAEC,OAAiB,EAAE;EAC7D,IAAI,CAACL,WAAW,EAAE;IAChBA,WAAW,GAAG,IAAI;IAClBF;IACE;IACA;IACA;IAAA,CACCQ,GAAG,CACFC,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,MAAM,GAC3BV,gBAAgB,GAChB,0BACEA,gBAAgB,CAChBW,OACR;IACA;IAAA,CACCC,IAAI,CAAC;MACJC,WAAW,EAAE,IAAI;MACjBC,KAAK,EAAEN,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,aAAa;MAC7CK,aAAa,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC;MAC3BC,wBAAwB,EAAE,IAAI;MAC9BC,aAAa,EAAE;QACbC,WAAW,EAAE,KAAK,CAAE;MACtB,CAAC;MACDC,KAAK,EAAE;QACLC,WAAW,EAAE;MACf,CAAC;MACDC,UAAU,EAAE,KAAK;MACjBC,iBAAiB,EAAE,IAAI;MACvBC,SAAS,EAAE,CAAC;IACd,CAAC,CAAC;EACN;EAEA,IAAI,CAAClB,EAAE,IAAI,CAACC,OAAO,IAAIJ,qBAAqB,CAACsB,GAAG,CAACnB,EAAE,CAAC,EAAE;IACpD;EACF;EACAH,qBAAqB,CAACuB,GAAG,CAACpB,EAAE,CAAC;EAC7B,KAAK,MAAM,CAACqB,IAAI,EAAEH,SAAS,CAAC,IAAII,MAAM,CAACC,OAAO,CAACtB,OAAO,CAAC,EAAE;IACvDP,IAAI,CAAC8B,iBAAiB,CAACH,IAAI,EAAErB,EAAE,EAAEkB,SAAS,CAAC;EAC7C;AACF","ignoreList":[]}
@@ -1,4 +1,9 @@
1
1
  import { i18n as I18n } from "i18next";
2
+ declare module "i18next" {
3
+ interface CustomTypeOptions {
4
+ returnNull: false;
5
+ }
6
+ }
2
7
  export declare const i18n: I18n;
3
8
  export * from "./init.js";
4
9
  export * from "./text.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@next-core/i18n",
3
- "version": "1.0.91",
3
+ "version": "1.0.93",
4
4
  "homepage": "https://github.com/easyops-cn/next-core/tree/v3/packages/i18n",
5
5
  "license": "GPL-3.0",
6
6
  "repository": {
@@ -58,5 +58,5 @@
58
58
  "optional": true
59
59
  }
60
60
  },
61
- "gitHead": "6f770693e9786f976e05509b9cba8e993a5f97f1"
61
+ "gitHead": "856db0fc12d1dcc0ea45f4ba308af2a7d6398676"
62
62
  }