diff --git a/CHANGELOG.md b/CHANGELOG.md index db875fb..9f09a41 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,11 @@ # Changelog Date format : day/month/year +## 1.8.2 - 24/06/2022 - Unofficial Italian translation +- Added Unofficial Italian translation (Corebook only for compendiums), all thanks to EldritchTranslator. +- Added French translation for Tables. +- Fixed : Translated table names broke the macros. We are now using IDs to avoid that in "L5R5E Macros" compendium. + ## 1.8.1 - 09/06/2022 - Small bugfixes - Added a restriction on symbols, they are now lower-case only, ex : (air) work, (Air) will not (#36). - Added some 20q questions in GM monitor global tooltip (q14, q15, q20) for quick access. diff --git a/system/babele/fr/l5r5e.core-name-tables.json b/system/babele/fr/l5r5e.core-name-tables.json new file mode 100644 index 0000000..4604aaf --- /dev/null +++ b/system/babele/fr/l5r5e.core-name-tables.json @@ -0,0 +1,40 @@ +{ + "label": "Tables de Noms", + "entries": [ + { + "id": "Ivory Kingdoms names", + "name": "Noms des Royaumes d’Ivoire", + "description": "La Voie des Vagues p.223-224" + }, + { + "id": "Japanese names (Female)", + "name": "Noms Japonais (Féminin)", + "description": "Liste non officielle" + }, + { + "id": "Japanese names (Male)", + "name": "Noms Japonais (Masculin)", + "description": "Liste non officielle" + }, + { + "id": "Japanese names (Village)", + "name": "Noms Japonais (Village)", + "description": "Liste non officielle" + }, + { + "id": "Qamarist names", + "name": "Noms Qamaristes", + "description": "La Voie des Vagues p.226" + }, + { + "id": "Rokugani names", + "name": "Noms Rokugani", + "description": "La Voie des Vagues p.222" + }, + { + "id": "Ujik names", + "name": "Noms Ujik", + "description": "La Voie des Vagues p.225" + } + ] +} diff --git a/system/babele/it/l5r5e.core-name-tables.json b/system/babele/it/l5r5e.core-name-tables.json index 7cdfa95..df7a013 100644 --- a/system/babele/it/l5r5e.core-name-tables.json +++ b/system/babele/it/l5r5e.core-name-tables.json @@ -1,40 +1,40 @@ { - "label": "Tabelle dei Nomi", - "entries": [ - { - "id": "Ivory Kingdoms names", - "name": "Nomi del Regno d'Avorio", - "description": "Sentiero delle Onde p.223-224" - }, - { - "id": "Japanese names (Female)", - "name": "Nomi giapponesi (Femminili)", - "description": "Lista non ufficiale" - }, - { - "id": "Japanese names (Male)", - "name": "Nomi giapponesi (Maschili)", - "description": "Lista non ufficiale" - }, - { - "id": "Japanese names (Village)", - "name": "Nomi giapponesi (Villaggi)", - "description": "Lista non ufficiale" - }, - { - "id": "Qamarist names", - "name": "Nomi Qamaristi", - "description": "Sentiero delle Onde p.226" - }, - { - "id": "Rokugani names", - "name": "Nomi Rokugani", - "description": "Sentiero delle Onde p.222" - }, - { - "id": "Ujik names", - "name": "Nomi Ujik", - "description": "Sentiero delle Onde p.225" - } - ] -} \ No newline at end of file + "label": "Tabelle dei Nomi", + "entries": [ + { + "id": "Ivory Kingdoms names", + "name": "Nomi del Regno d'Avorio", + "description": "Sentiero delle Onde p.223-224" + }, + { + "id": "Japanese names (Female)", + "name": "Nomi giapponesi (Femminili)", + "description": "Lista non ufficiale" + }, + { + "id": "Japanese names (Male)", + "name": "Nomi giapponesi (Maschili)", + "description": "Lista non ufficiale" + }, + { + "id": "Japanese names (Village)", + "name": "Nomi giapponesi (Villaggi)", + "description": "Lista non ufficiale" + }, + { + "id": "Qamarist names", + "name": "Nomi Qamaristi", + "description": "Sentiero delle Onde p.226" + }, + { + "id": "Rokugani names", + "name": "Nomi Rokugani", + "description": "Sentiero delle Onde p.222" + }, + { + "id": "Ujik names", + "name": "Nomi Ujik", + "description": "Sentiero delle Onde p.225" + } + ] +} diff --git a/system/packs/core-macros.db b/system/packs/core-macros.db index f7adf4c..d7871c7 100644 --- a/system/packs/core-macros.db +++ b/system/packs/core-macros.db @@ -1,9 +1,9 @@ -{"_id":"akSnaBrDnz8ZAVHR","name":"Draw 5 Japanese names (village)","type":"script","author":"Rv52pj6itbOX14wX","img":"icons/environment/settlement/ldoge.webp","scope":"global","command":"game.l5r5e.HelpersL5r5e.drawManyFromPack(\"l5r5e.core-name-tables\", \"Japanese names (Village)\", 5);","folder":null,"sort":0,"permission":{"default":0},"flags":{}} -{"_id":"avRx8SlktnoCzQQu","name":"Draw 5 Ivory Kingdoms names","type":"script","author":"Rv52pj6itbOX14wX","img":"systems/l5r5e/assets/icons/actors/character.svg","scope":"global","command":"game.l5r5e.HelpersL5r5e.drawManyFromPack(\"l5r5e.core-name-tables\", \"Ivory Kingdoms names\", 5);","folder":null,"sort":0,"permission":{"default":0},"flags":{}} -{"_id":"bm7cokBEhIvelmYt","name":"Draw 5 Qamarist names","type":"script","author":"Rv52pj6itbOX14wX","img":"systems/l5r5e/assets/icons/actors/character.svg","scope":"global","command":"game.l5r5e.HelpersL5r5e.drawManyFromPack(\"l5r5e.core-name-tables\", \"Qamarist names\", 5);","folder":null,"sort":0,"permission":{"default":0},"flags":{}} -{"_id":"cHV4W2eAk96bj1MC","name":"Draw 5 Rokugani names","type":"script","author":"Rv52pj6itbOX14wX","img":"systems/l5r5e/assets/icons/actors/character.svg","scope":"global","command":"game.l5r5e.HelpersL5r5e.drawManyFromPack(\"l5r5e.core-name-tables\", \"Rokugani names\", 5);","folder":null,"sort":0,"permission":{"default":0},"flags":{}} -{"_id":"dz61B4h3iJwOC0Ob","name":"Draw 5 Ujik names","type":"script","author":"Rv52pj6itbOX14wX","img":"systems/l5r5e/assets/icons/actors/character.svg","scope":"global","command":"game.l5r5e.HelpersL5r5e.drawManyFromPack(\"l5r5e.core-name-tables\", \"Ujik names\", 5);","folder":null,"sort":0,"permission":{"default":0},"flags":{}} -{"_id":"ed0HRLOWSKm6YTUS","name":"Draw 5 Japanese names (male)","type":"script","author":"Rv52pj6itbOX14wX","img":"systems/l5r5e/assets/icons/actors/traditional-japanese-man.svg","scope":"global","command":"game.l5r5e.HelpersL5r5e.drawManyFromPack(\"l5r5e.core-name-tables\", \"Japanese names (Male)\", 5);","folder":null,"sort":0,"permission":{"default":0},"flags":{}} -{"_id":"fk2naBrDnz8ZAVHR","name":"Draw 5 Japanese names (female)","type":"script","author":"Rv52pj6itbOX14wX","img":"systems/l5r5e/assets/icons/actors/traditional-japanese-woman.svg","scope":"global","command":"game.l5r5e.HelpersL5r5e.drawManyFromPack(\"l5r5e.core-name-tables\", \"Japanese names (Female)\", 5);","folder":null,"sort":0,"permission":{"default":0},"flags":{}} +{"_id":"akSnaBrDnz8ZAVHR","name":"Draw 5 Japanese names (village)","type":"script","author":"Rv52pj6itbOX14wX","img":"icons/environment/settlement/ldoge.webp","scope":"global","command":"game.l5r5e.HelpersL5r5e.drawManyFromPack(\"l5r5e.core-name-tables\", \"L5RCoreTblJpNamV\", 5);","folder":null,"sort":0,"permission":{"default":0},"flags":{}} +{"_id":"avRx8SlktnoCzQQu","name":"Draw 5 Ivory Kingdoms names","type":"script","author":"Rv52pj6itbOX14wX","img":"systems/l5r5e/assets/icons/actors/character.svg","scope":"global","command":"game.l5r5e.HelpersL5r5e.drawManyFromPack(\"l5r5e.core-name-tables\", \"aTVXI5Y5t7cBfyUE\", 5);","folder":null,"sort":0,"permission":{"default":0},"flags":{}} +{"_id":"bm7cokBEhIvelmYt","name":"Draw 5 Qamarist names","type":"script","author":"Rv52pj6itbOX14wX","img":"systems/l5r5e/assets/icons/actors/character.svg","scope":"global","command":"game.l5r5e.HelpersL5r5e.drawManyFromPack(\"l5r5e.core-name-tables\", \"bXaEmt72GLUeoyzz\", 5);","folder":null,"sort":0,"permission":{"default":0},"flags":{}} +{"_id":"cHV4W2eAk96bj1MC","name":"Draw 5 Rokugani names","type":"script","author":"Rv52pj6itbOX14wX","img":"systems/l5r5e/assets/icons/actors/character.svg","scope":"global","command":"game.l5r5e.HelpersL5r5e.drawManyFromPack(\"l5r5e.core-name-tables\", \"cgjfjbHmQuNV668k\", 5);","folder":null,"sort":0,"permission":{"default":0},"flags":{}} +{"_id":"dz61B4h3iJwOC0Ob","name":"Draw 5 Ujik names","type":"script","author":"Rv52pj6itbOX14wX","img":"systems/l5r5e/assets/icons/actors/character.svg","scope":"global","command":"game.l5r5e.HelpersL5r5e.drawManyFromPack(\"l5r5e.core-name-tables\", \"d9lU98NE8G2YuN48\", 5);","folder":null,"sort":0,"permission":{"default":0},"flags":{}} +{"_id":"ed0HRLOWSKm6YTUS","name":"Draw 5 Japanese names (male)","type":"script","author":"Rv52pj6itbOX14wX","img":"systems/l5r5e/assets/icons/actors/traditional-japanese-man.svg","scope":"global","command":"game.l5r5e.HelpersL5r5e.drawManyFromPack(\"l5r5e.core-name-tables\", \"L5RCoreTblJpNamM\", 5);","folder":null,"sort":0,"permission":{"default":0},"flags":{}} +{"_id":"fk2naBrDnz8ZAVHR","name":"Draw 5 Japanese names (female)","type":"script","author":"Rv52pj6itbOX14wX","img":"systems/l5r5e/assets/icons/actors/traditional-japanese-woman.svg","scope":"global","command":"game.l5r5e.HelpersL5r5e.drawManyFromPack(\"l5r5e.core-name-tables\", \"L5RCoreTblJpNamF\", 5);","folder":null,"sort":0,"permission":{"default":0},"flags":{}} {"_id":"ggs1eiqkfVWlm5JM","name":"Draw Names Dialog","type":"script","author":"Rv52pj6itbOX14wX","img":"systems/l5r5e/assets/icons/actors/army.svg","scope":"global","command":"const pack = \"l5r5e.core-name-tables\";\nconst comp = await game.packs.get(pack);\nif (!comp) { console.log(`L5R5E | Pack not found[${pack}]`); return; }\nawait comp.getDocuments();\n\nlet radioTablesHtml = \"\";\ncomp.index.forEach(obj => { radioTablesHtml += ``; });\n\nnew Dialog({\n title: \"L5R5E Draw Names\",\n content: `\n
\n
\n \n
\n ${radioTablesHtml}\n
\n
\n
\n
\n \n
\n \n
\n
\n
\n `,\n buttons: {\n no: {\n icon: \"\",\n label: game.i18n.localize('Cancel')\n },\n yes: {\n icon: \"\",\n label: game.i18n.localize('TABLE.Roll'),\n callback: (html) => {\n const tableName = html.find('input[name=\"tableName\"]:checked')[0]?.value || null;\n const drawNumber = html.find('input[name=\"drawNumber\"]')[0]?.value || null;\n if (!tableName || !drawNumber || drawNumber < 1) {return;}\n game.l5r5e.HelpersL5r5e.drawManyFromPack(pack, tableName, drawNumber);\n }\n },\n },\n default: \"no\"\n}).render(true);","folder":null,"sort":0,"permission":{"default":0},"flags":{}} {"_id":"hpfDGUS48dA2pkUB","name":"Open Character Sheet (linked actor)","type":"script","author":"Rv52pj6itbOX14wX","img":"systems/l5r5e/assets/icons/actors/character.svg","scope":"global","command":"game.user.character?.sheet.render(true);","folder":null,"sort":0,"permission":{"default":0},"flags":{}} diff --git a/system/scripts/actors/character-generator.js b/system/scripts/actors/character-generator.js index 633dca7..21e2388 100644 --- a/system/scripts/actors/character-generator.js +++ b/system/scripts/actors/character-generator.js @@ -130,16 +130,16 @@ export class CharacterGenerator { * @return {Promise} */ static async getRandomizedFirstname(isFemale, clan) { - let table = `Japanese names (${isFemale ? "Female" : "Male"})`; + let table = `L5RCoreTblJpNam${isFemale ? "F" : "M"}`; switch (clan) { case "ivory_kingdoms": - table = "Ivory Kingdoms names"; + table = "aTVXI5Y5t7cBfyUE"; break; case "qamarist": - table = "Qamarist names"; + table = "bXaEmt72GLUeoyzz"; break; case "ujik": - table = "Ujik names"; + table = "d9lU98NE8G2YuN48"; break; } const randomNames = await game.l5r5e.HelpersL5r5e.drawManyFromPack("l5r5e.core-name-tables", table, 1, { diff --git a/system/scripts/helpers.js b/system/scripts/helpers.js index dc23abe..a6e170b 100644 --- a/system/scripts/helpers.js +++ b/system/scripts/helpers.js @@ -745,7 +745,7 @@ export class HelpersL5r5e { /** * Shortcut method to draw names to chat (private) from a table in compendium without importing it * @param {String} pack Compendium name - * @param {String} tableName Table name in this compendium + * @param {String} tableName Table name/id in this compendium * @param {String} retrieve How many draw we do * @param {object} opt drawMany config option object * @return {Promise<{RollTableDraw}>} The drawn results @@ -758,7 +758,7 @@ export class HelpersL5r5e { } await comp.getDocuments(); - const table = await comp.getName(tableName); + const table = await (/^[a-zA-Z0-9]{16}$/.test(tableName) ? comp.get(tableName) : comp.getName(tableName)); if (!table) { console.log(`L5R5E | Table not found[${tableName}]`, comp, table); return; diff --git a/system/system.json b/system/system.json index ba71c4d..3a17190 100644 --- a/system/system.json +++ b/system/system.json @@ -6,8 +6,8 @@ "readme": "https://gitlab.com/teaml5r/l5r5e/-/blob/master/README.md", "changelog": "https://gitlab.com/teaml5r/l5r5e/-/blob/master/CHANGELOG.md", "manifest": "https://gitlab.com/teaml5r/l5r5e/-/raw/master/system/system.json", - "download": "https://gitlab.com/teaml5r/l5r5e/-/jobs/artifacts/v1.8.1/raw/l5r5e.zip?job=build", - "version": "1.8.1", + "download": "https://gitlab.com/teaml5r/l5r5e/-/jobs/artifacts/v1.8.2/raw/l5r5e.zip?job=build", + "version": "1.8.2", "minimumCoreVersion": "9", "compatibleCoreVersion": "9", "manifestPlusVersion": "1.2.0",