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:
Bastian Wagner
2026-08-21 20:08:59 +02:00
parent b8ee56ca1a
commit e48409fbf1
4 changed files with 11 additions and 11 deletions

View File

@@ -4,7 +4,7 @@ describe('resolveReputationRank', () => {
it('resolves 0 reputation to Stranger with a next threshold of 100', () => {
expect(resolveReputationRank(0)).toEqual({
key: 'STRANGER',
label: 'Fremder',
label: 'Stranger',
threshold: 0,
nextThreshold: 100,
});

View File

@@ -5,19 +5,19 @@ export interface ReputationRankInfo {
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.
const REPUTATION_RANKS: ReadonlyArray<{
threshold: number;
key: string;
label: string;
}> = [
{ threshold: 1200, key: 'ESTEEMED', label: 'Geachtet' },
{ threshold: 800, key: 'TRUSTED', label: 'Vertraut' },
{ threshold: 500, key: 'RECOGNIZED', label: 'Anerkannt' },
{ threshold: 250, key: 'KNOWN', label: 'Bekannt' },
{ threshold: 100, key: 'TOLERATED', label: 'Geduldet' },
{ threshold: 0, key: 'STRANGER', label: 'Fremder' },
{ threshold: 1200, key: 'ESTEEMED', label: 'Esteemed' },
{ threshold: 800, key: 'TRUSTED', label: 'Trusted' },
{ threshold: 500, key: 'RECOGNIZED', label: 'Recognized' },
{ threshold: 250, key: 'KNOWN', label: 'Known' },
{ threshold: 100, key: 'TOLERATED', label: 'Tolerated' },
{ threshold: 0, key: 'STRANGER', label: 'Stranger' },
];
export function resolveReputationRank(reputation: number): ReputationRankInfo {

View File

@@ -36,7 +36,7 @@ describe('ReputationController', () => {
factionName: 'Grenzwacht',
reputation: 40,
rank: 'STRANGER',
rankLabel: 'Fremder',
rankLabel: 'Stranger',
nextThreshold: 100,
},
];

View File

@@ -315,7 +315,7 @@ describe('ReputationService', () => {
factionName: 'Grenzwacht',
reputation: 0,
rank: 'STRANGER',
rankLabel: 'Fremder',
rankLabel: 'Stranger',
nextThreshold: 100,
},
]);
@@ -333,7 +333,7 @@ describe('ReputationService', () => {
factionName: 'Grenzwacht',
reputation: 300,
rank: 'KNOWN',
rankLabel: 'Bekannt',
rankLabel: 'Known',
nextThreshold: 500,
});
});