mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 19:51:08 +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
|
|
@ -171,9 +171,11 @@ export default class DhHomebrewSettings extends HandlebarsApplicationMixin(Appli
|
|||
if (obj.hasOwnProperty(key)) {
|
||||
const value = obj[key];
|
||||
if (typeof value === 'object' && value !== null) {
|
||||
obj[key] = this.localizeObject(value);
|
||||
} else {
|
||||
if (typeof value === 'string' && value.startsWith('DAGGERHEART.')) {
|
||||
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]
|
||||
}),
|
||||
currency: new fields.SchemaField({
|
||||
title: new fields.StringField({
|
||||
required: true,
|
||||
initial: 'Gold',
|
||||
label: 'DAGGERHEART.Settings.Homebrew.Currency.currencyName'
|
||||
}),
|
||||
coins: new fields.StringField({
|
||||
required: true,
|
||||
initial: game.i18n.localize('DAGGERHEART.Sheets.PC.Gold.Coins'),
|
||||
initial: 'Coins',
|
||||
label: 'DAGGERHEART.Settings.Homebrew.Currency.coinName'
|
||||
}),
|
||||
handfulls: new fields.StringField({
|
||||
required: true,
|
||||
initial: game.i18n.localize('DAGGERHEART.Sheets.PC.Gold.Handfulls'),
|
||||
initial: 'Handfulls',
|
||||
label: 'DAGGERHEART.Settings.Homebrew.Currency.handfullName'
|
||||
}),
|
||||
bags: new fields.StringField({
|
||||
required: true,
|
||||
initial: game.i18n.localize('DAGGERHEART.Sheets.PC.Gold.Bags'),
|
||||
initial: 'Bags',
|
||||
label: 'DAGGERHEART.Settings.Homebrew.Currency.bagName'
|
||||
}),
|
||||
chests: new fields.StringField({
|
||||
required: true,
|
||||
initial: game.i18n.localize('DAGGERHEART.Sheets.PC.Gold.Chests'),
|
||||
initial: 'Chests',
|
||||
label: 'DAGGERHEART.Settings.Homebrew.Currency.chestName'
|
||||
})
|
||||
}),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue