mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-09-04 17:37:21 +00: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 u49" src="img/x.gif" alt="<?php echo U49; ?>" title="<?php echo U49; ?>" /> <?php echo U49; ?> <span class="tribe">(Natars)</span></h1>
|
||||
<h1><img class="unit u49" src="img/x.gif" alt="<?php echo U49; ?>" title="<?php echo U49; ?>" /> <?php echo U49; ?> <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="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>5</b> fields/hour</td>
|
||||
<th><?php echo MANUAL_VELOCITY; ?></th>
|
||||
<td><b>5</b> <?php echo MANUAL_FIELDS_HOUR; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Can carry</th>
|
||||
<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="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</td>
|
||||
</tr></tbody>
|
||||
</table>
|
||||
|
||||
<img id="big_unit" class="big_u49" src="img/x.gif" alt="<?php echo U49; ?>" title="<?php echo U49; ?>" /><div id="t_desc">A mixture of pure fear, admiration and awe moves the villagers when the Natarian Emperor speaks to them. This commanding and well outfitted figure is fully aware of his effect on others and knows how to subjugate an entire village with a single harangue.</div>
|
||||
<div id="prereqs"><p><b><?php echo PREREQUISITES; ?></b><br>Description is intended for reference only. The Natars are a pure NPC tribe and thus cannot be played by oneself.</p></div>
|
||||
<img id="big_unit" class="big_u49" src="img/x.gif" alt="<?php echo U49; ?>" title="<?php echo U49; ?>" /><div id="t_desc"><?php echo MANUAL_UDESC_49; ?></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=48" 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=50" title="forward" coords="71,0,116,18" shape="rect" alt="" />
|
||||
<area href="manual.php?typ=1&s=50" 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