moved localization mappings in CONFIG.DS4.i18nKeys
- moved all mappings in CONFIG.DS4 that belong to localization into common parent CONFIG.DS4.i18nKeys - adapted logic in ds4.ts to not overwrite entries in CONFIG.DS4.i18nKeys - adapted calls to config in templates
This commit is contained in:
parent
a5d91eca71
commit
d831f376e1
18 changed files with 333 additions and 352 deletions
|
@ -8,6 +8,17 @@ export const DS4 = {
|
||||||
|____/ \___/|_| \_|\____|_____\___/|_| \_|____/|_____/_/ \_\_| |_____|_| \_\____/ |_|
|
|____/ \___/|_| \_|\____|_____\___/|_| \_|____/|_____/_/ \_\_| |_____|_| \_\____/ |_|
|
||||||
=============================================================================================`,
|
=============================================================================================`,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A dictionary of dictionaries each mapping keys to localized strings.
|
||||||
|
* To be filled with the localizations derived from i18nKeys.
|
||||||
|
*/
|
||||||
|
i18n: {
|
||||||
|
// to be filled with the localized mappings from i18nKeys
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* A dictionary of dictionaries each mapping keys to localization keys.
|
||||||
|
*/
|
||||||
|
i18nKeys: {
|
||||||
/**
|
/**
|
||||||
* Define the set of acttack types that can be performed with weapon items
|
* Define the set of acttack types that can be performed with weapon items
|
||||||
*/
|
*/
|
||||||
|
@ -17,23 +28,6 @@ export const DS4 = {
|
||||||
meleeRanged: "DS4.AttackTypeMeleeRanged",
|
meleeRanged: "DS4.AttackTypeMeleeRanged",
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
|
||||||
* Define the file paths to icon images
|
|
||||||
*/
|
|
||||||
attackTypesIcons: {
|
|
||||||
melee: "systems/ds4/assets/icons/official/combat-values/melee-attack.png",
|
|
||||||
meleeRanged: "systems/ds4/assets/icons/official/combat-values/melee-ranged-attack.png",
|
|
||||||
ranged: "systems/ds4/assets/icons/official/combat-values/ranged-attack.png",
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Define the file paths to icon images
|
|
||||||
*/
|
|
||||||
spellTypesIcons: {
|
|
||||||
spellcasting: "systems/ds4/assets/icons/official/combat-values/spellcasting.png",
|
|
||||||
targetedSpellcasting: "systems/ds4/assets/icons/official/combat-values/targeted-spellcasting.png",
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Define the set of item availabilties
|
* Define the set of item availabilties
|
||||||
*/
|
*/
|
||||||
|
@ -209,23 +203,6 @@ export const DS4 = {
|
||||||
eyeColor: "DS4.CharacterProfileEyeColor",
|
eyeColor: "DS4.CharacterProfileEyeColor",
|
||||||
specialCharacteristics: "DS4.CharacterProfileSpecialCharacteristics",
|
specialCharacteristics: "DS4.CharacterProfileSpecialCharacteristics",
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
|
||||||
* Define the profile info types for handlebars of a character
|
|
||||||
*/
|
|
||||||
characterProfileDTypes: {
|
|
||||||
biography: "String",
|
|
||||||
gender: "String",
|
|
||||||
birthday: "String",
|
|
||||||
birthplace: "String",
|
|
||||||
age: "Number",
|
|
||||||
height: "Number",
|
|
||||||
hairColor: "String",
|
|
||||||
weight: "Number",
|
|
||||||
eyeColor: "String",
|
|
||||||
specialCharacteristics: "String",
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Define currency elements of a character
|
* Define currency elements of a character
|
||||||
*/
|
*/
|
||||||
|
@ -319,4 +296,38 @@ export const DS4 = {
|
||||||
blindroll: "DS4.ChatVisibilityBlindRoll",
|
blindroll: "DS4.ChatVisibilityBlindRoll",
|
||||||
selfroll: "DS4.ChatVisibilitySelfRoll",
|
selfroll: "DS4.ChatVisibilitySelfRoll",
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Define the file paths to icon images
|
||||||
|
*/
|
||||||
|
attackTypesIcons: {
|
||||||
|
melee: "systems/ds4/assets/icons/official/combat-values/melee-attack.png",
|
||||||
|
meleeRanged: "systems/ds4/assets/icons/official/combat-values/melee-ranged-attack.png",
|
||||||
|
ranged: "systems/ds4/assets/icons/official/combat-values/ranged-attack.png",
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Define the file paths to icon images
|
||||||
|
*/
|
||||||
|
spellTypesIcons: {
|
||||||
|
spellcasting: "systems/ds4/assets/icons/official/combat-values/spellcasting.png",
|
||||||
|
targetedSpellcasting: "systems/ds4/assets/icons/official/combat-values/targeted-spellcasting.png",
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Define the profile info types for handlebars of a character
|
||||||
|
*/
|
||||||
|
characterProfileDTypes: {
|
||||||
|
biography: "String",
|
||||||
|
gender: "String",
|
||||||
|
birthday: "String",
|
||||||
|
birthplace: "String",
|
||||||
|
age: "Number",
|
||||||
|
height: "Number",
|
||||||
|
hairColor: "String",
|
||||||
|
weight: "Number",
|
||||||
|
eyeColor: "String",
|
||||||
|
specialCharacteristics: "String",
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -29,8 +29,8 @@ Hooks.once("init", async function () {
|
||||||
CONFIG.Item.entityClass = DS4Item as typeof Item;
|
CONFIG.Item.entityClass = DS4Item as typeof Item;
|
||||||
|
|
||||||
// Define localized type labels
|
// Define localized type labels
|
||||||
CONFIG.Actor.typeLabels = DS4.actorTypes;
|
CONFIG.Actor.typeLabels = DS4.i18nKeys.actorTypes;
|
||||||
CONFIG.Item.typeLabels = DS4.itemTypes;
|
CONFIG.Item.typeLabels = DS4.i18nKeys.itemTypes;
|
||||||
|
|
||||||
// Configure Dice
|
// Configure Dice
|
||||||
CONFIG.Dice.types = [Die, DS4Check];
|
CONFIG.Dice.types = [Die, DS4Check];
|
||||||
|
@ -84,46 +84,16 @@ async function registerHandlebarsPartials() {
|
||||||
* This function runs after game data has been requested and loaded from the servers, so entities exist
|
* This function runs after game data has been requested and loaded from the servers, so entities exist
|
||||||
*/
|
*/
|
||||||
Hooks.once("setup", function () {
|
Hooks.once("setup", function () {
|
||||||
// Localize CONFIG objects once up-front
|
|
||||||
const toLocalize = [
|
|
||||||
"attackTypes",
|
|
||||||
"itemAvailabilities",
|
|
||||||
"itemTypes",
|
|
||||||
"armorTypes",
|
|
||||||
"armorTypesAbbr",
|
|
||||||
"armorMaterialTypes",
|
|
||||||
"armorMaterialTypesAbbr",
|
|
||||||
"armorMaterialTypes",
|
|
||||||
"spellTypes",
|
|
||||||
"spellCategories",
|
|
||||||
"attributes",
|
|
||||||
"traits",
|
|
||||||
"combatValues",
|
|
||||||
"characterBaseInfo",
|
|
||||||
"characterProgression",
|
|
||||||
"characterLanguage",
|
|
||||||
"characterProfile",
|
|
||||||
"characterCurrency",
|
|
||||||
"creatureTypes",
|
|
||||||
"creatureSizeCategories",
|
|
||||||
"creatureBaseInfo",
|
|
||||||
"temporalUnits",
|
|
||||||
"temporalUnitsAbbr",
|
|
||||||
"distanceUnits",
|
|
||||||
"distanceUnitsAbbr",
|
|
||||||
"chatVisibilities",
|
|
||||||
];
|
|
||||||
|
|
||||||
// Exclude some from sorting where the default order matters
|
// Exclude some from sorting where the default order matters
|
||||||
const noSort = ["attributes", "traits", "combatValues", "creatureSizeCategories"];
|
const noSort = ["attributes", "traits", "combatValues", "creatureSizeCategories"];
|
||||||
|
|
||||||
// Localize and sort CONFIG objects
|
// Localize and sort CONFIG objects
|
||||||
for (const o of toLocalize) {
|
for (const o of Object.keys(CONFIG.DS4.i18nKeys)) {
|
||||||
const localized = Object.entries(CONFIG.DS4[o]).map((e) => {
|
const localized = Object.entries(CONFIG.DS4.i18nKeys[o]).map((e) => {
|
||||||
return [e[0], game.i18n.localize(e[1] as string)];
|
return [e[0], game.i18n.localize(e[1] as string)];
|
||||||
});
|
});
|
||||||
if (!noSort.includes(o)) localized.sort((a, b) => a[1].localeCompare(b[1]));
|
if (!noSort.includes(o)) localized.sort((a, b) => a[1].localeCompare(b[1]));
|
||||||
CONFIG.DS4[o] = localized.reduce((obj, e) => {
|
CONFIG.DS4.i18n[o] = localized.reduce((obj, e) => {
|
||||||
obj[e[0]] = e[1];
|
obj[e[0]] = e[1];
|
||||||
return obj;
|
return obj;
|
||||||
}, {});
|
}, {});
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { ModifiableData } from "../common/common-data";
|
import { ModifiableData } from "../common/common-data";
|
||||||
import { DS4 } from "../config";
|
import { DS4 } from "../config";
|
||||||
|
|
||||||
export type ItemType = keyof typeof DS4.itemTypes;
|
export type ItemType = keyof typeof DS4.i18nKeys.itemTypes;
|
||||||
|
|
||||||
export type DS4ItemDataType =
|
export type DS4ItemDataType =
|
||||||
| DS4Weapon
|
| DS4Weapon
|
||||||
|
|
|
@ -13,20 +13,20 @@
|
||||||
<div class="flexrow basic-properties">
|
<div class="flexrow basic-properties">
|
||||||
<div class="basic-property">
|
<div class="basic-property">
|
||||||
<label class="basic-property-label"
|
<label class="basic-property-label"
|
||||||
for="data.baseInfo.race">{{config.characterBaseInfo.race}}</label>
|
for="data.baseInfo.race">{{config.i18n.characterBaseInfo.race}}</label>
|
||||||
<input type="text" name="data.baseInfo.race" id="data.baseInfo.race" value="{{data.baseInfo.race}}"
|
<input type="text" name="data.baseInfo.race" id="data.baseInfo.race" value="{{data.baseInfo.race}}"
|
||||||
data-dtype="String" />
|
data-dtype="String" />
|
||||||
</div>
|
</div>
|
||||||
<div class="basic-property">
|
<div class="basic-property">
|
||||||
<label class="basic-property-label"
|
<label class="basic-property-label"
|
||||||
for="data.baseInfo.culture">{{config.characterBaseInfo.culture}}</label>
|
for="data.baseInfo.culture">{{config.i18n.characterBaseInfo.culture}}</label>
|
||||||
<input id="data.baseInfo.culture" type="text" name="data.baseInfo.culture"
|
<input id="data.baseInfo.culture" type="text" name="data.baseInfo.culture"
|
||||||
value="{{data.baseInfo.culture}}"
|
value="{{data.baseInfo.culture}}"
|
||||||
data-dtype="String" />
|
data-dtype="String" />
|
||||||
</div>
|
</div>
|
||||||
<div class="basic-property flex125">
|
<div class="basic-property flex125">
|
||||||
<label class="basic-property-label"
|
<label class="basic-property-label"
|
||||||
for="data.progression.progressPoints.used">{{config.characterProgression.progressPoints}}</label>
|
for="data.progression.progressPoints.used">{{config.i18n.characterProgression.progressPoints}}</label>
|
||||||
<div class="flexrow">
|
<div class="flexrow">
|
||||||
<input id="data.progression.progressPoints.used" type="number"
|
<input id="data.progression.progressPoints.used" type="number"
|
||||||
name="data.progression.progressPoints.used"
|
name="data.progression.progressPoints.used"
|
||||||
|
@ -43,7 +43,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="basic-property flex125">
|
<div class="basic-property flex125">
|
||||||
<label class="basic-property-label"
|
<label class="basic-property-label"
|
||||||
for="data.progression.talentPoints.used">{{config.characterProgression.talentPoints}}</label>
|
for="data.progression.talentPoints.used">{{config.i18n.characterProgression.talentPoints}}</label>
|
||||||
<div class="flexrow">
|
<div class="flexrow">
|
||||||
<input type="number" name="data.progression.talentPoints.used"
|
<input type="number" name="data.progression.talentPoints.used"
|
||||||
id="data.progression.talentPoints.used"
|
id="data.progression.talentPoints.used"
|
||||||
|
@ -56,13 +56,13 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="basic-property">
|
<div class="basic-property">
|
||||||
<label class="basic-property-label"
|
<label class="basic-property-label"
|
||||||
for="data.baseInfo.class">{{config.characterBaseInfo.class}}</label>
|
for="data.baseInfo.class">{{config.i18n.characterBaseInfo.class}}</label>
|
||||||
<input type="text" id="data.baseInfo.class" name="data.baseInfo.class"
|
<input type="text" id="data.baseInfo.class" name="data.baseInfo.class"
|
||||||
value="{{data.baseInfo.class}}" data-dtype="String" />
|
value="{{data.baseInfo.class}}" data-dtype="String" />
|
||||||
</div>
|
</div>
|
||||||
<div class="basic-property">
|
<div class="basic-property">
|
||||||
<label class="basic-property-label"
|
<label class="basic-property-label"
|
||||||
for="data.baseInfo.heroClass">{{config.characterBaseInfo.heroClass}}</label>
|
for="data.baseInfo.heroClass">{{config.i18n.characterBaseInfo.heroClass}}</label>
|
||||||
<input type="text" id="data.baseInfo.heroClass" name="data.baseInfo.heroClass"
|
<input type="text" id="data.baseInfo.heroClass" name="data.baseInfo.heroClass"
|
||||||
value="{{data.baseInfo.heroClass}}"
|
value="{{data.baseInfo.heroClass}}"
|
||||||
data-dtype="String" />
|
data-dtype="String" />
|
||||||
|
|
|
@ -6,10 +6,10 @@
|
||||||
<h1 class="charname"><input name="name" type="text" value="{{actor.name}}" placeholder="Name" /></h1>
|
<h1 class="charname"><input name="name" type="text" value="{{actor.name}}" placeholder="Name" /></h1>
|
||||||
<div class="flexrow basic-properties">
|
<div class="flexrow basic-properties">
|
||||||
<div class="basic-property">
|
<div class="basic-property">
|
||||||
<label>{{config.creatureBaseInfo.creatureType}}</label>
|
<label>{{config.i18n.creatureBaseInfo.creatureType}}</label>
|
||||||
<select name="data.baseInfo.creatureType" data-type="String">
|
<select name="data.baseInfo.creatureType" data-type="String">
|
||||||
{{#select data.baseInfo.creatureType}}
|
{{#select data.baseInfo.creatureType}}
|
||||||
{{#each config.creatureTypes as |value key|}}
|
{{#each config.i18n.creatureTypes as |value key|}}
|
||||||
<option value="{{key}}">{{value}}</option>
|
<option value="{{key}}">{{value}}</option>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
{{/select}}
|
{{/select}}
|
||||||
|
@ -17,20 +17,20 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="basic-property">
|
<div class="basic-property">
|
||||||
<label class="basic-property-label"
|
<label class="basic-property-label"
|
||||||
for="data.baseInfo.loot">{{config.creatureBaseInfo.loot}}</label>
|
for="data.baseInfo.loot">{{config.i18n.creatureBaseInfo.loot}}</label>
|
||||||
<input type="text" name="data.baseInfo.loot" value="{{data.baseInfo.loot}}" data-dtype="String" />
|
<input type="text" name="data.baseInfo.loot" value="{{data.baseInfo.loot}}" data-dtype="String" />
|
||||||
</div>
|
</div>
|
||||||
<div class="basic-property">
|
<div class="basic-property">
|
||||||
<label class="basic-property-label"
|
<label class="basic-property-label"
|
||||||
for="data.baseInfo.foeFactor">{{config.creatureBaseInfo.foeFactor}}</label>
|
for="data.baseInfo.foeFactor">{{config.i18n.creatureBaseInfo.foeFactor}}</label>
|
||||||
<input type="text" name="data.baseInfo.foeFactor" value="{{data.baseInfo.foeFactor}}"
|
<input type="text" name="data.baseInfo.foeFactor" value="{{data.baseInfo.foeFactor}}"
|
||||||
data-dtype="Number" />
|
data-dtype="Number" />
|
||||||
</div>
|
</div>
|
||||||
<div class="basic-property">
|
<div class="basic-property">
|
||||||
<label>{{config.creatureBaseInfo.sizeCategory}}</label>
|
<label>{{config.i18n.creatureBaseInfo.sizeCategory}}</label>
|
||||||
<select name="data.baseInfo.sizeCategory" data-type="String">
|
<select name="data.baseInfo.sizeCategory" data-type="String">
|
||||||
{{#select data.baseInfo.sizeCategory}}
|
{{#select data.baseInfo.sizeCategory}}
|
||||||
{{#each config.creatureSizeCategories as |value key|}}
|
{{#each config.i18n.creatureSizeCategories as |value key|}}
|
||||||
<option value="{{key}}">{{value}}</option>
|
<option value="{{key}}">{{value}}</option>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
{{/select}}
|
{{/select}}
|
||||||
|
@ -38,7 +38,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="basic-property">
|
<div class="basic-property">
|
||||||
<label class="basic-property-label"
|
<label class="basic-property-label"
|
||||||
for="data.baseInfo.experiencePoints">{{config.creatureBaseInfo.experiencePoints}}</label>
|
for="data.baseInfo.experiencePoints">{{config.i18n.creatureBaseInfo.experiencePoints}}</label>
|
||||||
<input type="text" name="data.baseInfo.experiencePoints" value="{{data.baseInfo.experiencePoints}}"
|
<input type="text" name="data.baseInfo.experiencePoints" value="{{data.baseInfo.experiencePoints}}"
|
||||||
data-dtype="Number" />
|
data-dtype="Number" />
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -42,11 +42,11 @@
|
||||||
{{!-- ======================================================================== --}}
|
{{!-- ======================================================================== --}}
|
||||||
|
|
||||||
<div class="attributes-traits grid grid-3col">
|
<div class="attributes-traits grid grid-3col">
|
||||||
{{#each config.attributes as |attribute-label attribute-key|}}
|
{{#each config.i18n.attributes as |attribute-label attribute-key|}}
|
||||||
{{> attribute attribute-label=attribute-label attribute-key=attribute-key attribute-data=(lookup ../data.attributes
|
{{> attribute attribute-label=attribute-label attribute-key=attribute-key attribute-data=(lookup ../data.attributes
|
||||||
attribute-key)}}
|
attribute-key)}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
{{#each config.traits as |trait-label trait-key|}}
|
{{#each config.i18n.traits as |trait-label trait-key|}}
|
||||||
{{> trait trait-label=trait-label trait-key=trait-key trait-data=(lookup ../data.traits trait-key)}}
|
{{> trait trait-label=trait-label trait-key=trait-key trait-data=(lookup ../data.traits trait-key)}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -4,13 +4,13 @@
|
||||||
<h4 class="items-list-title">{{localize 'DS4.CharacterCurrency'}}</h4>
|
<h4 class="items-list-title">{{localize 'DS4.CharacterCurrency'}}</h4>
|
||||||
<ol class="items-list">
|
<ol class="items-list">
|
||||||
<li class="item flexrow item-header">
|
<li class="item flexrow item-header">
|
||||||
<label for="data.currency.gold" class="flex05">{{config.characterCurrency.gold}}</label>
|
<label for="data.currency.gold" class="flex05">{{config.i18n.characterCurrency.gold}}</label>
|
||||||
<input class="flex3 item-num-val item-change" type="number" min="0" step="1" name="data.currency.gold"
|
<input class="flex3 item-num-val item-change" type="number" min="0" step="1" name="data.currency.gold"
|
||||||
id="data.currency.gold" value="{{data.currency.gold}}" data-dtype="Number" />
|
id="data.currency.gold" value="{{data.currency.gold}}" data-dtype="Number" />
|
||||||
<label for="data.currency.silver" class="flex05">{{config.characterCurrency.silver}}</label>
|
<label for="data.currency.silver" class="flex05">{{config.i18n.characterCurrency.silver}}</label>
|
||||||
<input class="flex3 item-num-val item-change" type="number" min="0" step="1" name="data.currency.silver"
|
<input class="flex3 item-num-val item-change" type="number" min="0" step="1" name="data.currency.silver"
|
||||||
id="data.currency.silver" value="{{data.currency.silver}}" data-dtype="Number" />
|
id="data.currency.silver" value="{{data.currency.silver}}" data-dtype="Number" />
|
||||||
<label for="data.currency.copper" class="flex05">{{config.characterCurrency.copper}}</label>
|
<label for="data.currency.copper" class="flex05">{{config.i18n.characterCurrency.copper}}</label>
|
||||||
<input class="flex3 item-num-val item-change" type="number" min="0" step="1" name="data.currency.copper"
|
<input class="flex3 item-num-val item-change" type="number" min="0" step="1" name="data.currency.copper"
|
||||||
id="data.currency.copper" value="{{data.currency.copper}}" data-dtype="Number" />
|
id="data.currency.copper" value="{{data.currency.copper}}" data-dtype="Number" />
|
||||||
</li>
|
</li>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<div class="progression flexrow">
|
<div class="progression flexrow">
|
||||||
<div class="progression-entry">
|
<div class="progression-entry">
|
||||||
<h2 class="progression-label"><label for="data.progression.level">{{config.characterProgression.level}}</label>
|
<h2 class="progression-label"><label for="data.progression.level">{{config.i18n.characterProgression.level}}</label>
|
||||||
</h2>
|
</h2>
|
||||||
<label for="data.progression.level" class="hidden">Progression Level</label>
|
<label for="data.progression.level" class="hidden">Progression Level</label>
|
||||||
<input class="progression-value" type="number" name="data.progression.level" id="data.progression.level" value="{{data.progression.level}}"
|
<input class="progression-value" type="number" name="data.progression.level" id="data.progression.level" value="{{data.progression.level}}"
|
||||||
|
@ -8,7 +8,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="progression-entry">
|
<div class="progression-entry">
|
||||||
<h2 class="progression-label"><label
|
<h2 class="progression-label"><label
|
||||||
for="data.progression.experiencePoints">{{config.characterProgression.experiencePoints}}</label>
|
for="data.progression.experiencePoints">{{config.i18n.characterProgression.experiencePoints}}</label>
|
||||||
</h2>
|
</h2>
|
||||||
<label for="data.progression.experiencePoints" class="hidden">Experience Points</label>
|
<label for="data.progression.experiencePoints" class="hidden">Experience Points</label>
|
||||||
<input class="progression-value" type="number" name="data.progression.experiencePoints" id="data.progression.experiencePoints"
|
<input class="progression-value" type="number" name="data.progression.experiencePoints" id="data.progression.experiencePoints"
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
{{!-- ======================================================================== --}}
|
{{!-- ======================================================================== --}}
|
||||||
|
|
||||||
<div class="combat-values flexrow flex-between">
|
<div class="combat-values flexrow flex-between">
|
||||||
{{#each config.combatValues as |combat-value-label combat-value-key|}}
|
{{#each config.i18n.combatValues as |combat-value-label combat-value-key|}}
|
||||||
{{> combat-value combat-value-key=combat-value-key combat-value-data=(lookup ../data.combatValues
|
{{> combat-value combat-value-key=combat-value-key combat-value-data=(lookup ../data.combatValues
|
||||||
combat-value-key)}}
|
combat-value-key)}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
|
|
|
@ -111,7 +111,7 @@
|
||||||
{{#> itemListEntry item=item}}
|
{{#> itemListEntry item=item}}
|
||||||
<div class="flex05 item-image">
|
<div class="flex05 item-image">
|
||||||
<img src="{{lookup ../../config.attackTypesIcons item.data.data.attackType}}"
|
<img src="{{lookup ../../config.attackTypesIcons item.data.data.attackType}}"
|
||||||
title="{{lookup ../../config.attackTypes item.data.data.attackType}}" width="24" height="24" />
|
title="{{lookup ../../config.i18n.attackTypes item.data.data.attackType}}" width="24" height="24" />
|
||||||
</div>
|
</div>
|
||||||
<div class="flex05 item-num-val">{{ item.data.data.weaponBonus}}</div>
|
<div class="flex05 item-num-val">{{ item.data.data.weaponBonus}}</div>
|
||||||
<div class="flex05 item-num-val">{{ item.data.data.opponentDefense}}</div>
|
<div class="flex05 item-num-val">{{ item.data.data.opponentDefense}}</div>
|
||||||
|
@ -135,11 +135,11 @@
|
||||||
{{/itemListHeader}}
|
{{/itemListHeader}}
|
||||||
{{#each itemsByType.armor as |item id|}}
|
{{#each itemsByType.armor as |item id|}}
|
||||||
{{#> itemListEntry item=item }}
|
{{#> itemListEntry item=item }}
|
||||||
<div title="{{lookup ../../config.armorMaterialTypes item.data.data.armorMaterialType}}">
|
<div title="{{lookup ../../config.i18n.armorMaterialTypes item.data.data.armorMaterialType}}">
|
||||||
{{lookup ../../config.armorMaterialTypesAbbr item.data.data.armorMaterialType}}
|
{{lookup ../../config.i18n.armorMaterialTypesAbbr item.data.data.armorMaterialType}}
|
||||||
</div>
|
</div>
|
||||||
<div title="{{lookup ../../config.armorTypes item.data.data.armorType}}">
|
<div title="{{lookup ../../config.i18n.armorTypes item.data.data.armorType}}">
|
||||||
{{lookup ../../config.armorTypesAbbr item.data.data.armorType}}
|
{{lookup ../../config.i18n.armorTypesAbbr item.data.data.armorType}}
|
||||||
</div>
|
</div>
|
||||||
<div class="flex05 item-num-val">{{ item.data.data.armorValue}}</div>
|
<div class="flex05 item-num-val">{{ item.data.data.armorValue}}</div>
|
||||||
{{/itemListEntry}}
|
{{/itemListEntry}}
|
||||||
|
|
|
@ -4,10 +4,10 @@
|
||||||
{{#if (ne profile-data-key 'biography')}}
|
{{#if (ne profile-data-key 'biography')}}
|
||||||
<div class="profile-entry">
|
<div class="profile-entry">
|
||||||
<label for="data.profile.{{profile-data-key}}">
|
<label for="data.profile.{{profile-data-key}}">
|
||||||
{{lookup ../config.characterProfile profile-data-key}}
|
{{lookup ../config.i18n.characterProfile profile-data-key}}
|
||||||
</label>
|
</label>
|
||||||
<input type="text" name="data.profile.{{profile-data-key}}" value="{{profile-data-value}}"
|
<input type="text" name="data.profile.{{profile-data-key}}" value="{{profile-data-value}}"
|
||||||
data-dtype="{{lookup ../config/characterProfileDTypes profile-data-key}}" />
|
data-dtype="{{lookup ../config.i18n.characterProfileDTypes profile-data-key}}" />
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
|
|
|
@ -23,11 +23,11 @@
|
||||||
!-- directly handing over the latter two.
|
!-- directly handing over the latter two.
|
||||||
--}}
|
--}}
|
||||||
{{#*inline "temporalUnit"}}
|
{{#*inline "temporalUnit"}}
|
||||||
{{> unit unitNames=config.temporalUnits unitAbbrs=config.temporalUnitsAbbr unitDatum=unitDatum localizationString=localizationString}}
|
{{> unit unitNames=config.i18n.temporalUnits unitAbbrs=config.i18n.temporalUnitsAbbr unitDatum=unitDatum localizationString=localizationString}}
|
||||||
{{/inline}}
|
{{/inline}}
|
||||||
|
|
||||||
{{#*inline "distanceUnit"}}
|
{{#*inline "distanceUnit"}}
|
||||||
{{> unit unitNames=config.distanceUnits unitAbbrs=config.distanceUnitsAbbr unitDatum=unitDatum localizationString=localizationString}}
|
{{> unit unitNames=config.i18n.distanceUnits unitAbbrs=config.i18n.distanceUnitsAbbr unitDatum=unitDatum localizationString=localizationString}}
|
||||||
{{/inline}}
|
{{/inline}}
|
||||||
|
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@
|
||||||
{{!-- spell type --}}
|
{{!-- spell type --}}
|
||||||
<div class="flex05 item-image">
|
<div class="flex05 item-image">
|
||||||
<img src="{{lookup ../config.spellTypesIcons item.data.data.spellType}}"
|
<img src="{{lookup ../config.spellTypesIcons item.data.data.spellType}}"
|
||||||
title="{{lookup ../config.spellTypes item.data.data.spellType}}" width="24" height="24" />
|
title="{{lookup ../config.i18n.spellTypes item.data.data.spellType}}" width="24" height="24" />
|
||||||
</div>
|
</div>
|
||||||
{{!-- spell bonus --}}
|
{{!-- spell bonus --}}
|
||||||
<input class="item-num-val item-change" type="text" data-dtype="String"
|
<input class="item-num-val item-change" type="text" data-dtype="String"
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<label>{{localize "DS4.ArmorType"}}</label>
|
<label>{{localize "DS4.ArmorType"}}</label>
|
||||||
<select name="data.armorType" data-type="String">
|
<select name="data.armorType" data-type="String">
|
||||||
{{#select data.armorType}}
|
{{#select data.armorType}}
|
||||||
{{#each config.armorTypes as |value key|}}
|
{{#each config.i18n.armorTypes as |value key|}}
|
||||||
<option value="{{key}}">{{value}}</option>
|
<option value="{{key}}">{{value}}</option>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
{{/select}}
|
{{/select}}
|
||||||
|
@ -15,7 +15,7 @@
|
||||||
<label for="data.armorMaterialType">{{localize "DS4.ArmorMaterialType"}}</label>
|
<label for="data.armorMaterialType">{{localize "DS4.ArmorMaterialType"}}</label>
|
||||||
<select name="data.armorMaterialType" data-type="String">
|
<select name="data.armorMaterialType" data-type="String">
|
||||||
{{#select data.armorMaterialType}}
|
{{#select data.armorMaterialType}}
|
||||||
{{#each config.armorMaterialTypes as |value key|}}
|
{{#each config.i18n.armorMaterialTypes as |value key|}}
|
||||||
<option value="{{key}}">{{value}}</option>
|
<option value="{{key}}">{{value}}</option>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
{{/select}}
|
{{/select}}
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
<label for="data.availability">{{localize "DS4.ItemAvailability"}}</label>
|
<label for="data.availability">{{localize "DS4.ItemAvailability"}}</label>
|
||||||
<select name="data.availability" data-type="String">
|
<select name="data.availability" data-type="String">
|
||||||
{{#select data.availability}}
|
{{#select data.availability}}
|
||||||
{{#each config.itemAvailabilities as |value key|}}
|
{{#each config.i18n.itemAvailabilities as |value key|}}
|
||||||
<option value="{{key}}">{{value}}</option>
|
<option value="{{key}}">{{value}}</option>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
{{/select}}
|
{{/select}}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<img class="profile-img" src="{{item.img}}" data-edit="img" title="{{item.name}}" />
|
<img class="profile-img" src="{{item.img}}" data-edit="img" title="{{item.name}}" />
|
||||||
<div class="header-fields flexrow">
|
<div class="header-fields flexrow">
|
||||||
<h1 class="charname"><input name="name" type="text" value="{{item.name}}" placeholder="Name" /></h1>
|
<h1 class="charname"><input name="name" type="text" value="{{item.name}}" placeholder="Name" /></h1>
|
||||||
<h2 class="item-type">{{localize (lookup config.itemTypes item.type)}}</h2>
|
<h2 class="item-type">{{lookup config.i18n.itemTypes item.type}}</h2>
|
||||||
{{> @partial-block}}
|
{{> @partial-block}}
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
|
@ -12,9 +12,9 @@
|
||||||
<select name="data.{{property}}.unit" data-type="String">
|
<select name="data.{{property}}.unit" data-type="String">
|
||||||
{{#select (lookup (lookup data property) 'unit')}}
|
{{#select (lookup (lookup data property) 'unit')}}
|
||||||
{{#if (eq unitType 'temporal')}}
|
{{#if (eq unitType 'temporal')}}
|
||||||
{{#each (lookup config 'temporalUnitsAbbr') as |value key|}}<option value="{{key}}">{{value}}</option>{{/each}}
|
{{#each (lookup config.i18n 'temporalUnitsAbbr') as |value key|}}<option value="{{key}}">{{value}}</option>{{/each}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{#each (lookup config 'distanceUnitsAbbr') as |value key|}}<option value="{{key}}">{{value}}</option>{{/each}}
|
{{#each (lookup config.i18n 'distanceUnitsAbbr') as |value key|}}<option value="{{key}}">{{value}}</option>{{/each}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/select}}
|
{{/select}}
|
||||||
</select>
|
</select>
|
||||||
|
@ -33,7 +33,7 @@
|
||||||
<label for="data.spellType">{{localize "DS4.SpellType"}}</label>
|
<label for="data.spellType">{{localize "DS4.SpellType"}}</label>
|
||||||
<select id="data.spellType" name="data.spellType" data-type="String">
|
<select id="data.spellType" name="data.spellType" data-type="String">
|
||||||
{{#select data.spellType}}
|
{{#select data.spellType}}
|
||||||
{{#each config.spellTypes as |value key|}}
|
{{#each config.i18n.spellTypes as |value key|}}
|
||||||
<option value="{{key}}">{{value}}</option>
|
<option value="{{key}}">{{value}}</option>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
{{/select}}
|
{{/select}}
|
||||||
|
@ -52,7 +52,7 @@
|
||||||
<label for="data.spellCategory">{{localize "DS4.SpellCategory"}}</label>
|
<label for="data.spellCategory">{{localize "DS4.SpellCategory"}}</label>
|
||||||
<select id="data.spellCategory" name="data.spellCategory" data-type="String">
|
<select id="data.spellCategory" name="data.spellCategory" data-type="String">
|
||||||
{{#select data.spellCategory}}
|
{{#select data.spellCategory}}
|
||||||
{{#each config.spellCategories as |value key|}}
|
{{#each config.i18n.spellCategories as |value key|}}
|
||||||
<option value="{{key}}">{{value}}</option>
|
<option value="{{key}}">{{value}}</option>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
{{/select}}
|
{{/select}}
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<label>{{localize "DS4.AttackType"}}</label>
|
<label>{{localize "DS4.AttackType"}}</label>
|
||||||
<select name="data.attackType" data-type="String">
|
<select name="data.attackType" data-type="String">
|
||||||
{{#select data.attackType}}
|
{{#select data.attackType}}
|
||||||
{{#each config.attackTypes as |value key|}}
|
{{#each config.i18n.attackTypes as |value key|}}
|
||||||
<option value="{{key}}">{{value}}</option>
|
<option value="{{key}}">{{value}}</option>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
{{/select}}
|
{{/select}}
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
<label for="visibility">{{localize "DS4.RollDialogVisibilityLabel"}}</label>
|
<label for="visibility">{{localize "DS4.RollDialogVisibilityLabel"}}</label>
|
||||||
<select id="visibility" data-type="String">
|
<select id="visibility" data-type="String">
|
||||||
{{#each rollModes as |rollMode|}}
|
{{#each rollModes as |rollMode|}}
|
||||||
<option value="{{rollMode}}">{{lookup ../config.chatVisibilities rollMode}}</option>
|
<option value="{{rollMode}}">{{lookup ../config.i18n.chatVisibilities rollMode}}</option>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</select>
|
</select>
|
||||||
</form>
|
</form>
|
||||||
|
|
Loading…
Reference in a new issue