mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
🤖 Merge PR #44438 Modified type of i18n-js I18n.fallbacks by @atheck
This commit is contained in:
parent
9c0c135e0b
commit
ac5c969feb
@ -18,6 +18,11 @@ I18n.t("some.missing.scope", { defaults: [{ scope: "some.existing.scope" }] });
|
||||
I18n.t("some.missing.scope", { defaults: [{ message: "Some message" }] });
|
||||
|
||||
I18n.fallbacks = true;
|
||||
I18n.fallbacks = "de";
|
||||
I18n.fallbacks = {
|
||||
de: "en",
|
||||
"de-DE": [ "de", "en" ]
|
||||
};
|
||||
I18n.locales.no = ["nb", "en"];
|
||||
I18n.locales.no = "nb";
|
||||
I18n.locales.no = locale => ["nb"];
|
||||
|
||||
2
types/i18n-js/index.d.ts
vendored
2
types/i18n-js/index.d.ts
vendored
@ -15,7 +15,7 @@ declare namespace I18n {
|
||||
let locale: string;
|
||||
let defaultSeparator: string;
|
||||
let placeholder: RegExp;
|
||||
let fallbacks: boolean;
|
||||
let fallbacks: boolean | string | { [locale: string]: string | string[] };
|
||||
let missingBehaviour: "message" | "guess";
|
||||
let missingTranslationPrefix: string;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user