From 75ba11350d6a6ca3088422859f268fac6b61258d Mon Sep 17 00:00:00 2001 From: David Date: Thu, 7 Jul 2022 09:36:23 +0200 Subject: [PATCH] #16 add translate string --- emailPoubelle.php | 2 +- emailPoubelleAdmin.php | 6 ++-- lang/messages.pot | 70 ++++++++++++++++++++++++++---------------- lib/ep_function.php | 14 ++++----- 4 files changed, 55 insertions(+), 37 deletions(-) diff --git a/emailPoubelle.php b/emailPoubelle.php index 93638eb..806f3b3 100644 --- a/emailPoubelle.php +++ b/emailPoubelle.php @@ -237,7 +237,7 @@ if (isset($_POST['username']) && $_POST['username'] != '') { // minimal anti-spa
id="input-email" size="24" border="0" onkeyup="printForm()" onchange="printForm()" /> - + " /> />
diff --git a/emailPoubelleAdmin.php b/emailPoubelleAdmin.php index 602d9fe..d537b7a 100644 --- a/emailPoubelleAdmin.php +++ b/emailPoubelleAdmin.php @@ -140,9 +140,9 @@ if ($auth==true) { $recordActifs = $dbco->query("SELECT email, count(alias) calias FROM ".DBTABLEPREFIX."alias WHERE status=5 GROUP BY email ORDER BY calias DESC LIMIT 40")->fetchAll(); echo ''; echo ' - - - + + + '; foreach ($recordActifs as $recordActif) { echo ' diff --git a/lang/messages.pot b/lang/messages.pot index c0214a2..c3c1985 100644 --- a/lang/messages.pot +++ b/lang/messages.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-11-16 12:45+0100\n" +"POT-Creation-Date: 2022-07-07 09:33+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -45,6 +45,18 @@ msgstr "" msgid "User email" msgstr "" +#: emailPoubelleAdmin.php:143 +msgid "Email" +msgstr "" + +#: emailPoubelleAdmin.php:144 +msgid "Number of alias" +msgstr "" + +#: emailPoubelleAdmin.php:145 +msgid "Action" +msgstr "" + #: emailPoubelle.php:22 msgid "Debug enabled" msgstr "" @@ -201,7 +213,7 @@ msgstr "" msgid "Add" msgstr "" -#: emailPoubelle.php:231 +#: emailPoubelle.php:231 emailPoubelle.php:240 msgid "List" msgstr "" @@ -289,95 +301,101 @@ msgstr "" msgid "Download and use this script on the project website" msgstr "" -#: ep_function.php:93 +#: ep_function.php:41 ep_function.php:78 ep_function.php:101 +#: ep_function.php:128 ep_function.php:202 ep_function.php:255 +#: ep_function.php:363 +msgid "DB error" +msgstr "" + +#: ep_function.php:99 msgid "has been deleted with all these aliases" msgstr "" -#: ep_function.php:99 +#: ep_function.php:105 msgid "Erreur" msgstr "" -#: ep_function.php:99 +#: ep_function.php:105 msgid "has not been deleted" msgstr "" -#: ep_function.php:120 +#: ep_function.php:126 msgid "has been deleted" msgstr "" -#: ep_function.php:126 +#: ep_function.php:132 msgid "Error: email trash unknown" msgstr "" -#: ep_function.php:145 ep_function.php:173 +#: ep_function.php:151 ep_function.php:179 msgid "Error: Can not find this trash email" msgstr "" -#: ep_function.php:148 ep_function.php:150 ep_function.php:152 -#: ep_function.php:176 ep_function.php:178 ep_function.php:180 +#: ep_function.php:154 ep_function.php:156 ep_function.php:158 +#: ep_function.php:182 ep_function.php:184 ep_function.php:186 msgid "The reception on" msgstr "" -#: ep_function.php:148 +#: ep_function.php:154 msgid "is active again" msgstr "" -#: ep_function.php:150 +#: ep_function.php:156 msgid "is already active" msgstr "" -#: ep_function.php:152 +#: ep_function.php:158 msgid "has not been confirmed by email" msgstr "" -#: ep_function.php:154 ep_function.php:182 +#: ep_function.php:160 ep_function.php:188 msgid "Error: unknown status" msgstr "" -#: ep_function.php:176 +#: ep_function.php:182 msgid "is now suspended" msgstr "" -#: ep_function.php:178 +#: ep_function.php:184 msgid "is already suspended" msgstr "" -#: ep_function.php:180 +#: ep_function.php:186 msgid "can not be suspended because it has not been activated yet" msgstr "" -#: ep_function.php:254 +#: ep_function.php:260 msgid "List trash email activate" msgstr "" -#: ep_function.php:257 +#: ep_function.php:263 msgid "List trash email disable" msgstr "" -#: ep_function.php:259 +#: ep_function.php:265 msgid "Create " msgstr "" -#: ep_function.php:261 +#: ep_function.php:267 msgid "and expires on" msgstr "" -#: ep_function.php:265 +#: ep_function.php:271 msgid "Comment :" msgstr "" -#: ep_function.php:268 +#: ep_function.php:274 msgid "Disable :" msgstr "" -#: ep_function.php:271 +#: ep_function.php:277 msgid "Activate :" msgstr "" -#: ep_function.php:274 +#: ep_function.php:280 msgid "Delete :" msgstr "" -#: ep_function.php:280 +#: ep_function.php:286 msgid "List trash email" msgstr "" diff --git a/lib/ep_function.php b/lib/ep_function.php index d0a2056..f6507bc 100644 --- a/lib/ep_function.php +++ b/lib/ep_function.php @@ -38,7 +38,7 @@ function UpdateVirtualDB() { ORDER BY alias ASC"); $selectcmd->execute(); } catch ( PDOException $e ) { - echo "DB error : ", $e->getMessage(); + echo _("DB error")." : ", $e->getMessage(); die(); } $file_content=null; @@ -75,7 +75,7 @@ function AjouterAlias($status, $alias,$email, $life, $comment) { $insertcmd->bindParam('comment', $comment, PDO::PARAM_STR); $insertcmd->execute(); } catch ( PDOException $e ) { - echo "DB error : ", $e->getMessage(); + echo _("DB error")." : ", $e->getMessage(); die(); } UpdateVirtualDB(); @@ -98,7 +98,7 @@ function DeleteEmail($email) { $deletecmd->execute(); echo '
'.$email.' '._('has been deleted with all these aliases').'.
'; } catch ( PDOException $e ) { - echo "DB error : ", $e->getMessage(); + echo _("DB error")." : ", $e->getMessage(); die(); } } else { @@ -125,7 +125,7 @@ function DeleteAlias($id, $alias_full) { $deletecmd->execute(); echo '
'.$alias_full.' '._('has been deleted').'
'; } catch ( PDOException $e ) { - echo "DB error : ", $e->getMessage(); + echo _("DB error")." : ", $e->getMessage(); die(); } } else { @@ -199,7 +199,7 @@ function UpdateStatusAlias($id, $alias_full, $status) { $updatecmd->bindParam('alias_full', $alias_full, PDO::PARAM_STR); $updatecmd->execute(); } catch ( PDOException $e ) { - echo "DB error : ", $e->getMessage(); + echo _("DB error")." : ", $e->getMessage(); die(); } UpdateVirtualDB(); @@ -252,7 +252,7 @@ function ListeAlias($email) { $selectcmd->bindParam('email', $email, PDO::PARAM_STR); $selectcmd->execute(); } catch ( PDOException $e ) { - echo "DB error : ", $e->getMessage(); + echo _("DB error")." : ", $e->getMessage(); die(); } $nb_alias=0; @@ -360,7 +360,7 @@ function LifeExpire() { $deletecmd = $dbco->prepare("DELETE FROM ".DBTABLEPREFIX."alias WHERE dateExpir IS NOT NULL AND dateExpir < '".date('Y-m-d H:i:s')."'"); $deletecmd->execute(); } catch ( PDOException $e ) { - echo "DB error : ", $e->getMessage(); + echo _("DB error")." : ", $e->getMessage(); die(); } }
EmailNumber of aliasAction'._('Email').''._('Number of alias').''._('Action').'