initial work for localization - mostly skills

This commit is contained in:
The Last Scrub
2020-09-23 22:53:56 -07:00
parent 1daedc58a8
commit e01c4b9383
8 changed files with 180 additions and 30 deletions
+6
View File
@@ -1,5 +1,11 @@
## Release/Patch Notes
### Versin 0.9.4
Fix - Pharmacy and Surgery skills were missing.
Fix - Accounting and Disguise base skill rating were 0%, should be 10%.
Fix - Damage on medium pistol in compendium was wrong, also fixed some base range values that were off.
Enhancement - Adding support for localization. Focusing on main character sheet for now.
### Version 0.9.3
We will never speak of 0.9.1 or 0.9.2 ever again.
+70 -1
View File
@@ -1 +1,70 @@
{}
{
"DG.SystemName": "Delta Green",
"DG.AgentNameFieldTooltip": "LAST NAME, FIRST NAME (AND ALIAS IF APPLICABLE)",
"DG.RollLuck": "Roll Luck",
"DG.Luck": "Luck",
"DG.FallbackText.ProfessionAndOrRank": "PROFESSION (RANK IF APPLICABLE)",
"DG.Skills.accounting": "Accounting",
"DG.Skills.alertness": "Alterness",
"DG.Skills.anthropology": "Anthropology",
"DG.Skills.archeology": "Archeology",
"DG.Skills.artillery": "Artillery",
"DG.Skills.athletics": "Athletics",
"DG.Skills.bureaucracy": "Bureaucracy",
"DG.Skills.computer_science": "Computer Science",
"DG.Skills.criminology": "Criminology",
"DG.Skills.demolitions": "Demolitions",
"DG.Skills.disguise": "Disguise",
"DG.Skills.dodge": "Dodge",
"DG.Skills.drive": "Drive",
"DG.Skills.firearms": "Firearms",
"DG.Skills.first_aid": "First Aid",
"DG.Skills.forensics": "Forensics",
"DG.Skills.heavy_machiner": "Heavy Machinery",
"DG.Skills.heavy_weapons": "Heavy Weapons",
"DG.Skills.history": "History",
"DG.Skills.humint": "HUMINT",
"DG.Skills.law": "Law",
"DG.Skills.medicine": "Medicine",
"DG.Skills.melee_weapons": "Melee Weapons",
"DG.Skills.navigate": "Navigate",
"DG.Skills.occult": "Occult",
"DG.Skills.persuade": "Persuade",
"DG.Skills.pharmacy": "Pharmacy",
"DG.Skills.psychotherapy": "Psychotherapy",
"DG.Skills.ride": "Ride",
"DG.Skills.search": "Search",
"DG.Skills.sigint": "SIGINT",
"DG.Skills.stealth": "Stealth",
"DG.Skills.surgery": "Surgery",
"DG.Skills.survival": "Survival",
"DG.Skills.swim": "Swim",
"DG.Skills.unarmed_combat": "Unarmed Combat",
"DG.Skills.unnatural": "Unnatural",
"DG.Skills.AddTypedOrCustomSkill": "Add Typed or Custom Skill",
"DG.Skills.AddSkill": "Add Skill",
"DG.Skills.SkillGroup": "Skill Group",
"DG.Skills.SkillName": "Skill Name",
"DG.TypeSkills.Art": "Art",
"DG.TypeSkills.Craft": "Craft",
"DG.TypeSkills.ForeignLanguage": "Foreign Language",
"DG.TypeSkills.MilitaryScience": "Military Science",
"DG.TypeSkills.Pilot": "Pilot",
"DG.TypeSkills.Science": "Science",
"DG.TypeSkills.Other": "Other",
"DG.Attributes.HP": "HP",
"DG.Attributes.WP": "WP",
"DG.Attributes.SAN": "SAN",
"DG.Navigation.Skills": "Skills",
"DG.Navigation.Physical": "Physical",
"DG.Navigation.Mental": "Mental",
"DG.Navigation.Gear": "Gear",
"DG.Navigation.CV": "C.V.",
"DG.Navigation.Contacts": "Contacts"
}
+70
View File
@@ -0,0 +1,70 @@
{
"DG.SystemName": "デルタ・グリーン",
"DG.AgentNameFieldTooltip": "名前(エイリアス)",
"DG.RollLuck": "運のテスト",
"DG.Luck": "運",
"DG.FallbackText.ProfessionAndOrRank": "職業 (またはランク)",
"DG.Skills.accounting": "会計",
"DG.Skills.alertness": "警戒心",
"DG.Skills.anthropology": "人類学",
"DG.Skills.archeology": "考古学",
"DG.Skills.artillery": "火砲",
"DG.Skills.athletics": "アスレチックス",
"DG.Skills.bureaucracy": "官僚",
"DG.Skills.computer_science": "コンピュータサイエンス",
"DG.Skills.criminology": "犯罪学",
"DG.Skills.demolitions": "解体",
"DG.Skills.disguise": "変装",
"DG.Skills.dodge": "ダッジ",
"DG.Skills.drive": "運転",
"DG.Skills.firearms": "銃砲",
"DG.Skills.first_aid": "応急処置",
"DG.Skills.forensics": "法医学",
"DG.Skills.heavy_machiner": "重機",
"DG.Skills.heavy_weapons": "重火器",
"DG.Skills.history": "歴史学",
"DG.Skills.humint": "HUMINT",
"DG.Skills.law": "法律",
"DG.Skills.medicine": "医学",
"DG.Skills.melee_weapons": "近接武器",
"DG.Skills.navigate": "航行",
"DG.Skills.occult": "オカルト",
"DG.Skills.persuade": "説得",
"DG.Skills.pharmacy": "薬学",
"DG.Skills.psychotherapy": "心理療法",
"DG.Skills.ride": "乗り",
"DG.Skills.search": "捜索",
"DG.Skills.sigint": "SIGINT",
"DG.Skills.stealth": "ステルス",
"DG.Skills.surgery": "手術",
"DG.Skills.survival": "サバイバル",
"DG.Skills.swim": "泳ぎ",
"DG.Skills.unarmed_combat": "非武装戦闘",
"DG.Skills.unnatural": "不自然",
"DG.Skills.AddTypedOrCustomSkill": "スキルを加える",
"DG.Skills.AddSkill": "スキルを加える",
"DG.Skills.SkillGroup": "スキルのグループ",
"DG.Skills.SkillName": "スキルの名前",
"DG.TypeSkills.Art": "芸",
"DG.TypeSkills.Craft": "クラフト",
"DG.TypeSkills.ForeignLanguage": "外国語",
"DG.TypeSkills.MilitaryScience": "軍事科学",
"DG.TypeSkills.Pilot": "パイロット",
"DG.TypeSkills.Science": "理科",
"DG.TypeSkills.Other": "他",
"DG.Attributes.HP": "HP",
"DG.Attributes.WP": "WP",
"DG.Attributes.SAN": "SAN",
"DG.Navigation.Skills": "技術",
"DG.Navigation.Physical": "健康",
"DG.Navigation.Mental": "精神",
"DG.Navigation.Gear": "道義",
"DG.Navigation.CV": "装備",
"DG.Navigation.Contacts": "絆"
}
+12 -12
View File
@@ -71,7 +71,7 @@ export class DeltaGreenActorSheet extends ActorSheet {
buttons = [
{
label: "Roll Luck",
label: game.i18n.translations.DG.RollLuck,
class: "test-extra-icon",
icon: "fas fa-dice",
onclick: (ev) => sendPercentileTestToChat(this.actor, "Luck", 50)
@@ -153,29 +153,29 @@ export class DeltaGreenActorSheet extends ActorSheet {
let htmlContent = "";
htmlContent += `<div>`;
htmlContent += ` <label>Skill Group</label>`;
htmlContent += ` <label>${game.i18n.translations.DG.Skills.SkillGroup}:</label>`;
htmlContent += ` <select name="new-type-skill-group" />`;
htmlContent += ` <option>Art</option>`;
htmlContent += ` <option>Craft</option>`;
htmlContent += ` <option>Foreign Language</option>`;
htmlContent += ` <option>Military Science</option>`;
htmlContent += ` <option>Pilot</option>`;
htmlContent += ` <option>Science</option>`;
htmlContent += ` <option>Other</option>`;
htmlContent += ` <option>${game.i18n.translations.DG.TypeSkills.Art}</option>`;
htmlContent += ` <option>${game.i18n.translations.DG.TypeSkills.Craft}</option>`;
htmlContent += ` <option>${game.i18n.translations.DG.TypeSkills.ForeignLanguage}</option>`;
htmlContent += ` <option>${game.i18n.translations.DG.TypeSkills.MilitaryScience}</option>`;
htmlContent += ` <option>${game.i18n.translations.DG.TypeSkills.Pilot}</option>`;
htmlContent += ` <option>${game.i18n.translations.DG.TypeSkills.Science}</option>`;
htmlContent += ` <option>${game.i18n.translations.DG.TypeSkills.Other}</option>`;
htmlContent += ` </select>`;
htmlContent += `</div>`;
htmlContent += `<div>`;
htmlContent += ` <label>Skill Name</label>`;
htmlContent += ` <label>${game.i18n.translations.DG.Skills.SkillName}</label>`;
htmlContent += ` <input type="text" name="new-type-skill-label" />`;
htmlContent += `</div>`;
new Dialog({
content:htmlContent,
title: "Add New Skill",
title: game.i18n.translations.DG.Skills.AddTypedOrCustomSkill,
buttons: {
add:{
label: "Add Skill",
label: game.i18n.translations.DG.Skills.AddSkill,
callback: btn =>{
let newTypeSkillLabel = btn.find("[name='new-type-skill-label']").val();
let newTypeSkillGroup = btn.find("[name='new-type-skill-group']").val();
+2 -2
View File
@@ -5,6 +5,6 @@
{"_id":"DruzlEXzmEMSwoSq","name":"Shotgun (Firing Slug)","permission":{"default":0,"bugxCCxa4GzlYx2g":3},"type":"weapon","data":{"name":"","description":"<p>Examples (12-gauge): Mossberg Model 500, Remington Model 870, Ruger Red Label. Double-barrel capacity: 2.</p>","skill":"firearms","range":"75M","damage":"2D6","armorPiercing":0,"lethality":0,"isLethal":false,"killRadius":"","ammo":"20","expense":"Standard"},"flags":{},"img":"systems/deltagreen/assets/icons/sawed-off-shotgun.svg"}
{"_id":"Zh1TVVNUFBxfxAOc","name":"Shotgun (Firing Shot)","permission":{"default":0,"bugxCCxa4GzlYx2g":3},"type":"weapon","data":{"name":"","description":"<p>Full damage up to 20 m; 2D6 from 21 to 50 m; 1D6 beyond beyond 50 m.</p>\n<p>Examples (12-gauge): Mossberg Model 500, Remington Model 870, Ruger Red Label. Double-barrel capacity: 2.</p>","skill":"firearms","range":"50M","damage":"2d10","armorPiercing":0,"lethality":0,"isLethal":false,"killRadius":"","ammo":"20","expense":"Standard"},"flags":{},"img":"systems/deltagreen/assets/icons/sawed-off-shotgun.svg"}
{"name":"Rifle (Very Heavy)","permission":{"default":0,"bugxCCxa4GzlYx2g":3},"type":"weapon","data":{"name":"","description":"<p>Use lethality rating (10%) if firing bursts.&nbsp; Heavier rounds inflict 1D12+1 damage.</p>","skill":"firearms","range":"250M","damage":"2D10","armorPiercing":5,"lethality":20,"isLethal":true,"killRadius":"N/A","ammo":"","expense":"Major"},"flags":{},"img":"systems/deltagreen/assets/icons/fn-fal.svg","_id":"ccNHepyVZVb6p49U"}
{"_id":"mvGLbgOB9TeGBfhr","name":"Heavy Pistol","permission":{"default":0,"bugxCCxa4GzlYx2g":3},"type":"weapon","data":{"name":"","description":"<p>Revolver capacity: 6. Examples: 10×25mm Auto, .357 Magnum, .44 Magnum, .50 AE: Colt Delta Elite, Glock 20, S&amp;W Model 13.</p>","skill":"firearms","range":"10M","damage":"1D12","armorPiercing":0,"lethality":0,"isLethal":false,"killRadius":"","ammo":"20","expense":"Standard"},"flags":{},"img":"systems/deltagreen/assets/icons/desert-eagle.svg"}
{"_id":"mvGLbgOB9TeGBfhr","name":"Heavy Pistol","permission":{"default":0,"bugxCCxa4GzlYx2g":3},"type":"weapon","data":{"name":"","description":"<p>Revolver capacity: 6. Examples: 10×25mm Auto, .357 Magnum, .44 Magnum, .50 AE: Colt Delta Elite, Glock 20, S&amp;W Model 13.</p>","skill":"firearms","range":"20M","damage":"1D12","armorPiercing":0,"lethality":0,"isLethal":false,"killRadius":"","ammo":"20","expense":"Standard"},"flags":{},"img":"systems/deltagreen/assets/icons/desert-eagle.svg"}
{"_id":"oQhWip2JTJYY18fS","name":"Shotgun (Firing Nonlethal)","permission":{"default":0,"bugxCCxa4GzlYx2g":3},"type":"weapon","data":{"name":"","description":"<p>Target stunned on a hit (along with damage).</p>","skill":"firearms","range":"10M","damage":"1D6","armorPiercing":0,"lethality":0,"isLethal":false,"killRadius":"","ammo":"20","expense":"Standard"},"flags":{},"img":"systems/deltagreen/assets/icons/sawed-off-shotgun.svg"}
{"_id":"xb73X4SjsbuYs4D7","name":"Medium Pistol","permission":{"default":0,"bugxCCxa4GzlYx2g":3},"type":"weapon","data":{"name":"","description":"<p>Revolver capacity: 6. Examples: 9×19 mm, .40 S&amp;W, .45 ACP: Beretta Mod 92FS (M9), Colt M1911A1, Glock 17, Glock 22.</p>","skill":"firearms","range":"10M","damage":"1D10","armorPiercing":0,"lethality":0,"isLethal":false,"killRadius":"","ammo":"20","expense":"Standard"},"flags":{},"img":"systems/deltagreen/assets/icons/glock.svg"}
{"_id":"xb73X4SjsbuYs4D7","name":"Medium Pistol","permission":{"default":0,"bugxCCxa4GzlYx2g":3},"type":"weapon","data":{"name":"","description":"<p>Revolver capacity: 6. Examples: 9×19 mm, .40 S&amp;W, .45 ACP: Beretta Mod 92FS (M9), Colt M1911A1, Glock 17, Glock 22.</p>","skill":"firearms","range":"15M","damage":"1D10","armorPiercing":0,"lethality":0,"isLethal":false,"killRadius":"","ammo":"20","expense":"Standard"},"flags":{},"img":"systems/deltagreen/assets/icons/glock.svg"}
+5
View File
@@ -41,6 +41,11 @@
"lang": "en",
"name": "English",
"path": "lang/en.json"
},
{
"lang": "ja",
"name": "日本語",
"path": "lang/ja.json"
}
],
"gridDistance": 1,
+2 -2
View File
@@ -46,7 +46,7 @@
"skills": {
"accounting": {
"label": "Accounting",
"proficiency": 0,
"proficiency": 10,
"failure": false
},
"alertness": {
@@ -96,7 +96,7 @@
},
"disguise": {
"label": "Disguise",
"proficiency": 0,
"proficiency": 10,
"failure": false
},
"dodge": {
+13 -13
View File
@@ -10,10 +10,10 @@
<img class="profile-img" src="{{actor.img}}" data-edit="img" title="{{actor.name}}" height="150" width="100"/>
<div class="horizontal-flex-column">
<div>
<h1 class="charname"><input name="name" type="text" value="{{actor.name}}" placeholder="LAST NAME, FIRST NAME (AND ALIAS IF APPLICABLE)"/></h1>
<h1 class="charname"><input name="name" type="text" value="{{actor.name}}" title="{{localize 'DG.AgentNameFieldTooltip' }}"/></h1>
</div>
<div>
<h2 class="profession"><input name="data.biography.profession" type="text" value="{{data.biography.profession}}" placeholder="PROFESSION (RANK IF APPLICABLE)"/></h1>
<h2 class="profession"><input name="data.biography.profession" type="text" value="{{data.biography.profession}}" placeholder="{{localize 'DG.FallbackText.ProfessionAndOrRank'}}"/></h1>
</div>
</div>
</div>
@@ -22,7 +22,7 @@
{{!-- HP --}}
<div class="resource flex-group-center">
<label for="data.health.value" class="resource-label" title="Hit points, a character becomes unconsious at 2 HP, and dies at 0 HP.">HP</label>
<label for="data.health.value" class="resource-label" title="Hit points, a character becomes unconsious at 2 HP, and dies at 0 HP.">{{localize 'DG.Attributes.HP' }}</label>
<div class="resource-content flexrow flex-center flex-between">
<input type="text" name="data.health.value" value="{{data.health.value}}" data-dtype="Number"/>
<span> / </span>
@@ -34,7 +34,7 @@
<div class="resource flex-group-center">
<label for="data.wp.value" class="resource-label"
title="Willpower Points are mental fuel. Agents require Willpower Points to keep going despite exhaustion or mentally taxing situations. See page 47 of the Agent's Handbook for more detail."
>WP</label>
>{{localize 'DG.Attributes.WP' }}</label>
<div class="resource-content flexrow flex-center flex-between">
<input type="text" name="data.wp.value" value="{{data.wp.value}}" data-dtype="Number"/>
<span> / </span>
@@ -46,7 +46,7 @@
<div class="resource flex-group-center">
<label for="data.wp.value" class="resource-label rollable"
data-rolltype="sanity" data-roll="d100" data-target="sanity" data-label="SAN" title="Click to roll a sanity check..."
>SAN</label>
>{{localize 'DG.Attributes.SAN' }}</label>
<div class="resource-content flexrow flex-center flex-between">
<input type="text" name="data.sanity.value" value="{{data.sanity.value}}" data-dtype="Number"
title="Current sanity, current breaking point is {{data.sanity.currentBreakingPoint}}, click the SAN label above to roll a sanity check."
@@ -61,12 +61,12 @@
{{!-- Sheet Tab Navigation --}}
<nav class="sheet-tabs tabs" data-group="primary">
<a class="item" data-tab="skills">Skills</a>
<a class="item" data-tab="physical">Physical</a>
<a class="item" data-tab="motivations">Mental</a>
<a class="item" data-tab="gear">Gear</a>
<a class="item" data-tab="bio">C.V.</a>
<a class="item" data-tab="bonds">Contacts</a>
<a class="item" data-tab="skills">{{localize 'DG.Navigation.Skills'}}</a>
<a class="item" data-tab="physical">{{localize 'DG.Navigation.Physical'}}</a>
<a class="item" data-tab="motivations">{{localize 'DG.Navigation.Mental'}}</a>
<a class="item" data-tab="gear">{{localize 'DG.Navigation.Gear'}}</a>
<a class="item" data-tab="bio">{{localize 'DG.Navigation.CV'}}</a>
<a class="item" data-tab="bonds">{{localize 'DG.Navigation.Contacts'}}</a>
<a class="item fas fa-question-circle" data-tab="about"></a>
</nav>
@@ -82,7 +82,7 @@
{{#if skill.proficiency}}title="Click to roll a skill check."{{/if}}
{{#unless skill.proficiency}}title="A skill at 0% cannot be used. See page 28 of the Agent's Handbook."{{/unless}}
>
{{skill.label}}
{{ localize (concat "DG.Skills." key) }}
</label>
<input class="percentile-skill-input" type="text" name="data.skills.{{key}}.proficiency" value="{{skill.proficiency}}" data-dtype="Number"/>
<input type="checkbox" name="data.skills.{{key}}.failure" {{checked skill.failure}} data-dtype="Boolean" {{#if skill.cannotBeImprovedByFailure}} disabled {{/if}}
@@ -94,7 +94,7 @@
<div>
<div class="item-controls">
<a class="item-control typed-skill-add" title="Create item"><i class="fas fa-plus"></i>Add Typed or Custom Skill</a>
<a class="item-control typed-skill-add"><i class="fas fa-plus"></i>{{localize 'DG.Skills.AddTypedOrCustomSkill'}}</a>
</div>
<div class="grid-2col">
{{#each data.typedSkills as |skill key|}}