translate: English is the primary langauge, so it's perfect, and should be on top of the list
diff --git a/index.php b/index.php
index ec96e04..7445c63 100644
--- a/index.php
+++ b/index.php
@@ -21,12 +21,18 @@
require_once('common.php');
function langsort($a, $b) {
+ // English is always on top
+ if ($a['name'] == 'English')
+ return -1;
+ if ($b['name'] == 'English')
+ return 1;
+
// Sort by Name
- $ap = $a['name'];
- $bp = $b['name'];
+ $an = $a['name'];
+ $bn = $b['name'];
// Sort by last update revision
- $ap = $a['last_update_rev'];
- $bp = $b['last_update_rev'];
+ $au = $a['last_update_rev'];
+ $bu = $b['last_update_rev'];
// Sort by status
$ap = $a['percentage'];
$bp = $b['percentage'];
@@ -36,9 +42,8 @@
if ($ap == $bp) {
if ($ac != $bc) {
return $ac > $bc ? -1 : 1;
- }
- else {
- return $a['name'] > $b['name'] ? -1 : 1;
+ } else {
+ return $an > $bn ? -1 : 1;
}
}
return $ap < $bp ? 1 : -1;
diff --git a/templates/frontpage.tpl b/templates/frontpage.tpl
index a0638b5..22158c6 100644
--- a/templates/frontpage.tpl
+++ b/templates/frontpage.tpl
@@ -48,7 +48,9 @@
<img class="flagthumb" src="flags/22/{$language.flag}.png" />
</td>
<td>
+ {if $langfile != 'english'}
<a href='problems.php?lang={$langfile}'><img style='border: none' src='warning.gif' width='16' height='16' /></a>
+ {/if}
</td>
<td>
{if file_exists('graphs/$langfile')}