Fix: Internationalize hardcoded UI strings (Issue #1787)

- Replace hardcoded 'Inventory Items', 'Character Items', 'Other' with i18n keys
- Internationalize 'New Effect' default name in active effects
- Fix hardcoded 'Roll Formula' and 'Formula Roll' labels in roll tables
- Add translation keys to lang/en.json for proper localization support
- Ensures all UI strings can be translated to other languages

Fixes #1787: I18n: Some UI strings still seem to be hardcoded
This commit is contained in:
codebytaki 2026-04-14 17:39:55 +06:00
parent 6afc5d625a
commit 477e2b78b6
4 changed files with 18 additions and 8 deletions

View file

@ -87,10 +87,10 @@ export default class DHItem extends foundry.documents.Item {
const isInventoryItem = CONFIG.Item.dataModels[type]?.metadata?.isInventoryItem;
const group =
isInventoryItem === true
? 'Inventory Items' //TODO localize
? game.i18n.localize('DAGGERHEART.ITEM_GROUPS.INVENTORY')
: isInventoryItem === false
? 'Character Items' //TODO localize
: 'Other'; //TODO localize
? game.i18n.localize('DAGGERHEART.ITEM_GROUPS.CHARACTER')
: game.i18n.localize('DAGGERHEART.ITEM_GROUPS.OTHER');
return { value: type, label, group };
}