@evolu/common 8.9.0 → 8.11.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/dist/src/Bytes.d.ts +647 -0
- package/dist/src/Bytes.d.ts.map +1 -0
- package/dist/src/{Binary.js → Bytes.js} +266 -16
- package/dist/src/Config.d.ts +142 -0
- package/dist/src/Config.d.ts.map +1 -0
- package/dist/src/Config.js +181 -0
- package/dist/src/Console.d.ts +62 -7
- package/dist/src/Console.d.ts.map +1 -1
- package/dist/src/Console.js +20 -4
- package/dist/src/Crypto.d.ts +76 -4
- package/dist/src/Crypto.d.ts.map +1 -1
- package/dist/src/Crypto.js +55 -4
- package/dist/src/Error.d.ts +45 -0
- package/dist/src/Error.d.ts.map +1 -1
- package/dist/src/Error.js +69 -0
- package/dist/src/Fs.d.ts +376 -0
- package/dist/src/Fs.d.ts.map +1 -0
- package/dist/src/Fs.js +113 -0
- package/dist/src/Identicon.d.ts +2 -2
- package/dist/src/Identicon.js +2 -2
- package/dist/src/LeakDetector.d.ts +22 -3
- package/dist/src/LeakDetector.d.ts.map +1 -1
- package/dist/src/LeakDetector.js +12 -2
- package/dist/src/LockManager.d.ts +8 -0
- package/dist/src/LockManager.d.ts.map +1 -1
- package/dist/src/LockManager.js +6 -0
- package/dist/src/Number.d.ts +50 -7
- package/dist/src/Number.d.ts.map +1 -1
- package/dist/src/Number.js +47 -8
- package/dist/src/Object.d.ts +32 -0
- package/dist/src/Object.d.ts.map +1 -1
- package/dist/src/Object.js +46 -0
- package/dist/src/Platform.d.ts +47 -7
- package/dist/src/Platform.d.ts.map +1 -1
- package/dist/src/Platform.js +24 -5
- package/dist/src/Random.d.ts +25 -2
- package/dist/src/Random.d.ts.map +1 -1
- package/dist/src/Random.js +14 -2
- package/dist/src/Resource.d.ts +156 -1
- package/dist/src/Resource.d.ts.map +1 -1
- package/dist/src/Resource.js +201 -72
- package/dist/src/Schedule.d.ts +11 -10
- package/dist/src/Schedule.d.ts.map +1 -1
- package/dist/src/Schedule.js +1 -1
- package/dist/src/Sqlite.d.ts +132 -16
- package/dist/src/Sqlite.d.ts.map +1 -1
- package/dist/src/Sqlite.js +64 -10
- package/dist/src/Task.d.ts +15 -4
- package/dist/src/Task.d.ts.map +1 -1
- package/dist/src/Task.js +41 -15
- package/dist/src/Test.d.ts +9 -0
- package/dist/src/Test.d.ts.map +1 -1
- package/dist/src/Test.js +4 -0
- package/dist/src/Time.d.ts +179 -20
- package/dist/src/Time.d.ts.map +1 -1
- package/dist/src/Time.js +95 -6
- package/dist/src/Type.d.ts +3056 -1539
- package/dist/src/Type.d.ts.map +1 -1
- package/dist/src/Type.js +2548 -584
- package/dist/src/WebSocket.d.ts +164 -13
- package/dist/src/WebSocket.d.ts.map +1 -1
- package/dist/src/WebSocket.js +133 -24
- package/dist/src/Worker.d.ts +90 -8
- package/dist/src/Worker.d.ts.map +1 -1
- package/dist/src/Worker.js +28 -2
- package/dist/src/index.d.ts +9 -8
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +5 -4
- package/dist/src/intl/_en.d.ts +24 -1
- package/dist/src/intl/_en.d.ts.map +1 -1
- package/dist/src/intl/_en.js +20 -0
- package/dist/src/intl/ar.d.ts +24 -1
- package/dist/src/intl/ar.d.ts.map +1 -1
- package/dist/src/intl/ar.js +20 -0
- package/dist/src/intl/bn.d.ts +24 -1
- package/dist/src/intl/bn.d.ts.map +1 -1
- package/dist/src/intl/bn.js +20 -0
- package/dist/src/intl/ca.d.ts +24 -1
- package/dist/src/intl/ca.d.ts.map +1 -1
- package/dist/src/intl/ca.js +20 -0
- package/dist/src/intl/cs.d.ts +24 -1
- package/dist/src/intl/cs.d.ts.map +1 -1
- package/dist/src/intl/cs.js +20 -0
- package/dist/src/intl/da.d.ts +24 -1
- package/dist/src/intl/da.d.ts.map +1 -1
- package/dist/src/intl/da.js +20 -0
- package/dist/src/intl/de.d.ts +24 -1
- package/dist/src/intl/de.d.ts.map +1 -1
- package/dist/src/intl/de.js +20 -0
- package/dist/src/intl/el.d.ts +24 -1
- package/dist/src/intl/el.d.ts.map +1 -1
- package/dist/src/intl/el.js +20 -0
- package/dist/src/intl/es.d.ts +24 -1
- package/dist/src/intl/es.d.ts.map +1 -1
- package/dist/src/intl/es.js +20 -0
- package/dist/src/intl/fa.d.ts +24 -1
- package/dist/src/intl/fa.d.ts.map +1 -1
- package/dist/src/intl/fa.js +20 -0
- package/dist/src/intl/fi.d.ts +24 -1
- package/dist/src/intl/fi.d.ts.map +1 -1
- package/dist/src/intl/fi.js +20 -0
- package/dist/src/intl/fil.d.ts +24 -1
- package/dist/src/intl/fil.d.ts.map +1 -1
- package/dist/src/intl/fil.js +20 -0
- package/dist/src/intl/fr.d.ts +24 -1
- package/dist/src/intl/fr.d.ts.map +1 -1
- package/dist/src/intl/fr.js +20 -0
- package/dist/src/intl/he.d.ts +24 -1
- package/dist/src/intl/he.d.ts.map +1 -1
- package/dist/src/intl/he.js +20 -0
- package/dist/src/intl/hi.d.ts +24 -1
- package/dist/src/intl/hi.d.ts.map +1 -1
- package/dist/src/intl/hi.js +20 -0
- package/dist/src/intl/hr.d.ts +24 -1
- package/dist/src/intl/hr.d.ts.map +1 -1
- package/dist/src/intl/hr.js +20 -0
- package/dist/src/intl/hu.d.ts +22 -1
- package/dist/src/intl/hu.d.ts.map +1 -1
- package/dist/src/intl/hu.js +18 -0
- package/dist/src/intl/id.d.ts +24 -1
- package/dist/src/intl/id.d.ts.map +1 -1
- package/dist/src/intl/id.js +20 -0
- package/dist/src/intl/it.d.ts +24 -1
- package/dist/src/intl/it.d.ts.map +1 -1
- package/dist/src/intl/it.js +20 -0
- package/dist/src/intl/ja.d.ts +24 -1
- package/dist/src/intl/ja.d.ts.map +1 -1
- package/dist/src/intl/ja.js +20 -0
- package/dist/src/intl/ko.d.ts +24 -1
- package/dist/src/intl/ko.d.ts.map +1 -1
- package/dist/src/intl/ko.js +20 -0
- package/dist/src/intl/ml.d.ts +24 -1
- package/dist/src/intl/ml.d.ts.map +1 -1
- package/dist/src/intl/ml.js +20 -0
- package/dist/src/intl/mr.d.ts +24 -1
- package/dist/src/intl/mr.d.ts.map +1 -1
- package/dist/src/intl/mr.js +20 -0
- package/dist/src/intl/ms.d.ts +24 -1
- package/dist/src/intl/ms.d.ts.map +1 -1
- package/dist/src/intl/ms.js +20 -0
- package/dist/src/intl/nb.d.ts +22 -1
- package/dist/src/intl/nb.d.ts.map +1 -1
- package/dist/src/intl/nb.js +18 -0
- package/dist/src/intl/nl.d.ts +24 -1
- package/dist/src/intl/nl.d.ts.map +1 -1
- package/dist/src/intl/nl.js +20 -0
- package/dist/src/intl/pa.d.ts +24 -1
- package/dist/src/intl/pa.d.ts.map +1 -1
- package/dist/src/intl/pa.js +20 -0
- package/dist/src/intl/pl.d.ts +23 -0
- package/dist/src/intl/pl.d.ts.map +1 -1
- package/dist/src/intl/pl.js +20 -0
- package/dist/src/intl/pt-BR.d.ts +24 -1
- package/dist/src/intl/pt-BR.d.ts.map +1 -1
- package/dist/src/intl/pt-BR.js +20 -0
- package/dist/src/intl/pt.d.ts +24 -1
- package/dist/src/intl/pt.d.ts.map +1 -1
- package/dist/src/intl/pt.js +20 -0
- package/dist/src/intl/ro.d.ts +24 -1
- package/dist/src/intl/ro.d.ts.map +1 -1
- package/dist/src/intl/ro.js +20 -0
- package/dist/src/intl/sk.d.ts +24 -1
- package/dist/src/intl/sk.d.ts.map +1 -1
- package/dist/src/intl/sk.js +20 -0
- package/dist/src/intl/sl.d.ts +24 -1
- package/dist/src/intl/sl.d.ts.map +1 -1
- package/dist/src/intl/sl.js +20 -0
- package/dist/src/intl/sv.d.ts +24 -1
- package/dist/src/intl/sv.d.ts.map +1 -1
- package/dist/src/intl/sv.js +20 -0
- package/dist/src/intl/sw.d.ts +21 -0
- package/dist/src/intl/sw.d.ts.map +1 -1
- package/dist/src/intl/sw.js +18 -0
- package/dist/src/intl/ta.d.ts +24 -1
- package/dist/src/intl/ta.d.ts.map +1 -1
- package/dist/src/intl/ta.js +20 -0
- package/dist/src/intl/te.d.ts +24 -1
- package/dist/src/intl/te.d.ts.map +1 -1
- package/dist/src/intl/te.js +20 -0
- package/dist/src/intl/th.d.ts +24 -1
- package/dist/src/intl/th.d.ts.map +1 -1
- package/dist/src/intl/th.js +20 -0
- package/dist/src/intl/tr.d.ts +24 -1
- package/dist/src/intl/tr.d.ts.map +1 -1
- package/dist/src/intl/tr.js +20 -0
- package/dist/src/intl/uk.d.ts +80 -57
- package/dist/src/intl/uk.d.ts.map +1 -1
- package/dist/src/intl/uk.js +174 -149
- package/dist/src/intl/ur.d.ts +24 -1
- package/dist/src/intl/ur.d.ts.map +1 -1
- package/dist/src/intl/ur.js +20 -0
- package/dist/src/intl/vi.d.ts +24 -1
- package/dist/src/intl/vi.d.ts.map +1 -1
- package/dist/src/intl/vi.js +20 -0
- package/dist/src/intl/zh-CN.d.ts +24 -1
- package/dist/src/intl/zh-CN.d.ts.map +1 -1
- package/dist/src/intl/zh-CN.js +20 -0
- package/dist/src/intl/zh-TW.d.ts +24 -1
- package/dist/src/intl/zh-TW.d.ts.map +1 -1
- package/dist/src/intl/zh-TW.js +20 -0
- package/dist/src/local-first/Db.d.ts +52 -3
- package/dist/src/local-first/Db.d.ts.map +1 -1
- package/dist/src/local-first/Db.js +412 -137
- package/dist/src/local-first/Evolu.d.ts +336 -211
- package/dist/src/local-first/Evolu.d.ts.map +1 -1
- package/dist/src/local-first/Evolu.js +102 -15
- package/dist/src/local-first/Owner.d.ts +13 -30
- package/dist/src/local-first/Owner.d.ts.map +1 -1
- package/dist/src/local-first/Owner.js +13 -30
- package/dist/src/local-first/Protocol.d.ts +95 -17
- package/dist/src/local-first/Protocol.d.ts.map +1 -1
- package/dist/src/local-first/Protocol.js +119 -39
- package/dist/src/local-first/Query.d.ts +8 -15
- package/dist/src/local-first/Query.d.ts.map +1 -1
- package/dist/src/local-first/Schema.d.ts +345 -21
- package/dist/src/local-first/Schema.d.ts.map +1 -1
- package/dist/src/local-first/Schema.js +214 -17
- package/dist/src/local-first/Shared.d.ts +537 -22
- package/dist/src/local-first/Shared.d.ts.map +1 -1
- package/dist/src/local-first/Shared.js +1437 -234
- package/dist/src/local-first/Storage.d.ts +192 -14
- package/dist/src/local-first/Storage.d.ts.map +1 -1
- package/dist/src/local-first/Storage.js +82 -21
- package/dist/src/local-first/Timestamp.d.ts +392 -41
- package/dist/src/local-first/Timestamp.d.ts.map +1 -1
- package/dist/src/local-first/Timestamp.js +404 -82
- package/dist/src/local-first/index.d.ts +0 -1
- package/dist/src/local-first/index.d.ts.map +1 -1
- package/dist/src/local-first/index.js +0 -1
- package/package.json +1 -1
- package/src/Assert.test.ts +2 -5
- package/src/{Binary.test.ts → Bytes.test.ts} +286 -1
- package/src/{Binary.ts → Bytes.ts} +652 -21
- package/src/Config.test.ts +668 -0
- package/src/Config.ts +410 -0
- package/src/Console.ts +62 -7
- package/src/Crypto.ts +76 -4
- package/src/Eq.test.ts +2 -3
- package/src/Error.test.ts +76 -3
- package/src/Error.ts +71 -0
- package/src/Fs.test.ts +105 -0
- package/src/Fs.ts +488 -0
- package/src/Identicon.ts +2 -2
- package/src/LeakDetector.ts +22 -3
- package/src/LockManager.ts +8 -0
- package/src/Number.test.ts +82 -18
- package/src/Number.ts +76 -8
- package/src/Object.test.ts +139 -10
- package/src/Object.ts +49 -0
- package/src/Platform.ts +50 -8
- package/src/Random.ts +25 -2
- package/src/Resource.test.ts +837 -0
- package/src/Resource.ts +235 -15
- package/src/Schedule.test.ts +50 -12
- package/src/Schedule.ts +24 -14
- package/src/Sqlite.ts +138 -18
- package/src/Task.test.ts +189 -8
- package/src/Task.ts +56 -17
- package/src/Test.ts +9 -0
- package/src/Time.test.ts +82 -11
- package/src/Time.ts +246 -24
- package/src/Type.test.ts +3994 -1119
- package/src/Type.ts +7258 -3842
- package/src/Types.test.ts +4 -14
- package/src/WebSocket.ts +313 -40
- package/src/Worker.ts +90 -8
- package/src/index.ts +18 -7
- package/src/intl/_en.ts +70 -0
- package/src/intl/ar.ts +71 -0
- package/src/intl/bn.ts +70 -0
- package/src/intl/ca.ts +70 -0
- package/src/intl/cs.ts +70 -0
- package/src/intl/da.ts +70 -0
- package/src/intl/de.ts +70 -0
- package/src/intl/el.ts +70 -0
- package/src/intl/es.ts +70 -0
- package/src/intl/fa.ts +70 -0
- package/src/intl/fi.ts +70 -0
- package/src/intl/fil.ts +70 -0
- package/src/intl/fr.ts +70 -0
- package/src/intl/he.ts +70 -0
- package/src/intl/hi.ts +70 -0
- package/src/intl/hr.ts +70 -0
- package/src/intl/hu.ts +69 -0
- package/src/intl/id.ts +70 -0
- package/src/intl/intl.test.ts +819 -1
- package/src/intl/it.ts +70 -0
- package/src/intl/ja.ts +70 -0
- package/src/intl/ko.ts +68 -0
- package/src/intl/ml.ts +70 -0
- package/src/intl/mr.ts +70 -0
- package/src/intl/ms.ts +71 -0
- package/src/intl/nb.ts +69 -0
- package/src/intl/nl.ts +70 -0
- package/src/intl/pa.ts +70 -0
- package/src/intl/pl.ts +63 -0
- package/src/intl/pt-BR.ts +70 -0
- package/src/intl/pt.ts +71 -0
- package/src/intl/ro.ts +70 -0
- package/src/intl/sk.ts +71 -0
- package/src/intl/sl.ts +70 -0
- package/src/intl/sv.ts +70 -0
- package/src/intl/sw.ts +62 -0
- package/src/intl/ta.ts +70 -0
- package/src/intl/te.ts +70 -0
- package/src/intl/th.ts +68 -0
- package/src/intl/tr.ts +70 -0
- package/src/intl/uk.ts +228 -155
- package/src/intl/ur.ts +70 -0
- package/src/intl/vi.ts +70 -0
- package/src/intl/zh-CN.ts +68 -0
- package/src/intl/zh-TW.ts +68 -0
- package/src/local-first/Db.ts +644 -339
- package/src/local-first/Evolu.test.ts +686 -21
- package/src/local-first/Evolu.ts +450 -228
- package/src/local-first/Owner.ts +13 -30
- package/src/local-first/Protocol.test.ts +618 -11
- package/src/local-first/Protocol.ts +197 -73
- package/src/local-first/Query.ts +8 -15
- package/src/local-first/Schema.test.ts +143 -0
- package/src/local-first/Schema.ts +374 -24
- package/src/local-first/Shared.test.ts +7731 -559
- package/src/local-first/Shared.ts +2036 -267
- package/src/local-first/Storage.ts +219 -33
- package/src/local-first/Timestamp.test.ts +344 -70
- package/src/local-first/Timestamp.ts +435 -119
- package/src/local-first/index.ts +0 -1
- package/dist/src/Binary.d.ts +0 -254
- package/dist/src/Binary.d.ts.map +0 -1
- package/dist/src/local-first/Error.d.ts +0 -12
- package/dist/src/local-first/Error.d.ts.map +0 -1
- package/dist/src/local-first/Error.js +0 -6
- package/dist/src/local-first/LocalAuth.d.ts +0 -150
- package/dist/src/local-first/LocalAuth.d.ts.map +0 -1
- package/dist/src/local-first/LocalAuth.js +0 -179
- package/src/local-first/Error.ts +0 -17
- package/src/local-first/LocalAuth.ts +0 -457
package/src/intl/fr.ts
CHANGED
|
@@ -4,13 +4,21 @@
|
|
|
4
4
|
* @module
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
+
import type { DurationLiteralError } from "../Time.ts";
|
|
8
|
+
import type { PercentageLiteralError } from "../Number.ts";
|
|
9
|
+
import type { ByteSizeLiteralError } from "../Bytes.ts";
|
|
7
10
|
import { assertNonNullable } from "../Assert.ts";
|
|
8
11
|
import { safelyStringifyUnknownValue } from "../String.ts";
|
|
9
12
|
import type {
|
|
10
13
|
ArrayError,
|
|
11
14
|
Base64UrlError,
|
|
15
|
+
BooleanFromStringError,
|
|
12
16
|
BetweenError,
|
|
17
|
+
IdentifierError,
|
|
13
18
|
CapitalizedError,
|
|
19
|
+
UncapitalizedError,
|
|
20
|
+
UppercasedError,
|
|
21
|
+
LowercasedError,
|
|
14
22
|
DateIsoError,
|
|
15
23
|
DateIsoFromDateError,
|
|
16
24
|
DecimalStringError,
|
|
@@ -23,6 +31,7 @@ import type {
|
|
|
23
31
|
Int64Error,
|
|
24
32
|
Int64StringError,
|
|
25
33
|
IntError,
|
|
34
|
+
IntFromStringError,
|
|
26
35
|
IdError,
|
|
27
36
|
JsonError,
|
|
28
37
|
JsonValueError,
|
|
@@ -56,6 +65,7 @@ import type {
|
|
|
56
65
|
SetError,
|
|
57
66
|
TableIdError,
|
|
58
67
|
TemplateLiteralError,
|
|
68
|
+
StartsWithError,
|
|
59
69
|
TrimmedError,
|
|
60
70
|
TupleElementsError,
|
|
61
71
|
TupleError,
|
|
@@ -110,6 +120,12 @@ export const formatBigIntError: TypeErrorFormatter<TypeOfError<"BigInt">> =
|
|
|
110
120
|
export const formatBooleanError: TypeErrorFormatter<TypeOfError<"Boolean">> =
|
|
111
121
|
formatTypeOfError;
|
|
112
122
|
|
|
123
|
+
/** Formats a BooleanFromStringError in French. */
|
|
124
|
+
export const formatBooleanFromStringError: TypeErrorFormatter<
|
|
125
|
+
BooleanFromStringError
|
|
126
|
+
> = (error) =>
|
|
127
|
+
`La valeur ${safelyStringifyUnknownValue(error.value)} n’est pas un booléen. Utilisez true ou false.`;
|
|
128
|
+
|
|
113
129
|
/** Formats a Symbol TypeOfError in French. */
|
|
114
130
|
export const formatSymbolError: TypeErrorFormatter<TypeOfError<"Symbol">> =
|
|
115
131
|
formatTypeOfError;
|
|
@@ -173,16 +189,46 @@ export const formatInt64StringError: TypeErrorFormatter<Int64StringError> = (
|
|
|
173
189
|
) =>
|
|
174
190
|
`La valeur ${safelyStringifyUnknownValue(error.value)} n’est pas une chaîne Int64 valide.`;
|
|
175
191
|
|
|
192
|
+
/** Formats an IdentifierError in French. */
|
|
193
|
+
export const formatIdentifierError: TypeErrorFormatter<IdentifierError> = (
|
|
194
|
+
error,
|
|
195
|
+
) =>
|
|
196
|
+
`La valeur ${safelyStringifyUnknownValue(error.value)} n’est pas un identifiant ${error.casing}.`;
|
|
197
|
+
|
|
176
198
|
/** Formats a CapitalizedError in French. */
|
|
177
199
|
export const formatCapitalizedError: TypeErrorFormatter<CapitalizedError> = (
|
|
178
200
|
error,
|
|
179
201
|
) =>
|
|
180
202
|
`La valeur ${safelyStringifyUnknownValue(error.value)} doit commencer par une majuscule.`;
|
|
181
203
|
|
|
204
|
+
/** Formats an UncapitalizedError in French. */
|
|
205
|
+
export const formatUncapitalizedError: TypeErrorFormatter<
|
|
206
|
+
UncapitalizedError
|
|
207
|
+
> = (error) =>
|
|
208
|
+
`La valeur ${safelyStringifyUnknownValue(error.value)} ne doit pas commencer par une majuscule.`;
|
|
209
|
+
|
|
210
|
+
/** Formats an UppercasedError in French. */
|
|
211
|
+
export const formatUppercasedError: TypeErrorFormatter<UppercasedError> = (
|
|
212
|
+
error,
|
|
213
|
+
) =>
|
|
214
|
+
`La valeur ${safelyStringifyUnknownValue(error.value)} doit être en majuscules.`;
|
|
215
|
+
|
|
216
|
+
/** Formats a LowercasedError in French. */
|
|
217
|
+
export const formatLowercasedError: TypeErrorFormatter<LowercasedError> = (
|
|
218
|
+
error,
|
|
219
|
+
) =>
|
|
220
|
+
`La valeur ${safelyStringifyUnknownValue(error.value)} doit être en minuscules.`;
|
|
221
|
+
|
|
182
222
|
/** Formats a TrimmedError in French. */
|
|
183
223
|
export const formatTrimmedError: TypeErrorFormatter<TrimmedError> = (error) =>
|
|
184
224
|
`La valeur ${safelyStringifyUnknownValue(error.value)} ne doit pas avoir d’espaces au début ou à la fin.`;
|
|
185
225
|
|
|
226
|
+
/** Formats a StartsWithError in French. */
|
|
227
|
+
export const formatStartsWithError: TypeErrorFormatter<StartsWithError> = (
|
|
228
|
+
error,
|
|
229
|
+
) =>
|
|
230
|
+
`La valeur ${safelyStringifyUnknownValue(error.value)} doit commencer par ${safelyStringifyUnknownValue(error.prefix)}.`;
|
|
231
|
+
|
|
186
232
|
/** Formats a MinLengthError in French. */
|
|
187
233
|
export const formatMinLengthError: TypeErrorFormatter<MinLengthError> = (
|
|
188
234
|
error,
|
|
@@ -273,6 +319,12 @@ export const formatNegativeDecimalStringError: TypeErrorFormatter<
|
|
|
273
319
|
export const formatIntError: TypeErrorFormatter<IntError> = (error) =>
|
|
274
320
|
`La valeur ${safelyStringifyUnknownValue(error.value)} doit être un entier sûr.`;
|
|
275
321
|
|
|
322
|
+
/** Formats an IntFromStringError in French. */
|
|
323
|
+
export const formatIntFromStringError: TypeErrorFormatter<
|
|
324
|
+
IntFromStringError
|
|
325
|
+
> = (error) =>
|
|
326
|
+
`La valeur ${safelyStringifyUnknownValue(error.value)} n’est pas un entier décimal.`;
|
|
327
|
+
|
|
276
328
|
/** Formats a GreaterThanError in French. */
|
|
277
329
|
export const formatGreaterThanError: TypeErrorFormatter<GreaterThanError> = (
|
|
278
330
|
error,
|
|
@@ -501,3 +553,21 @@ export const formatJsonValueError: TypeErrorFormatter<JsonValueError> = (
|
|
|
501
553
|
/** Formats a JsonError in French. */
|
|
502
554
|
export const formatJsonError: TypeErrorFormatter<JsonError> = (error) =>
|
|
503
555
|
`La valeur ${safelyStringifyUnknownValue(error.value)} ne peut pas être analysée comme un JsonValue.`;
|
|
556
|
+
|
|
557
|
+
/** Formats a {@link ByteSizeLiteralError}. */
|
|
558
|
+
export const formatByteSizeLiteralError: TypeErrorFormatter<
|
|
559
|
+
ByteSizeLiteralError
|
|
560
|
+
> = (error) =>
|
|
561
|
+
`La valeur ${safelyStringifyUnknownValue(error.value)} n’est pas un littéral de taille en octets. Utilisez une valeur comme "512KiB" ou "1MiB".`;
|
|
562
|
+
|
|
563
|
+
/** Formats a {@link DurationLiteralError}. */
|
|
564
|
+
export const formatDurationLiteralError: TypeErrorFormatter<
|
|
565
|
+
DurationLiteralError
|
|
566
|
+
> = (error) =>
|
|
567
|
+
`La valeur ${safelyStringifyUnknownValue(error.value)} n’est pas un littéral de durée. Utilisez une valeur comme "500ms" ou "1.5s".`;
|
|
568
|
+
|
|
569
|
+
/** Formats a {@link PercentageLiteralError}. */
|
|
570
|
+
export const formatPercentageLiteralError: TypeErrorFormatter<
|
|
571
|
+
PercentageLiteralError
|
|
572
|
+
> = (error) =>
|
|
573
|
+
`La valeur ${safelyStringifyUnknownValue(error.value)} n’est pas un littéral de pourcentage. Utilisez une valeur comme "50%" ou "12.5%".`;
|
package/src/intl/he.ts
CHANGED
|
@@ -4,13 +4,21 @@
|
|
|
4
4
|
* @module
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
+
import type { DurationLiteralError } from "../Time.ts";
|
|
8
|
+
import type { PercentageLiteralError } from "../Number.ts";
|
|
9
|
+
import type { ByteSizeLiteralError } from "../Bytes.ts";
|
|
7
10
|
import { assertNonNullable } from "../Assert.ts";
|
|
8
11
|
import { safelyStringifyUnknownValue } from "../String.ts";
|
|
9
12
|
import type {
|
|
10
13
|
ArrayError,
|
|
11
14
|
Base64UrlError,
|
|
15
|
+
BooleanFromStringError,
|
|
12
16
|
BetweenError,
|
|
17
|
+
IdentifierError,
|
|
13
18
|
CapitalizedError,
|
|
19
|
+
UncapitalizedError,
|
|
20
|
+
UppercasedError,
|
|
21
|
+
LowercasedError,
|
|
14
22
|
DateIsoError,
|
|
15
23
|
DateIsoFromDateError,
|
|
16
24
|
DecimalStringError,
|
|
@@ -23,6 +31,7 @@ import type {
|
|
|
23
31
|
Int64Error,
|
|
24
32
|
Int64StringError,
|
|
25
33
|
IntError,
|
|
34
|
+
IntFromStringError,
|
|
26
35
|
IdError,
|
|
27
36
|
JsonError,
|
|
28
37
|
JsonValueError,
|
|
@@ -56,6 +65,7 @@ import type {
|
|
|
56
65
|
SetError,
|
|
57
66
|
TableIdError,
|
|
58
67
|
TemplateLiteralError,
|
|
68
|
+
StartsWithError,
|
|
59
69
|
TrimmedError,
|
|
60
70
|
TupleElementsError,
|
|
61
71
|
TupleError,
|
|
@@ -110,6 +120,12 @@ export const formatBigIntError: TypeErrorFormatter<TypeOfError<"BigInt">> =
|
|
|
110
120
|
export const formatBooleanError: TypeErrorFormatter<TypeOfError<"Boolean">> =
|
|
111
121
|
formatTypeOfError;
|
|
112
122
|
|
|
123
|
+
/** מעצב שגיאת BooleanFromStringError בעברית. */
|
|
124
|
+
export const formatBooleanFromStringError: TypeErrorFormatter<
|
|
125
|
+
BooleanFromStringError
|
|
126
|
+
> = (error) =>
|
|
127
|
+
`הערך ${safelyStringifyUnknownValue(error.value)} אינו ערך בוליאני. השתמשו ב-true או ב-false.`;
|
|
128
|
+
|
|
113
129
|
/** מעצב שגיאת Symbol TypeOfError בעברית. */
|
|
114
130
|
export const formatSymbolError: TypeErrorFormatter<TypeOfError<"Symbol">> =
|
|
115
131
|
formatTypeOfError;
|
|
@@ -172,15 +188,45 @@ export const formatInt64StringError: TypeErrorFormatter<Int64StringError> = (
|
|
|
172
188
|
) =>
|
|
173
189
|
`הערך ${safelyStringifyUnknownValue(error.value)} אינו מחרוזת Int64 חוקית.`;
|
|
174
190
|
|
|
191
|
+
/** Formats an IdentifierError in Hebrew. */
|
|
192
|
+
export const formatIdentifierError: TypeErrorFormatter<IdentifierError> = (
|
|
193
|
+
error,
|
|
194
|
+
) =>
|
|
195
|
+
`הערך ${safelyStringifyUnknownValue(error.value)} אינו מזהה בתבנית ${error.casing}.`;
|
|
196
|
+
|
|
175
197
|
/** מעצב שגיאת CapitalizedError בעברית. */
|
|
176
198
|
export const formatCapitalizedError: TypeErrorFormatter<CapitalizedError> = (
|
|
177
199
|
error,
|
|
178
200
|
) => `הערך ${safelyStringifyUnknownValue(error.value)} חייב להתחיל באות גדולה.`;
|
|
179
201
|
|
|
202
|
+
/** Formats an UncapitalizedError in Hebrew. */
|
|
203
|
+
export const formatUncapitalizedError: TypeErrorFormatter<
|
|
204
|
+
UncapitalizedError
|
|
205
|
+
> = (error) =>
|
|
206
|
+
`הערך ${safelyStringifyUnknownValue(error.value)} לא יכול להתחיל באות גדולה.`;
|
|
207
|
+
|
|
208
|
+
/** Formats an UppercasedError in Hebrew. */
|
|
209
|
+
export const formatUppercasedError: TypeErrorFormatter<UppercasedError> = (
|
|
210
|
+
error,
|
|
211
|
+
) =>
|
|
212
|
+
`הערך ${safelyStringifyUnknownValue(error.value)} חייב להיות באותיות גדולות.`;
|
|
213
|
+
|
|
214
|
+
/** Formats a LowercasedError in Hebrew. */
|
|
215
|
+
export const formatLowercasedError: TypeErrorFormatter<LowercasedError> = (
|
|
216
|
+
error,
|
|
217
|
+
) =>
|
|
218
|
+
`הערך ${safelyStringifyUnknownValue(error.value)} חייב להיות באותיות קטנות.`;
|
|
219
|
+
|
|
180
220
|
/** מעצב שגיאת TrimmedError בעברית. */
|
|
181
221
|
export const formatTrimmedError: TypeErrorFormatter<TrimmedError> = (error) =>
|
|
182
222
|
`יש להסיר רווחים מיותרים מתחילת הערך ${safelyStringifyUnknownValue(error.value)} ומסופו.`;
|
|
183
223
|
|
|
224
|
+
/** Formats a StartsWithError in Hebrew. */
|
|
225
|
+
export const formatStartsWithError: TypeErrorFormatter<StartsWithError> = (
|
|
226
|
+
error,
|
|
227
|
+
) =>
|
|
228
|
+
`הערך ${safelyStringifyUnknownValue(error.value)} חייב להתחיל ב־${safelyStringifyUnknownValue(error.prefix)}.`;
|
|
229
|
+
|
|
184
230
|
/** מעצב שגיאת MinLengthError בעברית. */
|
|
185
231
|
export const formatMinLengthError: TypeErrorFormatter<MinLengthError> = (
|
|
186
232
|
error,
|
|
@@ -271,6 +317,12 @@ export const formatNegativeDecimalStringError: TypeErrorFormatter<
|
|
|
271
317
|
export const formatIntError: TypeErrorFormatter<IntError> = (error) =>
|
|
272
318
|
`הערך ${safelyStringifyUnknownValue(error.value)} חייב להיות מספר שלם בטוח.`;
|
|
273
319
|
|
|
320
|
+
/** מעצב שגיאת IntFromStringError בעברית. */
|
|
321
|
+
export const formatIntFromStringError: TypeErrorFormatter<
|
|
322
|
+
IntFromStringError
|
|
323
|
+
> = (error) =>
|
|
324
|
+
`הערך ${safelyStringifyUnknownValue(error.value)} אינו מספר שלם עשרוני.`;
|
|
325
|
+
|
|
274
326
|
/** מעצב שגיאת GreaterThanError בעברית. */
|
|
275
327
|
export const formatGreaterThanError: TypeErrorFormatter<GreaterThanError> = (
|
|
276
328
|
error,
|
|
@@ -499,3 +551,21 @@ export const formatJsonValueError: TypeErrorFormatter<JsonValueError> = (
|
|
|
499
551
|
/** מעצב שגיאת JsonError בעברית. */
|
|
500
552
|
export const formatJsonError: TypeErrorFormatter<JsonError> = (error) =>
|
|
501
553
|
`לא ניתן לנתח את הערך ${safelyStringifyUnknownValue(error.value)} ל-JsonValue.`;
|
|
554
|
+
|
|
555
|
+
/** Formats a {@link ByteSizeLiteralError}. */
|
|
556
|
+
export const formatByteSizeLiteralError: TypeErrorFormatter<
|
|
557
|
+
ByteSizeLiteralError
|
|
558
|
+
> = (error) =>
|
|
559
|
+
`הערך ${safelyStringifyUnknownValue(error.value)} אינו ליטרל של גודל בבתים. יש להשתמש בערך כגון "512KiB" או "1MiB".`;
|
|
560
|
+
|
|
561
|
+
/** Formats a {@link DurationLiteralError}. */
|
|
562
|
+
export const formatDurationLiteralError: TypeErrorFormatter<
|
|
563
|
+
DurationLiteralError
|
|
564
|
+
> = (error) =>
|
|
565
|
+
`הערך ${safelyStringifyUnknownValue(error.value)} אינו ליטרל של משך זמן. יש להשתמש בערך כגון "500ms" או "1.5s".`;
|
|
566
|
+
|
|
567
|
+
/** Formats a {@link PercentageLiteralError}. */
|
|
568
|
+
export const formatPercentageLiteralError: TypeErrorFormatter<
|
|
569
|
+
PercentageLiteralError
|
|
570
|
+
> = (error) =>
|
|
571
|
+
`הערך ${safelyStringifyUnknownValue(error.value)} אינו ליטרל של אחוזים. יש להשתמש בערך כגון "50%" או "12.5%".`;
|
package/src/intl/hi.ts
CHANGED
|
@@ -4,13 +4,21 @@
|
|
|
4
4
|
* @module
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
+
import type { DurationLiteralError } from "../Time.ts";
|
|
8
|
+
import type { PercentageLiteralError } from "../Number.ts";
|
|
9
|
+
import type { ByteSizeLiteralError } from "../Bytes.ts";
|
|
7
10
|
import { assertNonNullable } from "../Assert.ts";
|
|
8
11
|
import { safelyStringifyUnknownValue } from "../String.ts";
|
|
9
12
|
import type {
|
|
10
13
|
ArrayError,
|
|
11
14
|
Base64UrlError,
|
|
15
|
+
BooleanFromStringError,
|
|
12
16
|
BetweenError,
|
|
17
|
+
IdentifierError,
|
|
13
18
|
CapitalizedError,
|
|
19
|
+
UncapitalizedError,
|
|
20
|
+
UppercasedError,
|
|
21
|
+
LowercasedError,
|
|
14
22
|
DateIsoError,
|
|
15
23
|
DateIsoFromDateError,
|
|
16
24
|
DecimalStringError,
|
|
@@ -23,6 +31,7 @@ import type {
|
|
|
23
31
|
Int64Error,
|
|
24
32
|
Int64StringError,
|
|
25
33
|
IntError,
|
|
34
|
+
IntFromStringError,
|
|
26
35
|
IdError,
|
|
27
36
|
JsonError,
|
|
28
37
|
JsonValueError,
|
|
@@ -56,6 +65,7 @@ import type {
|
|
|
56
65
|
SetError,
|
|
57
66
|
TableIdError,
|
|
58
67
|
TemplateLiteralError,
|
|
68
|
+
StartsWithError,
|
|
59
69
|
TrimmedError,
|
|
60
70
|
TupleElementsError,
|
|
61
71
|
TupleError,
|
|
@@ -110,6 +120,12 @@ export const formatBigIntError: TypeErrorFormatter<TypeOfError<"BigInt">> =
|
|
|
110
120
|
export const formatBooleanError: TypeErrorFormatter<TypeOfError<"Boolean">> =
|
|
111
121
|
formatTypeOfError;
|
|
112
122
|
|
|
123
|
+
/** BooleanFromStringError को हिंदी में format करता है। */
|
|
124
|
+
export const formatBooleanFromStringError: TypeErrorFormatter<
|
|
125
|
+
BooleanFromStringError
|
|
126
|
+
> = (error) =>
|
|
127
|
+
`मान ${safelyStringifyUnknownValue(error.value)} बूलियन नहीं है। true या false का उपयोग करें।`;
|
|
128
|
+
|
|
113
129
|
/** Symbol TypeOfError को हिंदी में format करता है। */
|
|
114
130
|
export const formatSymbolError: TypeErrorFormatter<TypeOfError<"Symbol">> =
|
|
115
131
|
formatTypeOfError;
|
|
@@ -172,16 +188,46 @@ export const formatInt64StringError: TypeErrorFormatter<Int64StringError> = (
|
|
|
172
188
|
) =>
|
|
173
189
|
`मान ${safelyStringifyUnknownValue(error.value)} मान्य Int64 string नहीं है।`;
|
|
174
190
|
|
|
191
|
+
/** Formats an IdentifierError in Hindi. */
|
|
192
|
+
export const formatIdentifierError: TypeErrorFormatter<IdentifierError> = (
|
|
193
|
+
error,
|
|
194
|
+
) =>
|
|
195
|
+
`मान ${safelyStringifyUnknownValue(error.value)} ${error.casing} पहचानकर्ता नहीं है।`;
|
|
196
|
+
|
|
175
197
|
/** CapitalizedError को हिंदी में format करता है। */
|
|
176
198
|
export const formatCapitalizedError: TypeErrorFormatter<CapitalizedError> = (
|
|
177
199
|
error,
|
|
178
200
|
) =>
|
|
179
201
|
`मान ${safelyStringifyUnknownValue(error.value)} का पहला अक्षर बड़ा होना चाहिए।`;
|
|
180
202
|
|
|
203
|
+
/** Formats an UncapitalizedError in Hindi. */
|
|
204
|
+
export const formatUncapitalizedError: TypeErrorFormatter<
|
|
205
|
+
UncapitalizedError
|
|
206
|
+
> = (error) =>
|
|
207
|
+
`मान ${safelyStringifyUnknownValue(error.value)} बड़े अक्षर से शुरू नहीं होना चाहिए।`;
|
|
208
|
+
|
|
209
|
+
/** Formats an UppercasedError in Hindi. */
|
|
210
|
+
export const formatUppercasedError: TypeErrorFormatter<UppercasedError> = (
|
|
211
|
+
error,
|
|
212
|
+
) =>
|
|
213
|
+
`मान ${safelyStringifyUnknownValue(error.value)} बड़े अक्षरों में होना चाहिए।`;
|
|
214
|
+
|
|
215
|
+
/** Formats a LowercasedError in Hindi. */
|
|
216
|
+
export const formatLowercasedError: TypeErrorFormatter<LowercasedError> = (
|
|
217
|
+
error,
|
|
218
|
+
) =>
|
|
219
|
+
`मान ${safelyStringifyUnknownValue(error.value)} छोटे अक्षरों में होना चाहिए।`;
|
|
220
|
+
|
|
181
221
|
/** TrimmedError को हिंदी में format करता है। */
|
|
182
222
|
export const formatTrimmedError: TypeErrorFormatter<TrimmedError> = (error) =>
|
|
183
223
|
`मान ${safelyStringifyUnknownValue(error.value)} के आरंभ और अंत से whitespace हटाया हुआ होना चाहिए।`;
|
|
184
224
|
|
|
225
|
+
/** Formats a StartsWithError in Hindi. */
|
|
226
|
+
export const formatStartsWithError: TypeErrorFormatter<StartsWithError> = (
|
|
227
|
+
error,
|
|
228
|
+
) =>
|
|
229
|
+
`मान ${safelyStringifyUnknownValue(error.value)} की शुरुआत ${safelyStringifyUnknownValue(error.prefix)} से होनी चाहिए।`;
|
|
230
|
+
|
|
185
231
|
/** MinLengthError को हिंदी में format करता है। */
|
|
186
232
|
export const formatMinLengthError: TypeErrorFormatter<MinLengthError> = (
|
|
187
233
|
error,
|
|
@@ -272,6 +318,12 @@ export const formatNegativeDecimalStringError: TypeErrorFormatter<
|
|
|
272
318
|
export const formatIntError: TypeErrorFormatter<IntError> = (error) =>
|
|
273
319
|
`मान ${safelyStringifyUnknownValue(error.value)} safe integer होना चाहिए।`;
|
|
274
320
|
|
|
321
|
+
/** IntFromStringError को हिंदी में format करता है। */
|
|
322
|
+
export const formatIntFromStringError: TypeErrorFormatter<
|
|
323
|
+
IntFromStringError
|
|
324
|
+
> = (error) =>
|
|
325
|
+
`मान ${safelyStringifyUnknownValue(error.value)} दशमलव पूर्णांक नहीं है।`;
|
|
326
|
+
|
|
275
327
|
/** GreaterThanError को हिंदी में format करता है। */
|
|
276
328
|
export const formatGreaterThanError: TypeErrorFormatter<GreaterThanError> = (
|
|
277
329
|
error,
|
|
@@ -500,3 +552,21 @@ export const formatJsonValueError: TypeErrorFormatter<JsonValueError> = (
|
|
|
500
552
|
/** JsonError को हिंदी में format करता है। */
|
|
501
553
|
export const formatJsonError: TypeErrorFormatter<JsonError> = (error) =>
|
|
502
554
|
`मान ${safelyStringifyUnknownValue(error.value)} को JsonValue में parse नहीं किया जा सकता।`;
|
|
555
|
+
|
|
556
|
+
/** Formats a {@link ByteSizeLiteralError}. */
|
|
557
|
+
export const formatByteSizeLiteralError: TypeErrorFormatter<
|
|
558
|
+
ByteSizeLiteralError
|
|
559
|
+
> = (error) =>
|
|
560
|
+
`मान ${safelyStringifyUnknownValue(error.value)} बाइट आकार का लिटरल नहीं है। "512KiB" या "1MiB" जैसे मान का उपयोग करें।`;
|
|
561
|
+
|
|
562
|
+
/** Formats a {@link DurationLiteralError}. */
|
|
563
|
+
export const formatDurationLiteralError: TypeErrorFormatter<
|
|
564
|
+
DurationLiteralError
|
|
565
|
+
> = (error) =>
|
|
566
|
+
`मान ${safelyStringifyUnknownValue(error.value)} अवधि का लिटरल नहीं है। "500ms" या "1.5s" जैसे मान का उपयोग करें।`;
|
|
567
|
+
|
|
568
|
+
/** Formats a {@link PercentageLiteralError}. */
|
|
569
|
+
export const formatPercentageLiteralError: TypeErrorFormatter<
|
|
570
|
+
PercentageLiteralError
|
|
571
|
+
> = (error) =>
|
|
572
|
+
`मान ${safelyStringifyUnknownValue(error.value)} प्रतिशत का लिटरल नहीं है। "50%" या "12.5%" जैसे मान का उपयोग करें।`;
|
package/src/intl/hr.ts
CHANGED
|
@@ -4,13 +4,21 @@
|
|
|
4
4
|
* @module
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
+
import type { DurationLiteralError } from "../Time.ts";
|
|
8
|
+
import type { PercentageLiteralError } from "../Number.ts";
|
|
9
|
+
import type { ByteSizeLiteralError } from "../Bytes.ts";
|
|
7
10
|
import { assertNonNullable } from "../Assert.ts";
|
|
8
11
|
import { safelyStringifyUnknownValue } from "../String.ts";
|
|
9
12
|
import type {
|
|
10
13
|
ArrayError,
|
|
11
14
|
Base64UrlError,
|
|
15
|
+
BooleanFromStringError,
|
|
12
16
|
BetweenError,
|
|
17
|
+
IdentifierError,
|
|
13
18
|
CapitalizedError,
|
|
19
|
+
UncapitalizedError,
|
|
20
|
+
UppercasedError,
|
|
21
|
+
LowercasedError,
|
|
14
22
|
DateIsoError,
|
|
15
23
|
DateIsoFromDateError,
|
|
16
24
|
DecimalStringError,
|
|
@@ -23,6 +31,7 @@ import type {
|
|
|
23
31
|
Int64Error,
|
|
24
32
|
Int64StringError,
|
|
25
33
|
IntError,
|
|
34
|
+
IntFromStringError,
|
|
26
35
|
IdError,
|
|
27
36
|
JsonError,
|
|
28
37
|
JsonValueError,
|
|
@@ -56,6 +65,7 @@ import type {
|
|
|
56
65
|
SetError,
|
|
57
66
|
TableIdError,
|
|
58
67
|
TemplateLiteralError,
|
|
68
|
+
StartsWithError,
|
|
59
69
|
TrimmedError,
|
|
60
70
|
TupleElementsError,
|
|
61
71
|
TupleError,
|
|
@@ -117,6 +127,12 @@ export const formatBigIntError: TypeErrorFormatter<TypeOfError<"BigInt">> =
|
|
|
117
127
|
export const formatBooleanError: TypeErrorFormatter<TypeOfError<"Boolean">> =
|
|
118
128
|
formatTypeOfError;
|
|
119
129
|
|
|
130
|
+
/** Formats a BooleanFromStringError in Croatian. */
|
|
131
|
+
export const formatBooleanFromStringError: TypeErrorFormatter<
|
|
132
|
+
BooleanFromStringError
|
|
133
|
+
> = (error) =>
|
|
134
|
+
`Vrijednost ${safelyStringifyUnknownValue(error.value)} nije logička vrijednost. Upotrijebite true ili false.`;
|
|
135
|
+
|
|
120
136
|
/** Formats a Symbol TypeOfError in Croatian. */
|
|
121
137
|
export const formatSymbolError: TypeErrorFormatter<TypeOfError<"Symbol">> =
|
|
122
138
|
formatTypeOfError;
|
|
@@ -179,16 +195,46 @@ export const formatInt64StringError: TypeErrorFormatter<Int64StringError> = (
|
|
|
179
195
|
) =>
|
|
180
196
|
`Vrijednost ${safelyStringifyUnknownValue(error.value)} nije valjani Int64 niz.`;
|
|
181
197
|
|
|
198
|
+
/** Formats an IdentifierError in Croatian. */
|
|
199
|
+
export const formatIdentifierError: TypeErrorFormatter<IdentifierError> = (
|
|
200
|
+
error,
|
|
201
|
+
) =>
|
|
202
|
+
`Vrijednost ${safelyStringifyUnknownValue(error.value)} nije identifikator u formatu ${error.casing}.`;
|
|
203
|
+
|
|
182
204
|
/** Formats a CapitalizedError in Croatian. */
|
|
183
205
|
export const formatCapitalizedError: TypeErrorFormatter<CapitalizedError> = (
|
|
184
206
|
error,
|
|
185
207
|
) =>
|
|
186
208
|
`Vrijednost ${safelyStringifyUnknownValue(error.value)} mora počinjati velikim slovom.`;
|
|
187
209
|
|
|
210
|
+
/** Formats an UncapitalizedError in Croatian. */
|
|
211
|
+
export const formatUncapitalizedError: TypeErrorFormatter<
|
|
212
|
+
UncapitalizedError
|
|
213
|
+
> = (error) =>
|
|
214
|
+
`Vrijednost ${safelyStringifyUnknownValue(error.value)} ne smije počinjati velikim slovom.`;
|
|
215
|
+
|
|
216
|
+
/** Formats an UppercasedError in Croatian. */
|
|
217
|
+
export const formatUppercasedError: TypeErrorFormatter<UppercasedError> = (
|
|
218
|
+
error,
|
|
219
|
+
) =>
|
|
220
|
+
`Vrijednost ${safelyStringifyUnknownValue(error.value)} mora biti napisana velikim slovima.`;
|
|
221
|
+
|
|
222
|
+
/** Formats a LowercasedError in Croatian. */
|
|
223
|
+
export const formatLowercasedError: TypeErrorFormatter<LowercasedError> = (
|
|
224
|
+
error,
|
|
225
|
+
) =>
|
|
226
|
+
`Vrijednost ${safelyStringifyUnknownValue(error.value)} mora biti napisana malim slovima.`;
|
|
227
|
+
|
|
188
228
|
/** Formats a TrimmedError in Croatian. */
|
|
189
229
|
export const formatTrimmedError: TypeErrorFormatter<TrimmedError> = (error) =>
|
|
190
230
|
`Vrijednost ${safelyStringifyUnknownValue(error.value)} ne smije imati razmake na početku ni na kraju.`;
|
|
191
231
|
|
|
232
|
+
/** Formats a StartsWithError in Croatian. */
|
|
233
|
+
export const formatStartsWithError: TypeErrorFormatter<StartsWithError> = (
|
|
234
|
+
error,
|
|
235
|
+
) =>
|
|
236
|
+
`Vrijednost ${safelyStringifyUnknownValue(error.value)} mora počinjati s ${safelyStringifyUnknownValue(error.prefix)}.`;
|
|
237
|
+
|
|
192
238
|
/** Formats a MinLengthError in Croatian. */
|
|
193
239
|
export const formatMinLengthError: TypeErrorFormatter<MinLengthError> = (
|
|
194
240
|
error,
|
|
@@ -279,6 +325,12 @@ export const formatNegativeDecimalStringError: TypeErrorFormatter<
|
|
|
279
325
|
export const formatIntError: TypeErrorFormatter<IntError> = (error) =>
|
|
280
326
|
`Vrijednost ${safelyStringifyUnknownValue(error.value)} mora biti siguran cijeli broj.`;
|
|
281
327
|
|
|
328
|
+
/** Formats an IntFromStringError in Croatian. */
|
|
329
|
+
export const formatIntFromStringError: TypeErrorFormatter<
|
|
330
|
+
IntFromStringError
|
|
331
|
+
> = (error) =>
|
|
332
|
+
`Vrijednost ${safelyStringifyUnknownValue(error.value)} nije decimalni cijeli broj.`;
|
|
333
|
+
|
|
282
334
|
/** Formats a GreaterThanError in Croatian. */
|
|
283
335
|
export const formatGreaterThanError: TypeErrorFormatter<GreaterThanError> = (
|
|
284
336
|
error,
|
|
@@ -507,3 +559,21 @@ export const formatJsonValueError: TypeErrorFormatter<JsonValueError> = (
|
|
|
507
559
|
/** Formats a JsonError in Croatian. */
|
|
508
560
|
export const formatJsonError: TypeErrorFormatter<JsonError> = (error) =>
|
|
509
561
|
`Vrijednost ${safelyStringifyUnknownValue(error.value)} ne može se analizirati kao JsonValue.`;
|
|
562
|
+
|
|
563
|
+
/** Formats a {@link ByteSizeLiteralError}. */
|
|
564
|
+
export const formatByteSizeLiteralError: TypeErrorFormatter<
|
|
565
|
+
ByteSizeLiteralError
|
|
566
|
+
> = (error) =>
|
|
567
|
+
`Vrijednost ${safelyStringifyUnknownValue(error.value)} nije literal veličine u bajtovima. Upotrijebite vrijednost poput "512KiB" ili "1MiB".`;
|
|
568
|
+
|
|
569
|
+
/** Formats a {@link DurationLiteralError}. */
|
|
570
|
+
export const formatDurationLiteralError: TypeErrorFormatter<
|
|
571
|
+
DurationLiteralError
|
|
572
|
+
> = (error) =>
|
|
573
|
+
`Vrijednost ${safelyStringifyUnknownValue(error.value)} nije literal trajanja. Upotrijebite vrijednost poput "500ms" ili "1.5s".`;
|
|
574
|
+
|
|
575
|
+
/** Formats a {@link PercentageLiteralError}. */
|
|
576
|
+
export const formatPercentageLiteralError: TypeErrorFormatter<
|
|
577
|
+
PercentageLiteralError
|
|
578
|
+
> = (error) =>
|
|
579
|
+
`Vrijednost ${safelyStringifyUnknownValue(error.value)} nije literal postotka. Upotrijebite vrijednost poput "50%" ili "12.5%".`;
|
package/src/intl/hu.ts
CHANGED
|
@@ -4,13 +4,21 @@
|
|
|
4
4
|
* @module
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
+
import type { DurationLiteralError } from "../Time.ts";
|
|
8
|
+
import type { PercentageLiteralError } from "../Number.ts";
|
|
9
|
+
import type { ByteSizeLiteralError } from "../Bytes.ts";
|
|
7
10
|
import { assertNonNullable } from "../Assert.ts";
|
|
8
11
|
import { safelyStringifyUnknownValue } from "../String.ts";
|
|
9
12
|
import type {
|
|
10
13
|
ArrayError,
|
|
11
14
|
Base64UrlError,
|
|
15
|
+
BooleanFromStringError,
|
|
12
16
|
BetweenError,
|
|
17
|
+
IdentifierError,
|
|
13
18
|
CapitalizedError,
|
|
19
|
+
UncapitalizedError,
|
|
20
|
+
UppercasedError,
|
|
21
|
+
LowercasedError,
|
|
14
22
|
DateIsoError,
|
|
15
23
|
DateIsoFromDateError,
|
|
16
24
|
DecimalStringError,
|
|
@@ -23,6 +31,7 @@ import type {
|
|
|
23
31
|
Int64Error,
|
|
24
32
|
Int64StringError,
|
|
25
33
|
IntError,
|
|
34
|
+
IntFromStringError,
|
|
26
35
|
IdError,
|
|
27
36
|
JsonError,
|
|
28
37
|
JsonValueError,
|
|
@@ -56,6 +65,7 @@ import type {
|
|
|
56
65
|
SetError,
|
|
57
66
|
TableIdError,
|
|
58
67
|
TemplateLiteralError,
|
|
68
|
+
StartsWithError,
|
|
59
69
|
TrimmedError,
|
|
60
70
|
TupleElementsError,
|
|
61
71
|
TupleError,
|
|
@@ -135,12 +145,43 @@ export const formatInt64StringError: TypeErrorFormatter<Int64StringError> = (
|
|
|
135
145
|
error,
|
|
136
146
|
) =>
|
|
137
147
|
`A(z) ${safelyStringifyUnknownValue(error.value)} érték nem érvényes Int64 karakterlánc.`;
|
|
148
|
+
|
|
149
|
+
/** Formats an IdentifierError in Hungarian. */
|
|
150
|
+
export const formatIdentifierError: TypeErrorFormatter<IdentifierError> = (
|
|
151
|
+
error,
|
|
152
|
+
) =>
|
|
153
|
+
`A(z) ${safelyStringifyUnknownValue(error.value)} érték nem ${error.casing} azonosító.`;
|
|
154
|
+
|
|
138
155
|
export const formatCapitalizedError: TypeErrorFormatter<CapitalizedError> = (
|
|
139
156
|
error,
|
|
140
157
|
) =>
|
|
141
158
|
`A(z) ${safelyStringifyUnknownValue(error.value)} értéknek nagybetűvel kell kezdődnie.`;
|
|
159
|
+
|
|
160
|
+
/** Formats an UncapitalizedError in Hungarian. */
|
|
161
|
+
export const formatUncapitalizedError: TypeErrorFormatter<
|
|
162
|
+
UncapitalizedError
|
|
163
|
+
> = (error) =>
|
|
164
|
+
`A(z) ${safelyStringifyUnknownValue(error.value)} érték nem kezdődhet nagybetűvel.`;
|
|
165
|
+
|
|
166
|
+
/** Formats an UppercasedError in Hungarian. */
|
|
167
|
+
export const formatUppercasedError: TypeErrorFormatter<UppercasedError> = (
|
|
168
|
+
error,
|
|
169
|
+
) =>
|
|
170
|
+
`A(z) ${safelyStringifyUnknownValue(error.value)} értéknek nagybetűsnek kell lennie.`;
|
|
171
|
+
|
|
172
|
+
/** Formats a LowercasedError in Hungarian. */
|
|
173
|
+
export const formatLowercasedError: TypeErrorFormatter<LowercasedError> = (
|
|
174
|
+
error,
|
|
175
|
+
) =>
|
|
176
|
+
`A(z) ${safelyStringifyUnknownValue(error.value)} értéknek kisbetűsnek kell lennie.`;
|
|
142
177
|
export const formatTrimmedError: TypeErrorFormatter<TrimmedError> = (error) =>
|
|
143
178
|
`A(z) ${safelyStringifyUnknownValue(error.value)} értéknek nem lehetnek kezdő vagy záró szóközei.`;
|
|
179
|
+
/** Formats a StartsWithError in Hungarian. */
|
|
180
|
+
export const formatStartsWithError: TypeErrorFormatter<StartsWithError> = (
|
|
181
|
+
error,
|
|
182
|
+
) =>
|
|
183
|
+
`A(z) ${safelyStringifyUnknownValue(error.value)} értéknek a(z) ${safelyStringifyUnknownValue(error.prefix)} előtaggal kell kezdődnie.`;
|
|
184
|
+
|
|
144
185
|
export const formatMinLengthError: TypeErrorFormatter<MinLengthError> = (
|
|
145
186
|
error,
|
|
146
187
|
) =>
|
|
@@ -220,6 +261,16 @@ export const formatMultipleOfError: TypeErrorFormatter<MultipleOfError> = (
|
|
|
220
261
|
export const formatBetweenError: TypeErrorFormatter<BetweenError> = (error) =>
|
|
221
262
|
`A(z) ${safelyStringifyUnknownValue(error.value)} értéknek ${error.min} és ${error.max} között kell lennie, a határokat is beleértve.`;
|
|
222
263
|
|
|
264
|
+
export const formatBooleanFromStringError: TypeErrorFormatter<
|
|
265
|
+
BooleanFromStringError
|
|
266
|
+
> = (error) =>
|
|
267
|
+
`A(z) ${safelyStringifyUnknownValue(error.value)} érték nem logikai érték. Használja a true vagy false értéket.`;
|
|
268
|
+
|
|
269
|
+
export const formatIntFromStringError: TypeErrorFormatter<
|
|
270
|
+
IntFromStringError
|
|
271
|
+
> = (error) =>
|
|
272
|
+
`A(z) ${safelyStringifyUnknownValue(error.value)} érték nem decimális egész szám.`;
|
|
273
|
+
|
|
223
274
|
export const formatArrayError: TypeErrorFormatter<ArrayError> = (error) => {
|
|
224
275
|
if (error.reason.kind === "NotArray") {
|
|
225
276
|
return `A(z) ${safelyStringifyUnknownValue(error.reason.value)} érték nem tömb.`;
|
|
@@ -399,3 +450,21 @@ export const formatJsonValueError: TypeErrorFormatter<JsonValueError> = (
|
|
|
399
450
|
|
|
400
451
|
export const formatJsonError: TypeErrorFormatter<JsonError> = (error) =>
|
|
401
452
|
`A(z) ${safelyStringifyUnknownValue(error.value)} érték nem elemezhető JsonValue-vá.`;
|
|
453
|
+
|
|
454
|
+
/** Formats a {@link ByteSizeLiteralError}. */
|
|
455
|
+
export const formatByteSizeLiteralError: TypeErrorFormatter<
|
|
456
|
+
ByteSizeLiteralError
|
|
457
|
+
> = (error) =>
|
|
458
|
+
`A(z) ${safelyStringifyUnknownValue(error.value)} érték nem bájtméret-literál. Használjon például "512KiB" vagy "1MiB" értéket.`;
|
|
459
|
+
|
|
460
|
+
/** Formats a {@link DurationLiteralError}. */
|
|
461
|
+
export const formatDurationLiteralError: TypeErrorFormatter<
|
|
462
|
+
DurationLiteralError
|
|
463
|
+
> = (error) =>
|
|
464
|
+
`A(z) ${safelyStringifyUnknownValue(error.value)} érték nem időtartam-literál. Használjon például "500ms" vagy "1.5s" értéket.`;
|
|
465
|
+
|
|
466
|
+
/** Formats a {@link PercentageLiteralError}. */
|
|
467
|
+
export const formatPercentageLiteralError: TypeErrorFormatter<
|
|
468
|
+
PercentageLiteralError
|
|
469
|
+
> = (error) =>
|
|
470
|
+
`A(z) ${safelyStringifyUnknownValue(error.value)} érték nem százalékliterál. Használjon például "50%" vagy "12.5%" értéket.`;
|