feat(reputation): translate rank labels to English
Translates the six REPUTATION_RANKS labels in reputation-rank.ts (Geachtet/Vertraut/Anerkannt/Bekannt/Geduldet/Fremder -> Esteemed/ Trusted/Recognized/Known/Tolerated/Stranger), per the glossary in docs/superpowers/specs/2026-08-21-english-game-content-foundation-design.md section 4. Keys and thresholds are unchanged. Also updates reputation.service.spec.ts and reputation.controller.spec.ts, which asserted the German rankLabel value returned by resolveReputationRank() via the service/controller layer.
This commit is contained in:
@@ -4,7 +4,7 @@ describe('resolveReputationRank', () => {
|
|||||||
it('resolves 0 reputation to Stranger with a next threshold of 100', () => {
|
it('resolves 0 reputation to Stranger with a next threshold of 100', () => {
|
||||||
expect(resolveReputationRank(0)).toEqual({
|
expect(resolveReputationRank(0)).toEqual({
|
||||||
key: 'STRANGER',
|
key: 'STRANGER',
|
||||||
label: 'Fremder',
|
label: 'Stranger',
|
||||||
threshold: 0,
|
threshold: 0,
|
||||||
nextThreshold: 100,
|
nextThreshold: 100,
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -5,19 +5,19 @@ export interface ReputationRankInfo {
|
|||||||
nextThreshold: number | null;
|
nextThreshold: number | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Verbatim thresholds from spec §10, German labels for the German-language UI.
|
// Verbatim thresholds from spec §10, English labels for the English-language UI.
|
||||||
// Sorted descending: the first entry whose threshold <= reputation wins.
|
// Sorted descending: the first entry whose threshold <= reputation wins.
|
||||||
const REPUTATION_RANKS: ReadonlyArray<{
|
const REPUTATION_RANKS: ReadonlyArray<{
|
||||||
threshold: number;
|
threshold: number;
|
||||||
key: string;
|
key: string;
|
||||||
label: string;
|
label: string;
|
||||||
}> = [
|
}> = [
|
||||||
{ threshold: 1200, key: 'ESTEEMED', label: 'Geachtet' },
|
{ threshold: 1200, key: 'ESTEEMED', label: 'Esteemed' },
|
||||||
{ threshold: 800, key: 'TRUSTED', label: 'Vertraut' },
|
{ threshold: 800, key: 'TRUSTED', label: 'Trusted' },
|
||||||
{ threshold: 500, key: 'RECOGNIZED', label: 'Anerkannt' },
|
{ threshold: 500, key: 'RECOGNIZED', label: 'Recognized' },
|
||||||
{ threshold: 250, key: 'KNOWN', label: 'Bekannt' },
|
{ threshold: 250, key: 'KNOWN', label: 'Known' },
|
||||||
{ threshold: 100, key: 'TOLERATED', label: 'Geduldet' },
|
{ threshold: 100, key: 'TOLERATED', label: 'Tolerated' },
|
||||||
{ threshold: 0, key: 'STRANGER', label: 'Fremder' },
|
{ threshold: 0, key: 'STRANGER', label: 'Stranger' },
|
||||||
];
|
];
|
||||||
|
|
||||||
export function resolveReputationRank(reputation: number): ReputationRankInfo {
|
export function resolveReputationRank(reputation: number): ReputationRankInfo {
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ describe('ReputationController', () => {
|
|||||||
factionName: 'Grenzwacht',
|
factionName: 'Grenzwacht',
|
||||||
reputation: 40,
|
reputation: 40,
|
||||||
rank: 'STRANGER',
|
rank: 'STRANGER',
|
||||||
rankLabel: 'Fremder',
|
rankLabel: 'Stranger',
|
||||||
nextThreshold: 100,
|
nextThreshold: 100,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -315,7 +315,7 @@ describe('ReputationService', () => {
|
|||||||
factionName: 'Grenzwacht',
|
factionName: 'Grenzwacht',
|
||||||
reputation: 0,
|
reputation: 0,
|
||||||
rank: 'STRANGER',
|
rank: 'STRANGER',
|
||||||
rankLabel: 'Fremder',
|
rankLabel: 'Stranger',
|
||||||
nextThreshold: 100,
|
nextThreshold: 100,
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
@@ -333,7 +333,7 @@ describe('ReputationService', () => {
|
|||||||
factionName: 'Grenzwacht',
|
factionName: 'Grenzwacht',
|
||||||
reputation: 300,
|
reputation: 300,
|
||||||
rank: 'KNOWN',
|
rank: 'KNOWN',
|
||||||
rankLabel: 'Bekannt',
|
rankLabel: 'Known',
|
||||||
nextThreshold: 500,
|
nextThreshold: 500,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user