@strapi/i18n 5.4.2 → 5.5.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.
@@ -13,13 +13,20 @@ import { useParams, Link, useNavigate, matchPath } from "react-router-dom";
13
13
  import * as qs from "qs";
14
14
  import { stringify } from "qs";
15
15
  import omit from "lodash/omit";
16
- const __variableDynamicImportRuntimeHelper = (glob, path) => {
16
+ const __variableDynamicImportRuntimeHelper = (glob, path, segs) => {
17
17
  const v = glob[path];
18
18
  if (v) {
19
19
  return typeof v === "function" ? v() : Promise.resolve(v);
20
20
  }
21
21
  return new Promise((_, reject) => {
22
- (typeof queueMicrotask === "function" ? queueMicrotask : setTimeout)(reject.bind(null, new Error("Unknown variable dynamic import: " + path)));
22
+ (typeof queueMicrotask === "function" ? queueMicrotask : setTimeout)(
23
+ reject.bind(
24
+ null,
25
+ new Error(
26
+ "Unknown variable dynamic import: " + path + (path.split("/").length !== segs ? ". Note that variables only represent file names one level deep." : "")
27
+ )
28
+ )
29
+ );
23
30
  });
24
31
  };
25
32
  const pluginId = "i18n";
@@ -1469,7 +1476,7 @@ const index = {
1469
1476
  },
1470
1477
  id: "internationalization",
1471
1478
  to: "internationalization",
1472
- Component: () => import("./SettingsPage-giNp3Ftr.mjs").then((mod) => ({ default: mod.ProtectedSettingsPage })),
1479
+ Component: () => import("./SettingsPage-BAx9nmep.mjs").then((mod) => ({ default: mod.ProtectedSettingsPage })),
1473
1480
  permissions: PERMISSIONS.accessMain
1474
1481
  });
1475
1482
  const contentManager = app.getPlugin("content-manager");
@@ -1587,7 +1594,7 @@ const index = {
1587
1594
  async registerTrads({ locales }) {
1588
1595
  const importedTrads = await Promise.all(
1589
1596
  locales.map((locale) => {
1590
- return __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./translations/de.json": () => import("./de-9eCAqqrB.mjs"), "./translations/dk.json": () => import("./dk-2qBjxt-P.mjs"), "./translations/en.json": () => import("./en-DlXfy6Gy.mjs"), "./translations/es.json": () => import("./es-DlmMVaBG.mjs"), "./translations/fr.json": () => import("./fr-3S6ke71d.mjs"), "./translations/ko.json": () => import("./ko-qTjQ8IMw.mjs"), "./translations/pl.json": () => import("./pl-B67TSHqT.mjs"), "./translations/ru.json": () => import("./ru-hagMa57T.mjs"), "./translations/tr.json": () => import("./tr-Dw_jmkG-.mjs"), "./translations/zh-Hans.json": () => import("./zh-Hans-Dyc-aR-h.mjs"), "./translations/zh.json": () => import("./zh-57YM4amO.mjs") }), `./translations/${locale}.json`).then(({ default: data }) => {
1597
+ return __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./translations/de.json": () => import("./de-9eCAqqrB.mjs"), "./translations/dk.json": () => import("./dk-2qBjxt-P.mjs"), "./translations/en.json": () => import("./en-DlXfy6Gy.mjs"), "./translations/es.json": () => import("./es-DlmMVaBG.mjs"), "./translations/fr.json": () => import("./fr-3S6ke71d.mjs"), "./translations/ko.json": () => import("./ko-qTjQ8IMw.mjs"), "./translations/pl.json": () => import("./pl-B67TSHqT.mjs"), "./translations/ru.json": () => import("./ru-hagMa57T.mjs"), "./translations/tr.json": () => import("./tr-Dw_jmkG-.mjs"), "./translations/zh-Hans.json": () => import("./zh-Hans-Dyc-aR-h.mjs"), "./translations/zh.json": () => import("./zh-57YM4amO.mjs") }), `./translations/${locale}.json`, 3).then(({ default: data }) => {
1591
1598
  return {
1592
1599
  data: prefixPluginTranslations(data, pluginId),
1593
1600
  locale
@@ -1613,4 +1620,4 @@ export {
1613
1620
  index as i,
1614
1621
  useCreateLocaleMutation as u
1615
1622
  };
1616
- //# sourceMappingURL=index-Bt5ork2g.mjs.map
1623
+ //# sourceMappingURL=index-B0NijiBB.mjs.map