mirror of
https://github.com/hex248/ob248.com.git
synced 2026-02-08 18:53:02 +00:00
merge new into master
This commit is contained in:
111
node_modules/zod/v4/locales/cs.js
generated
vendored
Normal file
111
node_modules/zod/v4/locales/cs.js
generated
vendored
Normal file
@@ -0,0 +1,111 @@
|
||||
import * as util from "../core/util.js";
|
||||
const error = () => {
|
||||
const Sizable = {
|
||||
string: { unit: "znaků", verb: "mít" },
|
||||
file: { unit: "bajtů", verb: "mít" },
|
||||
array: { unit: "prvků", verb: "mít" },
|
||||
set: { unit: "prvků", verb: "mít" },
|
||||
};
|
||||
function getSizing(origin) {
|
||||
return Sizable[origin] ?? null;
|
||||
}
|
||||
const FormatDictionary = {
|
||||
regex: "regulární výraz",
|
||||
email: "e-mailová adresa",
|
||||
url: "URL",
|
||||
emoji: "emoji",
|
||||
uuid: "UUID",
|
||||
uuidv4: "UUIDv4",
|
||||
uuidv6: "UUIDv6",
|
||||
nanoid: "nanoid",
|
||||
guid: "GUID",
|
||||
cuid: "cuid",
|
||||
cuid2: "cuid2",
|
||||
ulid: "ULID",
|
||||
xid: "XID",
|
||||
ksuid: "KSUID",
|
||||
datetime: "datum a čas ve formátu ISO",
|
||||
date: "datum ve formátu ISO",
|
||||
time: "čas ve formátu ISO",
|
||||
duration: "doba trvání ISO",
|
||||
ipv4: "IPv4 adresa",
|
||||
ipv6: "IPv6 adresa",
|
||||
cidrv4: "rozsah IPv4",
|
||||
cidrv6: "rozsah IPv6",
|
||||
base64: "řetězec zakódovaný ve formátu base64",
|
||||
base64url: "řetězec zakódovaný ve formátu base64url",
|
||||
json_string: "řetězec ve formátu JSON",
|
||||
e164: "číslo E.164",
|
||||
jwt: "JWT",
|
||||
template_literal: "vstup",
|
||||
};
|
||||
const TypeDictionary = {
|
||||
nan: "NaN",
|
||||
number: "číslo",
|
||||
string: "řetězec",
|
||||
function: "funkce",
|
||||
array: "pole",
|
||||
};
|
||||
return (issue) => {
|
||||
switch (issue.code) {
|
||||
case "invalid_type": {
|
||||
const expected = TypeDictionary[issue.expected] ?? issue.expected;
|
||||
const receivedType = util.parsedType(issue.input);
|
||||
const received = TypeDictionary[receivedType] ?? receivedType;
|
||||
if (/^[A-Z]/.test(issue.expected)) {
|
||||
return `Neplatný vstup: očekáváno instanceof ${issue.expected}, obdrženo ${received}`;
|
||||
}
|
||||
return `Neplatný vstup: očekáváno ${expected}, obdrženo ${received}`;
|
||||
}
|
||||
case "invalid_value":
|
||||
if (issue.values.length === 1)
|
||||
return `Neplatný vstup: očekáváno ${util.stringifyPrimitive(issue.values[0])}`;
|
||||
return `Neplatná možnost: očekávána jedna z hodnot ${util.joinValues(issue.values, "|")}`;
|
||||
case "too_big": {
|
||||
const adj = issue.inclusive ? "<=" : "<";
|
||||
const sizing = getSizing(issue.origin);
|
||||
if (sizing) {
|
||||
return `Hodnota je příliš velká: ${issue.origin ?? "hodnota"} musí mít ${adj}${issue.maximum.toString()} ${sizing.unit ?? "prvků"}`;
|
||||
}
|
||||
return `Hodnota je příliš velká: ${issue.origin ?? "hodnota"} musí být ${adj}${issue.maximum.toString()}`;
|
||||
}
|
||||
case "too_small": {
|
||||
const adj = issue.inclusive ? ">=" : ">";
|
||||
const sizing = getSizing(issue.origin);
|
||||
if (sizing) {
|
||||
return `Hodnota je příliš malá: ${issue.origin ?? "hodnota"} musí mít ${adj}${issue.minimum.toString()} ${sizing.unit ?? "prvků"}`;
|
||||
}
|
||||
return `Hodnota je příliš malá: ${issue.origin ?? "hodnota"} musí být ${adj}${issue.minimum.toString()}`;
|
||||
}
|
||||
case "invalid_format": {
|
||||
const _issue = issue;
|
||||
if (_issue.format === "starts_with")
|
||||
return `Neplatný řetězec: musí začínat na "${_issue.prefix}"`;
|
||||
if (_issue.format === "ends_with")
|
||||
return `Neplatný řetězec: musí končit na "${_issue.suffix}"`;
|
||||
if (_issue.format === "includes")
|
||||
return `Neplatný řetězec: musí obsahovat "${_issue.includes}"`;
|
||||
if (_issue.format === "regex")
|
||||
return `Neplatný řetězec: musí odpovídat vzoru ${_issue.pattern}`;
|
||||
return `Neplatný formát ${FormatDictionary[_issue.format] ?? issue.format}`;
|
||||
}
|
||||
case "not_multiple_of":
|
||||
return `Neplatné číslo: musí být násobkem ${issue.divisor}`;
|
||||
case "unrecognized_keys":
|
||||
return `Neznámé klíče: ${util.joinValues(issue.keys, ", ")}`;
|
||||
case "invalid_key":
|
||||
return `Neplatný klíč v ${issue.origin}`;
|
||||
case "invalid_union":
|
||||
return "Neplatný vstup";
|
||||
case "invalid_element":
|
||||
return `Neplatná hodnota v ${issue.origin}`;
|
||||
default:
|
||||
return `Neplatný vstup`;
|
||||
}
|
||||
};
|
||||
};
|
||||
export default function () {
|
||||
return {
|
||||
localeError: error(),
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user