move from DG.ItemTypes to Foundry-compatible TYPES.Item for localization

This commit is contained in:
jalensailin
2024-06-08 01:23:04 -04:00
parent e11ef6dee8
commit 3bf67b6efc
8 changed files with 299 additions and 301 deletions
+6 -3
View File
@@ -865,9 +865,12 @@ export default class DeltaGreenActorSheet extends ActorSheet {
// Initialize a default name.
// const name = `New ${type.capitalize()}`;
const name =
game.i18n.localize("DG.ItemTypes.NewPrefix") +
game.i18n.localize(`DG.ItemTypes.${type}`);
const name = game.i18n.format(
game.i18n.translations.DOCUMENT?.New || "DG.FallbackText.newItem",
{
type: game.i18n.localize(`TYPES.Item.${type}`),
},
);
// Prepare the item object.
const itemData = {