fix i18n fallback for v13
This commit is contained in:
parent
76674f410e
commit
61bc68dd3c
11
src/main.mjs
11
src/main.mjs
@ -5,13 +5,20 @@ const { ApplicationV2, HandlebarsApplicationMixin } = foundry.applications.api;
|
|||||||
const { OperatorTerm, NumericTerm } = foundry.dice.terms;
|
const { OperatorTerm, NumericTerm } = foundry.dice.terms;
|
||||||
|
|
||||||
Hooks.once("i18nInit", async function() {
|
Hooks.once("i18nInit", async function() {
|
||||||
game.i18n._fallback = foundry.utils.mergeObject(await game.i18n._getTranslations("de"), game.i18n._fallback);
|
const lang = game.i18n.lang;
|
||||||
|
|
||||||
|
await game.i18n.setLanguage("de");
|
||||||
|
const fallback = game.i18n.translations;
|
||||||
|
await game.i18n.setLanguage(lang);
|
||||||
|
|
||||||
|
game.i18n._fallback = foundry.utils.mergeObject(fallback, game.i18n.fallback);
|
||||||
});
|
});
|
||||||
|
|
||||||
class DSA41_Notifications extends Notifications {
|
class DSA41_Notifications extends Notifications {
|
||||||
notify(message, type="info", {localize=false, permanent=false, console=true}={}) {
|
notify(message, type="info", {localize=false, permanent=false, console=true}={}) {
|
||||||
if (permanent && message.startsWith("Foundry Virtual Tabletop requires a minimum screen resolution"))
|
if (permanent && message === "ERROR.RESOLUTION.Window")
|
||||||
return;
|
return;
|
||||||
|
|
||||||
return super.notify(message, type, { localize, permanent, console });
|
return super.notify(message, type, { localize, permanent, console });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user