feat(FalukantService, i18n): enhance household tension handling and localization updates
All checks were successful
Deploy to production / deploy (push) Successful in 1m55s

- Added functionality to refresh and update household tension scores and reasons in the FalukantService, improving user experience by reflecting real-time household dynamics.
- Updated localization strings across multiple languages (Cebuano, German, English, Spanish, French) to include new office rank terminology and improved marriage crisis descriptions, enhancing clarity and context for users.
- Introduced a new office rank tier structure in localization files, providing better categorization and understanding of office ranks in the game.
This commit is contained in:
Torsten Schulz (local)
2026-04-17 17:07:53 +02:00
parent 1dd4d18927
commit afbea926a2
7 changed files with 86 additions and 15 deletions

View File

@@ -196,6 +196,15 @@
const quality = this.formatHouseCondition(numericValue);
return this.$t('falukant.nobility.requirement.house_condition', { quality });
}
if (type === 'office_rank_any' || type === 'office_rank_political') {
const rankName = this.officeRankTierLabel(numericValue);
const key = `falukant.nobility.requirement.${type}`;
const translated = this.$t(key, { rankName });
if (translated && translated !== key) {
return translated;
}
return this.$t('falukant.nobility.requirement.unknown', { type, amount: rankName });
}
const key = `falukant.nobility.requirement.${type}`;
const translated = this.$t(key, { amount });
if (translated && translated !== key) {
@@ -210,6 +219,18 @@
&& String(u.required) === String(req.requirementValue)
);
},
officeRankTierLabel(tierRaw) {
const tier = Math.round(Number(tierRaw));
if (!Number.isFinite(tier) || tier < 1) {
return this.$t('falukant.nobility.officeRankTier.fallback', { tier: tierRaw });
}
const capped = Math.min(6, tier);
const k = `falukant.nobility.officeRankTier.${capped}`;
if (this.$te(k)) {
return this.$t(k);
}
return this.$t('falukant.nobility.officeRankTier.fallback', { tier: capped });
},
formatOfficeInfo(info, source) {
if (!info?.name) {
return this.$t('falukant.nobility.none');