@docx-editor.dev/i18n 2.20.0 → 2.21.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.
package/README.md CHANGED
@@ -16,13 +16,15 @@
16
16
 
17
17
  Locale strings, types, and runtime helpers for the [docx-editor.dev](https://docx-editor.dev) editor chrome. Ten languages, with per-key fallback to English.
18
18
 
19
- ## Quick Start
19
+ ## Quick start
20
+
21
+ Install the locale package:
20
22
 
21
23
  ```bash
22
24
  npm install @docx-editor.dev/i18n
23
25
  ```
24
26
 
25
- Hand the catalog to the editor:
27
+ Pass a locale to the editor. This example requires the React adapter and its engine peer:
26
28
 
27
29
  ```tsx
28
30
  import { DocxEditor } from '@docx-editor.dev/react';
@@ -31,14 +33,13 @@ import { de } from '@docx-editor.dev/i18n';
31
33
  <DocxEditor document={bytes} i18n={de} />;
32
34
  ```
33
35
 
34
- For several editors, or for chrome parts you compose yourself, put it in context once with
35
- `LocaleProvider` instead:
36
+ For several editors, or for chrome parts you compose yourself, put it in context once with `LocaleProvider` instead:
36
37
 
37
38
  ```tsx
38
39
  import { DocxEditor, LocaleProvider } from '@docx-editor.dev/react';
40
+ import { de } from '@docx-editor.dev/i18n';
39
41
 
40
42
  <LocaleProvider i18n={de}>
41
- <DocxEditor.Toolbar />
42
43
  <DocxEditor document={bytes} />
43
44
  </LocaleProvider>;
44
45
  ```
@@ -52,7 +53,7 @@ import { de } from '@docx-editor.dev/i18n';
52
53
 
53
54
  const myLocale = {
54
55
  ...de,
55
- toolbar: { ...de.toolbar, bold: 'Fettdruck' },
56
+ formattingBar: { ...de.formattingBar, bold: 'Fettdruck' },
56
57
  };
57
58
  ```
58
59
 
@@ -60,15 +61,15 @@ Keys set to `null` in any locale fall back to English.
60
61
 
61
62
  ## Packages
62
63
 
63
- | Package | Description |
64
- | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------- |
65
- | [`@docx-editor.dev/react`](https://www.npmjs.com/package/@docx-editor.dev/react) | React adapter. `<DocxEditor>`, provider primitives, hooks, and compound chrome. |
66
- | [`@docx-editor.dev/core`](https://www.npmjs.com/package/@docx-editor.dev/core) | Framework-agnostic engine: OOXML read/write, canonical document tree, layout, paint. |
67
- | [`@docx-editor.dev/i18n`](https://www.npmjs.com/package/@docx-editor.dev/i18n) | Shared locale strings and types. |
68
- | [`@docx-editor.dev/pro`](https://www.npmjs.com/package/@docx-editor.dev/pro) | Tracked changes, comments, and custom nodes. |
69
- | [`@docx-editor.dev/editor-api`](https://www.npmjs.com/package/@docx-editor.dev/editor-api) | Office.js-compatible editing API: a batching object model, on a server or against an open editor. |
64
+ | Package | Description |
65
+ | --- | --- |
66
+ | [`@docx-editor.dev/react`](https://www.npmjs.com/package/@docx-editor.dev/react) | React adapter. `<DocxEditor>`, provider primitives, hooks, and compound chrome. |
67
+ | [`@docx-editor.dev/core`](https://www.npmjs.com/package/@docx-editor.dev/core) | Framework-agnostic engine: OOXML read/write, canonical document tree, layout, paint. |
68
+ | [`@docx-editor.dev/i18n`](https://www.npmjs.com/package/@docx-editor.dev/i18n) | Shared locale strings and types. |
69
+ | [`@docx-editor.dev/pro`](https://www.npmjs.com/package/@docx-editor.dev/pro) | Tracked changes, comments, and custom nodes. |
70
+ | [`@docx-editor.dev/editor-api`](https://www.npmjs.com/package/@docx-editor.dev/editor-api) | A supported subset of the Word Office.js API for server and browser editing. |
70
71
 
71
- > **Forking the adapter?** Keep your fork thin. Depend on `@docx-editor.dev/core` directly so parser, serializer, and rendering fixes land in your build automatically, without backporting each upstream change by hand.
72
+ If you fork an adapter, keep `@docx-editor.dev/core` as a peer dependency to receive engine fixes.
72
73
 
73
74
  ## Available locales
74
75
 
@@ -99,13 +100,16 @@ import { locales } from '@docx-editor.dev/i18n';
99
100
 
100
101
  ## Per-locale subpaths
101
102
 
102
- For apps that pick the locale at runtime, the named exports above don't tree-shake — the bundler can't know which locale wins, so it ships them all. Use the per-locale subpaths instead. Each one bundles a single locale (~30KB) and code-splits cleanly:
103
+ If you choose a locale at runtime, import its subpath to load only that locale. Static imports include it in the bundle. Dynamic imports let the bundler create a separate chunk:
103
104
 
104
105
  ```ts
105
- // Static — bundler ships only this locale's strings
106
+ // Static import: include only this locale's strings.
106
107
  import pl from '@docx-editor.dev/i18n/pl';
108
+ ```
107
109
 
108
- // Dynamic — splits into its own chunk, loaded on demand
110
+ For on-demand loading, use a dynamic import instead:
111
+
112
+ ```ts
109
113
  const pl = (await import('@docx-editor.dev/i18n/pl')).default;
110
114
  ```
111
115
 
@@ -113,6 +117,8 @@ Subpaths ship for every locale: `/en`, `/de`, `/fr`, `/he`, `/hi`, `/id`, `/pl`,
113
117
 
114
118
  ## Types
115
119
 
120
+ Import types to describe locale data and translation functions:
121
+
116
122
  ```ts
117
123
  import type {
118
124
  LocaleStrings, // shape of `en`, the full source of truth
@@ -141,9 +147,8 @@ t('navigation.find.total', { total: 15 }); // ICU plurals
141
147
 
142
148
  ## Contributing
143
149
 
144
- Contributions welcome. See [CONTRIBUTING.md](https://github.com/eigenpal/docx-editor/blob/main/CONTRIBUTING.md) for setup, tests, and the one-time CLA signature.
150
+ To contribute, see [CONTRIBUTING.md](https://github.com/eigenpal/docx-editor/blob/main/CONTRIBUTING.md) for setup, tests, and the one-time CLA signature.
145
151
 
146
- ## Commercial Support
152
+ ## Commercial support
147
153
 
148
- > [!TIP]
149
- > Questions or custom features? Email **[docx-editor@eigenpal.com](mailto:docx-editor@eigenpal.com)**.
154
+ For commercial support or custom features, [email the support team](mailto:docx-editor@eigenpal.com).
package/dist/de.js CHANGED
@@ -620,6 +620,14 @@ var de_default = {
620
620
  start: null,
621
621
  strike: null,
622
622
  underline: null
623
+ },
624
+ structuralDetails: {
625
+ cellDelete: null,
626
+ cellInsert: null,
627
+ cellMerge: null,
628
+ numberingInsert: null,
629
+ rowDelete: null,
630
+ rowInsert: null
623
631
  }
624
632
  },
625
633
  toc: {
@@ -706,7 +714,18 @@ var de_default = {
706
714
  picture: "Bild",
707
715
  plainText: "Nur Text",
708
716
  repeatingSection: "Wiederholungsabschnitt",
709
- richText: "Rich Text"
717
+ richText: "Rich Text",
718
+ buildingBlockGallery: null
719
+ },
720
+ calendar: {
721
+ nextMonth: null,
722
+ previousMonth: null,
723
+ today: null,
724
+ month: null,
725
+ year: null
726
+ },
727
+ gallery: {
728
+ empty: null
710
729
  }
711
730
  },
712
731
  notes: {
@@ -753,7 +772,8 @@ var de_default = {
753
772
  displayForReview: null,
754
773
  noMarkup: null,
755
774
  original: null,
756
- protectDocument: null
775
+ protectDocument: null,
776
+ simpleMarkup: null
757
777
  },
758
778
  imageAltText: {
759
779
  description: "Beschreibung",
package/dist/de.mjs CHANGED
@@ -593,6 +593,14 @@ var de_default = {
593
593
  start: null,
594
594
  strike: null,
595
595
  underline: null
596
+ },
597
+ structuralDetails: {
598
+ cellDelete: null,
599
+ cellInsert: null,
600
+ cellMerge: null,
601
+ numberingInsert: null,
602
+ rowDelete: null,
603
+ rowInsert: null
596
604
  }
597
605
  },
598
606
  toc: {
@@ -679,7 +687,18 @@ var de_default = {
679
687
  picture: "Bild",
680
688
  plainText: "Nur Text",
681
689
  repeatingSection: "Wiederholungsabschnitt",
682
- richText: "Rich Text"
690
+ richText: "Rich Text",
691
+ buildingBlockGallery: null
692
+ },
693
+ calendar: {
694
+ nextMonth: null,
695
+ previousMonth: null,
696
+ today: null,
697
+ month: null,
698
+ year: null
699
+ },
700
+ gallery: {
701
+ empty: null
683
702
  }
684
703
  },
685
704
  notes: {
@@ -726,7 +745,8 @@ var de_default = {
726
745
  displayForReview: null,
727
746
  noMarkup: null,
728
747
  original: null,
729
- protectDocument: null
748
+ protectDocument: null,
749
+ simpleMarkup: null
730
750
  },
731
751
  imageAltText: {
732
752
  description: "Beschreibung",
package/dist/en.js CHANGED
@@ -427,6 +427,14 @@ var en_default = {
427
427
  single: "Single",
428
428
  double: "Double",
429
429
  auto: "Automatic"
430
+ },
431
+ structuralDetails: {
432
+ rowInsert: "Inserted table row",
433
+ rowDelete: "Deleted table row",
434
+ cellInsert: "Inserted table cell",
435
+ cellDelete: "Deleted table cell",
436
+ cellMerge: "Changed cell merge",
437
+ numberingInsert: "Inserted numbering reference"
430
438
  }
431
439
  },
432
440
  contextMenu: {
@@ -701,13 +709,24 @@ var en_default = {
701
709
  comboBox: "Combo box",
702
710
  date: "Date",
703
711
  picture: "Picture",
712
+ buildingBlockGallery: "Building block gallery",
704
713
  repeatingSection: "Repeating section"
705
714
  },
715
+ gallery: {
716
+ empty: "This document has no building blocks for this gallery."
717
+ },
706
718
  lock: {
707
719
  unlocked: "Unlocked",
708
720
  sdtLocked: "Content control locked",
709
721
  contentLocked: "Contents locked",
710
722
  sdtContentLocked: "Content control and contents locked"
723
+ },
724
+ calendar: {
725
+ today: "Today",
726
+ previousMonth: "Previous month",
727
+ nextMonth: "Next month",
728
+ month: "Month",
729
+ year: "Year"
711
730
  }
712
731
  },
713
732
  headerFooter: {
@@ -869,6 +888,7 @@ var en_default = {
869
888
  },
870
889
  review: {
871
890
  displayForReview: "Display for Review",
891
+ simpleMarkup: "Simple Markup",
872
892
  allMarkup: "All Markup",
873
893
  noMarkup: "No Markup",
874
894
  original: "Original",
package/dist/en.mjs CHANGED
@@ -400,6 +400,14 @@ var en_default = {
400
400
  single: "Single",
401
401
  double: "Double",
402
402
  auto: "Automatic"
403
+ },
404
+ structuralDetails: {
405
+ rowInsert: "Inserted table row",
406
+ rowDelete: "Deleted table row",
407
+ cellInsert: "Inserted table cell",
408
+ cellDelete: "Deleted table cell",
409
+ cellMerge: "Changed cell merge",
410
+ numberingInsert: "Inserted numbering reference"
403
411
  }
404
412
  },
405
413
  contextMenu: {
@@ -674,13 +682,24 @@ var en_default = {
674
682
  comboBox: "Combo box",
675
683
  date: "Date",
676
684
  picture: "Picture",
685
+ buildingBlockGallery: "Building block gallery",
677
686
  repeatingSection: "Repeating section"
678
687
  },
688
+ gallery: {
689
+ empty: "This document has no building blocks for this gallery."
690
+ },
679
691
  lock: {
680
692
  unlocked: "Unlocked",
681
693
  sdtLocked: "Content control locked",
682
694
  contentLocked: "Contents locked",
683
695
  sdtContentLocked: "Content control and contents locked"
696
+ },
697
+ calendar: {
698
+ today: "Today",
699
+ previousMonth: "Previous month",
700
+ nextMonth: "Next month",
701
+ month: "Month",
702
+ year: "Year"
684
703
  }
685
704
  },
686
705
  headerFooter: {
@@ -842,6 +861,7 @@ var en_default = {
842
861
  },
843
862
  review: {
844
863
  displayForReview: "Display for Review",
864
+ simpleMarkup: "Simple Markup",
845
865
  allMarkup: "All Markup",
846
866
  noMarkup: "No Markup",
847
867
  original: "Original",
package/dist/fr.js CHANGED
@@ -620,6 +620,14 @@ var fr_default = {
620
620
  start: null,
621
621
  strike: null,
622
622
  underline: null
623
+ },
624
+ structuralDetails: {
625
+ cellDelete: null,
626
+ cellInsert: null,
627
+ cellMerge: null,
628
+ numberingInsert: null,
629
+ rowDelete: null,
630
+ rowInsert: null
623
631
  }
624
632
  },
625
633
  toc: {
@@ -706,7 +714,18 @@ var fr_default = {
706
714
  picture: "Image",
707
715
  plainText: "Texte",
708
716
  repeatingSection: "Section répétitive",
709
- richText: "Texte enrichi"
717
+ richText: "Texte enrichi",
718
+ buildingBlockGallery: null
719
+ },
720
+ calendar: {
721
+ nextMonth: null,
722
+ previousMonth: null,
723
+ today: null,
724
+ month: null,
725
+ year: null
726
+ },
727
+ gallery: {
728
+ empty: null
710
729
  }
711
730
  },
712
731
  notes: {
@@ -753,7 +772,8 @@ var fr_default = {
753
772
  displayForReview: null,
754
773
  noMarkup: null,
755
774
  original: null,
756
- protectDocument: null
775
+ protectDocument: null,
776
+ simpleMarkup: null
757
777
  },
758
778
  imageAltText: {
759
779
  description: "Description",
package/dist/fr.mjs CHANGED
@@ -593,6 +593,14 @@ var fr_default = {
593
593
  start: null,
594
594
  strike: null,
595
595
  underline: null
596
+ },
597
+ structuralDetails: {
598
+ cellDelete: null,
599
+ cellInsert: null,
600
+ cellMerge: null,
601
+ numberingInsert: null,
602
+ rowDelete: null,
603
+ rowInsert: null
596
604
  }
597
605
  },
598
606
  toc: {
@@ -679,7 +687,18 @@ var fr_default = {
679
687
  picture: "Image",
680
688
  plainText: "Texte",
681
689
  repeatingSection: "Section répétitive",
682
- richText: "Texte enrichi"
690
+ richText: "Texte enrichi",
691
+ buildingBlockGallery: null
692
+ },
693
+ calendar: {
694
+ nextMonth: null,
695
+ previousMonth: null,
696
+ today: null,
697
+ month: null,
698
+ year: null
699
+ },
700
+ gallery: {
701
+ empty: null
683
702
  }
684
703
  },
685
704
  notes: {
@@ -726,7 +745,8 @@ var fr_default = {
726
745
  displayForReview: null,
727
746
  noMarkup: null,
728
747
  original: null,
729
- protectDocument: null
748
+ protectDocument: null,
749
+ simpleMarkup: null
730
750
  },
731
751
  imageAltText: {
732
752
  description: "Description",
package/dist/he.js CHANGED
@@ -620,6 +620,14 @@ var he_default = {
620
620
  start: null,
621
621
  strike: null,
622
622
  underline: null
623
+ },
624
+ structuralDetails: {
625
+ cellDelete: null,
626
+ cellInsert: null,
627
+ cellMerge: null,
628
+ numberingInsert: null,
629
+ rowDelete: null,
630
+ rowInsert: null
623
631
  }
624
632
  },
625
633
  toc: {
@@ -706,7 +714,18 @@ var he_default = {
706
714
  picture: "תמונה",
707
715
  plainText: "טקסט רגיל",
708
716
  repeatingSection: "מקטע חוזר",
709
- richText: "טקסט מעוצב"
717
+ richText: "טקסט מעוצב",
718
+ buildingBlockGallery: null
719
+ },
720
+ calendar: {
721
+ nextMonth: null,
722
+ previousMonth: null,
723
+ today: null,
724
+ month: null,
725
+ year: null
726
+ },
727
+ gallery: {
728
+ empty: null
710
729
  }
711
730
  },
712
731
  notes: {
@@ -753,7 +772,8 @@ var he_default = {
753
772
  displayForReview: null,
754
773
  noMarkup: null,
755
774
  original: null,
756
- protectDocument: null
775
+ protectDocument: null,
776
+ simpleMarkup: null
757
777
  },
758
778
  imageAltText: {
759
779
  description: "תיאור",
package/dist/he.mjs CHANGED
@@ -593,6 +593,14 @@ var he_default = {
593
593
  start: null,
594
594
  strike: null,
595
595
  underline: null
596
+ },
597
+ structuralDetails: {
598
+ cellDelete: null,
599
+ cellInsert: null,
600
+ cellMerge: null,
601
+ numberingInsert: null,
602
+ rowDelete: null,
603
+ rowInsert: null
596
604
  }
597
605
  },
598
606
  toc: {
@@ -679,7 +687,18 @@ var he_default = {
679
687
  picture: "תמונה",
680
688
  plainText: "טקסט רגיל",
681
689
  repeatingSection: "מקטע חוזר",
682
- richText: "טקסט מעוצב"
690
+ richText: "טקסט מעוצב",
691
+ buildingBlockGallery: null
692
+ },
693
+ calendar: {
694
+ nextMonth: null,
695
+ previousMonth: null,
696
+ today: null,
697
+ month: null,
698
+ year: null
699
+ },
700
+ gallery: {
701
+ empty: null
683
702
  }
684
703
  },
685
704
  notes: {
@@ -726,7 +745,8 @@ var he_default = {
726
745
  displayForReview: null,
727
746
  noMarkup: null,
728
747
  original: null,
729
- protectDocument: null
748
+ protectDocument: null,
749
+ simpleMarkup: null
730
750
  },
731
751
  imageAltText: {
732
752
  description: "תיאור",
package/dist/hi.js CHANGED
@@ -620,6 +620,14 @@ var hi_default = {
620
620
  start: null,
621
621
  strike: null,
622
622
  underline: null
623
+ },
624
+ structuralDetails: {
625
+ cellDelete: null,
626
+ cellInsert: null,
627
+ cellMerge: null,
628
+ numberingInsert: null,
629
+ rowDelete: null,
630
+ rowInsert: null
623
631
  }
624
632
  },
625
633
  toc: {
@@ -706,7 +714,18 @@ var hi_default = {
706
714
  picture: "चित्र",
707
715
  plainText: "सादा पाठ",
708
716
  repeatingSection: "दोहराया जाने वाला अनुभाग",
709
- richText: "रिच टेक्स्ट"
717
+ richText: "रिच टेक्स्ट",
718
+ buildingBlockGallery: null
719
+ },
720
+ calendar: {
721
+ nextMonth: null,
722
+ previousMonth: null,
723
+ today: null,
724
+ month: null,
725
+ year: null
726
+ },
727
+ gallery: {
728
+ empty: null
710
729
  }
711
730
  },
712
731
  notes: {
@@ -753,7 +772,8 @@ var hi_default = {
753
772
  displayForReview: null,
754
773
  noMarkup: null,
755
774
  original: null,
756
- protectDocument: null
775
+ protectDocument: null,
776
+ simpleMarkup: null
757
777
  },
758
778
  imageAltText: {
759
779
  description: "विवरण",
package/dist/hi.mjs CHANGED
@@ -593,6 +593,14 @@ var hi_default = {
593
593
  start: null,
594
594
  strike: null,
595
595
  underline: null
596
+ },
597
+ structuralDetails: {
598
+ cellDelete: null,
599
+ cellInsert: null,
600
+ cellMerge: null,
601
+ numberingInsert: null,
602
+ rowDelete: null,
603
+ rowInsert: null
596
604
  }
597
605
  },
598
606
  toc: {
@@ -679,7 +687,18 @@ var hi_default = {
679
687
  picture: "चित्र",
680
688
  plainText: "सादा पाठ",
681
689
  repeatingSection: "दोहराया जाने वाला अनुभाग",
682
- richText: "रिच टेक्स्ट"
690
+ richText: "रिच टेक्स्ट",
691
+ buildingBlockGallery: null
692
+ },
693
+ calendar: {
694
+ nextMonth: null,
695
+ previousMonth: null,
696
+ today: null,
697
+ month: null,
698
+ year: null
699
+ },
700
+ gallery: {
701
+ empty: null
683
702
  }
684
703
  },
685
704
  notes: {
@@ -726,7 +745,8 @@ var hi_default = {
726
745
  displayForReview: null,
727
746
  noMarkup: null,
728
747
  original: null,
729
- protectDocument: null
748
+ protectDocument: null,
749
+ simpleMarkup: null
730
750
  },
731
751
  imageAltText: {
732
752
  description: "विवरण",
package/dist/id.js CHANGED
@@ -394,6 +394,14 @@ var id_default = {
394
394
  start: null,
395
395
  strike: null,
396
396
  underline: null
397
+ },
398
+ structuralDetails: {
399
+ cellDelete: null,
400
+ cellInsert: null,
401
+ cellMerge: null,
402
+ numberingInsert: null,
403
+ rowDelete: null,
404
+ rowInsert: null
397
405
  }
398
406
  },
399
407
  contextMenu: {
@@ -706,7 +714,18 @@ var id_default = {
706
714
  picture: "Gambar",
707
715
  plainText: "Teks biasa",
708
716
  repeatingSection: "Bagian berulang",
709
- richText: "Teks kaya"
717
+ richText: "Teks kaya",
718
+ buildingBlockGallery: null
719
+ },
720
+ calendar: {
721
+ nextMonth: null,
722
+ previousMonth: null,
723
+ today: null,
724
+ month: null,
725
+ year: null
726
+ },
727
+ gallery: {
728
+ empty: null
710
729
  }
711
730
  },
712
731
  notes: {
@@ -753,7 +772,8 @@ var id_default = {
753
772
  displayForReview: null,
754
773
  noMarkup: null,
755
774
  original: null,
756
- protectDocument: null
775
+ protectDocument: null,
776
+ simpleMarkup: null
757
777
  },
758
778
  imageAltText: {
759
779
  description: "Deskripsi",
package/dist/id.mjs CHANGED
@@ -367,6 +367,14 @@ var id_default = {
367
367
  start: null,
368
368
  strike: null,
369
369
  underline: null
370
+ },
371
+ structuralDetails: {
372
+ cellDelete: null,
373
+ cellInsert: null,
374
+ cellMerge: null,
375
+ numberingInsert: null,
376
+ rowDelete: null,
377
+ rowInsert: null
370
378
  }
371
379
  },
372
380
  contextMenu: {
@@ -679,7 +687,18 @@ var id_default = {
679
687
  picture: "Gambar",
680
688
  plainText: "Teks biasa",
681
689
  repeatingSection: "Bagian berulang",
682
- richText: "Teks kaya"
690
+ richText: "Teks kaya",
691
+ buildingBlockGallery: null
692
+ },
693
+ calendar: {
694
+ nextMonth: null,
695
+ previousMonth: null,
696
+ today: null,
697
+ month: null,
698
+ year: null
699
+ },
700
+ gallery: {
701
+ empty: null
683
702
  }
684
703
  },
685
704
  notes: {
@@ -726,7 +745,8 @@ var id_default = {
726
745
  displayForReview: null,
727
746
  noMarkup: null,
728
747
  original: null,
729
- protectDocument: null
748
+ protectDocument: null,
749
+ simpleMarkup: null
730
750
  },
731
751
  imageAltText: {
732
752
  description: "Deskripsi",