Merge branch 'master' into 'master'
Master See merge request sasmira/swade-fr!10
This commit is contained in:
commit
de7301218a
@ -54,7 +54,30 @@ Hooks.once('init', () => {
|
||||
const transFolder = { "Actor": "Acteur", "Edges": "Atouts"}
|
||||
const subFolder = { 'Social Edges': 'Atouts sociaux', 'Background Edges': 'Atouts de Background', 'Combat Edges': 'Atouts de combat',
|
||||
'Leadership Edges': 'Atouts de commandement', 'Legendary Edges': 'Atouts légendaires', 'Power Edges': 'Atouts de pouvoir',
|
||||
'Professional Edges': 'Atouts professionnels', 'Weird Edges': 'Atouts étranges', 'Edges': 'Atouts' }
|
||||
'Professional Edges': 'Atouts professionnels', 'Weird Edges': 'Atouts étranges', 'Edges': 'Atouts', 'Hindrances': 'Handicaps', 'Skills': 'Compétences',
|
||||
'Equipment': 'Equipement', 'Ammo': 'Munitions', 'Armor': 'Armure', 'Common Gear': 'Matériel commun', 'Modern Firearms': 'Armes à feu modernes',
|
||||
'Personal Weapons': 'Armes', 'Special Weapons': 'Armes spéciales', 'Bullet': 'Balles', 'Cannon': 'Canon', 'Laser Battery': 'Batterie Laser',
|
||||
'Adventuring Gear': 'Matériel d\'aventure', 'Animals and Tack': 'Animaux', 'Clothing': 'Vêtements', 'Computers & Electronics':'Ordinateurs et Electroniques',
|
||||
'Firearms Accessories': 'Accessoires armes à feu', 'Food': 'Nourriture', 'Personal Defense': 'Auto-défense', 'Futuristic': 'Futuriste',
|
||||
'Medieval & Ancient': 'Médiévale et Antiquité', 'Modern': 'Moderne', 'Shields': 'Boucliers', 'Laser (Futuristic)': 'Laser (Fururiste)',
|
||||
'Machine Guns': 'Mitraillettes', 'Pistols': 'Pistolets', 'Rifles': 'Fusils', 'Submachine Guns': 'Semi-automatiques', 'Cannons': 'Canons',
|
||||
'Catapults': 'Catapultes', 'Flamethrowers': 'Lance-flammes', 'Rocket Launchers & Torpedoes': 'Lance roquettes et torpilles',
|
||||
'Vehicular Weapons': 'Armes de véhicules' }
|
||||
|
||||
/************************************************************************************/
|
||||
const __translate_sub_folders = async (packName) => {
|
||||
let pack = game.packs.get(packName)
|
||||
pack.locked = false;
|
||||
let folderEntityIds = pack.index.filter(x => x.name === "#[CF_tempEntity]");
|
||||
for ( let index of folderEntityIds) {
|
||||
let folderEntity = await pack.getEntity(index._id);
|
||||
//console.log("Fold1", folderEntity);
|
||||
let newName = subFolder[folderEntity.data.flags.cf.name];
|
||||
if ( newName) {
|
||||
await pack.updateEntity({ _id: index._id, 'flags.cf.name': newName } );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/************************************************************************************/
|
||||
const __fix_folder_names = async ( ) => {
|
||||
@ -67,17 +90,9 @@ const __fix_folder_names = async ( ) => {
|
||||
}
|
||||
}
|
||||
|
||||
let pack = game.packs.get("swade-core-rules.swade-edges")
|
||||
pack.locked = false;
|
||||
let folderEntityIds = pack.index.filter(x => x.name === "#[CF_tempEntity]");
|
||||
for ( let index of folderEntityIds) {
|
||||
//console.log("Fold1", index);
|
||||
let folderEntity = await pack.getEntity(index._id);
|
||||
let newName = subFolder[folderEntity.data.flags.cf.name];
|
||||
if ( newName) {
|
||||
await pack.updateEntity({ _id: index._id, 'flags.cf.name': newName } );
|
||||
}
|
||||
}
|
||||
__translate_sub_folders("swade-core-rules.swade-edges");
|
||||
__translate_sub_folders("swade-core-rules.swade-hindrances");
|
||||
__translate_sub_folders("swade-core-rules.swade-equipment");
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user