Add missing translated fields
This commit is contained in:
parent
98239b44ae
commit
4b2cb70034
@ -68,35 +68,6 @@ Hooks.once('init', () => {
|
|||||||
}
|
}
|
||||||
return talents_list;
|
return talents_list;
|
||||||
},
|
},
|
||||||
"career_trappings": (trappings_list) => {
|
|
||||||
var compendium = game.packs.find(p => p.collection === 'wfrp4e.trappings');
|
|
||||||
var i;
|
|
||||||
var len = trappings_list.length;
|
|
||||||
var re = /(.*)\((.*)\)/i;
|
|
||||||
for (i = 0; i < len; i++) {
|
|
||||||
var transl = compendium.i18nName( trappings_list[i] );
|
|
||||||
if ( transl == trappings_list[i] ) {
|
|
||||||
var res = re.exec( trappings_list[i]);
|
|
||||||
if (res) {
|
|
||||||
//console.log("Matched/split:", res[1], res[2]);
|
|
||||||
var subword = game.i18n.localize(res[2].trim() );
|
|
||||||
var s1 = res[1].trim() + " ()";
|
|
||||||
var translw = compendium.i18nName( s1 );
|
|
||||||
if (translw != transl) {
|
|
||||||
var res2 = re.exec(translw);
|
|
||||||
transl = res2[1] + "(" + subword + ")";
|
|
||||||
} else {
|
|
||||||
s1 = res[1].trim() + " ( )";
|
|
||||||
translw = compendium.i18nName( s1 );
|
|
||||||
var res2 = re.exec(translw);
|
|
||||||
transl = res2[1] + "(" + subword + ")";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
trappings_list[i] = transl;
|
|
||||||
}
|
|
||||||
return trappings_list;
|
|
||||||
},
|
|
||||||
// To avoid duplicateing class for all careers
|
// To avoid duplicateing class for all careers
|
||||||
"generic_localization": (value) => {
|
"generic_localization": (value) => {
|
||||||
return game.i18n.localize( value.trim() );
|
return game.i18n.localize( value.trim() );
|
||||||
|
@ -17,10 +17,7 @@
|
|||||||
"path": "data.careergroup.value",
|
"path": "data.careergroup.value",
|
||||||
"converter": "generic_localization"
|
"converter": "generic_localization"
|
||||||
},
|
},
|
||||||
"trappings": {
|
"trappings": data.trappings.value
|
||||||
"path": "data.trappings",
|
|
||||||
"converter": "career_trappings"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"entries": [
|
"entries": [
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user