Refactor character name handling in enrichNotificationsWithCharacterNames: Update comments for clarity on character_name and characterName usage. Enhance localization by adding success messages in German and English translations.

This commit is contained in:
Torsten Schulz (local)
2026-01-29 07:46:17 +01:00
parent 59875cf900
commit 4cce044128
3 changed files with 6 additions and 4 deletions

View File

@@ -5514,7 +5514,7 @@ async function enrichNotificationsWithCharacterNames(notifications) {
return null;
}
// Attach resolved name to notifications (set both characterName and character_name)
// Attach resolved name to notifications (set character_name; characterName is a getter that reads from it)
for (const n of notifications) {
let foundId = null;
try {
@@ -5536,7 +5536,7 @@ async function enrichNotificationsWithCharacterNames(notifications) {
if (foundId && nameMap.has(Number(foundId))) {
const resolved = nameMap.get(Number(foundId));
n.characterName = resolved;
// Set character_name directly (characterName is a getter that reads from character_name)
n.character_name = resolved;
}
}

View File

@@ -2,6 +2,7 @@
"message": {
"title": "Mitteilung",
"close": "Schließen",
"test": "Test funktioniert"
"test": "Test funktioniert",
"success": "Die Aktion war erfolgreich."
}
}

View File

@@ -1,6 +1,7 @@
{
"message": {
"title": "Notice",
"close": "Close"
"close": "Close",
"success": "The action was successful."
}
}