mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 03:31:07 +01:00
add title. remove localization from settings file since it didn't work.
This commit is contained in:
parent
a4c7533743
commit
32c224c472
4 changed files with 13 additions and 4 deletions
|
|
@ -102,6 +102,7 @@
|
||||||
},
|
},
|
||||||
"Currency": {
|
"Currency": {
|
||||||
"title": "Currency Overrides",
|
"title": "Currency Overrides",
|
||||||
|
"currencyName": "Currency Name",
|
||||||
"coinName": "Coin Name",
|
"coinName": "Coin Name",
|
||||||
"handfullName": "Handfull Name",
|
"handfullName": "Handfull Name",
|
||||||
"bagName": "Bag Name",
|
"bagName": "Bag Name",
|
||||||
|
|
|
||||||
|
|
@ -171,9 +171,11 @@ export default class DhHomebrewSettings extends HandlebarsApplicationMixin(Appli
|
||||||
if (obj.hasOwnProperty(key)) {
|
if (obj.hasOwnProperty(key)) {
|
||||||
const value = obj[key];
|
const value = obj[key];
|
||||||
if (typeof value === 'object' && value !== null) {
|
if (typeof value === 'object' && value !== null) {
|
||||||
|
obj[key] = this.localizeObject(value);
|
||||||
} else {
|
} else {
|
||||||
if (typeof value === 'string' && value.startsWith('DAGGERHEART.')) {
|
if (typeof value === 'string' && value.startsWith('DAGGERHEART.')) {
|
||||||
obj[key] = game.i18n.localize(value);
|
obj[key] = game.i18n.localize(value);
|
||||||
|
console.log(obj[key]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -17,24 +17,29 @@ export default class DhHomebrew extends foundry.abstract.DataModel {
|
||||||
initial: () => [2, 1, 1, 0, 0, -1]
|
initial: () => [2, 1, 1, 0, 0, -1]
|
||||||
}),
|
}),
|
||||||
currency: new fields.SchemaField({
|
currency: new fields.SchemaField({
|
||||||
|
title: new fields.StringField({
|
||||||
|
required: true,
|
||||||
|
initial: 'Gold',
|
||||||
|
label: 'DAGGERHEART.Settings.Homebrew.Currency.currencyName'
|
||||||
|
}),
|
||||||
coins: new fields.StringField({
|
coins: new fields.StringField({
|
||||||
required: true,
|
required: true,
|
||||||
initial: game.i18n.localize('DAGGERHEART.Sheets.PC.Gold.Coins'),
|
initial: 'Coins',
|
||||||
label: 'DAGGERHEART.Settings.Homebrew.Currency.coinName'
|
label: 'DAGGERHEART.Settings.Homebrew.Currency.coinName'
|
||||||
}),
|
}),
|
||||||
handfulls: new fields.StringField({
|
handfulls: new fields.StringField({
|
||||||
required: true,
|
required: true,
|
||||||
initial: game.i18n.localize('DAGGERHEART.Sheets.PC.Gold.Handfulls'),
|
initial: 'Handfulls',
|
||||||
label: 'DAGGERHEART.Settings.Homebrew.Currency.handfullName'
|
label: 'DAGGERHEART.Settings.Homebrew.Currency.handfullName'
|
||||||
}),
|
}),
|
||||||
bags: new fields.StringField({
|
bags: new fields.StringField({
|
||||||
required: true,
|
required: true,
|
||||||
initial: game.i18n.localize('DAGGERHEART.Sheets.PC.Gold.Bags'),
|
initial: 'Bags',
|
||||||
label: 'DAGGERHEART.Settings.Homebrew.Currency.bagName'
|
label: 'DAGGERHEART.Settings.Homebrew.Currency.bagName'
|
||||||
}),
|
}),
|
||||||
chests: new fields.StringField({
|
chests: new fields.StringField({
|
||||||
required: true,
|
required: true,
|
||||||
initial: game.i18n.localize('DAGGERHEART.Sheets.PC.Gold.Chests'),
|
initial: 'Chests',
|
||||||
label: 'DAGGERHEART.Settings.Homebrew.Currency.chestName'
|
label: 'DAGGERHEART.Settings.Homebrew.Currency.chestName'
|
||||||
})
|
})
|
||||||
}),
|
}),
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@
|
||||||
<legend>
|
<legend>
|
||||||
{{localize "DAGGERHEART.Settings.Homebrew.Currency.title"}}
|
{{localize "DAGGERHEART.Settings.Homebrew.Currency.title"}}
|
||||||
</legend>
|
</legend>
|
||||||
|
{{formGroup settingFields.schema.fields.currency.fields.title value=settingFields._source.currency.title localize=true}}
|
||||||
{{formGroup settingFields.schema.fields.currency.fields.coins value=settingFields._source.currency.coins localize=true}}
|
{{formGroup settingFields.schema.fields.currency.fields.coins value=settingFields._source.currency.coins localize=true}}
|
||||||
{{formGroup settingFields.schema.fields.currency.fields.handfulls value=settingFields._source.currency.handfulls localize=true}}
|
{{formGroup settingFields.schema.fields.currency.fields.handfulls value=settingFields._source.currency.handfulls localize=true}}
|
||||||
{{formGroup settingFields.schema.fields.currency.fields.bags value=settingFields._source.currency.bags localize=true}}
|
{{formGroup settingFields.schema.fields.currency.fields.bags value=settingFields._source.currency.bags localize=true}}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue