Using the "new" Babele.get().setSystemTranslationsDir() for embed translation

This commit is contained in:
Vlyan
2021-12-18 11:12:27 +01:00
parent 1a0532e2ef
commit 1578d899d9
29 changed files with 3 additions and 7 deletions

View File

@@ -4,16 +4,12 @@ export default class HooksL5r5e {
* Do anything after initialization but before ready
*/
static setup() {
// Embed Babele compendiums
// Enable embed Babele compendiums only if custom compendium is not found or disabled
if (
typeof Babele !== "undefined" &&
Babele.get().modules.every((module) => module.lang !== "fr" || module.module !== "l5r5e-custom-compendiums")
Babele.get().modules.every((module) => module.module !== "l5r5e-custom-compendiums")
) {
Babele.get().register({
module: "../systems/l5r5e", // babele only accept modules, so... well :D
lang: "fr",
dir: "babele/fr-fr",
});
Babele.get().setSystemTranslationsDir("babele"); // Since Babele v2.0.4
}
}