Merge pull request #412 from deltagreen-foundryvtt/jalenml/fix-new-item-i18n-str

Fix translating "New Item" string
This commit is contained in:
Jalen
2026-06-20 00:34:05 -04:00
committed by GitHub
+3 -6
View File
@@ -752,12 +752,9 @@ export default class DGActorSheet extends DGSheetMixin(ActorSheetV2) {
*/
_onItemCreate(type) {
// Initialize a default name.
const name = game.i18n.format(
game.i18n.translations.DOCUMENT?.New || "DG.FallbackText.newItem",
{
type: game.i18n.localize(`TYPES.Item.${type}`),
},
);
const name = game.i18n.format("DG.FallbackText.newItem", {
type: game.i18n.localize(`TYPES.Item.${type}`),
});
// Prepare the item object.
const itemData = {