diff --git a/apps/web/src/app/features/hunting/encounter-card/encounter-card.component.html b/apps/web/src/app/features/hunting/encounter-card/encounter-card.component.html index 65f625f..132dbad 100644 --- a/apps/web/src/app/features/hunting/encounter-card/encounter-card.component.html +++ b/apps/web/src/app/features/hunting/encounter-card/encounter-card.component.html @@ -18,7 +18,7 @@ Besiegt @@ -28,7 +28,7 @@

{{ encounter.monster.name }}

- Stufe {{ encounter.monster.level }} + Level {{ encounter.monster.level }}
diff --git a/apps/web/src/app/features/hunting/encounter-card/encounter-card.component.spec.ts b/apps/web/src/app/features/hunting/encounter-card/encounter-card.component.spec.ts index 8b9a736..c37bbc1 100644 --- a/apps/web/src/app/features/hunting/encounter-card/encounter-card.component.spec.ts +++ b/apps/web/src/app/features/hunting/encounter-card/encounter-card.component.spec.ts @@ -46,7 +46,7 @@ describe('EncounterCardComponent', () => { const artwork = element.querySelector('.encounter-card__artwork'); expect(element.textContent).toContain('Dämmerwolf'); - expect(element.textContent).toContain('Stufe 3'); + expect(element.textContent).toContain('Level 3'); expect(element.textContent).toContain('Suitable'); expect(artwork?.getAttribute('src')).toBe('/images/enemies/Dawnwolf.png'); expect(artwork?.getAttribute('alt')).toBe('Dämmerwolf'); @@ -72,7 +72,7 @@ describe('EncounterCardComponent', () => { expect(element.querySelector('.encounter-card__crest-icon')).toBeNull(); }); - it('emits the encounter id (never the monster key) when Angreifen is clicked', () => { + it('emits the encounter id (never the monster key) when Attack is clicked', () => { const fixture = TestBed.createComponent(EncounterCardComponent); fixture.componentRef.setInput('encounter', dawnwolfEncounter); fixture.detectChanges(); @@ -82,7 +82,7 @@ describe('EncounterCardComponent', () => { const button = Array.from(fixture.nativeElement.querySelectorAll('button')).find( (candidate): candidate is HTMLButtonElement => - candidate instanceof HTMLButtonElement && candidate.textContent?.trim() === 'Angreifen', + candidate instanceof HTMLButtonElement && candidate.textContent?.trim() === 'Attack', ); button?.click(); @@ -109,7 +109,7 @@ describe('EncounterCardComponent', () => { const mark = element.querySelector('.encounter-card__defeated-mark'); expect(mark).not.toBeNull(); - expect(mark?.getAttribute('alt')).toBe('Besiegt'); + expect(mark?.getAttribute('alt')).toBe('Defeated'); expect( element.querySelector('.encounter-card__attack')?.disabled, ).toBe(true); diff --git a/apps/web/src/app/features/hunting/encounter-card/encounter-card.component.ts b/apps/web/src/app/features/hunting/encounter-card/encounter-card.component.ts index 05edb3a..660b646 100644 --- a/apps/web/src/app/features/hunting/encounter-card/encounter-card.component.ts +++ b/apps/web/src/app/features/hunting/encounter-card/encounter-card.component.ts @@ -29,10 +29,10 @@ export class EncounterCardComponent { protected get actionLabel(): string { if (this.defeated) { - return 'Besiegt'; + return 'Defeated'; } - return this.encounter.status === 'IN_PROGRESS' ? 'Im Kampf' : 'Angreifen'; + return this.encounter.status === 'IN_PROGRESS' ? 'In Combat' : 'Attack'; } protected onAttack(): void { diff --git a/apps/web/src/app/features/hunting/hunt-page/hunt-page.component.html b/apps/web/src/app/features/hunting/hunt-page/hunt-page.component.html index 40be676..b8aa947 100644 --- a/apps/web/src/app/features/hunting/hunt-page/hunt-page.component.html +++ b/apps/web/src/app/features/hunting/hunt-page/hunt-page.component.html @@ -1,17 +1,14 @@ -
+
@if (worldStore.currentLocation(); as location) { @if (!location.huntingEnabled) {
-

Keine Jagd verfügbar

-

- Am Südtor von Graufurt gibt es keine regulären Jagdgebiete. Reise in ein gefährlicheres - Gebiet, um nach Gegnern zu suchen. -

- +

No Hunt Available

+

No hunting ground is available here right now.

+
} @else if (huntingStore.currentHunt(); as hunt) { -
-

{{ location.name }} — Begegnungen

+
+

{{ location.name }} — Encounters

@for (encounter of huntingStore.encounters(); track encounter.id) { @@ -26,9 +23,9 @@ [disabled]="huntingStore.loading()" (click)="refreshHunt()" > - Neu suchen + Search Again - +
} @else { @@ -36,7 +33,7 @@

{{ location.name }}

{{ location.description }}

- Durchsuche die Umgebung nach Spuren und Gegnern, bevor du dich in den Kampf wagst. + Search the surroundings for tracks and enemies before venturing into combat.

} @if (huntingStore.loading()) { -

Du suchst nach Spuren...

+

You search for tracks...

} } @else {
-

Jagdgebiet wird vorbereitet.

+

Preparing hunting ground.

} @if (huntingStore.error(); as error) { } @if (combatStore.error(); as combatError) { }
diff --git a/apps/web/src/app/features/hunting/hunt-page/hunt-page.component.spec.ts b/apps/web/src/app/features/hunting/hunt-page/hunt-page.component.spec.ts index c99d887..637d7b1 100644 --- a/apps/web/src/app/features/hunting/hunt-page/hunt-page.component.spec.ts +++ b/apps/web/src/app/features/hunting/hunt-page/hunt-page.component.spec.ts @@ -130,26 +130,26 @@ describe('HuntPageComponent', () => { return fixture; } - it('shows the hunting-unavailable state at the Südtor, with no Jagd beginnen button, and a way back to the location', async () => { + it('shows the hunting-unavailable state at the Südtor, with no Begin Hunt button, and a way back to the location', async () => { const fixture = await setup(southGate); const element = fixture.nativeElement as HTMLElement; - expect(element.textContent).toContain('Keine Jagd verfügbar'); - expect(element.textContent).toContain('Am Südtor von Graufurt gibt es keine regulären Jagdgebiete.'); + expect(element.textContent).toContain('No Hunt Available'); + expect(element.textContent).toContain('No hunting ground is available here right now.'); expect( Array.from(element.querySelectorAll('button')).some( - (button) => button.textContent?.trim() === 'Jagd beginnen', + (button) => button.textContent?.trim() === 'Begin Hunt', ), ).toBe(false); const backButton = element.querySelector('[data-hunt-to-location]'); - expect(backButton?.textContent?.trim()).toBe('Zurück zum Ort'); + expect(backButton?.textContent?.trim()).toBe('Back to Location'); backButton?.click(); expect(router.navigate).toHaveBeenCalledWith(['/location']); }); - it('calls startHunt when Jagd beginnen is clicked at a hunting-enabled location', async () => { + it('calls startHunt when Begin Hunt is clicked at a hunting-enabled location', async () => { const fixture = await setup(burnedRoad); const element = fixture.nativeElement as HTMLElement; @@ -175,11 +175,11 @@ describe('HuntPageComponent', () => { '.encounter-card__artwork[src="/images/combat/sprites/road-bandit-620.png"]', ).length, ).toBe(1); - expect(element.textContent).toContain('Stufe 1'); - expect(element.textContent).toContain('Stufe 3'); + expect(element.textContent).toContain('Level 1'); + expect(element.textContent).toContain('Level 3'); }); - it('calls refreshHunt when Neu suchen is clicked', async () => { + it('calls refreshHunt when Search Again is clicked', async () => { const fixture = await setup(burnedRoad, threeEncounterHunt); const element = fixture.nativeElement as HTMLElement; @@ -196,7 +196,7 @@ describe('HuntPageComponent', () => { const element = fixture.nativeElement as HTMLElement; const attackButtons = Array.from(element.querySelectorAll('button')).filter( - (button) => button.textContent?.trim() === 'Angreifen', + (button) => button.textContent?.trim() === 'Attack', ); expect(attackButtons.length).toBe(3); @@ -214,7 +214,7 @@ describe('HuntPageComponent', () => { const element = fixture.nativeElement as HTMLElement; const attackButtons = Array.from(element.querySelectorAll('button')).filter( - (button) => button.textContent?.trim() === 'Angreifen', + (button) => button.textContent?.trim() === 'Attack', ); attackButtons[0].click(); await Promise.resolve(); @@ -234,7 +234,7 @@ describe('HuntPageComponent', () => { const element = fixture.nativeElement as HTMLElement; const attackButtons = Array.from(element.querySelectorAll('button')).filter( - (button) => button.textContent?.trim() === 'Angreifen', + (button) => button.textContent?.trim() === 'Attack', ); attackButtons[0].click(); await Promise.resolve(); @@ -254,7 +254,7 @@ describe('HuntPageComponent', () => { const element = fixture.nativeElement as HTMLElement; const attackButtons = Array.from(element.querySelectorAll('button')).filter( - (button) => button.textContent?.trim() === 'Angreifen', + (button) => button.textContent?.trim() === 'Attack', ); attackButtons[0].click(); await Promise.resolve(); @@ -374,7 +374,7 @@ describe('HuntPageComponent', () => { fixture.detectChanges(); const element = fixture.nativeElement as HTMLElement; - expect(element.textContent).toContain('Du suchst nach Spuren...'); + expect(element.textContent).toContain('You search for tracks...'); expect(element.querySelector('[data-hunt-start]')?.disabled).toBe(true); });