Files
TravianZ Patcher 48dde68baa feat(l10n): translate manual unit pages (FR/RO)
Localize the 51 in-game manual unit detail pages (Templates/Manual/1*.tpl,
typ=1) so they render in the player's language instead of English, continuing
the manual l10n started in the building pages PR.

What changed:
- 51 unit pages (Romans/Teutons/Gauls/Nature/Natars) now use translation
  constants for every hardcoded string: tribe tags -> TRIBE1..5, the stat
  labels (attack value, defence vs infantry/cavalry, Velocity, fields/hour,
  Can carry, Duration of training), the unit descriptions, the NPC reference
  notes and the "forward" nav.
- 48 new constants added to en/fr/ro:
  * 7 shared stat labels (MANUAL_ATTACK_VALUE, MANUAL_DEF_INFANTRY,
    MANUAL_DEF_CAVALRY, MANUAL_VELOCITY, MANUAL_FIELDS_HOUR, MANUAL_CAN_CARRY,
    MANUAL_TRAINING_DURATION)
  * 2 NPC reference notes (MANUAL_NPC_NATARS, MANUAL_NPC_NATURE)
  * 1 templated Nature-animal blurb (MANUAL_UDESC_ANIMAL_EXP, used via
    printf with the animal name + xp value, so the 10 animal pages share it)
  * 38 unit descriptions (MANUAL_UDESC_*). Identical descriptions are shared:
    settlers (110/120/130) and rams (117/127) reuse one constant each.
- Reuses constants already present upstream and in the building pages branch:
  TRIBE1..5, LEVEL, FORWARD, CROP_CONSUMPTION, PREREQUISITES, UPKEEP, DURATION,
  RESOURCES, U1..U50.

English render is unchanged: the English constant values are the existing page
text extracted verbatim (whitespace-collapsed). it/zh are intentionally left to
fall back to English via the en.php fallback wired up earlier.

Scope note: this builds on the manual building-pages l10n branch (reuses
CROP_CONSUMPTION). The 17 "new features" pages (typ=11/13) are out of scope and
will be a follow-up PR. RO strings are functional but would benefit from a
native review.
2026-06-10 13:48:02 +02:00

51 lines
2.6 KiB
Smarty

<h1><img class="unit u13" src="img/x.gif" alt="<?php echo U13; ?>" title="<?php echo U13; ?>" /> <?php echo U13; ?> <span class="tribe">(<?php echo TRIBE2; ?>)</span></h1>
<table id="troop_info" cellpadding="1" cellspacing="1">
<thead><tr>
<th><img class="att_all" src="img/x.gif" alt="<?php echo MANUAL_ATTACK_VALUE; ?>" title="<?php echo MANUAL_ATTACK_VALUE; ?>" /></th>
<th><img class="def_i" src="img/x.gif" alt="<?php echo MANUAL_DEF_INFANTRY; ?>" title="<?php echo MANUAL_DEF_INFANTRY; ?>" /></th>
<th><img class="def_c" src="img/x.gif" alt="<?php echo MANUAL_DEF_CAVALRY; ?>" title="<?php echo MANUAL_DEF_CAVALRY; ?>" /></th>
<th><img class="r1" src="img/x.gif" alt="<?php echo LUMBER; ?>" title="<?php echo LUMBER; ?>" /></th>
<th><img class="r2" src="img/x.gif" alt="<?php echo CLAY; ?>" title="<?php echo CLAY; ?>" /></th>
<th><img class="r3" src="img/x.gif" alt="<?php echo IRON; ?>" title="<?php echo IRON; ?>" /></th>
<th><img class="r4" src="img/x.gif" alt="<?php echo CROP; ?>" title="<?php echo CROP; ?>" /></th>
</tr></thead>
<tbody><tr>
<td>60</td>
<td>30</td>
<td>30</td>
<td>130</td>
<td>120</td>
<td>170</td>
<td>70</td>
</tr></tbody>
</table>
<table id="troop_details" cellpadding="1" cellspacing="1">
<tbody><tr>
<th><?php echo MANUAL_VELOCITY; ?></th>
<td><b>6</b> <?php echo MANUAL_FIELDS_HOUR; ?></td>
</tr>
<tr>
<th><?php echo MANUAL_CAN_CARRY; ?></th>
<td><b>50</b> <?php echo RESOURCES; ?></td>
</tr>
<tr>
<th><?php echo UPKEEP; ?></th>
<td><img class="r5" src="img/x.gif" alt="<?php echo CROP_CONSUMPTION; ?>" title="<?php echo CROP_CONSUMPTION; ?>" /> 1</td>
</tr>
<tr>
<th><?php echo MANUAL_TRAINING_DURATION; ?></th>
<td><img class="clock" src="img/x.gif" alt="<?php echo DURATION; ?>" title="<?php echo DURATION; ?>" /> 0:20:00</td>
</tr></tbody>
</table>
<img id="big_unit" class="big_u13" src="img/x.gif" alt="<?php echo U13; ?>" title="<?php echo U13; ?>" /><div id="t_desc"><?php echo MANUAL_UDESC_13; ?></div>
<div id="prereqs"><b><?php echo PREREQUISITES; ?></b><br /><a href="manual.php?typ=4&amp;gid=22"><?php echo ACADEMY; ?></a> <?php echo LEVEL; ?> 3, <a href="manual.php?typ=4&amp;gid=12"><?php echo BLACKSMITH; ?></a> <?php echo LEVEL; ?> 1</div>
<map id="nav" name="nav">
<area href="manual.php?typ=1&amp;s=12" title="<?php echo BACK; ?>" coords="0,0,45,18" shape="rect" alt="" />
<area href="manual.php?s=1" title="<?php echo OVERVIEW; ?>" coords="46,0,70,18" shape="rect" alt="" />
<area href="manual.php?typ=1&amp;s=14" title="<?php echo FORWARD; ?>" coords="71,0,116,18" shape="rect" alt="" />
</map>
<img usemap="#nav" src="img/x.gif" class="navi" alt="" />