@rexezuge/i18n 1.0.2 → 1.0.3

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.
@@ -1 +1 @@
1
- {"version":3,"file":"BackendStrings.js","sourceRoot":"","sources":["../src/BackendStrings.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH,8EAA8E;AAC9E,MAAM,iBAAiB,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,CAAU,CAAC;AAuBlH;;;;;;;GAOG;AACH,SAAS,uBAAuB,CAAC,GAAW;IAC1C,MAAM,UAAU,GAAG,GAAG,CAAC,IAAI,EAAE,CAAC,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IACnD,MAAM,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IACpD,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IACpC,MAAM,QAAQ,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC;IAClD,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,QAAQ,CAAC;IACxC,MAAM,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;IACzG,OAAO,CAAC,QAAQ,EAAE,GAAG,IAAI,CAAC,CA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C,EAAE,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,KAAK,IAAI,CAAC,CAAC;IAC7F,OAAO,CAAC,KAAK,IAAI,IAAI,CAAoB,CAAC;AAC5C,CAAC;AAED,OAAO,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,eAAe,EAAE,CAAC","sourcesContent":["/**\n * The key/type source of truth for every localized backend string.\n *\n * ## Provenance\n *\n * Distilled from `packages/shared/src/i18n/BackendStrings.ts` across the\n * consumer repos, comparing them one by one:\n *\n * - **Durable-DAV** — the canonical base. Its `AGENTS.md` pins backend strings\n * to `packages/shared/src/i18n`, and it is the copy that *deliberately*\n * shrunk: the `repo`/`token`/`issue`/`git`/`namespace` groups, 15 keys across\n * 12 locales (~60 translated strings), were deleted because no production\n * code path ever read them and `validate_locales.mjs` failed CI on a missing\n * translation of a key nothing could emit.\n * - **Durable-DAV-Router** — same twelve locales, same `common` group, same\n * fallback chain, plus a `resolveLocalizedStrings(locale, fallback)` chain\n * and a `formatBackendString` interpolator (its own data is gone, so that\n * interpolator is residue here too).\n * - **Edge-Git** — same twelve locales and same three `common` strings, but it\n * still carries the five groups Durable-DAV deleted, and its bundle is\n * therefore the only one with `{placeholder}` values.\n * - **Mail-Otter** — same twelve locales, an entirely different product\n * bundle (digest/actionPage/summary/chat/tracking/notify/results/csv). No\n * overlap with the `common` group at all.\n * - **Edge-Sonic** — partial: an English-only single-file bundle with one\n * flattened `common` group of eight keys. Noted, not ported.\n *\n * Durable-DAV's set wins, so `common` with three keys is the canonical\n * bundle: three repos ship those three strings identically, a fourth ships\n * them plus five unreachable groups, and the fifth ships something else\n * entirely.\n *\n * ## Self-contained\n *\n * The source repos import `canonicalizeLanguageTag` from\n * `shared/utils/LanguageTag`. This package has zero runtime dependencies, so\n * that one function is inlined below rather than re-exported from a sibling\n * kit package — the tag grammar is small, fixed, and testable here.\n */\n\n/** Every locale the bundle ships. `en` is the fallback and is never empty. */\nconst SUPPORTED_LOCALES = ['en', 'de', 'fr', 'es', 'it', 'nl', 'pt', 'pl', 'ja', 'zh-CN', 'zh-TW', 'ko'] as const;\n\n/** A locale tag that has a bundle. Anything else resolves through `normalizeLocale`. */\ntype SupportedLocale = (typeof SUPPORTED_LOCALES)[number];\n\n/**\n * Messages a request path can actually emit.\n *\n * The group exists because a route boundary maps a `ServiceError` onto a status\n * and, for the 401/403/500 pair, onto a client-facing sentence. Nothing here is\n * interpolated: a message is either static or comes from the error itself, so a\n * `{placeholder}` would be printed to a client verbatim.\n */\ninterface CommonStrings {\n unauthorized: string;\n forbidden: string;\n internalError: string;\n}\n\ninterface BackendStrings {\n common: CommonStrings;\n}\n\n/**\n * Fold a raw language tag to its canonical form.\n *\n * `_` separators are macOS-style and must not create a distinct tag; the\n * language subtag is lowercase and any two-letter region is uppercase, which\n * is what makes `zh_cn`, `ZH-CN` and `zh-CN` the *same* tag before any bundle\n * lookup happens. A tag that is only separators is `en`, not an empty string.\n */\nfunction canonicalizeLanguageTag(tag: string): string {\n const normalized = tag.trim().replaceAll('_', '-');\n const parts = normalized.split('-').filter(Boolean);\n if (parts.length === 0) return 'en';\n const language = (parts[0] ?? 'en').toLowerCase();\n if (parts.length === 1) return language;\n const rest = parts.slice(1).map((part) => (part.length === 2 ? part.toUpperCase() : part.toLowerCase()));\n return [language, ...rest].join('-');\n}\n\n/**\n * Resolve any tag — or nothing at all — to a locale that has a bundle.\n *\n * The fallback rules, in order:\n *\n * 1. Nothing, or not a string, is `en`. A missing `Accept-Language` and a\n * corrupt one must not diverge.\n * 2. An exact canonical hit wins, so `zh-CN` stays distinct from `zh-TW`.\n * 3. `zh` — and any other `zh-*` region — collapses to `zh-CN`. It is the\n * default Simplified bundle, which is what `zh` means to a client that\n * sends the bare language subtag.\n * 4. A base-language match maps a regional variant onto its language bundle:\n * `de-AT` is `de`, `pt-BR` is `pt`. A wrong-but-close locale is worse than\n * an honest fallback, but an unrelated one (`xx`) is not mapped at all.\n */\nfunction normalizeLocale(locale: string | null | undefined): SupportedLocale {\n if (!locale || typeof locale !== 'string') return 'en';\n const canonical = canonicalizeLanguageTag(locale);\n if ((SUPPORTED_LOCALES as readonly string[]).includes(canonical)) {\n return canonical as SupportedLocale;\n }\n const base = canonical.split('-', 1)[0]?.toLowerCase() ?? 'en';\n if (base === 'zh') return 'zh-CN';\n const match = (SUPPORTED_LOCALES as readonly string[]).find((l) => l.toLowerCase() === base);\n return (match || 'en') as SupportedLocale;\n}\n\nexport { SUPPORTED_LOCALES, canonicalizeLanguageTag, normalizeLocale };\nexport type { BackendStrings, CommonStrings, SupportedLocale };\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"getLocalizedStrings.js","sourceRoot":"","sources":["../src/getLocalizedStrings.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C;;;;;;GAMG;AACH,MAAM,cAAc,GAA4C;IAC9D,EAAE,EAAE,SAAS;IACb,EAAE,EAAE,SAAS;IACb,EAAE,EAAE,SAAS;IACb,EAAE,EAAE,SAAS;IACb,EAAE,EAA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AAc,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C;;;;;;GAMG;AACH,MAAM,cAAc,GAA4C;IAC9D,EAAE,EAAE,SAAS;IACb,EAAE,EAAE,SAAS;IACb,EAAE,EAAE,SAAS;IACb,EAAE,EAAE,SAAS;IACb,EAAE,EAAE,SAAS;IACb,EAAE,EAAE,SAAS;IACb,EAAE,EAAE,SAAS;IACb,EAAE,EAAE,SAAS;IACb,EAAE,EAAE,SAAS;IACb,OAAO,EAAE,WAAW;IACpB,OAAO,EAAE,WAAW;IACpB,EAAE,EAAE,SAAS;CACd,CAAC;AAEF;;;;;;;GAOG;AACH,SAAS,mBAAmB,CAAC,MAAiC;IAC5D,OAAO,cAAc,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC,CAAC;AACjD,CAAC;AAED;;;;;;;;;;GAUG;AACH,SAAS,uBAAuB,CAAC,MAAsB,EAAE,QAAwB;IAC/E,MAAM,OAAO,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC;IACxC,OAAO,mBAAmB,CAAC,OAAO,KAAK,IAAI,CAAC,CAAC,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;AACrF,CAAC;AAED,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,CAAC","sourcesContent":["import type { BackendStrings, SupportedLocale } from './BackendStrings';\nimport { normalizeLocale } from './BackendStrings';\nimport { deStrings } from './locales/de';\nimport { enStrings } from './locales/en';\nimport { esStrings } from './locales/es';\nimport { frStrings } from './locales/fr';\nimport { itStrings } from './locales/it';\nimport { jaStrings } from './locales/ja';\nimport { koStrings } from './locales/ko';\nimport { nlStrings } from './locales/nl';\nimport { plStrings } from './locales/pl';\nimport { ptStrings } from './locales/pt';\nimport { zhCNStrings } from './locales/zh-CN';\nimport { zhTWStrings } from './locales/zh-TW';\n\n/**\n * The twelve bundles, keyed by locale.\n *\n * Typed as a total `Record` rather than a partial map with a `??` at the read\n * site: adding a locale to `SUPPORTED_LOCALES` without adding a bundle is a\n * compile error here instead of a runtime `undefined` string at the boundary.\n */\nconst LOCALE_STRINGS: Record<SupportedLocale, BackendStrings> = {\n en: enStrings,\n de: deStrings,\n fr: frStrings,\n es: esStrings,\n it: itStrings,\n nl: nlStrings,\n pt: ptStrings,\n pl: plStrings,\n ja: jaStrings,\n 'zh-CN': zhCNStrings,\n 'zh-TW': zhTWStrings,\n ko: koStrings,\n};\n\n/**\n * Look up the bundle for a language tag.\n *\n * `null`/`undefined`/`\"\"`/unknown all land on `en` through `normalizeLocale`,\n * so a caller cannot get `undefined` back and never has to guard the read.\n * Prefer this over indexing `LOCALE_STRINGS` directly — the index would happily\n * return `undefined` for a tag that has no bundle.\n */\nfunction getLocalizedStrings(locale: string | null | undefined): BackendStrings {\n return LOCALE_STRINGS[normalizeLocale(locale)];\n}\n\n/**\n * Look up a bundle, falling back to a second preference before `en`.\n *\n * This is the `Accept-Language` plus stored-user-preference pair: the header is\n * what the *client* sent this request, the stored preference is what the user\n * chose once. The stored preference only speaks when the header does not\n * express a real choice, which is what `primary === 'en'` means — an explicit\n * `en` header and an absent header are indistinguishable to this resolver, and\n * that is deliberate, because a browser that sends `en` while the user picked\n * `ja` should still get `ja`.\n */\nfunction resolveLocalizedStrings(locale?: string | null, fallback?: string | null): BackendStrings {\n const primary = normalizeLocale(locale);\n return getLocalizedStrings(primary === 'en' ? normalizeLocale(fallback) : primary);\n}\n\nexport { LOCALE_STRINGS, getLocalizedStrings, resolveLocalizedStrings };\n"]}
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAE/F,OAAO,E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AO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC","sourcesContent":["/**\n * `@rexezuge/i18n` — the backend string bundle and its twelve locales.\n *\n * Zero runtime dependencies. The bundle is one `common` group of three keys\n * (see `BackendStrings.ts` for the provenance and for why the `repo`/`token`/\n * `git` groups are not here); the locale table, the fallback chain, and the\n * lookup are the parts every consumer boundary needs.\n */\nexport { SUPPORTED_LOCALES, canonicalizeLanguageTag, normalizeLocale } from './BackendStrings';\nexport type { BackendStrings, CommonStrings, SupportedLocale } from './BackendStrings';\nexport { LOCALE_STRINGS, getLocalizedStrings, resolveLocalizedStrings } from './getLocalizedStrings';\n\n// The bundles themselves, exported so a consumer can read one directly (a\n// migration script, a test, a bundle-level integrity check) without reaching\n// through the table.\nexport { deStrings } from './locales/de';\nexport { enStrings } from './locales/en';\nexport { esStrings } from './locales/es';\nexport { frStrings } from './locales/fr';\nexport { itStrings } from './locales/it';\nexport { jaStrings } from './locales/ja';\nexport { koStrings } from './locales/ko';\nexport { nlStrings } from './locales/nl';\nexport { plStrings } from './locales/pl';\nexport { ptStrings } from './locales/pt';\nexport { zhCNStrings } from './locales/zh-CN';\nexport { zhTWStrings } from './locales/zh-TW';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"de.js","sourceRoot":"","sources":["../../src/locales/de.ts"],"names":[],"mappings":"AAEA,MAAM,SAAS,GAAmB;IAChC,MAAM,EAAE;QACN,YAAY,EAAE,iCAAiC;QAC/C,SAAS,EAAE,qBAAqB;QAChC,aAAa,EAAE,wBAAwB;KACxC;CACF,CAAC;AAEF,OAAO,EAAE,SAAS,EAAE,CAAC"}
1
+ {"version":3,"file":"de.js","sourceRoot":"","sources":["../../src/locales/de.ts"],"names":[],"mappings":"AAEA,MAAM,SAAS,GAAmB;IAChC,MAAM,EAAE;QACN,YAAY,EAAE,iCAAiC;QAC/C,SAAS,EAAE,qBAAqB;QAChC,aAAa,EAAE,wBAAwB;KACxC;CACF,CAAC;AAEF,OAAO,EAAE,SAAS,EAAE,CAAC","sourcesContent":["import type { BackendStrings } from '../BackendStrings';\n\nconst deStrings: BackendStrings = {\n common: {\n unauthorized: 'Authentifizierung Erforderlich.',\n forbidden: 'Zugriff Verweigert.',\n internalError: 'Interner Serverfehler.',\n },\n};\n\nexport { deStrings };\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"en.js","sourceRoot":"","sources":["../../src/locales/en.ts"],"names":[],"mappings":"AAEA,MAAM,SAAS,GAAmB;IAChC,MAAM,EAAE;QACN,YAAY,EAAE,0BAA0B;QACxC,SAAS,EAAE,gBAAgB;QAC3B,aAAa,EAAE,wBAAwB;KACxC;CACF,CAAC;AAEF,OAAO,EAAE,SAAS,EAAE,CAAC"}
1
+ {"version":3,"file":"en.js","sourceRoot":"","sources":["../../src/locales/en.ts"],"names":[],"mappings":"AAEA,MAAM,SAAS,GAAmB;IAChC,MAAM,EAAE;QACN,YAAY,EAAE,0BAA0B;QACxC,SAAS,EAAE,gBAAgB;QAC3B,aAAa,EAAE,wBAAwB;KACxC;CACF,CAAC;AAEF,OAAO,EAAE,SAAS,EAAE,CAAC","sourcesContent":["import type { BackendStrings } from '../BackendStrings';\n\nconst enStrings: BackendStrings = {\n common: {\n unauthorized: 'Authentication Required.',\n forbidden: 'Access Denied.',\n internalError: 'Internal Server Error.',\n },\n};\n\nexport { enStrings };\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"es.js","sourceRoot":"","sources":["../../src/locales/es.ts"],"names":[],"mappings":"AAEA,MAAM,SAAS,GAAmB;IAChC,MAAM,EAAE;QACN,YAAY,EAAE,0BAA0B;QACxC,SAAS,EAAE,kBAAkB;QAC7B,aAAa,EAAE,6BAA6B;KAC7C;CACF,CAAC;AAEF,OAAO,EAAE,SAAS,EAAE,CAAC"}
1
+ {"version":3,"file":"es.js","sourceRoot":"","sources":["../../src/locales/es.ts"],"names":[],"mappings":"AAEA,MAAM,SAAS,GAAmB;IAChC,MAAM,EAAE;QACN,YAAY,EAAE,0BAA0B;QACxC,SAAS,EAAE,kBAAkB;QAC7B,aAAa,EAAE,6BAA6B;KAC7C;CACF,CAAC;AAEF,OAAO,EAAE,SAAS,EAAE,CAAC","sourcesContent":["import type { BackendStrings } from '../BackendStrings';\n\nconst esStrings: BackendStrings = {\n common: {\n unauthorized: 'Autenticación Requerida.',\n forbidden: 'Acceso Denegado.',\n internalError: 'Error Interno Del Servidor.',\n },\n};\n\nexport { esStrings };\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"fr.js","sourceRoot":"","sources":["../../src/locales/fr.ts"],"names":[],"mappings":"AAEA,MAAM,SAAS,GAAmB;IAChC,MAAM,EAAE;QACN,YAAY,EAAE,2BAA2B;QACzC,SAAS,EAAE,eAAe;QAC1B,aAAa,EAAE,4BAA4B;KAC5C;CACF,CAAC;AAEF,OAAO,EAAE,SAAS,EAAE,CAAC"}
1
+ {"version":3,"file":"fr.js","sourceRoot":"","sources":["../../src/locales/fr.ts"],"names":[],"mappings":"AAEA,MAAM,SAAS,GAAmB;IAChC,MAAM,EAAE;QACN,YAAY,EAAE,2BAA2B;QACzC,SAAS,EAAE,eAAe;QAC1B,aAAa,EAAE,4BAA4B;KAC5C;CACF,CAAC;AAEF,OAAO,EAAE,SAAS,EAAE,CAAC","sourcesContent":["import type { BackendStrings } from '../BackendStrings';\n\nconst frStrings: BackendStrings = {\n common: {\n unauthorized: 'Authentification Requise.',\n forbidden: 'Accès Refusé.',\n internalError: 'Erreur Interne Du Serveur.',\n },\n};\n\nexport { frStrings };\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"it.js","sourceRoot":"","sources":["../../src/locales/it.ts"],"names":[],"mappings":"AAEA,MAAM,SAAS,GAAmB;IAChC,MAAM,EAAE;QACN,YAAY,EAAE,2BAA2B;QACzC,SAAS,EAAE,iBAAiB;QAC5B,aAAa,EAAE,4BAA4B;KAC5C;CACF,CAAC;AAEF,OAAO,EAAE,SAAS,EAAE,CAAC"}
1
+ {"version":3,"file":"it.js","sourceRoot":"","sources":["../../src/locales/it.ts"],"names":[],"mappings":"AAEA,MAAM,SAAS,GAAmB;IAChC,MAAM,EAAE;QACN,YAAY,EAAE,2BAA2B;QACzC,SAAS,EAAE,iBAAiB;QAC5B,aAAa,EAAE,4BAA4B;KAC5C;CACF,CAAC;AAEF,OAAO,EAAE,SAAS,EAAE,CAAC","sourcesContent":["import type { BackendStrings } from '../BackendStrings';\n\nconst itStrings: BackendStrings = {\n common: {\n unauthorized: 'Autenticazione Richiesta.',\n forbidden: 'Accesso Negato.',\n internalError: 'Errore Interno Del Server.',\n },\n};\n\nexport { itStrings };\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ja.js","sourceRoot":"","sources":["../../src/locales/ja.ts"],"names":[],"mappings":"AAEA,MAAM,SAAS,GAAmB;IAChC,MAAM,EAAE;QACN,YAAY,EAAE,UAAU;QACxB,SAAS,EAAE,eAAe;QAC1B,aAAa,EAAE,YAAY;KAC5B;CACF,CAAC;AAEF,OAAO,EAAE,SAAS,EAAE,CAAC"}
1
+ {"version":3,"file":"ja.js","sourceRoot":"","sources":["../../src/locales/ja.ts"],"names":[],"mappings":"AAEA,MAAM,SAAS,GAAmB;IAChC,MAAM,EAAE;QACN,YAAY,EAAE,UAAU;QACxB,SAAS,EAAE,eAAe;QAC1B,aAAa,EAAE,YAAY;KAC5B;CACF,CAAC;AAEF,OAAO,EAAE,SAAS,EAAE,CAAC","sourcesContent":["import type { BackendStrings } from '../BackendStrings';\n\nconst jaStrings: BackendStrings = {\n common: {\n unauthorized: '認証が必要です。',\n forbidden: 'アクセスが拒否されました。',\n internalError: 'サーバー内部エラー。',\n },\n};\n\nexport { jaStrings };\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ko.js","sourceRoot":"","sources":["../../src/locales/ko.ts"],"names":[],"mappings":"AAEA,MAAM,SAAS,GAAmB;IAChC,MAAM,EAAE;QACN,YAAY,EAAE,YAAY;QAC1B,SAAS,EAAE,eAAe;QAC1B,aAAa,EAAE,WAAW;KAC3B;CACF,CAAC;AAEF,OAAO,EAAE,SAAS,EAAE,CAAC"}
1
+ {"version":3,"file":"ko.js","sourceRoot":"","sources":["../../src/locales/ko.ts"],"names":[],"mappings":"AAEA,MAAM,SAAS,GAAmB;IAChC,MAAM,EAAE;QACN,YAAY,EAAE,YAAY;QAC1B,SAAS,EAAE,eAAe;QAC1B,aAAa,EAAE,WAAW;KAC3B;CACF,CAAC;AAEF,OAAO,EAAE,SAAS,EAAE,CAAC","sourcesContent":["import type { BackendStrings } from '../BackendStrings';\n\nconst koStrings: BackendStrings = {\n common: {\n unauthorized: '인증이 필요합니다.',\n forbidden: '액세스가 거부되었습니다.',\n internalError: '서버 내부 오류.',\n },\n};\n\nexport { koStrings };\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"nl.js","sourceRoot":"","sources":["../../src/locales/nl.ts"],"names":[],"mappings":"AAEA,MAAM,SAAS,GAAmB;IAChC,MAAM,EAAE;QACN,YAAY,EAAE,wBAAwB;QACtC,SAAS,EAAE,oBAAoB;QAC/B,aAAa,EAAE,qBAAqB;KACrC;CACF,CAAC;AAEF,OAAO,EAAE,SAAS,EAAE,CAAC"}
1
+ {"version":3,"file":"nl.js","sourceRoot":"","sources":["../../src/locales/nl.ts"],"names":[],"mappings":"AAEA,MAAM,SAAS,GAAmB;IAChC,MAAM,EAAE;QACN,YAAY,EAAE,wBAAwB;QACtC,SAAS,EAAE,oBAAoB;QAC/B,aAAa,EAAE,qBAAqB;KACrC;CACF,CAAC;AAEF,OAAO,EAAE,SAAS,EAAE,CAAC","sourcesContent":["import type { BackendStrings } from '../BackendStrings';\n\nconst nlStrings: BackendStrings = {\n common: {\n unauthorized: 'Authenticatie Vereist.',\n forbidden: 'Toegang Geweigerd.',\n internalError: 'Interne Serverfout.',\n },\n};\n\nexport { nlStrings };\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"pl.js","sourceRoot":"","sources":["../../src/locales/pl.ts"],"names":[],"mappings":"AAEA,MAAM,SAAS,GAAmB;IAChC,MAAM,EAAE;QACN,YAAY,EAAE,uBAAuB;QACrC,SAAS,EAAE,iBAAiB;QAC5B,aAAa,EAAE,0BAA0B;KAC1C;CACF,CAAC;AAEF,OAAO,EAAE,SAAS,EAAE,CAAC"}
1
+ {"version":3,"file":"pl.js","sourceRoot":"","sources":["../../src/locales/pl.ts"],"names":[],"mappings":"AAEA,MAAM,SAAS,GAAmB;IAChC,MAAM,EAAE;QACN,YAAY,EAAE,uBAAuB;QACrC,SAAS,EAAE,iBAAiB;QAC5B,aAAa,EAAE,0BAA0B;KAC1C;CACF,CAAC;AAEF,OAAO,EAAE,SAAS,EAAE,CAAC","sourcesContent":["import type { BackendStrings } from '../BackendStrings';\n\nconst plStrings: BackendStrings = {\n common: {\n unauthorized: 'Wymagana Autoryzacja.',\n forbidden: 'Odmowa Dostępu.',\n internalError: 'Wewnętrzny Błąd Serwera.',\n },\n};\n\nexport { plStrings };\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"pt.js","sourceRoot":"","sources":["../../src/locales/pt.ts"],"names":[],"mappings":"AAEA,MAAM,SAAS,GAAmB;IAChC,MAAM,EAAE;QACN,YAAY,EAAE,0BAA0B;QACxC,SAAS,EAAE,gBAAgB;QAC3B,aAAa,EAAE,2BAA2B;KAC3C;CACF,CAAC;AAEF,OAAO,EAAE,SAAS,EAAE,CAAC"}
1
+ {"version":3,"file":"pt.js","sourceRoot":"","sources":["../../src/locales/pt.ts"],"names":[],"mappings":"AAEA,MAAM,SAAS,GAAmB;IAChC,MAAM,EAAE;QACN,YAAY,EAAE,0BAA0B;QACxC,SAAS,EAAE,gBAAgB;QAC3B,aAAa,EAAE,2BAA2B;KAC3C;CACF,CAAC;AAEF,OAAO,EAAE,SAAS,EAAE,CAAC","sourcesContent":["import type { BackendStrings } from '../BackendStrings';\n\nconst ptStrings: BackendStrings = {\n common: {\n unauthorized: 'Autenticação Necessária.',\n forbidden: 'Acesso Negado.',\n internalError: 'Erro Interno Do Servidor.',\n },\n};\n\nexport { ptStrings };\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"zh-CN.js","sourceRoot":"","sources":["../../src/locales/zh-CN.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,GAAmB;IAClC,MAAM,EAAE;QACN,YAAY,EAAE,SAAS;QACvB,SAAS,EAAE,QAAQ;QACnB,aAAa,EAAE,UAAU;KAC1B;CACF,CAAC;AAEF,OAAO,EAAE,WAAW,EAAE,CAAC"}
1
+ {"version":3,"file":"zh-CN.js","sourceRoot":"","sources":["../../src/locales/zh-CN.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,GAAmB;IAClC,MAAM,EAAE;QACN,YAAY,EAAE,SAAS;QACvB,SAAS,EAAE,QAAQ;QACnB,aAAa,EAAE,UAAU;KAC1B;CACF,CAAC;AAEF,OAAO,EAAE,WAAW,EAAE,CAAC","sourcesContent":["import type { BackendStrings } from '../BackendStrings';\n\nconst zhCNStrings: BackendStrings = {\n common: {\n unauthorized: '需要身份验证。',\n forbidden: '访问被拒绝。',\n internalError: '服务器内部错误。',\n },\n};\n\nexport { zhCNStrings };\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"zh-TW.js","sourceRoot":"","sources":["../../src/locales/zh-TW.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,GAAmB;IAClC,MAAM,EAAE;QACN,YAAY,EAAE,OAAO;QACrB,SAAS,EAAE,QAAQ;QACnB,aAAa,EAAE,UAAU;KAC1B;CACF,CAAC;AAEF,OAAO,EAAE,WAAW,EAAE,CAAC"}
1
+ {"version":3,"file":"zh-TW.js","sourceRoot":"","sources":["../../src/locales/zh-TW.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,GAAmB;IAClC,MAAM,EAAE;QACN,YAAY,EAAE,OAAO;QACrB,SAAS,EAAE,QAAQ;QACnB,aAAa,EAAE,UAAU;KAC1B;CACF,CAAC;AAEF,OAAO,EAAE,WAAW,EAAE,CAAC","sourcesContent":["import type { BackendStrings } from '../BackendStrings';\n\nconst zhTWStrings: BackendStrings = {\n common: {\n unauthorized: '需要驗證。',\n forbidden: '存取被拒絕。',\n internalError: '伺服器內部錯誤。',\n },\n};\n\nexport { zhTWStrings };\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rexezuge/i18n",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "repository": {