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

localizations #2331

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
6 changes: 3 additions & 3 deletions modules/model/item/skill.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,19 +93,19 @@ export class SkillModel extends BaseItemModel {
// If skill has (any) or (), ask for a specialisation
if (this.parent.specifier.toLowerCase() == game.i18n.localize("SPEC.Any").toLowerCase() || (this.isGrouped && !(this.parent.specifier)))
{
let skills = await warhammer.utility.findAllItems("skill", "Loading Skills", true);
let skills = await warhammer.utility.findAllItems("skill", game.i18n.localize("SHEET.LoadingSkills"), true);
let specialisations = skills.filter(i => i.name.split("(")[0]?.trim() == this.parent.baseName);

// if specialisations are found, prompt it, if not, skip to value dialog
let choice = specialisations.length > 0 ? await ItemDialog.create(specialisations, 1, {title : "Skill Specialisation", text : "Select specialisation, if no selection is made, enter one manually."}) : []
let choice = specialisations.length > 0 ? await ItemDialog.create(specialisations, 1, {title : game.i18n.localize("SHEET.SkillSpecialization"), text : game.i18n.localize("SHEET.SkillSpecializationText")}) : []
let newName = ""
if (choice[0])
{
newName = choice[0].name;
}
else
{
newName = this.parent.baseName + ` (${await ValueDialog.create({text: "Enter Skill Specialisation", title : "Skill Specialisation"})})`;
newName = this.parent.baseName + ` (${await ValueDialog.create({text: game.i18n.localize("SHEET.SkillSpecializationEnter"), title : game.i18n.localize("SHEET.SkillSpecialization")})})`;

}

Expand Down
4 changes: 2 additions & 2 deletions modules/model/item/trait.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export class TraitModel extends PropertiesMixin(BaseItemModel)
{
let schema = super.defineSchema();

schema.category = new fields.StringField({initial : "standard", choices : {standard : "Standard", vehicle : "Vehicle"}});
schema.category = new fields.StringField({initial : "standard", choices : {standard : game.i18n.localize("ITEM.Standard"), vehicle : game.i18n.localize("SPEC.Vehicle")}});

schema.rollable = new fields.SchemaField({
value : new fields.BooleanField({}),
Expand All @@ -20,7 +20,7 @@ export class TraitModel extends PropertiesMixin(BaseItemModel)
dice : new fields.StringField({}),
defaultDifficulty : new fields.StringField({initial : "challenging", choices : game.wfrp4e.config.difficultyLabels}),
SL : new fields.BooleanField({}),
attackType : new fields.StringField({initial: "melee", choices : {melee : "Melee", ranged : "Ranged"}})
attackType : new fields.StringField({initial: "melee", choices : {melee : game.i18n.localize("Melee"), ranged : game.i18n.localize("Ranged")}})
});

schema.specification = new fields.SchemaField({
Expand Down
5 changes: 5 additions & 0 deletions static/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,10 @@
"SHEET.CareerSkill" : "Changing Career Skill",
"SHEET.CareerSkillPrompt" : "You are changing the specialization of a skill in your current career. Do you want to apply this change to the career as well?",
"SHEET.CareerSkillNotif" : "Changing {oldName} to {newName} in {career}",
"SHEET.LoadingSkills" : "Loading Skills",
"SHEET.SkillSpecialization" : "Skill Specialisation",
"SHEET.SkillSpecializationText" : "Select specialisation, if no selection is made, enter one manually.",
"SHEET.SkillSpecializationEnter" : "Enter Skill Specialisation",
"SHEET.SortItems" : "Sort Items",
"SHEET.ArmourDamaged" : "Armour Damaged by 1",
"SHEET.ArmourRepaired" : "Armour Repaired by 1",
Expand Down Expand Up @@ -240,6 +244,7 @@
"SHEET.DeleteItem" : "Delete Item",
"SHEET.RemoveItem" : "Remove Item",
"SHEET.Encumbrance" : "Encumbrance",
"SHEET.EncCount" : "Encumbrance Counter",
"SHEET.MaxEnc" : "Max Encumbered",
"SHEET.VeryEnc" : "Very Encumbered",
"SHEET.Encumbered" : "Encumbered",
Expand Down
2 changes: 1 addition & 1 deletion static/templates/sheets/item/types/prayer.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{{formGroup fields.duration.fields.value value=source.system.duration.value}}
{{formGroup fields.target.fields.aoe value=source.system.target.aoe}}
{{#if source.system.target.aoe}}
{{formGroup fields.target.fields.value value=source.system.target.value label="Radius"}}
{{formGroup fields.target.fields.value value=source.system.target.value label="Radius" localize=true}}
{{formGroup fields.target.fields.extendableAoE value=source.system.target.extendableAoE}}
{{else}}
{{formGroup fields.target.fields.value value=source.system.target.value}}
Expand Down
2 changes: 1 addition & 1 deletion static/templates/sheets/item/types/spell.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

{{formGroup fields.target.fields.aoe value=source.system.target.aoe}}
{{#if source.system.target.aoe}}
{{formGroup fields.target.fields.value value=source.system.target.value label="Radius"}}
{{formGroup fields.target.fields.value value=source.system.target.value label="Radius" localize=true}}
{{else}}
{{formGroup fields.target.fields.value value=source.system.target.value}}
{{/if}}
Expand Down