Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some localizacion fixes #14

Merged
merged 5 commits into from
Jan 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion i18n/en.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

"AC2D20.VEHICLES.QUALITIES.singleSeat:": Single Seat
AC2D20.Ability.agi: Agility
AC2D20.Ability.bra: Brawn
Expand Down Expand Up @@ -324,3 +323,23 @@ TYPES.Item.special_rule: Special Rule
TYPES.Item.spell: Spell
TYPES.Item.talent: Talent
TYPES.Item.weapon: Weapon
AC2D20.TEMPLATES.Name: Name
AC2D20.TEMPLATES.Nationality: Nationality
AC2D20.TEMPLATES.Archetype: Archetype
AC2D20.TEMPLATES.Background: Background
AC2D20.TEMPLATES.Characteristic: Characteristic
AC2D20.EFFECTS.Temporary: Temporary Effects
AC2D20.EFFECTS.Passive: Passive Effects
AC2D20.EFFECTS.Inactive: Inactive Effects
AC2D20.SETTINGS.showmomentumName: Show GM Momentum To Players
AC2D20.SETTINGS.showmomentumHint: Shows the GM momentum window to everyone. Requires refresh on players side.
AC2D20.SETTINGS.maxappName: Players Can Setup Max App
AC2D20.SETTINGS.maxappHint: Allows players to settup the Party's MAX AP. Requires refresh on players side.
AC2D20.SETTINGS.compendiumName: Skills Compendium
AC2D20.SETTINGS.compendiumHint: Each time a new character is created it will include this set of skills.
AC2D20.SETTINGS.hoverName: Mouse Hover JSON file
AC2D20.SETTINGS.hoverHint: Location of the json file containing the text for qualities and damage effects.
AC2D20.SETTINGS.ctName: Combat Tracker Updates Momentum?
AC2D20.SETTINGS.ctHint: If enabled the Combat Tracker will decrement the Momentum Pool when a new Combat Round starts, or when Combat ends.
AC2D20.TEMPLATES.majoritems: Major Items
AC2D20.TEMPLATES.minoritems: Minor Items
48 changes: 34 additions & 14 deletions i18n/es.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ AC2D20.AbilityAbbr.wil: vol
AC2D20.ARMOR.qualities.heavy: Pesada
AC2D20.ARMOR.qualities.shield: Escudo
AC2D20.ARMOR.qualities.uncomfortable: Incómoda
AC2D20.Combat.CombatantsTurnDone: Turn Completed
AC2D20.Combat.CombatantsTurnNotDone: Turn Not Completed
AC2D20.Combat.CombatEndMomentumPoolDecremented: Momentum Pool Decremented at End of Combat
AC2D20.Combat.CombatHasNotStarted: Combat Has Not Started
AC2D20.Combat.CombatRoundMomentumPoolDecremented: Momentum Pool Decremented at Start of New Round
AC2D20.Combat.ToggleCombatantsTurnDone: Toggle Turn Completed
AC2D20.Combat.CombatantsTurnDone: Turno finalizado
AC2D20.Combat.CombatantsTurnNotDone: Turno no finalizado
AC2D20.Combat.CombatEndMomentumPoolDecremented: Reserva de momentum reducida al final del combate
AC2D20.Combat.CombatHasNotStarted: Combate no iniciado
AC2D20.Combat.CombatRoundMomentumPoolDecremented: Reserva de momentum reducida al inicio de un nuevo asalto
AC2D20.Combat.ToggleCombatantsTurnDone: Conmutar turno finalizado
AC2D20.EffectCreate: Crear Efecto
AC2D20.EffectDelete: Borrar Efecto
AC2D20.EffectEdit: Editar Efecto
Expand Down Expand Up @@ -315,11 +315,31 @@ ACTOR.Vehicle.Passengers: Pasajeros
TYPES.Actor.character: Personaje
TYPES.Actor.npc: PNJ
TYPES.Actor.vehicle: Vehículo
TYPES.Item.armor: Armor
TYPES.Item.equipment: Equipment
TYPES.Item.skill: Skill
TYPES.Item.skillkit: Skill Kit
TYPES.Item.special_rule: Special Rule
TYPES.Item.spell: Spell
TYPES.Item.talent: Talent
TYPES.Item.weapon: Weapon
TYPES.Item.armor: Armadura
TYPES.Item.equipment: Equipo
TYPES.Item.skill: Habilidad
TYPES.Item.skillkit: Grupo de habilidades
TYPES.Item.special_rule: Regla especial
TYPES.Item.spell: Conjuro
TYPES.Item.talent: Talento
TYPES.Item.weapon: Arma
AC2D20.TEMPLATES.Name: Nombre
AC2D20.TEMPLATES.Nationality: Nacionalidad
AC2D20.TEMPLATES.Archetype: Arquetipo
AC2D20.TEMPLATES.Background: Trasfondo
AC2D20.TEMPLATES.Characteristic: Rasgo característico
AC2D20.EFFECTS.Temporary: Efectos temporales
AC2D20.EFFECTS.Passive: Efectos pasivos
AC2D20.EFFECTS.Inactive: Efectos inactivos
AC2D20.SETTINGS.showmomentumName: Mostrar momentum del GM a los jugadores
AC2D20.SETTINGS.showmomentumHint: Muestra la ventana del momentum del GM a todos los jugadores. Necesita que los jugadores recarguen el programa.
AC2D20.SETTINGS.maxappName: Jugadores pueden ajustar Máx PA
AC2D20.SETTINGS.maxappHint: Permite que los jugadores ajusten el máx PA del grupo. Necesita que los jugadores recarguen el programa.
AC2D20.SETTINGS.compendiumName: Compendio de habilidades
AC2D20.SETTINGS.compendiumHint: Cuando se crea un nuevo personaje incluirá las habilidades contenidas en este compendio.
AC2D20.SETTINGS.hoverName: Fichero JSON de descripciones
AC2D20.SETTINGS.hoverHint: Localización del fichero json que contiene las descripciones de cualidades y efectos de daño que aparecen al pasar el ratón.
AC2D20.SETTINGS.ctName: Asistente de combate actualiza el momentum
AC2D20.SETTINGS.ctHint: Si se activa, el asistente de combate reducirá la reserva de momentum cuando empiece un nuevo asalto, o cuando el combate finalice.
AC2D20.TEMPLATES.majoritems: Objetos grandes
AC2D20.TEMPLATES.minoritems: Objetos pequeños
6 changes: 3 additions & 3 deletions system/src/helpers/effects.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,17 @@ export function prepareActiveEffectCategories(effects) {
const categories = {
temporary: {
type: "temporary",
label: "Temporary Effects",
label: game.i18n.localize("AC2D20.EFFECTS.Temporary"),
effects: [],
},
passive: {
type: "passive",
label: "Passive Effects",
label: game.i18n.localize("AC2D20.EFFECTS.Passive"),
effects: [],
},
inactive: {
type: "inactive",
label: "Inactive Effects",
label: game.i18n.localize("AC2D20.EFFECTS.Inactive"),
effects: [],
},
};
Expand Down
10 changes: 8 additions & 2 deletions system/src/helpers/handlebars.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,13 @@ export const registerHandlebarsHelpers = function() {
Object.entries(effect).forEach(([k, v]) => {
let effString = "";
let tooltip = "";
let locString = "";
if (v.value) {
let tstr = `AC2D20.WEAPONS.effects.${k}`;
let lstr = `AC2D20.WEAPONS.damageEffect.${k}`;
tooltip = Handlebars.helpers.getTooltipFromConfigKey(tstr);
effString += `<span data-tooltip="${tooltip}">${v.label}`;
locString = game.i18n.localize(lstr);
effString += `<span data-tooltip="${tooltip}">${locString}`;
if (v.rank) {
effString += ` ${v.rank}`;
}
Expand All @@ -107,10 +110,13 @@ export const registerHandlebarsHelpers = function() {
Object.entries(qualities).forEach(([k, v]) => {
let quString = "";
let tooltip = "";
let locString = "";
if (v.value) {
let tstr = `AC2D20.WEAPONS.qualities.${k}`;
let lstr = `AC2D20.WEAPONS.weaponQuality.${k}`;
tooltip = Handlebars.helpers.getTooltipFromConfigKey(tstr);
quString += `<span data-tooltip="${tooltip}">${v.label}</span>`;
locString = game.i18n.localize(lstr);
quString += `<span data-tooltip="${tooltip}">${locString}</span>`;
_qualities.push(quString);
}
});
Expand Down
19 changes: 10 additions & 9 deletions system/src/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,34 +26,35 @@ export function registerSettings() {
});

game.settings.register("ac2d20", "gmMomentumShowToPlayers", {
name: "Show GM Momentum To Players",
hint: "Shows the GM momentum window to everyone. Requires refresh on players side.",
name: game.i18n.localize("AC2D20.SETTINGS.showmomentumName"),
hint: game.i18n.localize("AC2D20.SETTINGS.showmomentumHint"),
scope: "world",
config: true,
default: false,
type: Boolean,
});

game.settings.register("ac2d20", "maxAppShowToPlayers", {
name: "Players Can Setup Max App",
hint: "Allows players to settup the Party's MAX AP. Requires refresh on players side.",
name: game.i18n.localize("AC2D20.SETTINGS.maxappName"),
hint: game.i18n.localize("AC2D20.SETTINGS.maxappHint"),
scope: "world",
config: true,
default: false,
type: Boolean,
});

game.settings.register("ac2d20", "compendium-skills", {
name: "Skills Compendium",
name: game.i18n.localize("AC2D20.SETTINGS.compendiumName"),
hint: game.i18n.localize("AC2D20.SETTINGS.compendiumHint"),
scope: "world",
config: true,
default: "ac2d20.skills",
type: String,
});

game.settings.register("ac2d20", "hoversJsonLocation", {
name: "Mouse Hover JSON file",
hint: "Location of the json file containing the text for qualities and damage effects.",
name: game.i18n.localize("AC2D20.SETTINGS.hoverName"),
hint: game.i18n.localize("AC2D20.SETTINGS.hoverHint"),
scope: "world",
config: true,
default: "systems/ac2d20/assets/hovers.json",
Expand All @@ -64,8 +65,8 @@ export function registerSettings() {
});

game.settings.register("ac2d20", "combatTrackerMomentumUpdate", {
name: "Combat Tracker Updates Momentum?",
hint: "If enabled the Combat Tracker will decrement the Momentum Pool when a new Combat Round starts, or when Combat ends.",
name: game.i18n.localize("AC2D20.SETTINGS.ctName"),
hint: game.i18n.localize("AC2D20.SETTINGS.ctHint"),
scope: "world",
config: true,
default: true,
Expand Down
2 changes: 1 addition & 1 deletion system/templates/actor/parts/actor-encumbrance.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
<span class="right-slope olive"></span>
</div>
<div style="display: flex;flex-direction: row; justify-content: space-between; border: 1px solid #759549; margin-bottom: 5px; padding: 5px;">
<span>[Major Items: {{majorItemsTotal}}] [Minor Items: {{minorItemsTotal}}] </span>
<span>[{{localize "AC2D20.TEMPLATES.majoritems"}}: {{majorItemsTotal}}] [{{localize "AC2D20.TEMPLATES.minoritems"}}: {{minorItemsTotal}}] </span>
<span>{{#if (eq isEncumbered true)}}<span style="color:#6b0b0b;">{{localize "AC2D20.TEMPLATES.Encumbered"}}</span>{{/if}} {{totalEncumbrance}} / {{system.carryCapacity.value}} <i class="fas fa-info-circle" title="Add effect | system.carryCapacity.value | Add | #Number | to modify the carry capacity"></i></span>
</div>
12 changes: 6 additions & 6 deletions system/templates/actor/parts/actor-header.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
<img class="paperclip" src="systems/ac2d20/assets/paperclip-60.png" data-edit="img" height="60" />
<div class="flexcol" style="height: 100%;">
<div class="flexrow" style="padding: 10px 5px 0px 5px;">
<h1 class="sheet-name" style="align-self: flex-end; margin: 0 5px;"><input class="underline" name="name" type="text" value="{{actor.name}}" placeholder="Name" /></h1>
<input placeholder="Nationality" type="text" class="underline" name="system.nationality" value="{{system.nationality}}" data-dtype="String" style="align-self: flex-end; margin: 0 5px;" />
<input placeholder="Rank" type="text" class="underline" name="system.rank" value="{{system.rank}}" data-dtype="String" style="align-self: flex-end; margin: 0 5px;" />
<h1 class="sheet-name" style="align-self: flex-end; margin: 0 5px;"><input class="underline" name="name" type="text" value="{{actor.name}}" placeholder="{{localize 'AC2D20.TEMPLATES.Name'}}" /></h1>
<input placeholder="{{localize 'AC2D20.TEMPLATES.Nationality'}}" type="text" class="underline" name="system.nationality" value="{{system.nationality}}" data-dtype="String" style="align-self: flex-end; margin: 0 5px;" />
<input placeholder="{{localize 'AC2D20.TEMPLATES.Rank'}}" type="text" class="underline" name="system.rank" value="{{system.rank}}" data-dtype="String" style="align-self: flex-end; margin: 0 5px;" />
</div>
<div class="flexrow" style="padding: 0 5px;">
<input placeholder="Archetype" type="text" class="underline" name="system.archetype" value="{{system.archetype}}" data-dtype="String" style="align-self: flex-end;margin: 0 5px;" />
<input placeholder="Background" type="text" class="underline" name="system.background" value="{{system.background}}" data-dtype="String" style="align-self: flex-end;margin: 0 5px;" />
<input placeholder="Characteristic" type="text" class="underline" name="system.characteristic" value="{{system.characteristic}}" data-dtype="String" style="align-self: flex-end;margin: 0 5px;" />
<input placeholder="{{localize 'AC2D20.TEMPLATES.Archetype'}}" type="text" class="underline" name="system.archetype" value="{{system.archetype}}" data-dtype="String" style="align-self: flex-end;margin: 0 5px;" />
<input placeholder="{{localize 'AC2D20.TEMPLATES.Background'}}" type="text" class="underline" name="system.background" value="{{system.background}}" data-dtype="String" style="align-self: flex-end;margin: 0 5px;" />
<input placeholder="{{localize 'AC2D20.TEMPLATES.Characteristic'}}" type="text" class="underline" name="system.characteristic" value="{{system.characteristic}}" data-dtype="String" style="align-self: flex-end;margin: 0 5px;" />
</div>
</div>
</header>
2 changes: 1 addition & 1 deletion system/templates/item/item-skill-sheet.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<div class="focus-item">
<input type="text" class='focus-title' value="{{focus.title}}">
<span style="margin: 0 5px; display: flex; align-items: center;">
<label>Focus</label>
<label>{{localize 'AC2D20.TEMPLATES.Focus'}}</label>
<input type="checkbox" class="focus-cb" {{#if (eq focus.isfocus true)}}checked{{/if}}>
</span>
<div class="item-controls">
Expand Down