]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
couple improvements, translations
authorThomas Citharel <tcit@tcit.fr>
Fri, 13 Feb 2015 18:39:48 +0000 (19:39 +0100)
committerThomas Citharel <tcit@tcit.fr>
Fri, 13 Feb 2015 18:39:48 +0000 (19:39 +0100)
inc/poche/Poche.class.php
inc/poche/Routing.class.php
inc/poche/config.inc.default.php
locale/en_US.utf8/LC_MESSAGES/en_US.utf8.mo
locale/en_US.utf8/LC_MESSAGES/en_US.utf8.po
locale/fr_FR.utf8/LC_MESSAGES/fr_FR.utf8.mo
locale/fr_FR.utf8/LC_MESSAGES/fr_FR.utf8.po

index cd7578e3401ad4966e6f74ac013b9714c8717f5b..a91a3f8f4fc1458f7336b223101bfbf86f58d606 100755 (executable)
@@ -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 <a href="?logout">logout ?</a>'), $newUsername));
+                if (\Session::isLogged()) {
+                    $this->messages->add('s', sprintf(_('The new user %s has been installed. Do you want to <a href="?logout">logout ?</a>'), $newUsername));
+                }
                 Tools::redirect();
                 }
                 else {
index e9b67771791c59ce1ffd0f4616da489b491a8e13..177b74d551ddeae17353fc9d21044a30718f4485 100755 (executable)
@@ -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'])) {
index e569dddd692c8c34e28f556fab120f50bf3309a4..7c27856db634c2297edbdc3d1c6ee3b9d82b98de 100755 (executable)
@@ -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');
index 025231250ebaa376d2b3c3a7a067d9351810e2be..4341e50e33572f944c10a8ea0371781ae9b7edf7 100644 (file)
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
index 75dad661e762ec1a88d4a30aaf2591b63a8f629d..37d926f1eae96a819d135fab0792679cbe26785a 100644 (file)
@@ -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."
 
index b3b2f6fed9ebafeba0bb90d7c8216628720f3ec4..1004c1a07d119063bafb8fb4b1f9e15ba045a168 100644 (file)
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
index 948a835643ddbe3bd9fa8ade5458a1cd2daa3960..e0ee574ed0be4b35a3f875fd0aefa343e87dc676 100644 (file)
@@ -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."