mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-09-23 10:26:42 +08:00
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.
This commit is contained in:
+12
-12
@@ -1,10 +1,10 @@
|
||||
<h1><img class="unit u11" src="img/x.gif" alt="<?php echo U11; ?>" title="<?php echo U11; ?>" /> <?php echo U11; ?> <span class="tribe">(Teutons)</span></h1>
|
||||
<h1><img class="unit u11" src="img/x.gif" alt="<?php echo U11; ?>" title="<?php echo U11; ?>" /> <?php echo U11; ?> <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="attack value" title="attack value" /></th>
|
||||
<th><img class="def_i" src="img/x.gif" alt="defence against infantry" title="defence against infantry" /></th>
|
||||
<th><img class="def_c" src="img/x.gif" alt="defence against cavalry" title="defence against cavalry" /></th>
|
||||
<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>
|
||||
@@ -24,28 +24,28 @@
|
||||
|
||||
<table id="troop_details" cellpadding="1" cellspacing="1">
|
||||
<tbody><tr>
|
||||
<th>Velocity</th>
|
||||
<td><b>7</b> fields/hour</td>
|
||||
<th><?php echo MANUAL_VELOCITY; ?></th>
|
||||
<td><b>7</b> <?php echo MANUAL_FIELDS_HOUR; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Can carry</th>
|
||||
<th><?php echo MANUAL_CAN_CARRY; ?></th>
|
||||
<td><b>60</b> <?php echo RESOURCES; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo UPKEEP; ?></th>
|
||||
<td><img class="r5" src="img/x.gif" alt="Crop consumption" title="Crop consumption" /> 1</td>
|
||||
<td><img class="r5" src="img/x.gif" alt="<?php echo CROP_CONSUMPTION; ?>" title="<?php echo CROP_CONSUMPTION; ?>" /> 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Duration of training</th>
|
||||
<th><?php echo MANUAL_TRAINING_DURATION; ?></th>
|
||||
<td><img class="clock" src="img/x.gif" alt="<?php echo DURATION; ?>" title="<?php echo DURATION; ?>" /> 0:12:00</td>
|
||||
</tr></tbody>
|
||||
</table>
|
||||
|
||||
<img id="big_unit" class="big_u11" src="img/x.gif" alt="<?php echo U11; ?>" title="<?php echo U11; ?>" /><div id="t_desc">Clubswingers are the cheapest unit in Travian. They are quickly trained and have medium attack capabilities but their armour isn’t the best. Clubswingers are almost defenceless against cavalry and will be ridden down with ease.</div>
|
||||
<div id="prereqs"><b><?php echo PREREQUISITES; ?></b><br /><a href="manual.php?typ=4&gid=19"><?php echo BARRACKS; ?></a> Level 1</div>
|
||||
<img id="big_unit" class="big_u11" src="img/x.gif" alt="<?php echo U11; ?>" title="<?php echo U11; ?>" /><div id="t_desc"><?php echo MANUAL_UDESC_11; ?></div>
|
||||
<div id="prereqs"><b><?php echo PREREQUISITES; ?></b><br /><a href="manual.php?typ=4&gid=19"><?php echo BARRACKS; ?></a> <?php echo LEVEL; ?> 1</div>
|
||||
<map id="nav" name="nav">
|
||||
<area href="manual.php?typ=2&s=2" 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=12" title="forward" coords="71,0,116,18" shape="rect" alt="" />
|
||||
<area href="manual.php?typ=1&s=12" title="<?php echo FORWARD; ?>" coords="71,0,116,18" shape="rect" alt="" />
|
||||
</map>
|
||||
<img usemap="#nav" src="img/x.gif" class="navi" alt="" />
|
||||
Reference in New Issue
Block a user