Better management of careers translations
This commit is contained in:
parent
a1f1861172
commit
a888502952
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user