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:
Bastian Wagner
2026-08-21 21:29:10 +02:00
parent 5222bfb2ab
commit 5586e6c672
14 changed files with 53 additions and 53 deletions

View File

@@ -9,12 +9,12 @@ import {
import { GameApiService } from '../../core/api/game-api.service';
import { WorldStore } from './world.store';
const GENERIC_INTERACTION_ERROR = 'Diese Handlung ist gerade nicht möglich.';
const GENERIC_INTERACTION_ERROR = "This action isn't possible right now.";
// Mirrors the codes in `apps/api/src/world/world.errors.ts`.
const INTERACTION_ERROR_MESSAGES: Readonly<Record<string, string>> = {
LOCATION_INTERACTION_UNAVAILABLE: 'Hier gibt es dazu nichts zu entdecken.',
CHARACTER_NOT_FOUND: 'Dein Charakter konnte nicht gefunden werden.',
LOCATION_INTERACTION_UNAVAILABLE: "There's nothing to discover here.",
CHARACTER_NOT_FOUND: 'Your character could not be found.',
};
/**