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.5 KiB
Smarty

<h1><img class="unit u38" src="img/x.gif" alt="<?php echo U38; ?>" title="<?php echo U38; ?>" /> <?php echo U38; ?> <span class="tribe">(<?php echo TRIBE4; ?>)</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>450</td>
<td>380</td>
<td>240</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
</tr></tbody>
</table>
<table id="troop_details" cellpadding="1" cellspacing="1">
<tbody><tr>
<th><?php echo MANUAL_VELOCITY; ?></th>
<td><b>20</b> <?php echo MANUAL_FIELDS_HOUR; ?></td>
</tr>
<tr>
<th><?php echo MANUAL_CAN_CARRY; ?></th>
<td><b>0</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; ?>" /> 3</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</td>
</tr></tbody>
</table>
<img id="big_unit" class="big_u38" src="img/x.gif" alt="<?php echo U38; ?>" title="<?php echo U38; ?>" /><div id="t_desc"><?php printf(MANUAL_UDESC_ANIMAL_EXP, U38, 3); ?></div>
<div id="prereqs"><p><b><?php echo PREREQUISITES; ?></b><br><?php echo MANUAL_NPC_NATURE; ?></p></div>
<map id="nav" name="nav">
<area href="manual.php?typ=1&amp;s=57" 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=59" title="<?php echo FORWARD; ?>" coords="71,0,116,18" shape="rect" alt="" />
</map>
<img usemap="#nav" src="img/x.gif" class="navi" alt="" />