@object-ui/i18n 3.3.0 → 3.3.2

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 (53) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/README.md +21 -1
  3. package/dist/i18n.js +10 -1
  4. package/dist/locales/ar.d.ts +58 -0
  5. package/dist/locales/ar.js +58 -0
  6. package/dist/locales/de.d.ts +58 -0
  7. package/dist/locales/de.js +58 -0
  8. package/dist/locales/en.d.ts +78 -0
  9. package/dist/locales/en.js +78 -0
  10. package/dist/locales/es.d.ts +58 -0
  11. package/dist/locales/es.js +58 -0
  12. package/dist/locales/fr.d.ts +58 -0
  13. package/dist/locales/fr.js +58 -0
  14. package/dist/locales/index.d.ts +620 -0
  15. package/dist/locales/ja.d.ts +58 -0
  16. package/dist/locales/ja.js +58 -0
  17. package/dist/locales/ko.d.ts +58 -0
  18. package/dist/locales/ko.js +58 -0
  19. package/dist/locales/pt.d.ts +58 -0
  20. package/dist/locales/pt.js +58 -0
  21. package/dist/locales/ru.d.ts +58 -0
  22. package/dist/locales/ru.js +58 -0
  23. package/dist/locales/zh.d.ts +78 -0
  24. package/dist/locales/zh.js +78 -0
  25. package/dist/useObjectLabel.d.ts +46 -0
  26. package/dist/useObjectLabel.js +79 -12
  27. package/package.json +30 -7
  28. package/.turbo/turbo-build.log +0 -4
  29. package/src/__tests__/i18n.test.ts +0 -255
  30. package/src/__tests__/provider.test.tsx +0 -117
  31. package/src/__tests__/spec-formatters.test.ts +0 -208
  32. package/src/__tests__/useObjectLabel.test.tsx +0 -131
  33. package/src/i18n.ts +0 -98
  34. package/src/index.ts +0 -81
  35. package/src/locales/ar.ts +0 -742
  36. package/src/locales/de.ts +0 -755
  37. package/src/locales/en.ts +0 -836
  38. package/src/locales/es.ts +0 -741
  39. package/src/locales/fr.ts +0 -755
  40. package/src/locales/index.ts +0 -42
  41. package/src/locales/ja.ts +0 -752
  42. package/src/locales/ko.ts +0 -741
  43. package/src/locales/pt.ts +0 -741
  44. package/src/locales/ru.ts +0 -761
  45. package/src/locales/zh.ts +0 -835
  46. package/src/provider.tsx +0 -177
  47. package/src/useObjectLabel.ts +0 -122
  48. package/src/useSafeTranslation.ts +0 -49
  49. package/src/utils/formatting.ts +0 -136
  50. package/src/utils/index.ts +0 -21
  51. package/src/utils/spec-formatters.ts +0 -220
  52. package/tsconfig.json +0 -12
  53. package/tsconfig.tsbuildinfo +0 -1
@@ -1,42 +0,0 @@
1
- /**
2
- * @object-ui/i18n - Locale index
3
- * Exports all 10 built-in language packs
4
- */
5
- export { default as en, type TranslationKeys } from './en';
6
- export { default as zh } from './zh';
7
- export { default as ja } from './ja';
8
- export { default as ko } from './ko';
9
- export { default as de } from './de';
10
- export { default as fr } from './fr';
11
- export { default as es } from './es';
12
- export { default as pt } from './pt';
13
- export { default as ru } from './ru';
14
- export { default as ar } from './ar';
15
-
16
- /**
17
- * Map of all built-in locales keyed by language code
18
- */
19
- import en from './en';
20
- import zh from './zh';
21
- import ja from './ja';
22
- import ko from './ko';
23
- import de from './de';
24
- import fr from './fr';
25
- import es from './es';
26
- import pt from './pt';
27
- import ru from './ru';
28
- import ar from './ar';
29
-
30
- export const builtInLocales = { en, zh, ja, ko, de, fr, es, pt, ru, ar } as const;
31
-
32
- /**
33
- * List of RTL language codes
34
- */
35
- export const RTL_LANGUAGES = ['ar', 'he', 'fa', 'ur'] as const;
36
-
37
- /**
38
- * Check if a language code is RTL
39
- */
40
- export function isRTL(lang: string): boolean {
41
- return (RTL_LANGUAGES as readonly string[]).includes(lang);
42
- }