@strapi/i18n 0.0.0-next.965570e6e12a33ad098ddb3174a9750fddb03be2 → 0.0.0-next.96a532b33a712f19b498ed0a82a84752247cd899

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.
Files changed (111) hide show
  1. package/dist/admin/components/CMHeaderActions.js +116 -1
  2. package/dist/admin/components/CMHeaderActions.js.map +1 -1
  3. package/dist/admin/components/CMHeaderActions.mjs +119 -5
  4. package/dist/admin/components/CMHeaderActions.mjs.map +1 -1
  5. package/dist/admin/components/CreateLocale.js +1 -1
  6. package/dist/admin/components/CreateLocale.js.map +1 -1
  7. package/dist/admin/components/CreateLocale.mjs +1 -1
  8. package/dist/admin/components/CreateLocale.mjs.map +1 -1
  9. package/dist/admin/components/EditLocale.js +1 -1
  10. package/dist/admin/components/EditLocale.js.map +1 -1
  11. package/dist/admin/components/EditLocale.mjs +1 -1
  12. package/dist/admin/components/EditLocale.mjs.map +1 -1
  13. package/dist/admin/components/LocaleListCell.js +65 -45
  14. package/dist/admin/components/LocaleListCell.js.map +1 -1
  15. package/dist/admin/components/LocaleListCell.mjs +66 -46
  16. package/dist/admin/components/LocaleListCell.mjs.map +1 -1
  17. package/dist/admin/components/LocalePicker.js +18 -11
  18. package/dist/admin/components/LocalePicker.js.map +1 -1
  19. package/dist/admin/components/LocalePicker.mjs +19 -12
  20. package/dist/admin/components/LocalePicker.mjs.map +1 -1
  21. package/dist/admin/contentManagerHooks/editView.js +6 -3
  22. package/dist/admin/contentManagerHooks/editView.js.map +1 -1
  23. package/dist/admin/contentManagerHooks/editView.mjs +7 -4
  24. package/dist/admin/contentManagerHooks/editView.mjs.map +1 -1
  25. package/dist/admin/contentManagerHooks/listView.js +2 -1
  26. package/dist/admin/contentManagerHooks/listView.js.map +1 -1
  27. package/dist/admin/contentManagerHooks/listView.mjs +2 -1
  28. package/dist/admin/contentManagerHooks/listView.mjs.map +1 -1
  29. package/dist/admin/index.js +1 -0
  30. package/dist/admin/index.js.map +1 -1
  31. package/dist/admin/index.mjs +2 -1
  32. package/dist/admin/index.mjs.map +1 -1
  33. package/dist/admin/pages/SettingsPage.js +121 -46
  34. package/dist/admin/pages/SettingsPage.js.map +1 -1
  35. package/dist/admin/pages/SettingsPage.mjs +124 -30
  36. package/dist/admin/pages/SettingsPage.mjs.map +1 -1
  37. package/dist/admin/services/api.js +2 -1
  38. package/dist/admin/services/api.js.map +1 -1
  39. package/dist/admin/services/api.mjs +2 -1
  40. package/dist/admin/services/api.mjs.map +1 -1
  41. package/dist/admin/services/settings.js +29 -0
  42. package/dist/admin/services/settings.js.map +1 -0
  43. package/dist/admin/services/settings.mjs +26 -0
  44. package/dist/admin/services/settings.mjs.map +1 -0
  45. package/dist/admin/src/components/CMHeaderActions.d.ts +7 -1
  46. package/dist/admin/src/components/LocaleListCell.d.ts +2 -1
  47. package/dist/admin/src/services/api.d.ts +1 -1
  48. package/dist/admin/src/services/locales.d.ts +1 -1
  49. package/dist/admin/src/services/relations.d.ts +1 -1
  50. package/dist/admin/src/services/settings.d.ts +5 -0
  51. package/dist/admin/translations/en.json.js +7 -0
  52. package/dist/admin/translations/en.json.js.map +1 -1
  53. package/dist/admin/translations/en.json.mjs +7 -0
  54. package/dist/admin/translations/en.json.mjs.map +1 -1
  55. package/dist/admin/utils/clean.js +2 -2
  56. package/dist/admin/utils/clean.js.map +1 -1
  57. package/dist/admin/utils/clean.mjs +2 -2
  58. package/dist/admin/utils/clean.mjs.map +1 -1
  59. package/dist/server/constants/iso-locales.json.js +4 -0
  60. package/dist/server/constants/iso-locales.json.js.map +1 -1
  61. package/dist/server/constants/iso-locales.json.mjs +4 -0
  62. package/dist/server/constants/iso-locales.json.mjs.map +1 -1
  63. package/dist/server/controllers/index.js +3 -1
  64. package/dist/server/controllers/index.js.map +1 -1
  65. package/dist/server/controllers/index.mjs +3 -1
  66. package/dist/server/controllers/index.mjs.map +1 -1
  67. package/dist/server/controllers/settings.js +24 -0
  68. package/dist/server/controllers/settings.js.map +1 -0
  69. package/dist/server/controllers/settings.mjs +22 -0
  70. package/dist/server/controllers/settings.mjs.map +1 -0
  71. package/dist/server/routes/admin.js +20 -0
  72. package/dist/server/routes/admin.js.map +1 -1
  73. package/dist/server/routes/admin.mjs +20 -0
  74. package/dist/server/routes/admin.mjs.map +1 -1
  75. package/dist/server/services/ai-localizations.js +143 -0
  76. package/dist/server/services/ai-localizations.js.map +1 -0
  77. package/dist/server/services/ai-localizations.mjs +141 -0
  78. package/dist/server/services/ai-localizations.mjs.map +1 -0
  79. package/dist/server/services/index.js +5 -1
  80. package/dist/server/services/index.js.map +1 -1
  81. package/dist/server/services/index.mjs +5 -1
  82. package/dist/server/services/index.mjs.map +1 -1
  83. package/dist/server/services/settings.js +25 -0
  84. package/dist/server/services/settings.js.map +1 -0
  85. package/dist/server/services/settings.mjs +23 -0
  86. package/dist/server/services/settings.mjs.map +1 -0
  87. package/dist/server/src/controllers/index.d.ts +4 -0
  88. package/dist/server/src/controllers/index.d.ts.map +1 -1
  89. package/dist/server/src/controllers/settings.d.ts +7 -0
  90. package/dist/server/src/controllers/settings.d.ts.map +1 -0
  91. package/dist/server/src/index.d.ts +23 -0
  92. package/dist/server/src/index.d.ts.map +1 -1
  93. package/dist/server/src/routes/admin.d.ts.map +1 -1
  94. package/dist/server/src/services/ai-localizations.d.ts +17 -0
  95. package/dist/server/src/services/ai-localizations.d.ts.map +1 -0
  96. package/dist/server/src/services/index.d.ts +19 -0
  97. package/dist/server/src/services/index.d.ts.map +1 -1
  98. package/dist/server/src/services/settings.d.ts +13 -0
  99. package/dist/server/src/services/settings.d.ts.map +1 -0
  100. package/dist/server/src/utils/index.d.ts +5 -1
  101. package/dist/server/src/utils/index.d.ts.map +1 -1
  102. package/dist/server/src/validation/settings.d.ts +12 -0
  103. package/dist/server/src/validation/settings.d.ts.map +1 -0
  104. package/dist/server/utils/index.js.map +1 -1
  105. package/dist/server/utils/index.mjs.map +1 -1
  106. package/dist/server/validation/settings.js +11 -0
  107. package/dist/server/validation/settings.js.map +1 -0
  108. package/dist/server/validation/settings.mjs +9 -0
  109. package/dist/server/validation/settings.mjs.map +1 -0
  110. package/dist/shared/contracts/settings.d.ts +40 -0
  111. package/package.json +9 -8
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Used to store user configurations related to i18n.
3
+ * E.g the AI metadata flag for automatic translations.
4
+ */
5
+ import { errors } from '@strapi/utils';
6
+ import type { Utils } from '@strapi/types';
7
+ export interface Settings {
8
+ data: {
9
+ aiLocalizations?: boolean;
10
+ };
11
+ }
12
+ export type SettingsData = Settings['data'];
13
+ /**
14
+ * GET /i18n/settings
15
+ *
16
+ * Return the stored settings for the i18n plugin.
17
+ */
18
+ export declare namespace GetSettings {
19
+ interface Request {
20
+ query?: {};
21
+ }
22
+ interface Response {
23
+ data: Settings;
24
+ }
25
+ }
26
+ /**
27
+ * PUT /i18n/settings
28
+ *
29
+ * Update the stored settings
30
+ */
31
+ export declare namespace UpdateSettings {
32
+ interface Request {
33
+ body: Settings['data'];
34
+ }
35
+ type Response = Utils.OneOf<{
36
+ data: Settings['data'];
37
+ }, {
38
+ error?: errors.ApplicationError | errors.ValidationError;
39
+ }>;
40
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@strapi/i18n",
3
- "version": "0.0.0-next.965570e6e12a33ad098ddb3174a9750fddb03be2",
3
+ "version": "0.0.0-next.96a532b33a712f19b498ed0a82a84752247cd899",
4
4
  "description": "Create read and update content in different languages, both from the Admin Panel and from the API",
5
5
  "repository": {
6
6
  "type": "git",
@@ -57,9 +57,9 @@
57
57
  },
58
58
  "dependencies": {
59
59
  "@reduxjs/toolkit": "1.9.7",
60
- "@strapi/design-system": "2.0.0-rc.29",
61
- "@strapi/icons": "2.0.0-rc.29",
62
- "@strapi/utils": "0.0.0-next.965570e6e12a33ad098ddb3174a9750fddb03be2",
60
+ "@strapi/design-system": "2.0.0-rc.30",
61
+ "@strapi/icons": "2.0.0-rc.30",
62
+ "@strapi/utils": "0.0.0-next.96a532b33a712f19b498ed0a82a84752247cd899",
63
63
  "lodash": "4.17.21",
64
64
  "qs": "6.11.1",
65
65
  "react-intl": "6.6.2",
@@ -68,12 +68,13 @@
68
68
  "zod": "3.25.67"
69
69
  },
70
70
  "devDependencies": {
71
- "@strapi/admin": "0.0.0-next.965570e6e12a33ad098ddb3174a9750fddb03be2",
72
- "@strapi/admin-test-utils": "0.0.0-next.965570e6e12a33ad098ddb3174a9750fddb03be2",
73
- "@strapi/content-manager": "0.0.0-next.965570e6e12a33ad098ddb3174a9750fddb03be2",
74
- "@strapi/types": "0.0.0-next.965570e6e12a33ad098ddb3174a9750fddb03be2",
71
+ "@strapi/admin": "0.0.0-next.96a532b33a712f19b498ed0a82a84752247cd899",
72
+ "@strapi/admin-test-utils": "0.0.0-next.96a532b33a712f19b498ed0a82a84752247cd899",
73
+ "@strapi/content-manager": "0.0.0-next.96a532b33a712f19b498ed0a82a84752247cd899",
74
+ "@strapi/types": "0.0.0-next.96a532b33a712f19b498ed0a82a84752247cd899",
75
75
  "@testing-library/react": "15.0.7",
76
76
  "@testing-library/user-event": "14.5.2",
77
+ "koa": "2.16.1",
77
78
  "msw": "1.3.0",
78
79
  "react": "18.3.1",
79
80
  "react-dom": "18.3.1",