Fix scripts !

This commit is contained in:
2026-01-29 11:43:28 +01:00
parent 0e8237c233
commit 752a6701c0
104 changed files with 195 additions and 193 deletions

View File

@@ -248,16 +248,16 @@ Hooks.once('init', () => {
let translw = translItem?.name || undefined
if (translw && translw != s1) {
let res2 = re.exec(translw);
transl = res2[1] + "(" + subword + ")";
transl = res2[1].trim() + " (" + subword + ")";
} else {
s1 = res[1].trim() + " ( )";
translItem = game.babele.translate(compData.metadata.id, { name: s1, type: "skill" }, true)
translw = translItem?.name || undefined
if(translw) {
let res2 = re.exec(translw);
transl = res2[1] + "(" + subword + ")";
transl = res2[1].trim() + " (" + subword + ")";
} else {
transl = res[1] + " (" + subword + ")";
transl = res[1].trim() + " (" + subword + ")";
}
}
}
@@ -366,7 +366,7 @@ Hooks.once('init', () => {
translItem = game.babele.translate(compData.metadata.id, { name: s1 }, true)
let translw = translItem?.name || undefined
if (translw && translw != s1) {
transl = translw + " (" + subword + ")";
transl = translw.trim() + " (" + subword + ")";
}
}
}
@@ -424,7 +424,9 @@ Hooks.once('init', () => {
if (trait_fr?.name && trait_fr?.name != name_en) {
trait_fr.name = trait_fr.name || trait_en.name
trait_en.name = nbt + trait_fr.name + special;
trait_en.system.description.value = trait_fr.system.description.value;
if ( trait_en.system?.description?.value) {
trait_en.system.description.value = trait_fr.system.description.value;
}
if (trait_en.system?.specification && isNaN(trait_en.system.specification.value)) { // This is a string, so translate it
//console.log("Translating : ", trait_en.system.specification.value);
trait_en.system.specification.value = game.i18n.localize(trait_en.system.specification.value.trim());

File diff suppressed because one or more lines are too long