From 3210c87103f9f48fcd70f5fe5d4d9d5497eda382 Mon Sep 17 00:00:00 2001 From: Jean-Marc Pigeon Date: Sat, 6 Sep 2025 10:08:20 -0400 Subject: [PATCH] Translation seems to be working --- sql/datatest.sql | 4 +++ sql/mailleur.sql | 2 ++ www/{unidis.php => gesdis.php} | 7 +++--- www/lvllog.php | 2 +- www/unienv.php | 2 +- www/unilng.php | 45 ++++++++++++++++++++++++++++++++++ 6 files changed, 57 insertions(+), 5 deletions(-) rename www/{unidis.php => gesdis.php} (93%) create mode 100644 www/unilng.php diff --git a/sql/datatest.sql b/sql/datatest.sql index efeb35a..0fead17 100644 --- a/sql/datatest.sql +++ b/sql/datatest.sql @@ -10,6 +10,8 @@ DELETE FROM emails; //============================================================== //set for local test +INSERT INTO emails (email,password,lang) \ + values ('jmp@example.com','tryit','FRA'); INSERT INTO emails (email,password) \ values ('root@example.com','4cabri'); INSERT INTO emails (email,password) \ @@ -70,4 +72,6 @@ INSERT INTO remotes (remoteip,credit) \ //defining admin user INSERT INTO admins (email) \ values ('root@example.com'); +INSERT INTO admins (email) \ + values ('jmp@example.com'); //============================================================== diff --git a/sql/mailleur.sql b/sql/mailleur.sql index 1010ee0..8222e5e 100644 --- a/sql/mailleur.sql +++ b/sql/mailleur.sql @@ -60,6 +60,8 @@ CREATE TABLE emails ( password TEXT //user (encrypted) password DFLT '!', hash TEXT, //'email:realm:password' MD5 + lang TEXT //user prefered language + DFLT 'ENG', //English by default space INTEGER //space used by user email DFLT 0, mxspace INTEGER //Maximun space available diff --git a/www/unidis.php b/www/gesdis.php similarity index 93% rename from www/unidis.php rename to www/gesdis.php index 609e5d5..7a282c2 100644 --- a/www/unidis.php +++ b/www/gesdis.php @@ -2,10 +2,10 @@ //============================================================== // -// Basic display function +// Display management function // //============================================================== - +include_once "unilng.php"; //============================================================== // @@ -24,7 +24,8 @@ if ($isadmin==true) $admcolor="red"; switch ($pageref) { case "lvllog" : - $entete="Authentication"; + $entete=gettranslate(lng::fra,"authentication"); + //$entete=gettranslate(lng::fra,"nuts"); break; case "lvlmai" : $entete="main"; diff --git a/www/lvllog.php b/www/lvllog.php index 5c38cfd..e9fe253 100644 --- a/www/lvllog.php +++ b/www/lvllog.php @@ -7,7 +7,7 @@ //============================================================== include_once "subrou.php"; include_once "unienv.php"; -include_once "unidis.php"; +include_once "gesdis.php"; include_once "gessql.php"; //============================================================== diff --git a/www/unienv.php b/www/unienv.php index 0e42e8c..d2be85c 100644 --- a/www/unienv.php +++ b/www/unienv.php @@ -2,7 +2,7 @@ //============================================================== // -// To load environement variable +// To load environment variable // //============================================================== function loadenv() diff --git a/www/unilng.php b/www/unilng.php new file mode 100644 index 0000000..4e1d72a --- /dev/null +++ b/www/unilng.php @@ -0,0 +1,45 @@ + -- 2.47.3