@byline/i18n 4.12.0 → 4.13.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/dist/admin/index.d.ts +2 -1
- package/dist/admin/index.js +5 -2
- package/dist/admin/th.js +535 -0
- package/package.json +8 -8
- package/src/admin/index.test.node.ts +3 -1
- package/src/admin/index.ts +4 -1
- package/src/admin/th.json +534 -0
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"private": false,
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MPL-2.0",
|
|
6
|
-
"version": "4.
|
|
6
|
+
"version": "4.13.1",
|
|
7
7
|
"engines": {
|
|
8
8
|
"node": ">=20.9.0"
|
|
9
9
|
},
|
|
@@ -53,20 +53,20 @@
|
|
|
53
53
|
"dependencies": {
|
|
54
54
|
"@formatjs/intl-localematcher": "^0.8.13",
|
|
55
55
|
"clsx": "^2.1.1",
|
|
56
|
-
"intl-messageformat": "^11.2.
|
|
56
|
+
"intl-messageformat": "^11.2.14",
|
|
57
57
|
"negotiator": "^1.0.0",
|
|
58
|
-
"@byline/ui": "4.
|
|
58
|
+
"@byline/ui": "4.13.1"
|
|
59
59
|
},
|
|
60
60
|
"peerDependencies": {
|
|
61
61
|
"react": "^19.0.0",
|
|
62
62
|
"react-dom": "^19.0.0"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
|
-
"@biomejs/biome": "2.5.
|
|
65
|
+
"@biomejs/biome": "2.5.9",
|
|
66
66
|
"@rsbuild/plugin-react": "^2.1.0",
|
|
67
67
|
"@rslib/core": "^0.23.2",
|
|
68
|
-
"@types/negotiator": "^0.6.
|
|
69
|
-
"@types/node": "^26.
|
|
68
|
+
"@types/negotiator": "^0.6.5",
|
|
69
|
+
"@types/node": "^26.2.0",
|
|
70
70
|
"@types/react": "19.2.18",
|
|
71
71
|
"@types/react-dom": "19.2.4",
|
|
72
72
|
"@vitejs/plugin-react": "^6.0.5",
|
|
@@ -75,8 +75,8 @@
|
|
|
75
75
|
"react-dom": "^19.2.8",
|
|
76
76
|
"rimraf": "^6.1.3",
|
|
77
77
|
"typescript": "^7.0.2",
|
|
78
|
-
"vite": "^8.2.
|
|
79
|
-
"vitest": "^4.1.
|
|
78
|
+
"vite": "^8.2.1",
|
|
79
|
+
"vitest": "^4.1.11"
|
|
80
80
|
},
|
|
81
81
|
"publishConfig": {
|
|
82
82
|
"access": "public",
|
|
@@ -17,6 +17,7 @@ import {
|
|
|
17
17
|
fr,
|
|
18
18
|
it as itBundle,
|
|
19
19
|
ko,
|
|
20
|
+
th,
|
|
20
21
|
zhCN,
|
|
21
22
|
} from './index.js'
|
|
22
23
|
|
|
@@ -44,6 +45,7 @@ describe('bundled locale data', () => {
|
|
|
44
45
|
['it', itBundle],
|
|
45
46
|
['zh-CN', zhCN],
|
|
46
47
|
['ko', ko],
|
|
48
|
+
['th', th],
|
|
47
49
|
])('exports the %s bundle with the same key set as en (no drift)', (_code, bundle) => {
|
|
48
50
|
expect(new Set(Object.keys(bundle))).toEqual(new Set(Object.keys(en)))
|
|
49
51
|
})
|
|
@@ -63,7 +65,7 @@ describe('bundled locale data', () => {
|
|
|
63
65
|
'collections.list.treeRefreshFailedDescription',
|
|
64
66
|
'collections.edit.deletedWithWarningsDescription',
|
|
65
67
|
] as const
|
|
66
|
-
const nonEnglishBundles = { fr, es, de, it: itBundle, 'zh-CN': zhCN, ko } as const
|
|
68
|
+
const nonEnglishBundles = { fr, es, de, it: itBundle, 'zh-CN': zhCN, ko, th } as const
|
|
67
69
|
|
|
68
70
|
expect(Object.keys(nonEnglishBundles)).toEqual(
|
|
69
71
|
bundledLocales.filter((locale) => locale !== 'en')
|
package/src/admin/index.ts
CHANGED
|
@@ -33,6 +33,7 @@ import esJson from './es.json'
|
|
|
33
33
|
import frJson from './fr.json'
|
|
34
34
|
import itJson from './it.json'
|
|
35
35
|
import koJson from './ko.json'
|
|
36
|
+
import thJson from './th.json'
|
|
36
37
|
import zhCNJson from './zh-CN.json'
|
|
37
38
|
import type { LocaleCode, NamespaceTranslations, TranslationBundle } from '../types.js'
|
|
38
39
|
|
|
@@ -43,6 +44,7 @@ const de: NamespaceTranslations = deJson
|
|
|
43
44
|
const it: NamespaceTranslations = itJson
|
|
44
45
|
const zhCN: NamespaceTranslations = zhCNJson
|
|
45
46
|
const ko: NamespaceTranslations = koJson
|
|
47
|
+
const th: NamespaceTranslations = thJson
|
|
46
48
|
|
|
47
49
|
/**
|
|
48
50
|
* Map of every bundled locale → its `byline-admin` namespace
|
|
@@ -59,13 +61,14 @@ const BUNDLES: Readonly<Record<LocaleCode, NamespaceTranslations>> = {
|
|
|
59
61
|
it,
|
|
60
62
|
'zh-CN': zhCN,
|
|
61
63
|
ko,
|
|
64
|
+
th,
|
|
62
65
|
}
|
|
63
66
|
|
|
64
67
|
/** Locale codes for which a bundled translation ships in-package. */
|
|
65
68
|
export const bundledLocales: readonly LocaleCode[] = Object.freeze(Object.keys(BUNDLES))
|
|
66
69
|
|
|
67
70
|
/** Re-exported as typed consts for plugin authors who want the literal-key autocomplete. */
|
|
68
|
-
export { de, en, es, fr, it, ko, zhCN }
|
|
71
|
+
export { de, en, es, fr, it, ko, th, zhCN }
|
|
69
72
|
export type AdminNamespaceTranslations = typeof enJson
|
|
70
73
|
|
|
71
74
|
export interface AdminTranslationsOptions {
|