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:
@@ -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();
|
||||
|
||||
@@ -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');
|
||||
});
|
||||
|
||||
|
||||
@@ -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',
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user