@semihbou/zod-i18n-map 0.0.2 → 0.0.4

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 (65) hide show
  1. package/dist/index.js +87 -28
  2. package/dist/index.js.map +1 -1
  3. package/dist/index.mjs +87 -28
  4. package/dist/index.mjs.map +1 -1
  5. package/locales/ar/zod.icu.json +110 -0
  6. package/locales/ar/zod.json +2 -5
  7. package/locales/bg/zod.icu.json +110 -0
  8. package/locales/bg/zod.json +2 -5
  9. package/locales/cs/zod.icu.json +110 -0
  10. package/locales/cs/zod.json +2 -5
  11. package/locales/de/zod.icu.json +110 -0
  12. package/locales/de/zod.json +2 -5
  13. package/locales/en/zod.icu.json +110 -0
  14. package/locales/en/zod.json +2 -5
  15. package/locales/es/zod.icu.json +110 -0
  16. package/locales/es/zod.json +2 -5
  17. package/locales/fa/zod.icu.json +110 -0
  18. package/locales/fa/zod.json +3 -6
  19. package/locales/fi/zod.icu.json +110 -0
  20. package/locales/fi/zod.json +2 -5
  21. package/locales/fr/zod.icu.json +110 -0
  22. package/locales/fr/zod.json +2 -5
  23. package/locales/he/zod.icu.json +110 -0
  24. package/locales/he/zod.json +2 -5
  25. package/locales/hr-HR/zod.icu.json +110 -0
  26. package/locales/hr-HR/zod.json +2 -5
  27. package/locales/id/zod.icu.json +110 -0
  28. package/locales/id/zod.json +2 -5
  29. package/locales/is/zod.icu.json +102 -0
  30. package/locales/is/zod.json +2 -5
  31. package/locales/it/zod.icu.json +110 -0
  32. package/locales/it/zod.json +2 -5
  33. package/locales/ja/zod.icu.json +110 -0
  34. package/locales/ja/zod.json +2 -5
  35. package/locales/ko/zod.icu.json +110 -0
  36. package/locales/ko/zod.json +2 -5
  37. package/locales/lt/zod.icu.json +110 -0
  38. package/locales/lt/zod.json +2 -5
  39. package/locales/nb/zod.icu.json +110 -0
  40. package/locales/nb/zod.json +2 -5
  41. package/locales/nl/zod.icu.json +110 -0
  42. package/locales/nl/zod.json +2 -5
  43. package/locales/pl/zod.icu.json +110 -0
  44. package/locales/pl/zod.json +2 -5
  45. package/locales/pt/zod.icu.json +110 -0
  46. package/locales/pt/zod.json +2 -5
  47. package/locales/ro/zod.icu.json +110 -0
  48. package/locales/ro/zod.json +2 -5
  49. package/locales/ru/zod.icu.json +110 -0
  50. package/locales/ru/zod.json +2 -5
  51. package/locales/sk/zod.icu.json +116 -0
  52. package/locales/sk/zod.json +1 -4
  53. package/locales/sv/zod.icu.json +110 -0
  54. package/locales/sv/zod.json +2 -5
  55. package/locales/tr/zod.icu.json +110 -0
  56. package/locales/tr/zod.json +2 -5
  57. package/locales/uk-UA/zod.icu.json +110 -0
  58. package/locales/uk-UA/zod.json +2 -5
  59. package/locales/uz/zod.icu.json +110 -0
  60. package/locales/uz/zod.json +2 -5
  61. package/locales/zh-CN/zod.icu.json +110 -0
  62. package/locales/zh-CN/zod.json +2 -5
  63. package/locales/zh-TW/zod.icu.json +102 -0
  64. package/locales/zh-TW/zod.json +2 -5
  65. package/package.json +12 -4
@@ -8,11 +8,8 @@
8
8
  "invalid_union": "Kesishma natijalarini birlashtirib bo'lmaydi",
9
9
  "invalid_union_discriminator": "Diskriminator qiymati noto'g'ri. {{-options}} kutilmoqda",
10
10
  "invalid_enum_value": "Enum qiymati noto'g'ri. Kutilayotgan {{-options}}, qabul qilingan '{{received}}'",
11
- "invalid_arguments": "Funksiya argumentlari noto'g'ri",
12
- "invalid_return_type": "Funktsiyani qaytarish turi noto'g'ri",
13
11
  "invalid_date": "Sana noto'g'ri",
14
12
  "custom": "Noto'g'ri kiritildi",
15
- "invalid_intersection_types": "Kesishma natijalarini birlashtirib bo'lmaydi",
16
13
  "not_multiple_of": "Son {{multipleOf}} ga karrali bo'lishi kerak",
17
14
  "not_finite": "Son chekli bo'lishi kerak",
18
15
  "invalid_string": {
@@ -93,7 +90,7 @@
93
90
  "number": "son",
94
91
  "string": "satr",
95
92
  "nan": "NaN",
96
- "integer": "butun son",
93
+ "int": "butun son",
97
94
  "float": "suzuvchi nuqtali son",
98
95
  "boolean": "mantiqiy qiymat",
99
96
  "date": "sana",
@@ -110,4 +107,4 @@
110
107
  "map": "xesh jadvali",
111
108
  "set": "to'plam"
112
109
  }
113
- }
110
+ }
@@ -0,0 +1,110 @@
1
+ {
2
+ "errors": {
3
+ "invalid_type": "预期输入为{expected},而输入为{received}",
4
+ "invalid_type_received_undefined": "必填",
5
+ "invalid_type_received_null": "必填",
6
+ "invalid_literal": "错误的字面量值,请输入 {expected}",
7
+ "unrecognized_keys": "对象中的键无法识别: {keys}",
8
+ "invalid_union": "不满足联合类型中的选项",
9
+ "invalid_union_discriminator": "标识值无法被区分。请输入 {options}",
10
+ "invalid_enum_value": "错误的枚举值 ''{received}''。请输入 {options}",
11
+ "invalid_date": "错误的日期格式",
12
+ "custom": "错误的输入格式",
13
+ "not_multiple_of": "数值必须是 {multipleOf} 的倍数",
14
+ "not_finite": "数值必须有限",
15
+ "invalid_string": {
16
+ "email": "错误的{validation}格式",
17
+ "url": "错误的{validation}格式",
18
+ "uuid": "错误的{validation}格式",
19
+ "cuid": "错误的{validation}格式",
20
+ "regex": "错误的格式",
21
+ "datetime": "错误的{validation}格式",
22
+ "startsWith": "文本必须以 \"{startsWith}\" 开头",
23
+ "endsWith": "文本必须以 \"{endsWith}\" 结尾"
24
+ },
25
+ "too_small": {
26
+ "array": {
27
+ "exact": "数组元素必须为 {minimum} 个",
28
+ "inclusive": "数组元素不得少于 {minimum} 个",
29
+ "not_inclusive": "数组元素必须超过 {minimum} 个"
30
+ },
31
+ "string": {
32
+ "exact": "文本长度必须为 {minimum} 个字符",
33
+ "inclusive": "文本长度不得少于 {minimum} 个字符",
34
+ "not_inclusive": "文本长度必须超过 {minimum} 个字符"
35
+ },
36
+ "number": {
37
+ "exact": "数值必须为 {minimum}",
38
+ "inclusive": "数值不得小于 {minimum}",
39
+ "not_inclusive": "数值必须大于 {minimum}"
40
+ },
41
+ "set": {
42
+ "exact": "错误的输入格式",
43
+ "inclusive": "错误的输入格式",
44
+ "not_inclusive": "错误的输入格式"
45
+ },
46
+ "date": {
47
+ "exact": "日期必须为 {minimum, date}",
48
+ "inclusive": "日期不得晚于 {minimum, date}",
49
+ "not_inclusive": "日期必须早于 {minimum, date}"
50
+ }
51
+ },
52
+ "too_big": {
53
+ "array": {
54
+ "exact": "数组元素必须为 {maximum} 个",
55
+ "inclusive": "数组元素不得多于 {maximum} 个",
56
+ "not_inclusive": "数组元素必须少于 {maximum} 个"
57
+ },
58
+ "string": {
59
+ "exact": "文本长度必须为 {maximum} 个字符",
60
+ "inclusive": "文本长度不得多于 {maximum} 个字符",
61
+ "not_inclusive": "文本长度必须少于 {maximum} 个字符"
62
+ },
63
+ "number": {
64
+ "exact": "数值必须为 {maximum}",
65
+ "inclusive": "数值不得大于 {maximum}",
66
+ "not_inclusive": "数值必须小于 {maximum}"
67
+ },
68
+ "set": {
69
+ "exact": "错误的输入格式",
70
+ "inclusive": "错误的输入格式",
71
+ "not_inclusive": "错误的输入格式"
72
+ },
73
+ "date": {
74
+ "exact": "日期必须为 {maximum, date}",
75
+ "inclusive": "日期不得早于 {maximum, date}",
76
+ "not_inclusive": "日期必须晚于 {maximum, date}"
77
+ }
78
+ }
79
+ },
80
+ "validations": {
81
+ "email": "邮件",
82
+ "url": "链接",
83
+ "uuid": "uuid",
84
+ "cuid": "cuid",
85
+ "regex": "正则表达式",
86
+ "datetime": "日期时间"
87
+ },
88
+ "types": {
89
+ "function": "函数",
90
+ "number": "数字",
91
+ "string": "字符串",
92
+ "nan": "非数",
93
+ "int": "整数",
94
+ "float": "浮点数",
95
+ "boolean": "布尔值",
96
+ "date": "日期",
97
+ "bigint": "大整数",
98
+ "undefined": "未定义",
99
+ "symbol": "符号",
100
+ "null": "空对象",
101
+ "array": "数组",
102
+ "object": "对象",
103
+ "unknown": "未知",
104
+ "promise": "Promise",
105
+ "void": "空",
106
+ "never": "不存在",
107
+ "map": "字典",
108
+ "set": "集合"
109
+ }
110
+ }
@@ -8,11 +8,8 @@
8
8
  "invalid_union": "不满足联合类型中的选项",
9
9
  "invalid_union_discriminator": "标识值无法被区分。请输入 {{- options}}",
10
10
  "invalid_enum_value": "错误的枚举值 '{{received}}'。请输入 {{- options}}",
11
- "invalid_arguments": "错误的函数参数格式",
12
- "invalid_return_type": "错误的函数返回值格式",
13
11
  "invalid_date": "错误的日期格式",
14
12
  "custom": "错误的输入格式",
15
- "invalid_intersection_types": "交叉类型结果无法被合并",
16
13
  "not_multiple_of": "数值必须是 {{multipleOf}} 的倍数",
17
14
  "not_finite": "数值必须有限",
18
15
  "invalid_string": {
@@ -93,7 +90,7 @@
93
90
  "number": "数字",
94
91
  "string": "字符串",
95
92
  "nan": "非数",
96
- "integer": "整数",
93
+ "int": "整数",
97
94
  "float": "浮点数",
98
95
  "boolean": "布尔值",
99
96
  "date": "日期",
@@ -110,4 +107,4 @@
110
107
  "map": "字典",
111
108
  "set": "集合"
112
109
  }
113
- }
110
+ }
@@ -0,0 +1,102 @@
1
+ {
2
+ "errors": {
3
+ "invalid_type": "期望輸入的是{expected},而輸入的是{received}",
4
+ "invalid_type_received_undefined": "必填的欄位",
5
+ "invalid_type_received_null": "必填的欄位",
6
+ "invalid_literal": "無效的輸入,請輸入 {expected}",
7
+ "unrecognized_keys": "無法識別物件的鍵值:{keys}",
8
+ "invalid_union": "輸入格式錯誤",
9
+ "invalid_union_discriminator": "無效的識別符,請輸入 {options}",
10
+ "invalid_enum_value": "無效的 ''{received}'' 值,請輸入 {options}",
11
+ "invalid_date": "錯誤的日期",
12
+ "custom": "格式錯誤",
13
+ "not_multiple_of": "必須是 {multipleOf} 的倍數",
14
+ "not_finite": "不能為無限值",
15
+ "invalid_string": {
16
+ "email": "{validation}格式錯誤",
17
+ "url": "{validation}格式錯誤",
18
+ "uuid": "{validation} 格式錯誤",
19
+ "cuid": "{validation} 格式錯誤",
20
+ "regex": "格式錯誤",
21
+ "datetime": "{validation} 格式錯誤",
22
+ "startsWith": "必須以 \"{startsWith}\" 開始",
23
+ "endsWith": "必須以 \"{endsWith}\" 結尾"
24
+ },
25
+ "too_small": {
26
+ "array": {
27
+ "inclusive": "至少需要包含 {minimum} 個元素",
28
+ "not_inclusive": "必須包含多於 {minimum} 個元素"
29
+ },
30
+ "string": {
31
+ "inclusive": "至少需要包含 {minimum} 個字元",
32
+ "not_inclusive": "必須包含多於 {minimum} 個字元"
33
+ },
34
+ "number": {
35
+ "inclusive": "必須大於或等於 {minimum}",
36
+ "not_inclusive": "必須大於 {minimum}"
37
+ },
38
+ "set": {
39
+ "exact": "無效的輸入",
40
+ "inclusive": "無效的輸入",
41
+ "not_inclusive": "無效的輸入"
42
+ },
43
+ "date": {
44
+ "inclusive": "日期必須晚於或等於 {minimum, date}",
45
+ "not_inclusive": "日期必須晚於 {minimum, date}"
46
+ }
47
+ },
48
+ "too_big": {
49
+ "array": {
50
+ "inclusive": "最多只能包含 {maximum} 個元素",
51
+ "not_inclusive": "必須少於 {maximum} 個元素"
52
+ },
53
+ "string": {
54
+ "inclusive": "最多只能包含 {maximum} 個字元",
55
+ "not_inclusive": "必須少於 {maximum} 個字元"
56
+ },
57
+ "number": {
58
+ "inclusive": "必須小於或等於 {maximum}",
59
+ "not_inclusive": "必須小於 {maximum}"
60
+ },
61
+ "set": {
62
+ "exact": "無效的輸入",
63
+ "inclusive": "無效的輸入",
64
+ "not_inclusive": "無效的輸入"
65
+ },
66
+ "date": {
67
+ "inclusive": "日期必須早於或等於 {maximum, date}",
68
+ "not_inclusive": "日期必須早於 {maximum, date}"
69
+ }
70
+ }
71
+ },
72
+ "validations": {
73
+ "email": "電子郵件",
74
+ "url": "連結",
75
+ "uuid": "uuid",
76
+ "cuid": "cuid",
77
+ "regex": "正則表達式",
78
+ "datetime": "datetime"
79
+ },
80
+ "types": {
81
+ "function": "函數",
82
+ "number": "數字",
83
+ "string": "字串",
84
+ "nan": "NaN",
85
+ "int": "整數",
86
+ "float": "浮點數",
87
+ "boolean": "布林值",
88
+ "date": "日期",
89
+ "bigint": "Bigint",
90
+ "undefined": "未定義",
91
+ "symbol": "Symbol",
92
+ "null": "null",
93
+ "array": "陣列",
94
+ "object": "物件",
95
+ "unknown": "unknown",
96
+ "promise": "Promise",
97
+ "void": "void",
98
+ "never": "never",
99
+ "map": "Map",
100
+ "set": "Set"
101
+ }
102
+ }
@@ -8,11 +8,8 @@
8
8
  "invalid_union": "輸入格式錯誤",
9
9
  "invalid_union_discriminator": "無效的識別符,請輸入 {{- options}}",
10
10
  "invalid_enum_value": "無效的 '{{received}}' 值,請輸入 {{- options}}",
11
- "invalid_arguments": "參數錯誤",
12
- "invalid_return_type": "錯誤的回傳值類型",
13
11
  "invalid_date": "錯誤的日期",
14
12
  "custom": "格式錯誤",
15
- "invalid_intersection_types": "交集類型無法合併",
16
13
  "not_multiple_of": "必須是 {{multipleOf}} 的倍數",
17
14
  "not_finite": "不能為無限值",
18
15
  "invalid_string": {
@@ -85,7 +82,7 @@
85
82
  "number": "數字",
86
83
  "string": "字串",
87
84
  "nan": "NaN",
88
- "integer": "整數",
85
+ "int": "整數",
89
86
  "float": "浮點數",
90
87
  "boolean": "布林值",
91
88
  "date": "日期",
@@ -102,4 +99,4 @@
102
99
  "map": "Map",
103
100
  "set": "Set"
104
101
  }
105
- }
102
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@semihbou/zod-i18n-map",
3
- "version": "0.0.2",
3
+ "version": "0.0.4",
4
4
  "description": "A library for localizing zod error messages.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -23,7 +23,13 @@
23
23
  },
24
24
  "peerDependencies": {
25
25
  "i18next": ">=21.3.0",
26
- "zod": ">=4.0.0"
26
+ "i18next-icu": ">=2.0.0",
27
+ "zod": ">=4.1.12"
28
+ },
29
+ "peerDependenciesMeta": {
30
+ "i18next-icu": {
31
+ "optional": true
32
+ }
27
33
  },
28
34
  "devDependencies": {
29
35
  "@tsconfig/node16": "^1.0.3",
@@ -31,11 +37,13 @@
31
37
  "@vitest/coverage-c8": "^0.33.0",
32
38
  "c8": "^7.12.0",
33
39
  "i18next": "^22.4.9",
40
+ "i18next-icu": "^2.4.4",
41
+ "intl-messageformat": "^11.2.9",
34
42
  "rimraf": "^5.0.0",
35
43
  "tsup": "8.5.0",
36
- "typescript": "^4.9.5",
44
+ "typescript": "^5.7.3",
37
45
  "vite": "7.2.2",
38
46
  "vitest": "^4.0.8",
39
- "zod": "^4.0.0"
47
+ "zod": "^4.1.12"
40
48
  }
41
49
  }