]> SAFE projects GIT repository - jmp/mailleur/commitdiff
Addition d'une sentinelle dans la defintion table traduction
authorJean-Marc Pigeon <jmp@safe.c>
Fri, 12 Dec 2025 14:22:51 +0000 (09:22 -0500)
committerJean-Marc Pigeon <jmp@safe.c>
Fri, 12 Dec 2025 14:22:51 +0000 (09:22 -0500)
www/gesdis.php
www/translations.js

index 649ec2d6c7a5ee3f50f444cf90240fcddea611f4..0f3d92f1b8090903c72084e3456e6a634c9a761e 100644 (file)
@@ -40,7 +40,7 @@ switch ($pageref) {
     break;
   case "lvlmai"        :
     $entete="<span class=\"translatable\" trkey=\"Main screen\">Main screen</span>";
-    $out=gettranslate($userlang,"Logout");
+    $out="<span class=\"translatable\" trkey=\"Logout\">Logout</span>";
     if ($isadmin==true) {
       $remotes=gettranslate($userlang,"SMTP server");
       $users=gettranslate($userlang,"User Management");
index b0005a0575c3c6fc3b04a1d6a6cd4382e4e0661f..13f7bd6a96480ce24697adb272c5ec8995592440 100644 (file)
@@ -1,7 +1,8 @@
 // vim: smarttab tabstop=8 shiftwidth=2 expandtab
 
-// Table unique, même style que le PHP
-const TR = [
+//language table
+const TR =
+  [
     ["Authentication",  "Authentification"],
     ["Email",           "Courriel"],
     ["Login",           "Connexion"],
@@ -9,16 +10,18 @@ const TR = [
     ["Originator",      "Expediteur"],
     ["Password",        "Mot de passe"],
     ["Recipient",       "Destinataire"],
-    ["Show",            "Afficher"]
-];
+    ["Show",            "Afficher"],
+    [null,              null]
+  ];
 
 var translationMap = new Map();
 
-// On construit automatiquement les dictionnaires EN/FR
+// Building EN/FR dictionnaries
 const translationEn = new Map();
 const translationFr = new Map();
 
 for (const [en, fr] of TR) {
+  if (en === null) break; //detecting end of table
   translationEn.set(en, en);
   translationFr.set(en, fr);
   }