feat(falukant): enhance notification handling and localization updates
All checks were successful
Deploy to production / deploy (push) Successful in 2m52s

- Updated the `enrichNotificationsWithCharacterNames` method in FalukantService to include region name enrichment and handle additional character IDs.
- Introduced a new `serializeNotificationForClient` function to format notifications for the client, ensuring all relevant data is included.
- Enhanced the MessagesDialog component to merge notification payloads and extract parameters more effectively, improving the clarity of displayed messages.
- Added new localization entries for director resignation risk and regional festival effects in multiple languages, ensuring comprehensive user notifications.
This commit is contained in:
Torsten Schulz (local)
2026-04-14 08:06:56 +02:00
parent 9deda3147e
commit 26daf5fed5
7 changed files with 230 additions and 43 deletions

View File

@@ -35,7 +35,7 @@
"notify_election_created": "Giskedyul ang usa ka bag-ong eleksiyon.",
"notify_office_filled": "Na puno ang usa ka politikal nga opisina.",
"director": {
"resignation_risk_high": "Taas ang risgo nga mubiyaa ang direktor: risgo {risk_percent}% (threshold {threshold_percent}%). Karon nga satisfaction {satisfaction}."
"resignation_risk_high": "Taas ang risgo nga mobiya ang direktor nga si {directorName}: risgo {risk_percent}% (threshold {threshold_percent}%). Karon nga satisfaction {satisfaction}."
},
"director_death": "Namatay si {characterName} sa edad nga {ageYears}. Isip amo, kinahanglan kang magtudlo og bag-ong direktor.{regionLabel}{spouses}{children}{lovers}",
"relationship_death": "Namatay si {characterName} sa edad nga {ageYears}.{regionLabel}{spouses}{children}{lovers}",
@@ -93,7 +93,13 @@
},
"regional_festival": {
"title": "Pista sa rehiyon",
"description": "Adunay dakong pista sa rehiyon nga {regionName}."
"description": "Adunay dakong pista sa rehiyon nga {regionName}.{priceEffectLine}"
},
"effects": {
"price_effect_suffix": " Epekto: gipaabot nga pagbag-o sa presyo sa mga paliton nga ~{percent}%.",
"festival_weather_line": "Ang panahon sa rehiyon nagbag-o.",
"festival_price_line": "Presyo sa mga paliton ~{percent}%.",
"festival_quality_line": "Kalidad sa produksyon ~{change}."
},
"regional_epidemic": {
"title": "Epidemya",

View File

@@ -49,7 +49,7 @@
"notify_election_created": "Es wurde eine neue Wahl ausgeschrieben.",
"notify_office_filled": "Ein politisches Amt wurde neu besetzt.",
"director": {
"resignation_risk_high": "Hohe Kündigungsgefahr bei einem Direktor: Risiko {risk_percent}% (Schwelle {threshold_percent}%). Zufriedenheit aktuell {satisfaction}."
"resignation_risk_high": "Hohe Kündigungsgefahr für den Direktor {directorName}: Risiko {risk_percent} % (Schwelle {threshold_percent} %). Zufriedenheit aktuell {satisfaction}."
},
"director_death": "{characterName} ist im Alter von {ageYears} Jahren verstorben. Als Arbeitgeber musst du die Direktion neu besetzen.{regionLabel}{spouses}{children}{lovers}",
"relationship_death": "{characterName} ist im Alter von {ageYears} Jahren verstorben.{regionLabel}{spouses}{children}{lovers}",
@@ -95,7 +95,13 @@
},
"regional_festival": {
"title": "Regionales Fest",
"description": "Ein großes Fest findet in der Region {regionName} statt."
"description": "Ein großes Fest findet in der Region {regionName} statt.{priceEffectLine}"
},
"effects": {
"price_effect_suffix": " Auswirkung: erwartete Warenpreisänderung ca. {percent} %.",
"festival_weather_line": "Wetter in der Region schlägt um.",
"festival_price_line": "Warenpreise etwa {percent} %.",
"festival_quality_line": "Produktionsqualität etwa {change}."
},
"regional_epidemic": {
"title": "Epidemie",

View File

@@ -35,7 +35,7 @@
"notify_election_created": "A new election has been scheduled.",
"notify_office_filled": "A political office has been filled.",
"director": {
"resignation_risk_high": "High resignation risk for a director: risk {risk_percent}% (threshold {threshold_percent}%). Current satisfaction {satisfaction}."
"resignation_risk_high": "High resignation risk for director {directorName}: risk {risk_percent}% (threshold {threshold_percent}%). Current satisfaction {satisfaction}."
},
"director_death": "{characterName} died at the age of {ageYears}. As employer you need to appoint a new director.{regionLabel}{spouses}{children}{lovers}",
"relationship_death": "{characterName} died at the age of {ageYears}.{regionLabel}{spouses}{children}{lovers}",
@@ -93,7 +93,13 @@
},
"regional_festival": {
"title": "Regional Festival",
"description": "A large festival is taking place in the region {regionName}."
"description": "A large festival is taking place in the region {regionName}.{priceEffectLine}"
},
"effects": {
"price_effect_suffix": " Effect: expected goods price change ~{percent}%.",
"festival_weather_line": "The regional weather shifts.",
"festival_price_line": "Goods prices about {percent}%.",
"festival_quality_line": "Production quality about {change}."
},
"regional_epidemic": {
"title": "Epidemic",

View File

@@ -49,7 +49,7 @@
"notify_election_created": "Se ha convocado una nueva elección.",
"notify_office_filled": "Se ha cubierto un cargo político.",
"director": {
"resignation_risk_high": "Alto riesgo de renuncia de un director: riesgo {risk_percent}% (umbral {threshold_percent}%). Satisfacción actual {satisfaction}."
"resignation_risk_high": "Alto riesgo de renuncia del director {directorName}: riesgo {risk_percent}% (umbral {threshold_percent}%). Satisfacción actual {satisfaction}."
},
"director_death": "{characterName} ha fallecido a la edad de {ageYears} años. Como empleador debes nombrar un nuevo director.{regionLabel}{spouses}{children}{lovers}",
"relationship_death": "{characterName} ha fallecido a la edad de {ageYears} años.{regionLabel}{spouses}{children}{lovers}",
@@ -95,7 +95,13 @@
},
"regional_festival": {
"title": "Fiesta regional",
"description": "Se celebra una gran fiesta en la región {regionName}."
"description": "Se celebra una gran fiesta en la región {regionName}.{priceEffectLine}"
},
"effects": {
"price_effect_suffix": " Efecto: variación esperada del precio de las mercancías ~{percent}%.",
"festival_weather_line": "El tiempo en la región cambia.",
"festival_price_line": "Precios de mercancías ~{percent} %.",
"festival_quality_line": "Calidad de producción ~{change}."
},
"regional_epidemic": {
"title": "Epidemia",

View File

@@ -49,7 +49,7 @@
"notify_election_created": "Une nouvelle élection a été déclenchée.",
"notify_office_filled": "Une fonction politique a été pourvue.",
"director": {
"resignation_risk_high": "Risque élevé de démission dun directeur : risque {risk_percent}% (seuil {threshold_percent}%). Satisfaction actuelle {satisfaction}."
"resignation_risk_high": "Risque élevé de démission du directeur {directorName} : risque {risk_percent}% (seuil {threshold_percent}%). Satisfaction actuelle {satisfaction}."
},
"director_death": "{characterName} est décédé à l'âge de {ageYears}. En tant qu'employeur, vous devez remplir le conseil d'administration.{regionLabel}{spouses}{children}{lovers}",
"relationship_death": "{characterName} est décédé à l'âge de {ageYears}.{regionLabel}{spouses}{children}{lovers}",
@@ -95,7 +95,13 @@
},
"regional_festival": {
"title": "Fête régionale",
"description": "Un grand festival a lieu dans la région {regionName}."
"description": "Un grand festival a lieu dans la région {regionName}.{priceEffectLine}"
},
"effects": {
"price_effect_suffix": " Effet : variation attendue des prix des marchandises ~{percent} %.",
"festival_weather_line": "Le temps dans la région change.",
"festival_price_line": "Prix des marchandises ~{percent} %.",
"festival_quality_line": "Qualité de production ~{change}."
},
"regional_epidemic": {
"title": "Épidémie",