@semihbou/zod-i18n-map 0.0.3 → 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.
@@ -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
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@semihbou/zod-i18n-map",
3
- "version": "0.0.3",
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,14 +23,22 @@
23
23
  },
24
24
  "peerDependencies": {
25
25
  "i18next": ">=21.3.0",
26
+ "i18next-icu": ">=2.0.0",
26
27
  "zod": ">=4.1.12"
27
28
  },
29
+ "peerDependenciesMeta": {
30
+ "i18next-icu": {
31
+ "optional": true
32
+ }
33
+ },
28
34
  "devDependencies": {
29
35
  "@tsconfig/node16": "^1.0.3",
30
36
  "@types/node": "^18.15.3",
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
44
  "typescript": "^5.7.3",