From a888502952c1ff4dae9615974632c525c7aef056 Mon Sep 17 00:00:00 2001 From: LeRatierBretonnien Date: Tue, 3 Oct 2023 11:43:31 +0200 Subject: [PATCH] Better management of careers translations --- babele-register.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/babele-register.js b/babele-register.js index 5927665..302c8b5 100644 --- a/babele-register.js +++ b/babele-register.js @@ -161,7 +161,7 @@ Hooks.once('init', () => { let translItem = game.babele.translate(compData.metadata.id, { name: skills_list[i], type: "skill" }, true) let transl = translItem?.name || undefined if (!transl) transl = skills_list[i] - console.log("List ...", skills_list[i], compData.metadata.id, translItem); + //console.log("List ...", skills_list[i], compData.metadata.id, translItem); if (transl == skills_list[i]) { let res = re.exec(skills_list[i]); if (res) { @@ -170,7 +170,7 @@ Hooks.once('init', () => { let s1 = res[1].trim() + " ()"; translItem = game.babele.translate(compData.metadata.id, { name: s1, type: "skill" }, true) let translw = translItem?.name || undefined - if (translw != s1) { + if (translw && translw != s1) { let res2 = re.exec(translw); transl = res2[1] + "(" + subword + ")"; } else {