mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-06-28 00:24:23 +00:00
48dde68baa
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.
51 lines
2.4 KiB
Smarty
51 lines
2.4 KiB
Smarty
<h1><img class="unit u46" src="img/x.gif" alt="<?php echo U46; ?>" title="<?php echo U46; ?>" /> <?php echo U46; ?> <span class="tribe">(<?php echo TRIBE5; ?>)</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>170</td>
|
|
<td>140</td>
|
|
<td>80</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>12</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_u46" src="img/x.gif" alt="<?php echo U46; ?>" title="<?php echo U46; ?>" /><div id="t_desc"><?php echo MANUAL_UDESC_46; ?></div>
|
|
<div id="prereqs"><p><b><?php echo PREREQUISITES; ?></b><br><?php echo MANUAL_NPC_NATARS; ?></p></div>
|
|
<map id="nav" name="nav">
|
|
<area href="manual.php?typ=1&s=45" 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&s=47" title="<?php echo FORWARD; ?>" coords="71,0,116,18" shape="rect" alt="" />
|
|
</map>
|
|
<img usemap="#nav" src="img/x.gif" class="navi" alt="" /> |