feat(web): translate combat log, action buttons, and victory/defeat screen to English
Translates formatEvent() and monsterIntentLabel() combat-log templates, default participant-name fallbacks (Du/Der Gegner -> You/The enemy), and every static string in the combat page template: round header, action buttons, outcome headings, rewards panel, post-combat buttons, log panel, and loading/error/aria-label text. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ACkMEDYiwtcfchqKkiUJNX
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<section class="combat" aria-label="Kampf">
|
||||
<section class="combat" aria-label="Combat">
|
||||
@if (combat(); as combat) {
|
||||
<div class="combat__stage" [class.combat__stage--shaken]="stageShake()">
|
||||
<header class="combat__status">
|
||||
@@ -9,7 +9,7 @@
|
||||
<div
|
||||
class="bar bar--player"
|
||||
role="progressbar"
|
||||
[attr.aria-label]="'Lebenspunkte ' + combat.player.name"
|
||||
[attr.aria-label]="'Health points ' + combat.player.name"
|
||||
[attr.aria-valuenow]="combat.player.currentHp"
|
||||
[attr.aria-valuemin]="0"
|
||||
[attr.aria-valuemax]="combat.player.maxHp"
|
||||
@@ -20,7 +20,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p class="combat__round" data-combat-round>Runde {{ combat.round }}</p>
|
||||
<p class="combat__round" data-combat-round>Round {{ combat.round }}</p>
|
||||
|
||||
<div class="fighter fighter--monster">
|
||||
<div class="fighter__meter">
|
||||
@@ -31,7 +31,7 @@
|
||||
<div
|
||||
class="bar bar--monster"
|
||||
role="progressbar"
|
||||
[attr.aria-label]="'Lebenspunkte ' + combat.monster.name"
|
||||
[attr.aria-label]="'Health points ' + combat.monster.name"
|
||||
[attr.aria-valuenow]="combat.monster.currentHp"
|
||||
[attr.aria-valuemin]="0"
|
||||
[attr.aria-valuemax]="combat.monster.maxHp"
|
||||
@@ -80,7 +80,7 @@
|
||||
(click)="performAction('ATTACK')"
|
||||
>
|
||||
<img class="action__icon" src="/images/hud/runtime/AttackIcon-96.png" alt="" />
|
||||
<span class="action__label">Angriff</span>
|
||||
<span class="action__label">Attack</span>
|
||||
<span class="action__key">1</span>
|
||||
</button>
|
||||
<button
|
||||
@@ -91,7 +91,7 @@
|
||||
(click)="performAction('HEAVY_STRIKE')"
|
||||
>
|
||||
<img class="action__icon" src="/images/hud/runtime/AttackIcon-96.png" alt="" />
|
||||
<span class="action__label">Schwerer Hieb</span>
|
||||
<span class="action__label">Heavy Strike</span>
|
||||
<span class="action__key">2</span>
|
||||
</button>
|
||||
<button
|
||||
@@ -102,7 +102,7 @@
|
||||
(click)="performAction('SHIELD_BASH')"
|
||||
>
|
||||
<img class="action__icon" src="/images/hud/runtime/CharacterIcon-128.png" alt="" />
|
||||
<span class="action__label">Schildstoß</span>
|
||||
<span class="action__label">Shield Bash</span>
|
||||
<span class="action__key">3</span>
|
||||
</button>
|
||||
<button
|
||||
@@ -113,7 +113,7 @@
|
||||
(click)="performAction('DEFEND')"
|
||||
>
|
||||
<img class="action__icon" src="/images/hud/runtime/CharacterIcon-128.png" alt="" />
|
||||
<span class="action__label">Verteidigen</span>
|
||||
<span class="action__label">Defend</span>
|
||||
<span class="action__key">4</span>
|
||||
</button>
|
||||
<button
|
||||
@@ -124,7 +124,7 @@
|
||||
(click)="performAction('POTION')"
|
||||
>
|
||||
<img class="action__icon" src="/images/items/small-healing-potion.png" alt="" />
|
||||
<span class="action__label">Trank {{ combat.player.potionsRemaining }}/{{ combat.player.potionsMax }}</span>
|
||||
<span class="action__label">Potion {{ combat.player.potionsRemaining }}/{{ combat.player.potionsMax }}</span>
|
||||
<span class="action__key">5</span>
|
||||
</button>
|
||||
}
|
||||
@@ -132,24 +132,24 @@
|
||||
|
||||
@if (combat.status === 'WON') {
|
||||
<div class="outcome outcome--won" data-combat-result="WON">
|
||||
<h2 class="outcome__title">Sieg</h2>
|
||||
<p>{{ combat.monster.name }} wurde besiegt.</p>
|
||||
<h2 class="outcome__title">Victory</h2>
|
||||
<p>{{ combat.monster.name }} has been defeated.</p>
|
||||
|
||||
@if (combat.rewards; as rewards) {
|
||||
<section class="rewards" data-combat-rewards aria-label="Belohnungen">
|
||||
<h3 class="rewards__title">Belohnungen</h3>
|
||||
<section class="rewards" data-combat-rewards aria-label="Rewards">
|
||||
<h3 class="rewards__title">Rewards</h3>
|
||||
|
||||
@if (rewards.silver) {
|
||||
<dl class="rewards__currencies">
|
||||
<div class="rewards__currency" data-reward-silver>
|
||||
<dt>Silber</dt>
|
||||
<dt>Silver</dt>
|
||||
<dd>+{{ rewards.silver }}</dd>
|
||||
</div>
|
||||
</dl>
|
||||
}
|
||||
|
||||
@if (rewards.items.length) {
|
||||
<h3 class="rewards__title">Beute</h3>
|
||||
<h3 class="rewards__title">Loot</h3>
|
||||
<ul class="rewards__loot">
|
||||
@for (reward of rewards.items; track reward.characterItemId) {
|
||||
<li>
|
||||
@@ -158,14 +158,14 @@
|
||||
}
|
||||
</ul>
|
||||
} @else {
|
||||
<p class="outcome__hint" data-reward-empty>Keine besondere Beute gefunden.</p>
|
||||
<p class="outcome__hint" data-reward-empty>No notable loot found.</p>
|
||||
}
|
||||
</section>
|
||||
}
|
||||
|
||||
<div class="outcome__buttons">
|
||||
<button type="button" class="outcome__button" data-combat-to-hunt (click)="goToHunt()">
|
||||
Weiter jagen
|
||||
Keep Hunting
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
@@ -173,7 +173,7 @@
|
||||
data-combat-to-location
|
||||
(click)="goToLocation()"
|
||||
>
|
||||
Zum Ort
|
||||
To Location
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
@@ -181,17 +181,17 @@
|
||||
data-combat-to-inventory
|
||||
(click)="goToInventory()"
|
||||
>
|
||||
Inventar öffnen
|
||||
Open Inventory
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
} @else if (combat.status === 'LOST') {
|
||||
<div class="outcome outcome--lost" data-combat-result="LOST">
|
||||
<h2 class="outcome__title">Niederlage</h2>
|
||||
<p>{{ combat.player.name }} wurde im Kampf besiegt.</p>
|
||||
<h2 class="outcome__title">Defeat</h2>
|
||||
<p>{{ combat.player.name }} has been defeated.</p>
|
||||
<div class="outcome__buttons">
|
||||
<button type="button" class="outcome__button" data-combat-to-hunt (click)="goToHunt()">
|
||||
Weiter jagen
|
||||
Keep Hunting
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
@@ -199,18 +199,18 @@
|
||||
data-combat-to-location
|
||||
(click)="goToLocation()"
|
||||
>
|
||||
Zum Ort
|
||||
To Location
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
||||
<aside class="combat__log" aria-label="Kampfprotokoll">
|
||||
<h2 class="combat__log-title">Kampflog</h2>
|
||||
<aside class="combat__log" aria-label="Combat Log">
|
||||
<h2 class="combat__log-title">Combat Log</h2>
|
||||
<div class="combat__log-body">
|
||||
@for (round of logRounds(); track round.round) {
|
||||
<p class="combat__log-round">Runde {{ round.round }}</p>
|
||||
<p class="combat__log-round">Round {{ round.round }}</p>
|
||||
@for (event of round.events; track event.sequence) {
|
||||
<p class="combat__log-entry" [class.combat__log-entry--player]="event.source === 'PLAYER'">
|
||||
{{ formatEvent(event) }}
|
||||
@@ -220,13 +220,13 @@
|
||||
</div>
|
||||
</aside>
|
||||
} @else if (combatStore.loading()) {
|
||||
<p class="combat__notice" role="status">Kampf wird geladen…</p>
|
||||
<p class="combat__notice" role="status">Loading combat…</p>
|
||||
}
|
||||
|
||||
@if (combatStore.error(); as error) {
|
||||
<section class="combat__notice combat__notice--error" role="alert">
|
||||
<p>{{ error }}</p>
|
||||
<button type="button" data-combat-retry (click)="retry()">Erneut versuchen</button>
|
||||
<button type="button" data-combat-retry (click)="retry()">Retry</button>
|
||||
</section>
|
||||
}
|
||||
</section>
|
||||
|
||||
Reference in New Issue
Block a user