From f2321633b9dcc806b3c036a742bde1e4c9bcbef9 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Fri, 13 Feb 2015 19:39:48 +0100 Subject: couple improvements, translations --- inc/poche/Poche.class.php | 8 ++++++-- inc/poche/Routing.class.php | 2 +- inc/poche/config.inc.default.php | 3 +-- locale/en_US.utf8/LC_MESSAGES/en_US.utf8.mo | Bin 17302 -> 17420 bytes locale/en_US.utf8/LC_MESSAGES/en_US.utf8.po | 3 +++ locale/fr_FR.utf8/LC_MESSAGES/fr_FR.utf8.mo | Bin 22690 -> 22813 bytes locale/fr_FR.utf8/LC_MESSAGES/fr_FR.utf8.po | 3 +++ 7 files changed, 14 insertions(+), 5 deletions(-) diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php index cd7578e3..a91a3f8f 100755 --- a/inc/poche/Poche.class.php +++ b/inc/poche/Poche.class.php @@ -93,7 +93,9 @@ class Poche _('This is an automatically generated message, no one will answer if you respond to it.'); // if external (public) registration - $body = "Hi, " . $newUsername . "\r\n\r\nYou've just created a wallabag account on " . Tools::getPocheUrl() . ".\r\nHave fun with it !"; + $body = sprintf(_('Hi, %1$s'), $newUsername) . "\r\n\r\n" . + sprintf(_('You\'ve just created a wallabag account on %1$s.'), Tools::getPocheUrl()) . + "\r\n\r\n" . _("Have fun with it !"); $body = $internalRegistration ? $body_internal : $body; $body = wordwrap($body, 70, "\r\n"); // cut lines with more than 70 caracters (MIME standard) @@ -117,7 +119,9 @@ class Poche $this->messages->add('i', _('The user was created, but no email was sent because email was not filled in')); } Tools::logm('The new user ' . $newUsername . ' has been installed'); - $this->messages->add('s', sprintf(_('The new user %s has been installed. Do you want to logout ?'), $newUsername)); + if (\Session::isLogged()) { + $this->messages->add('s', sprintf(_('The new user %s has been installed. Do you want to logout ?'), $newUsername)); + } Tools::redirect(); } else { diff --git a/inc/poche/Routing.class.php b/inc/poche/Routing.class.php index e9b67771..177b74d5 100755 --- a/inc/poche/Routing.class.php +++ b/inc/poche/Routing.class.php @@ -72,7 +72,7 @@ class Routing Tools::logm('register'); $tplFile = Tools::getTplFile('register'); } elseif (ALLOW_REGISTER && isset($_GET['register'])){ - $this->wallabag->createNewUser($_POST['newusername'], $_POST['password4newuser']); + $this->wallabag->createNewUser($_POST['newusername'], $_POST['password4newuser'], $_POST['newuseremail']); Tools::redirect(); } elseif(isset($_SERVER['PHP_AUTH_USER'])) { if($this->wallabag->store->userExists($_SERVER['PHP_AUTH_USER'])) { diff --git a/inc/poche/config.inc.default.php b/inc/poche/config.inc.default.php index e569dddd..7c27856d 100755 --- a/inc/poche/config.inc.default.php +++ b/inc/poche/config.inc.default.php @@ -33,8 +33,6 @@ @define ('MODE_DEMO', FALSE); @define ('DEBUG_POCHE', FALSE); -@define ('ALLOW_REGISTER', TRUE); - //default level of error reporting in application. Developers should override it in their config.inc.php: set to E_ALL. @define ('ERROR_REPORTING', E_ALL & ~E_NOTICE); @@ -63,6 +61,7 @@ // registration @define ('SEND_CONFIRMATION_EMAIL', TRUE); // TO BE CHANGED DEPENDING ON POLL +@define ('ALLOW_REGISTER', TRUE); // display or not print link in article view @define ('SHOW_PRINTLINK', '1'); diff --git a/locale/en_US.utf8/LC_MESSAGES/en_US.utf8.mo b/locale/en_US.utf8/LC_MESSAGES/en_US.utf8.mo index 02523125..4341e50e 100644 Binary files a/locale/en_US.utf8/LC_MESSAGES/en_US.utf8.mo and b/locale/en_US.utf8/LC_MESSAGES/en_US.utf8.mo differ diff --git a/locale/en_US.utf8/LC_MESSAGES/en_US.utf8.po b/locale/en_US.utf8/LC_MESSAGES/en_US.utf8.po index 75dad661..37d926f1 100644 --- a/locale/en_US.utf8/LC_MESSAGES/en_US.utf8.po +++ b/locale/en_US.utf8/LC_MESSAGES/en_US.utf8.po @@ -673,6 +673,9 @@ msgstr "Hi, %1$s" msgid "Someone just created a wallabag account for you on %1$s." msgstr "Someone just created a wallabag account for you on %1$s." +msgid "You've just created a wallabag account on %1$s" +msgstr "You've just created a wallabag account on %1$s" + msgid "Your login is %1$s." msgstr "Your login is %1$s." diff --git a/locale/fr_FR.utf8/LC_MESSAGES/fr_FR.utf8.mo b/locale/fr_FR.utf8/LC_MESSAGES/fr_FR.utf8.mo index b3b2f6fe..1004c1a0 100644 Binary files a/locale/fr_FR.utf8/LC_MESSAGES/fr_FR.utf8.mo and b/locale/fr_FR.utf8/LC_MESSAGES/fr_FR.utf8.mo differ diff --git a/locale/fr_FR.utf8/LC_MESSAGES/fr_FR.utf8.po b/locale/fr_FR.utf8/LC_MESSAGES/fr_FR.utf8.po index 948a8356..e0ee574e 100644 --- a/locale/fr_FR.utf8/LC_MESSAGES/fr_FR.utf8.po +++ b/locale/fr_FR.utf8/LC_MESSAGES/fr_FR.utf8.po @@ -800,6 +800,9 @@ msgid "Someone just created a wallabag account for you on %1$s." msgstr "" "Quelqu'un vient juste de créer un compte wallabag pour vous à l'adresse %1$s." +msgid "You've just created a wallabag account on %1$s" +msgstr "Vous venez juste de vous créer un compte wallabag sur %1$s" + msgid "Your login is %1$s." msgstr "Votre identifiant is %1$s." -- cgit v1.2.3