feat(web): translate error messages surfaced from API error codes to English
Translates the five client-side error-message maps (world, hunting, combat, inventory, local-location stores) that re-translate already-English API error codes back to display text, per design doc §4. Also fixes four component specs that hard-coded the same German strings when asserting rendered error text (combat-page, hunt-page, location-interaction-panel, location-page).
This commit is contained in:
@@ -510,12 +510,12 @@ describe('CombatPageComponent', () => {
|
||||
|
||||
it('shows an error and retries loading the combat', async () => {
|
||||
const fixture = await setup(null);
|
||||
combatStore.error.set('Dieser Kampf wurde nicht gefunden.');
|
||||
combatStore.error.set('This combat could not be found.');
|
||||
fixture.detectChanges();
|
||||
|
||||
const element = fixture.nativeElement as HTMLElement;
|
||||
expect(element.querySelector('[role="alert"]')?.textContent).toContain(
|
||||
'Dieser Kampf wurde nicht gefunden.',
|
||||
'This combat could not be found.',
|
||||
);
|
||||
element.querySelector<HTMLButtonElement>('[data-combat-retry]')?.click();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user