@docx-editor.dev/i18n 2.38.0-canary.20261115032819.sha-05856f6 → 2.38.0
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/README.md +3 -2
- package/dist/index.d.mts +4 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.js +1446 -0
- package/dist/index.mjs +1445 -0
- package/dist/it.d.mts +33 -0
- package/dist/it.d.ts +33 -0
- package/dist/it.js +1476 -0
- package/dist/it.mjs +1449 -0
- package/package.json +6 -1
package/README.md
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
|
|
19
19
|
# @docx-editor.dev/i18n
|
|
20
20
|
|
|
21
|
-
Translate [docx-editor.dev](https://docx-editor.dev) controls with locale strings, types, and runtime helpers. The package provides
|
|
21
|
+
Translate [docx-editor.dev](https://docx-editor.dev) controls with locale strings, types, and runtime helpers. The package provides 15 languages and falls back to English for missing translations.
|
|
22
22
|
|
|
23
23
|
## Quick start
|
|
24
24
|
|
|
@@ -83,6 +83,7 @@ For custom translations, set `_dir: 'rtl'` in your catalog or pass `dir="rtl"` t
|
|
|
83
83
|
| `he` | `he` | Hebrew |
|
|
84
84
|
| `hi` | `hi` | Hindi |
|
|
85
85
|
| `id` | `id` | Indonesian |
|
|
86
|
+
| `it` | `it` | Italian |
|
|
86
87
|
| `ja` | `ja` | Japanese |
|
|
87
88
|
| `pl` | `pl` | Polish |
|
|
88
89
|
| `pt-BR` | `ptBR` | Portuguese (Brazil) |
|
|
@@ -117,7 +118,7 @@ For on-demand loading, use a dynamic import instead:
|
|
|
117
118
|
const pl = (await import('@docx-editor.dev/i18n/pl')).default;
|
|
118
119
|
```
|
|
119
120
|
|
|
120
|
-
Subpaths ship for every locale: `/en`, `/ar`, `/de`, `/es`, `/fr`, `/he`, `/hi`, `/id`, `/ja`, `/pl`, `/pt-BR`, `/tr`, `/zh-CN`. Each also exports its locale as a named binding (`import { pl } from '@docx-editor.dev/i18n/pl'`) for callers that prefer non-default imports.
|
|
121
|
+
Subpaths ship for every locale: `/en`, `/ar`, `/de`, `/es`, `/fr`, `/he`, `/hi`, `/id`, `/it`, `/ja`, `/pl`, `/pt-BR`, `/ru`, `/tr`, `/zh-CN`. Each also exports its locale as a named binding (`import { pl } from '@docx-editor.dev/i18n/pl'`) for callers that prefer non-default imports.
|
|
121
122
|
|
|
122
123
|
## Types
|
|
123
124
|
|
package/dist/index.d.mts
CHANGED
|
@@ -1586,7 +1586,7 @@ type LocaleStrings = typeof enJson;
|
|
|
1586
1586
|
*
|
|
1587
1587
|
* @public
|
|
1588
1588
|
*/
|
|
1589
|
-
type LocaleCode = 'en' | 'ar' | 'de' | 'es' | 'fr' | 'he' | 'hi' | 'id' | 'ja' | 'pl' | 'pt-BR' | 'ru' | 'tr' | 'zh-CN';
|
|
1589
|
+
type LocaleCode = 'en' | 'ar' | 'de' | 'es' | 'fr' | 'he' | 'hi' | 'id' | 'it' | 'ja' | 'pl' | 'pt-BR' | 'ru' | 'tr' | 'zh-CN';
|
|
1590
1590
|
/** English (`en`) — the source of truth, 100% covered. @public */
|
|
1591
1591
|
declare const en: LocaleStrings;
|
|
1592
1592
|
/** Arabic (`ar`). Community-maintained; null leaves fall back to English. @public */
|
|
@@ -1603,6 +1603,8 @@ declare const he: PartialLocaleStrings;
|
|
|
1603
1603
|
declare const hi: PartialLocaleStrings;
|
|
1604
1604
|
/** Indonesian (`id`). Community-maintained; null leaves fall back to English. @public */
|
|
1605
1605
|
declare const id: PartialLocaleStrings;
|
|
1606
|
+
/** Italian (`it`). Community-maintained; null leaves fall back to English. @public */
|
|
1607
|
+
declare const it: PartialLocaleStrings;
|
|
1606
1608
|
/** Japanese (`ja`). Community-maintained; null leaves fall back to English. @public */
|
|
1607
1609
|
declare const ja: PartialLocaleStrings;
|
|
1608
1610
|
/** Polish (`pl`). Community-maintained; null leaves fall back to English. @public */
|
|
@@ -1721,5 +1723,5 @@ type TFunction = (key: TranslationKey, vars?: Record<string, string | number>) =
|
|
|
1721
1723
|
*/
|
|
1722
1724
|
declare function createT(strings: LocaleStrings, lang?: string): TFunction;
|
|
1723
1725
|
|
|
1724
|
-
export { ar, catalogDirection, chromeDirection, createT, de, deepMerge, en, es, fr, he, hi, id, isApplePlatform, ja, localeDirection, locales, localizeDisabledReason, pl, platformShortcut, ptBR, ru, tr, zhCN };
|
|
1726
|
+
export { ar, catalogDirection, chromeDirection, createT, de, deepMerge, en, es, fr, he, hi, id, isApplePlatform, it, ja, localeDirection, locales, localizeDisabledReason, pl, platformShortcut, ptBR, ru, tr, zhCN };
|
|
1725
1727
|
export type { DeepPartial, LocaleCode, LocaleStrings, PartialLocaleStrings, TFunction, TranslationKey, Translations };
|
package/dist/index.d.ts
CHANGED
|
@@ -1586,7 +1586,7 @@ type LocaleStrings = typeof enJson;
|
|
|
1586
1586
|
*
|
|
1587
1587
|
* @public
|
|
1588
1588
|
*/
|
|
1589
|
-
type LocaleCode = 'en' | 'ar' | 'de' | 'es' | 'fr' | 'he' | 'hi' | 'id' | 'ja' | 'pl' | 'pt-BR' | 'ru' | 'tr' | 'zh-CN';
|
|
1589
|
+
type LocaleCode = 'en' | 'ar' | 'de' | 'es' | 'fr' | 'he' | 'hi' | 'id' | 'it' | 'ja' | 'pl' | 'pt-BR' | 'ru' | 'tr' | 'zh-CN';
|
|
1590
1590
|
/** English (`en`) — the source of truth, 100% covered. @public */
|
|
1591
1591
|
declare const en: LocaleStrings;
|
|
1592
1592
|
/** Arabic (`ar`). Community-maintained; null leaves fall back to English. @public */
|
|
@@ -1603,6 +1603,8 @@ declare const he: PartialLocaleStrings;
|
|
|
1603
1603
|
declare const hi: PartialLocaleStrings;
|
|
1604
1604
|
/** Indonesian (`id`). Community-maintained; null leaves fall back to English. @public */
|
|
1605
1605
|
declare const id: PartialLocaleStrings;
|
|
1606
|
+
/** Italian (`it`). Community-maintained; null leaves fall back to English. @public */
|
|
1607
|
+
declare const it: PartialLocaleStrings;
|
|
1606
1608
|
/** Japanese (`ja`). Community-maintained; null leaves fall back to English. @public */
|
|
1607
1609
|
declare const ja: PartialLocaleStrings;
|
|
1608
1610
|
/** Polish (`pl`). Community-maintained; null leaves fall back to English. @public */
|
|
@@ -1721,5 +1723,5 @@ type TFunction = (key: TranslationKey, vars?: Record<string, string | number>) =
|
|
|
1721
1723
|
*/
|
|
1722
1724
|
declare function createT(strings: LocaleStrings, lang?: string): TFunction;
|
|
1723
1725
|
|
|
1724
|
-
export { ar, catalogDirection, chromeDirection, createT, de, deepMerge, en, es, fr, he, hi, id, isApplePlatform, ja, localeDirection, locales, localizeDisabledReason, pl, platformShortcut, ptBR, ru, tr, zhCN };
|
|
1726
|
+
export { ar, catalogDirection, chromeDirection, createT, de, deepMerge, en, es, fr, he, hi, id, isApplePlatform, it, ja, localeDirection, locales, localizeDisabledReason, pl, platformShortcut, ptBR, ru, tr, zhCN };
|
|
1725
1727
|
export type { DeepPartial, LocaleCode, LocaleStrings, PartialLocaleStrings, TFunction, TranslationKey, Translations };
|