feat(web): translate slot, rarity, danger, and location-type labels to English

Translates the four static Angular label maps (SLOT_LABELS, RARITY_LABELS,
DANGER_LABELS, LOCATION_TYPE_LABELS) and the inventory detail panel's
hardcoded item-type fallback per the English Game Content Foundation
design doc glossary. Updates every spec assertion across the web app that
checks rendered text sourced from these maps, including specs owned by
later tasks (combat-page, encounter-card, inventory-page) where they
render one of these labels.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Bastian Wagner
2026-08-21 20:16:56 +02:00
parent e48409fbf1
commit 5222bfb2ab
11 changed files with 42 additions and 42 deletions

View File

@@ -40,7 +40,7 @@ export class InventoryDetailPanelComponent {
});
/** Stand-in for items with no slot: the API does not expose an item type. */
protected readonly typeLabel = computed(() => 'Gegenstand');
protected readonly typeLabel = computed(() => 'Item');
protected readonly statRows = computed<StatRow[]>(() => {
const item = this.item();

View File

@@ -149,9 +149,9 @@ describe('InventoryPageComponent', () => {
const { fixture } = await setup();
const text = (fixture.nativeElement as HTMLElement).querySelector('.inventory-page__equipment-list')?.textContent ?? '';
expect(text).toContain('Waffe');
expect(text).toContain('Weapon');
expect(text).toContain('Abgenutztes Kurzschwert');
expect(text).toContain('Kopf');
expect(text).toContain('Head');
expect(text).toContain('Leer');
});

View File

@@ -1,12 +1,12 @@
import type { EquipmentSlot } from '../../core/api/game-api.models';
/** German slot names, shared by the paper doll and the item detail panel. */
/** Slot names, shared by the paper doll and the item detail panel. */
export const SLOT_LABELS: Readonly<Record<EquipmentSlot, string>> = {
WEAPON: 'Waffe',
HEAD: 'Kopf',
CHEST: 'Brust',
HANDS: 'Handschuhe',
LEGS: 'Beine',
FEET: 'Stiefel',
AMULET: 'Amulett',
WEAPON: 'Weapon',
HEAD: 'Head',
CHEST: 'Chest',
HANDS: 'Hands',
LEGS: 'Legs',
FEET: 'Feet',
AMULET: 'Amulet',
};