feat(politics): update title eligibility messages and logic in PoliticsView
This commit is contained in:
@@ -1611,8 +1611,8 @@
|
||||
"yes": "Ja",
|
||||
"no": "Nein",
|
||||
"blockedByAge": "Mindestalter nicht erreicht",
|
||||
"blockedByTitle": "Benötigter Stand: mindestens {title}",
|
||||
"unknownRequiredTitle": "unbekannt",
|
||||
"blockedByTitle": "Standesvoraussetzung nicht erfüllt",
|
||||
"blockedByTitleMinimum": "Benötigter Stand: mindestens {title}",
|
||||
"blockedByPrerequisites": "Vorherige Ämter fehlen"
|
||||
},
|
||||
"too_young": "Dein Charakter ist noch zu jung. Eine Bewerbung ist erst ab 16 Jahren möglich.",
|
||||
|
||||
@@ -797,8 +797,8 @@
|
||||
"yes": "Yes",
|
||||
"no": "No",
|
||||
"blockedByAge": "Minimum age not met",
|
||||
"blockedByTitle": "Required title: at least {title}",
|
||||
"unknownRequiredTitle": "unknown",
|
||||
"blockedByTitle": "Title requirement not met",
|
||||
"blockedByTitleMinimum": "Required title: at least {title}",
|
||||
"blockedByPrerequisites": "Required prior offices missing"
|
||||
},
|
||||
"too_young": "Your character is too young. Applications are only possible from age 16.",
|
||||
|
||||
@@ -180,11 +180,12 @@
|
||||
: $t('falukant.politics.officesTab.no') }}
|
||||
<template v-if="!office.canApplyNow">
|
||||
<span v-if="!office.canApplyByAge"> · {{ $t('falukant.politics.officesTab.blockedByAge') }}</span>
|
||||
<span v-if="!office.titleEligible">
|
||||
· {{ $t('falukant.politics.officesTab.blockedByTitle', {
|
||||
<span v-if="!office.titleEligible && office.requiredTitleLabelTr">
|
||||
· {{ $t('falukant.politics.officesTab.blockedByTitleMinimum', {
|
||||
title: formatRequiredTitle(office.requiredTitleLabelTr, office.characterGender)
|
||||
}) }}
|
||||
</span>
|
||||
<span v-else-if="!office.titleEligible"> · {{ $t('falukant.politics.officesTab.blockedByTitle') }}</span>
|
||||
<span v-if="!office.prerequisitesMet"> · {{ $t('falukant.politics.officesTab.blockedByPrerequisites') }}</span>
|
||||
</template>
|
||||
</span>
|
||||
@@ -369,7 +370,6 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
formatRequiredTitle(titleLabelTr, gender) {
|
||||
if (!titleLabelTr) return this.$t('falukant.politics.officesTab.unknownRequiredTitle');
|
||||
return this.$t(`falukant.titles.${gender === 'female' ? 'female' : 'male'}.${titleLabelTr}`);
|
||||
},
|
||||
formatPoliticalCharacterName(character) {
|
||||
|
||||
Reference in New Issue
Block a user