i18n: render battle reports in each reader's language (EN/FR/RO) (#236)

This commit is contained in:
Ferywir
2026-06-17 15:24:37 +02:00
committed by GitHub
parent abe36748d7
commit 51c9cc5b2c
11 changed files with 309 additions and 86 deletions
+3 -3
View File
@@ -7,7 +7,7 @@
# - Reduced redundant queries
#################################################################################
$dataarray = explode(",", $message->readingNotice['data']);
$dataarray = array_map('tz_expand_report', explode(",", $message->readingNotice['data']));
// ======================== CONFIG ========================
$hasHero = (isset($dataarray[184]) && $dataarray[184] > 0);
@@ -82,7 +82,7 @@ if ($database->isVillageOases($dataarray[29])) {
<tr>
<?php $date = $generator->procMtime($message->readingNotice['time']); ?>
<td class="sent"><?php echo TZ_SENT; ?></td>
<td><?php echo ON; ?> <span><?php echo $date[0]." at ".$date[1]; ?></span> <span><?php echo TZ_HOUR; ?></span></td>
<td><?php echo ON; ?> <span><?php echo $date[0]." ".TZ_AT." ".$date[1]; ?></span> <span><?php echo TZ_HOUR; ?></span></td>
</tr>
</thead>
@@ -117,7 +117,7 @@ for ($i = $start; $i <= ($start + 9); $i++) {
}
if ($hasHero) {
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"".RC_HERO."\" alt=\"".RC_HERO."\" /></td>";
}
echo "</tr><tr><th>".TROOPS."</th>";