diff --git a/src/main.mjs b/src/main.mjs index 3d87828..5037138 100644 --- a/src/main.mjs +++ b/src/main.mjs @@ -5,13 +5,20 @@ const { ApplicationV2, HandlebarsApplicationMixin } = foundry.applications.api; const { OperatorTerm, NumericTerm } = foundry.dice.terms; 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 { 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 super.notify(message, type, { localize, permanent, console }); } }