Fix scripts !
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user