feat(FalukantService, i18n): enhance household tension handling and localization updates
All checks were successful
Deploy to production / deploy (push) Successful in 1m55s
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:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user