Skip to content

Commit

Permalink
fix: Minor gui fix (increase a dropdown width), more Spanish localiza…
Browse files Browse the repository at this point in the history
…tion, and some general localization fixes.
  • Loading branch information
xdy committed Sep 17, 2020
1 parent 8ce8aac commit 2092837
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 28 deletions.
11 changes: 7 additions & 4 deletions src/module/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export const registerSettings = function ():void {

game.settings.register('twodsix', 'effectOrTotal', {
name: game.i18n.localize("TWODSIX.Settings.effectOrTotal.name"),
hint: game.i18n.localize("TWODSIX.Settings.effectOrTotal.name"),
hint: game.i18n.localize("TWODSIX.Settings.effectOrTotal.hint"),
scope: 'world',
config: true,
default: false,
Expand All @@ -70,7 +70,7 @@ export const registerSettings = function ():void {

game.settings.register('twodsix', 'automateDamageRollOnHit', {
name: game.i18n.localize("TWODSIX.Settings.automateDamageRollOnHit.name"),
hint: game.i18n.localize("TWODSIX.Settings.automateDamageRollOnHit.name"),
hint: game.i18n.localize("TWODSIX.Settings.automateDamageRollOnHit.hint"),
scope: 'world',
config: true,
default: false,
Expand Down Expand Up @@ -109,10 +109,13 @@ function _simpleUpdateInit(formula:string, notify = false):void {
const currentFormula = CONFIG.Combat.initiative.formula;
try {
new Roll(formula).roll();
message = `Set initiative formula to: ${formula}`;
message = game.i18n.format("TWODSIX.Settings.initiativeFormula.success", {formula: formula});
} catch (error) {
if (notify) {
message = `Failed to set initiative formula to: ${formula}, using previous value ${currentFormula} instead.`;
message = game.i18n.format("TWODSIX.Settings.initiativeFormula.failure", {
formula: formula,
currentFormula: currentFormula
});
notificationType = "error";
}
game.settings.set("twodsix", "initiativeFormula", currentFormula).then(() => formula = currentFormula);
Expand Down
4 changes: 2 additions & 2 deletions static/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,10 @@
"name": "Show effect or total roll value for skill and characteristic rolls."
},
"initiativeFormula": {
"failure": "Failed to set initiative formula to: ${formula}, using previous value ${currentFormula} instead.",
"failure": "Failed to set initiative formula to: {formula}, using previous value {currentFormula} instead.",
"hint": "Like: \"2d6 + @characteristics.dexterity.mod\"",
"name": "Initiative Formula",
"success": "Set initiative formula to: ${formula}"
"success": "Set initiative formula to: {formula}"
},
"maxSkillLevel": {
"hint": "Leave empty to use default (9).",
Expand Down
22 changes: 15 additions & 7 deletions static/lang/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -174,16 +174,24 @@
"absoluteBonusValueForEachTimeIncrement": {
"hint": "Dejar vacío para utilizar por defecto (+/-1). Sin utilidad actualmente.",
"name": "Qué bonus/penalización aplicar a cada incremento en una tarea."
},
"automateDamageRollOnHit": {
"hint": "true=Tirar daño, modificado por el efecto de la tirada de habilidad. false=No tirar el daño.",
"name": "¿Tirar daño automaticamente en las tiradas de habilidad que impacten (Ej: efecto > 0) con objetos que puedan dañar?"
},
"defaultTokenSettings": {
"hint": "Automáticamente asignar configuración al token de nuevos Actores.",
"name": "Configuración por defecto del token"
},
"effectOrTotal": {
"hint": "true=Mostrar Efecto (Ej: tirada+modificadores-objetivo, normalmente 8), false=Mostrar Valor (Ej: tirada+modificadores)",
"name": "Mostrar el Efecto o el Valor final en las tiradas de habilidad y característica."
},
"initiativeFormula": {
"failure": "Fallo al asignar nueva fórmula: ${formula}, utilizando el valor anterior ${currentFormula}.",
"failure": "Fallo al asignar nueva fórmula: {formula}, utilizando el valor anterior {currentFormula}.",
"hint": "Ej: \"2d6 + @characteristics.dexterity.mod\"",
"name": "Fórmula de iniciativa",
"success": "Nueva fórmula de iniciativa asignada correctamente: ${formula}"
"success": "Nueva fórmula de iniciativa asignada correctamente: {formula}"
},
"maxSkillLevel": {
"hint": "Dejar vacío para utilizar por defecto (9).",
Expand All @@ -194,16 +202,16 @@
"name": "Modificador para los Atributos a cero."
},
"systemMigrationVersion": {
"hint": "Guarda la versión del schema para el sistema Twodsix. (No modificar a menos que se sepa lo que se hace)",
"hint": "Cambia la versión del schema del sistema Twodsix. (No modificar a menos que se sepa lo que se hace)",
"name": "Versión Schema del sistema"
},
"termForAdvantage": {
"hint": "No utilizar el mismo que en termForDisadvantage...",
"name": "Cómo llamar las tiradas con Ventaja (3d6kh2)."
"hint": "No utilizar el mismo término que en Desventaja.",
"name": "Nombre de las tiradas con Ventaja (3d6kh2)."
},
"termForDisadvantage": {
"hint": "No utilizar el mismo que en termForAdvantage...",
"name": "Cómo llamar las tiradas con Desventaja (3d6kl2)."
"hint": "No utilizar el mismo término que en Ventaja.",
"name": "Nombre de las tiradas con Desventaja (3d6kl2)."
}
}
},
Expand Down
4 changes: 2 additions & 2 deletions static/lang/sv.json
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,10 @@
"name": "Visa effekten eller totalvärdet när färgdighet och grundförmågor rullas."
},
"initiativeFormula": {
"failure": "Misslyckades sätta initiativformel till: ${formula}, använder föregående värde ${currentFormula} istället.",
"failure": "Misslyckades sätta initiativformel till: {formula}, använder föregående värde {currentFormula} istället.",
"hint": "T ex: \"2d6 + @characteristics.dexterity.mod\"",
"name": "Initiativformel",
"success": "Sätt initiativformel till: ${formula}"
"success": "Sätt initiativformel till: {formula}"
},
"maxSkillLevel": {
"hint": "Lämna tomt för att använda default (9).",
Expand Down
2 changes: 1 addition & 1 deletion static/styles/twodsix.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions static/templates/actors/actor-sheet.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<div class="character-characteristics">
<div class="stat str">
<span class="stat-name rollable" data-roll="2d6+{{data.characteristics.strength.mod}}" data-label="{{data.characteristics.strength.shortLabel}}"
alt="roll strength">{{localize "TWODSIX.Actor.Characteristics.STR"}} <img src="./systems/twodsix/assets/d6-icon.svg"/></span>
>{{localize "TWODSIX.Actor.Characteristics.STR"}} <img src="./systems/twodsix/assets/d6-icon.svg" alt="roll strength"/></span>

<span class="stat-ability"><input type="number" min="0" name="data.characteristics.strength.value"
data-label="data.characteristics.strength.value" value="{{data.characteristics.strength.value}}"
Expand All @@ -36,7 +36,7 @@

<div class="stat dex">
<span class="stat-name rollable" data-roll="2d6+{{data.characteristics.dexterity.mod}}" data-label="{{data.characteristics.dexterity.shortLabel}}"
alt="roll dexterity">{{localize "TWODSIX.Actor.Characteristics.DEX"}} <img src="./systems/twodsix/assets/d6-icon.svg"/>
>{{localize "TWODSIX.Actor.Characteristics.DEX"}} <img src="./systems/twodsix/assets/d6-icon.svg" alt="roll dexterity"/>
</span>

<span class="stat-ability"><input type="number" min="0" name="data.characteristics.dexterity.value"
Expand All @@ -51,7 +51,7 @@

<div class="stat end">
<span class="stat-name rollable" data-roll="2d6+{{data.characteristics.endurance.mod}}" data-label="{{data.characteristics.endurance.shortLabel}}"
alt="roll endurance">{{localize "TWODSIX.Actor.Characteristics.END"}} <img src="./systems/twodsix/assets/d6-icon.svg"/>
>{{localize "TWODSIX.Actor.Characteristics.END"}} <img src="./systems/twodsix/assets/d6-icon.svg" alt="roll endurance"/>
</span>

<span class="stat-ability"><input type="number" min="0" name="data.characteristics.endurance.value"
Expand All @@ -66,7 +66,7 @@

<div class="stat int">
<span class="stat-name rollable" data-roll="2d6+{{data.characteristics.intelligence.mod}}" data-label="{{data.characteristics.intelligence.shortLabel}}"
alt="roll intelligence">{{localize "TWODSIX.Actor.Characteristics.INT"}} <img src="./systems/twodsix/assets/d6-icon.svg"/>
>{{localize "TWODSIX.Actor.Characteristics.INT"}} <img src="./systems/twodsix/assets/d6-icon.svg" alt="roll intelligence"/>
</span>

<span class="stat-ability"><input type="number" min="0" name="data.characteristics.intelligence.value"
Expand All @@ -81,7 +81,7 @@

<div class="stat edu">
<span class="stat-name rollable" data-roll="2d6+{{data.characteristics.education.mod}}" data-label="{{data.characteristics.education.shortLabel}}"
alt="roll education">{{localize "TWODSIX.Actor.Characteristics.EDU"}} <img src="./systems/twodsix/assets/d6-icon.svg"/>
>{{localize "TWODSIX.Actor.Characteristics.EDU"}} <img src="./systems/twodsix/assets/d6-icon.svg" alt="roll education"/>
</span>

<span class="stat-ability"><input type="number" min="0" name="data.characteristics.education.value"
Expand All @@ -96,7 +96,7 @@

<div class="stat soc">
<span class="stat-name rollable" data-roll="2d6+{{data.characteristics.socialStanding.mod}}" data-label="{{data.characteristics.socialStanding.shortLabel}}"
alt="roll socialStanding">{{localize "TWODSIX.Actor.Characteristics.SOC"}} <img src="./systems/twodsix/assets/d6-icon.svg"/>
>{{localize "TWODSIX.Actor.Characteristics.SOC"}} <img src="./systems/twodsix/assets/d6-icon.svg" alt="roll socialStanding"/>
</span>

<span class="stat-ability"><input type="number" min="0" name="data.characteristics.socialStanding.value"
Expand All @@ -111,7 +111,7 @@

<div class="special psi">
<span class="special-name rollable" data-roll="2d6+{{data.characteristics.psionicStrength.mod}}" data-label="{{data.characteristics.psionicStrength.shortLabel}}"
alt="roll psionicStrength">{{localize "TWODSIX.Actor.Characteristics.PSI"}} <img src="./systems/twodsix/assets/d6-icon.svg"/>
>{{localize "TWODSIX.Actor.Characteristics.PSI"}} <img src="./systems/twodsix/assets/d6-icon.svg" alt="roll psionicStrength"/>
</span>

<span class="special-ability"><input type="number" min="0" name="data.characteristics.psionicStrength.value"
Expand Down
8 changes: 3 additions & 5 deletions static/templates/actors/ship-sheet.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<form class="{{cssClass}} flexcol" autocomplete="off">
<img class="ship-mask-bg" src="/systems/twodsix/assets/ship/Interface-Overlay-2.svg" alt="?"/>
<img class="ship-mask-bg" src="./systems/twodsix/assets/ship/Interface-Overlay-2.svg" alt="?"/>
<div class="ship-container">
<div class="ship_image">
<img class="ship-img" src="{{actor.img}}" data-edit="img" title="{{actor.ship.name}}" alt='{{localize "TWODSIX.Actor.ShipImage"}}'/>
Expand Down Expand Up @@ -30,8 +30,7 @@
<div class="ship-m-drive"><label>M-Drive</label><input type="text" value="{{data.ship.reqPower.m-drive}}" name="data.ship.reqPower.m-drive" placeholder="0"/></div>
<div class="ship-j-drive"><label>J-Drive</label><input type="text" value="{{data.ship.reqPower.j-drive}}" name="data.ship.reqPower.j-drive" placeholder="0"/></div>
<div class="ship-sensors"><label>Sensors</label><input type="text" value="{{data.ship.reqPower.sensors}}" name="data.ship.reqPower.sensors" placeholder="0"/></div>
<div class="ship-weapons">Weapons<input type="text" value="{{data.ship.reqPower.weapons}}" name="data.ship.reqPower.weapons" placeholder="0"/></li>
</div>
<div class="ship-weapons">Weapons<input type="text" value="{{data.ship.reqPower.weapons}}" name="data.ship.reqPower.weapons" placeholder="0"></div>s
</div>
</div>
</div>
Expand Down Expand Up @@ -68,6 +67,5 @@
<div class="tab ship-notes" data-group="primary" data-tab="ship-notes">
{{> "systems/twodsix/templates/actors/parts/ship/ship-notes.html"}}
</div>


</div>
</form>

0 comments on commit 2092837

Please sign in to comment.