From cbdeb5249003967c195f240182c38674109f058b Mon Sep 17 00:00:00 2001 From: ghiamar <07Cf0264@Martin> Date: Mon, 28 Apr 2014 18:50:49 -0300 Subject: [PATCH 01/15] Readme known issues section added Readme typo correction Little Doctrine annotations imrpvement Little optimizations Added Role description Updated licence code --- LICENSE | 2 +- README.md | 3 ++ composer.json | 5 +++ data/SampleData.sql | 18 +++++--- src/CsnUser/Controller/AdminController.php | 21 ++++----- src/CsnUser/Entity/Language.php | 4 +- src/CsnUser/Entity/Question.php | 4 +- src/CsnUser/Entity/Role.php | 45 ++++++++++++++++--- src/CsnUser/Entity/State.php | 4 +- src/CsnUser/Entity/User.php | 6 +-- .../Service/Factory/UserFormFactory.php | 4 +- 11 files changed, 80 insertions(+), 36 deletions(-) diff --git a/LICENSE b/LICENSE index f957eb2..a369bab 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (C) 2013 Stoyan Cheresharov, Niko Vasilev, Stoyan Revov and Svetoslav Chonkov +Copyright (C) 2013 Stoyan Cheresharov, Niko Vasilev, Stoyan Revov, Svetoslav Chonkov and Martin Briglia Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, diff --git a/README.md b/README.md index a8637ad..7de12a8 100644 --- a/README.md +++ b/README.md @@ -110,4 +110,7 @@ Recommends - [coolcsn/CsnCms](https://github.com/coolcsn/CsnCms) - Content management system; +Known Issues +------------ +- **ZendDeveloperTools:** Enabling *ZendDeveloperTools* module makes Doctrine ORM Annotation Builder fail. You can enable ZendDeveloperTools, but for annotated form creation test, you need to disable it first or annotated forms will not render at all. diff --git a/composer.json b/composer.json index 588ca6e..c63e0cd 100644 --- a/composer.json +++ b/composer.json @@ -32,6 +32,11 @@ "email": "st.revov@gmail.com", "role": "Developer" } + { + "name": "Martin Briglia", + "email": "martin@mgscreativa.com", + "role": "Developer" + } ], "minimum-stability": "dev", "require": { diff --git a/data/SampleData.sql b/data/SampleData.sql index 8eaa0ae..2846cec 100644 --- a/data/SampleData.sql +++ b/data/SampleData.sql @@ -14,10 +14,10 @@ INSERT INTO `language` (`id`, `name`, `abbreviation`) VALUES -- Dumping data for table `role` -- -INSERT INTO `role` (`id`, `name`) VALUES -(1, 'Guest'), -(2, 'Member'), -(3, 'Admin'); +INSERT INTO `role` (`id`, `name`, `description`) VALUES +(1, 'Guest', 'Gest role for not logged users'), +(2, 'Member', 'Member role for logged in users'), +(3, 'Admin', 'Admin role for Administrator users'); -- -- Dumping data for table `roles_parents` @@ -38,9 +38,17 @@ INSERT INTO `question` (`id`, `question`) VALUES (4, 'In what city or town was your first job?'); -- --- Dumping data for table `questions` +-- Dumping data for table `state` -- INSERT INTO `state` (`id`, `state`) VALUES (1, 'Disabled'), (2, 'Enabled'); + +-- +-- Dumping data for table `user` +-- + +INSERT INTO `user` (`id`, `role_id`, `language_id`, `state_id`, `question_id`, `username`, `first_name`, `last_name`, `email`, `password`, `answer`, `picture`, `registration_date`, `registration_token`, `email_confirmed`) VALUES +(1, 3, 1, 2, 1, 'administrator', 'Admin', 'Istrator', 'admin@istrator.com', '$2y$10$GUKeGz/rLU74nVN85c5OveH02Ymiq7gxxYoNbU6anwbjG/gzW2z8W', 'who knows', NULL, NULL, NULL, 1); + diff --git a/src/CsnUser/Controller/AdminController.php b/src/CsnUser/Controller/AdminController.php index af2928f..a7f28ab 100755 --- a/src/CsnUser/Controller/AdminController.php +++ b/src/CsnUser/Controller/AdminController.php @@ -64,7 +64,7 @@ public function indexAction() } /** - * Create action + * Create user action * * Method to create an user * @@ -80,10 +80,9 @@ public function createUserAction() $user = new User; $form = $this->getUserFormHelper()->createUserForm($user, 'CreateUser'); - $request = $this->getRequest(); - if ($request->isPost()) { + if ($this->getRequest()->isPost()) { $form->setValidationGroup('username', 'email', 'firstName', 'lastName', 'password', 'passwordVerify', 'language', 'state', 'role', 'question', 'answer', 'csrf'); - $form->setData($request->getPost()); + $form->setData($this->getRequest()->getPost()); if ($form->isValid()) { $entityManager = $this->getEntityManager(); $user->setEmailConfirmed(false); @@ -112,7 +111,7 @@ public function createUserAction() } /** - * Edit action + * Edit user action * * Method to update an user * @@ -140,11 +139,10 @@ public function editUserAction() $form->setAttributes(array( 'action' => $this->url()->fromRoute('user-admin', array('action' => 'edit-user', 'id' => $id)), )); - - $request = $this->getRequest(); - if ($request->isPost()) { + + if ($this->getRequest()->isPost()) { $form->setValidationGroup('username', 'email', 'firstName', 'lastName', 'language', 'state', 'role', 'question', 'answer', 'csrf'); - $form->setData($request->getPost()); + $form->setData($this->getRequest()->getPost()); if ($form->isValid()) { $entityManager->persist($user); $entityManager->flush(); @@ -164,14 +162,13 @@ public function editUserAction() $viewModel = new ViewModel(array( 'form' => $form, - 'headerLabel' => $this->getTranslatorHelper()->translate('Edit User').' - '.$user->getDisplayName(), )); $viewModel->setTemplate('csn-user/admin/edit-user-form'); return $viewModel; } /** - * Delete action + * Delete user action * * Method to delete an user from his ID * @@ -210,7 +207,7 @@ public function deleteUserAction() } /** - * Disable action + * Disable user action * * Method to disable an user from his ID * diff --git a/src/CsnUser/Entity/Language.php b/src/CsnUser/Entity/Language.php index 53563ad..451cda5 100644 --- a/src/CsnUser/Entity/Language.php +++ b/src/CsnUser/Entity/Language.php @@ -17,10 +17,10 @@ use Doctrine\ORM\Mapping as ORM; /** - * Language + * Doctrine ORM implementation of Language entity * - * @ORM\Table(name="language") * @ORM\Entity + * @ORM\Table(name="`language`") */ class Language { diff --git a/src/CsnUser/Entity/Question.php b/src/CsnUser/Entity/Question.php index 46c9c9c..3a492e6 100644 --- a/src/CsnUser/Entity/Question.php +++ b/src/CsnUser/Entity/Question.php @@ -17,10 +17,10 @@ use Doctrine\ORM\Mapping as ORM; /** - * Questions + * Doctrine ORM implementation of Question entity * - * @ORM\Table(name="question") * @ORM\Entity + * @ORM\Table(name="`question`") */ class Question { diff --git a/src/CsnUser/Entity/Role.php b/src/CsnUser/Entity/Role.php index e60a663..29bcef5 100644 --- a/src/CsnUser/Entity/Role.php +++ b/src/CsnUser/Entity/Role.php @@ -19,10 +19,10 @@ use Doctrine\Common\Collections\Collection; /** - * Role + * Doctrine ORM implementation of Role entity * - * @ORM\Table(name="role") * @ORM\Entity + * @ORM\Table(name="`role`") */ class Role { @@ -31,6 +31,7 @@ class Role * * @ORM\Column(name="id", type="integer") * @ORM\Id + * @ORM\GeneratedValue(strategy="IDENTITY") */ protected $id; @@ -40,14 +41,21 @@ class Role * @ORM\Column(name="name", type="string", length=15, nullable=false) */ protected $name; + + /** + * @var string + * + * @ORM\Column(name="description", type="string", length=100, nullable=false) + */ + protected $roleDescription; /** - * @var Array + * @var Role * - * @ORM\ManyToMany(targetEntity="Role", cascade={"persist"}) + * @ORM\ManyToMany(targetEntity="CsnUser\Entity\Role", cascade={"persist"}) * @ORM\JoinTable(name="roles_parents", - * joinColumns={@ORM\JoinColumn(name="role_id", referencedColumnName="id")}, - * inverseJoinColumns={@ORM\JoinColumn(name="parent_id", referencedColumnName="id")} + * joinColumns={@ ORM\JoinColumn(name="role_id", referencedColumnName="id")}, + * inverseJoinColumns={@ ORM\JoinColumn(name="parent_id", referencedColumnName="id")} * ) */ protected $parents; @@ -90,10 +98,33 @@ public function getName() return $this->name; } + /** + * Set role description + * + * @param string $roleDescription + * @return Role + */ + public function setRoleDescription($roleDescription) + { + $this->roleDescription = $roleDescription; + + return $this; + } + + /** + * Get role description + * + * @return string + */ + public function getRoleDescription() + { + return $this->roleDescription; + } + /** * Set parents * - * @param Array $parent + * @param $parents * @return Role */ public function setParents($parents) diff --git a/src/CsnUser/Entity/State.php b/src/CsnUser/Entity/State.php index f3b05f2..c8d58db 100644 --- a/src/CsnUser/Entity/State.php +++ b/src/CsnUser/Entity/State.php @@ -17,10 +17,10 @@ use Doctrine\ORM\Mapping as ORM; /** - * State + * Doctrine ORM implementation of State entity * - * @ORM\Table(name="state") * @ORM\Entity + * @ORM\Table(name="`state`") */ class State { diff --git a/src/CsnUser/Entity/User.php b/src/CsnUser/Entity/User.php index 5804cd8..97c1703 100644 --- a/src/CsnUser/Entity/User.php +++ b/src/CsnUser/Entity/User.php @@ -34,7 +34,7 @@ class User /** * @var integer * - * @ORM\Column(name="id", type="integer") + * @ORM\Column(name="id", type="integer", nullable=false) * @ORM\Id * @ORM\GeneratedValue(strategy="IDENTITY") * @Annotation\Exclude() @@ -237,12 +237,12 @@ class User protected $emailConfirmed; /** - * @ORM\ManyToMany(targetEntity="User", mappedBy="myFriends") + * @ORM\ManyToMany(targetEntity="CsnUser\Entity\User", mappedBy="myFriends") **/ protected $friendsWithMe; /** - * @ORM\ManyToMany(targetEntity="User", inversedBy="friendsWithMe") + * @ORM\ManyToMany(targetEntity="CsnUser\Entity\User", inversedBy="friendsWithMe") * @ORM\JoinTable(name="friends", * joinColumns={@ORM\JoinColumn(name="user_id", referencedColumnName="id")}, * inverseJoinColumns={@ORM\JoinColumn(name="friend_id", referencedColumnName="id")} diff --git a/src/CsnUser/Service/Factory/UserFormFactory.php b/src/CsnUser/Service/Factory/UserFormFactory.php index 7c2d420..521d7d2 100644 --- a/src/CsnUser/Service/Factory/UserFormFactory.php +++ b/src/CsnUser/Service/Factory/UserFormFactory.php @@ -52,7 +52,7 @@ class UserFormFactory implements FactoryInterface protected $translatorHelper; /** - * @var Zend\Mvc\I18n\Translator + * @var Zend\Mvc\Controller\Plugin\Url */ protected $url; @@ -142,7 +142,7 @@ public function createUserForm($userEntity, $formName = 'LogIn') case 'EditUser': $this->form->setAttributes(array( - 'name' => 'register' + 'name' => 'edit-user' )); break; From 52f2e1b3af3ac16380e4b3c43281a88454ab2117 Mon Sep 17 00:00:00 2001 From: ghiamar <07Cf0264@Martin> Date: Mon, 28 Apr 2014 18:51:52 -0300 Subject: [PATCH 02/15] Readme typo correction --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7de12a8..3e27c59 100644 --- a/README.md +++ b/README.md @@ -85,7 +85,7 @@ The following routes are available: - **user** Welcome view. - **user/login** User login view. - **user/register** User register view. -- **user/register/reset-password** User resep password view. +- **user/register/reset-password** User reset password view. - **user/register/edit-profile** User edit profile view. - **user/register/change-password** User change password view. - **user/register/change-email** User change email view. From ec899ededc36fbc60303bd7d14941611d7a4bb92 Mon Sep 17 00:00:00 2001 From: ghiamar <07Cf0264@Martin> Date: Mon, 28 Apr 2014 18:53:09 -0300 Subject: [PATCH 03/15] Readme typo correction --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3e27c59..98659b3 100644 --- a/README.md +++ b/README.md @@ -112,5 +112,5 @@ Recommends Known Issues ------------ -- **ZendDeveloperTools:** Enabling *ZendDeveloperTools* module makes Doctrine ORM Annotation Builder fail. You can enable ZendDeveloperTools, but for annotated form creation test, you need to disable it first or annotated forms will not render at all. +- **ZendDeveloperTools:** Enabling *ZendDeveloperTools* module makes Doctrine ORM Annotation Builder fail. You can enable *ZendDeveloperTools*, but for annotated form creation test, you need to disable it first or annotated forms will not render at all. From 2c5cbcbcb656361774a4eff87c4d90a1a6f3ce84 Mon Sep 17 00:00:00 2001 From: ghiamar <07Cf0264@Martin> Date: Mon, 12 May 2014 13:00:21 -0300 Subject: [PATCH 04/15] Made some rework for compatibility with CsnAuthorization --- data/SampleData.sql | 17 +++------ src/CsnUser/Entity/Role.php | 38 +++++++++---------- src/CsnUser/Entity/User.php | 4 +- .../Service/Factory/UserFormFactory.php | 2 +- 4 files changed, 26 insertions(+), 35 deletions(-) diff --git a/data/SampleData.sql b/data/SampleData.sql index 2846cec..c678870 100644 --- a/data/SampleData.sql +++ b/data/SampleData.sql @@ -15,17 +15,10 @@ INSERT INTO `language` (`id`, `name`, `abbreviation`) VALUES -- INSERT INTO `role` (`id`, `name`, `description`) VALUES -(1, 'Guest', 'Gest role for not logged users'), -(2, 'Member', 'Member role for logged in users'), -(3, 'Admin', 'Admin role for Administrator users'); - --- --- Dumping data for table `roles_parents` --- - -INSERT INTO `roles_parents` (`role_id`, `parent_id`) VALUES -(2, 1), -(3, 2); +(1, 'Guest', 'This is the not logged in user role, should not be applyed to any user.'), +(2, 'User', 'Should get almost view permissions only, and maybe some create/edit permissions'), +(3, 'Manager', 'Manages everithing except deletions'), +(4, 'Admin', 'The super user, he can do anything'); -- -- Dumping data for table `questions` @@ -50,5 +43,5 @@ INSERT INTO `state` (`id`, `state`) VALUES -- INSERT INTO `user` (`id`, `role_id`, `language_id`, `state_id`, `question_id`, `username`, `first_name`, `last_name`, `email`, `password`, `answer`, `picture`, `registration_date`, `registration_token`, `email_confirmed`) VALUES -(1, 3, 1, 2, 1, 'administrator', 'Admin', 'Istrator', 'admin@istrator.com', '$2y$10$GUKeGz/rLU74nVN85c5OveH02Ymiq7gxxYoNbU6anwbjG/gzW2z8W', 'who knows', NULL, NULL, NULL, 1); +(1, 4, 1, 2, 1, 'administrator', 'Admin', 'Istrator', 'admin@istrator.com', '$2y$10$GUKeGz/rLU74nVN85c5OveH02Ymiq7gxxYoNbU6anwbjG/gzW2z8W', 'who knows', NULL, NULL, NULL, 1); diff --git a/src/CsnUser/Entity/Role.php b/src/CsnUser/Entity/Role.php index 29bcef5..2c1cdd2 100644 --- a/src/CsnUser/Entity/Role.php +++ b/src/CsnUser/Entity/Role.php @@ -16,7 +16,6 @@ use Doctrine\ORM\Mapping as ORM; use Doctrine\Common\Collections\ArrayCollection; -use Doctrine\Common\Collections\Collection; /** * Doctrine ORM implementation of Role entity @@ -38,7 +37,7 @@ class Role /** * @var string * - * @ORM\Column(name="name", type="string", length=15, nullable=false) + * @ORM\Column(name="name", type="string", length=30, nullable=false, unique=true) */ protected $name; @@ -50,19 +49,19 @@ class Role protected $roleDescription; /** - * @var Role - * - * @ORM\ManyToMany(targetEntity="CsnUser\Entity\Role", cascade={"persist"}) - * @ORM\JoinTable(name="roles_parents", - * joinColumns={@ ORM\JoinColumn(name="role_id", referencedColumnName="id")}, - * inverseJoinColumns={@ ORM\JoinColumn(name="parent_id", referencedColumnName="id")} - * ) + * @var Privilege + * @ORM\OneToMany(targetEntity="CsnAuthorization\Entity\Privilege", mappedBy="role", cascade={"persist", "remove"}, orphanRemoval=true) */ - protected $parents; + protected $privilege; + /** + * Construct + * + * Construct some referenced columns arrays + */ public function __construct() { - $this->parents = new ArrayCollection; + $this->privilege = new ArrayCollection; } /** @@ -122,26 +121,25 @@ public function getRoleDescription() } /** - * Set parents + * Set privilege * - * @param $parents + * @param $privilege * @return Role */ - public function setParents($parents) + public function setPrivilege($privilege) { - $this->parents = $parents; + $this->privilege = $privilege; return $this; } - + /** - * Get parents + * Get privilege * * @return Array */ - public function getParents() + public function getPrivilege() { - return $this->parents; + return $this->privilege; } - } diff --git a/src/CsnUser/Entity/User.php b/src/CsnUser/Entity/User.php index 97c1703..bc19f8c 100644 --- a/src/CsnUser/Entity/User.php +++ b/src/CsnUser/Entity/User.php @@ -14,11 +14,10 @@ namespace CsnUser\Entity; -use Doctrine\ORM\Mapping as ORM; use Zend\Form\Annotation; +use Doctrine\ORM\Mapping as ORM; use Doctrine\Common\Collections\ArrayCollection; -use Doctrine\Common\Collections\Collection; /** * Doctrine ORM implementation of User entity @@ -238,6 +237,7 @@ class User /** * @ORM\ManyToMany(targetEntity="CsnUser\Entity\User", mappedBy="myFriends") + * @Annotation\Exclude() **/ protected $friendsWithMe; diff --git a/src/CsnUser/Service/Factory/UserFormFactory.php b/src/CsnUser/Service/Factory/UserFormFactory.php index 521d7d2..f2de048 100644 --- a/src/CsnUser/Service/Factory/UserFormFactory.php +++ b/src/CsnUser/Service/Factory/UserFormFactory.php @@ -173,7 +173,7 @@ private function addCommonFields() 'type' => 'Zend\Form\Element\Csrf', 'options' => array( 'csrf_options' => array( - 'timeout' => 600 + 'timeout' => 600, ) ) )); From b5ba5d3f7a57cbd5aa66e9f55276a1cb6d8a84dc Mon Sep 17 00:00:00 2001 From: ghiamar <07Cf0264@Martin> Date: Mon, 12 May 2014 15:19:17 -0300 Subject: [PATCH 05/15] Minor CSS adjustments --- data/CsnUser.css | 5 +++++ view/csn-user/admin/index.phtml | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/data/CsnUser.css b/data/CsnUser.css index 28ca797..9557dce 100644 --- a/data/CsnUser.css +++ b/data/CsnUser.css @@ -20,6 +20,11 @@ table.users-list td, table.users-list th { text-align: center; } + +table.users-list td.name-column, +table.users-list td.email-column { + text-align: left; +} table.users-list a.name { color: #3389D1; diff --git a/view/csn-user/admin/index.phtml b/view/csn-user/admin/index.phtml index 02cd955..6f4a391 100644 --- a/view/csn-user/admin/index.phtml +++ b/view/csn-user/admin/index.phtml @@ -53,13 +53,13 @@ $flashMessenger = $this->flashMessenger() ?> getId(); ?> - + getFirstName() . ' ' . $user->getLastName() ?> (getRole()->getName()?>) - getEmail(); ?> + getEmail(); ?> translate($user->getState()->getState()) ?> From 0953e13da6b6f7c569342af779cdbcfde1eeecc2 Mon Sep 17 00:00:00 2001 From: ghiamar <07Cf0264@Martin> Date: Tue, 13 May 2014 13:20:40 -0300 Subject: [PATCH 06/15] Updated README.md --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 98659b3..d5746b5 100644 --- a/README.md +++ b/README.md @@ -53,6 +53,10 @@ CsnUser requires setting up a Connection for Doctrine, a simple Mail configurati 5. Append the contents of `./vendor/coolcsn/CsnUser/data/CsnUser.css` to APP_ROOT/public/css/styles.css or include `CsnUser.css` into your app. +Default User +------------ +CsnUser by default provides you with an admin user for you to test. Login woth this user using `administrator` as the username and `superadmin` as the password. + Options ------- From 5fcb8891fe9589046aeb451c36a56d233d9d64d4 Mon Sep 17 00:00:00 2001 From: ghiamar <07Cf0264@Martin> Date: Tue, 13 May 2014 13:32:50 -0300 Subject: [PATCH 07/15] Updated README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d5746b5..4a5bc6e 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,7 @@ CsnUser requires setting up a Connection for Doctrine, a simple Mail configurati Default User ------------ -CsnUser by default provides you with an admin user for you to test. Login woth this user using `administrator` as the username and `superadmin` as the password. +CsnUser by default provides you with an admin user for you to test. Login with this user using `administrator` as the username and `superadmin` as the password. Options ------- From dcb70cd3be7052c26bd9da59eb6dd964ad902640 Mon Sep 17 00:00:00 2001 From: ghiamar <07Cf0264@Martin> Date: Tue, 13 May 2014 19:53:50 -0300 Subject: [PATCH 08/15] Better cookie handling Added session lifetime option Moved rememberme element texts to login form Updated wrong SampleData --- config/csnuser.global.php.dist | 13 +++- config/module.config.php | 1 + data/SampleData.sql | 2 +- src/CsnUser/Controller/IndexController.php | 24 ++++-- src/CsnUser/Module.php | 24 ++++++ src/CsnUser/Options/ModuleOptions.php | 75 ++++++++++--------- .../Service/Factory/UserFormFactory.php | 10 ++- view/csn-user/index/login.phtml | 6 +- 8 files changed, 104 insertions(+), 51 deletions(-) diff --git a/config/csnuser.global.php.dist b/config/csnuser.global.php.dist index 0a64a0f..f64943d 100644 --- a/config/csnuser.global.php.dist +++ b/config/csnuser.global.php.dist @@ -67,7 +67,16 @@ return array( * Accepted values: int */ 'captcha_char_num' => 3, - + + /** + * Set max idle user time in minutes, used to logout user in case of + * inactivity. Dont set it too high! + * + * Default value: 15 + * Accepted values: int + */ + 'session_life_time' => 15, + /** * Visibility of exception details * @@ -79,4 +88,4 @@ return array( */ 'display_exceptions' => true, ), -); +); \ No newline at end of file diff --git a/config/module.config.php b/config/module.config.php index ad2a272..5449391 100644 --- a/config/module.config.php +++ b/config/module.config.php @@ -78,6 +78,7 @@ 'service_manager' => array ( 'factories' => array( 'Zend\Authentication\AuthenticationService' => 'CsnUser\Service\Factory\AuthenticationFactory', + 'Zend\Session\SessionManager' => 'Zend\Session\Service\SessionManagerFactory', 'mail.transport' => 'CsnUser\Service\Factory\MailTransportFactory', 'csnuser_module_options' => 'CsnUser\Service\Factory\ModuleOptionsFactory', 'csnuser_error_view' => 'CsnUser\Service\Factory\ErrorViewFactory', diff --git a/data/SampleData.sql b/data/SampleData.sql index c678870..2f9f7e5 100644 --- a/data/SampleData.sql +++ b/data/SampleData.sql @@ -43,5 +43,5 @@ INSERT INTO `state` (`id`, `state`) VALUES -- INSERT INTO `user` (`id`, `role_id`, `language_id`, `state_id`, `question_id`, `username`, `first_name`, `last_name`, `email`, `password`, `answer`, `picture`, `registration_date`, `registration_token`, `email_confirmed`) VALUES -(1, 4, 1, 2, 1, 'administrator', 'Admin', 'Istrator', 'admin@istrator.com', '$2y$10$GUKeGz/rLU74nVN85c5OveH02Ymiq7gxxYoNbU6anwbjG/gzW2z8W', 'who knows', NULL, NULL, NULL, 1); +(1, 4, 1, 2, 3, 'administrator', 'Admin', 'Istrator', 'admin@istrator.com', '$2y$10$GUKeGz/rLU74nVN85c5OveH02Ymiq7gxxYoNbU6anwbjG/gzW2z8W', 'who knows', NULL, NULL, NULL, 1); diff --git a/src/CsnUser/Controller/IndexController.php b/src/CsnUser/Controller/IndexController.php index 69bf6da..877758a 100644 --- a/src/CsnUser/Controller/IndexController.php +++ b/src/CsnUser/Controller/IndexController.php @@ -16,8 +16,6 @@ use Zend\Mvc\Controller\AbstractActionController; use Zend\View\Model\ViewModel; -use Zend\Session\SessionManager; -use Zend\Session\Config\StandardConfig; use CsnUser\Entity\User; use CsnUser\Options\ModuleOptions; @@ -75,7 +73,7 @@ public function loginAction() $user = new User; $form = $this->getUserFormHelper()->createUserForm($user, 'login'); $messages = null; - if ($this->getRequest()->isPost()) { + if($this->getRequest()->isPost()) { $form->setValidationGroup('usernameOrEmail', 'password', 'rememberme', 'csrf', 'captcha'); $form->setData($this->getRequest()->getPost()); if ($form->isValid()) { @@ -117,11 +115,21 @@ public function loginAction() $authService->getStorage()->write($identity); if ($this->params()->fromPost('rememberme')) { - $time = 1209600; // 14 days (1209600/3600 = 336 hours => 336/24 = 14 days) - $sessionManager = new SessionManager(); - $sessionManager->rememberMe($time); + $useCookies = true; + $cookieLifeTime = 14*24*60*60; + } else { + $useCookies = false; + $cookieLifeTime = 0; } + + $sessionLifeTime = $this->getOptions()->getSessionLifeTime(); + $sessionManager = $this->getServiceLocator()->get('Zend\Session\SessionManager'); + $sessionManager->getConfig()->setUseCookies($useCookies); + $sessionManager->getConfig()->setCookieHttpOnly(true); + $sessionManager->getConfig()->setCookieDomain($this->getRequest()->getUri()->getHost()); + $sessionManager->rememberMe(60*$sessionLifeTime); + return $this->redirect()->toRoute($this->getOptions()->getLoginRedirectRoute()); } @@ -156,6 +164,10 @@ public function loginAction() */ public function logoutAction() { + if (!$user = $this->identity()) { + return $this->redirect()->toRoute($this->getOptions()->getLoginRedirectRoute()); + } + $auth = $this->getServiceLocator()->get('Zend\Authentication\AuthenticationService'); if ($auth->hasIdentity()) { $auth->clearIdentity(); diff --git a/src/CsnUser/Module.php b/src/CsnUser/Module.php index 506b8e4..0067618 100644 --- a/src/CsnUser/Module.php +++ b/src/CsnUser/Module.php @@ -14,8 +14,32 @@ namespace CsnUser; +use Zend\Session\Container; +use Zend\Session\SessionManager; +use Zend\Session\Config\SessionConfig; +use Zend\EventManager\EventInterface; + class Module { + /*public function onBootstrap(EventInterface $event) + { + $serviceManager = $event->getApplication()->getServiceManager(); + $sessionLifeTime = $serviceManager->get('csnuser_module_options')->getSessionLifeTime(); + $host = $serviceManager->get('Request')->getUri()->getHost(); + + $sessionConfig = new SessionConfig(); + $sessionConfig->setOptions(array( + 'cookie_httponly' => true, + 'cookie_domain' => $host, + 'gc_maxlifetime' => 60*$sessionLifeTime, + 'remember_me_seconds' => 60*$sessionLifeTime, + )); + + $sessionManager = new SessionManager($sessionConfig); + $sessionManager->start(); + Container::setDefaultManager($sessionManager); + }*/ + public function getConfig() { return include __DIR__ . '/../../config/module.config.php'; diff --git a/src/CsnUser/Options/ModuleOptions.php b/src/CsnUser/Options/ModuleOptions.php index bc1f634..f09ae5a 100644 --- a/src/CsnUser/Options/ModuleOptions.php +++ b/src/CsnUser/Options/ModuleOptions.php @@ -44,17 +44,20 @@ class ModuleOptions extends AbstractOptions protected $navMenu = true; /** - * @var bool + * @var int */ - protected $displayExceptions = true; - protected $captchaCharNum = 3; /** - * @var string + * @var int */ - protected $authenticationService = 'doctrine.authenticationservice.orm_default'; + protected $sessionLifeTime = 15; + /** + * @var bool + */ + protected $displayExceptions = true; + /** * set login redirect route * @@ -148,72 +151,70 @@ public function getNavMenu() } /** - * set display exceptions + * set captcha number of characters * - * @param bool $displayExceptions - * @return ModuleOptions + * @return int */ - public function setDisplayExceptions($displayExceptions) + public function setCaptchaCharNum($captchaCharNum) { - $this->displayExceptions = $displayExceptions; - - return $this; + $this->captchaCharNum = $captchaCharNum; + + return $this->captchaCharNum; } /** - * get visibility of exception error messages + * get captcha number of characters * - * @return bool + * @return int */ - public function getDisplayExceptions() + public function getCaptchaCharNum() { - return $this->displayExceptions; + return $this->captchaCharNum; } /** - * set captcha number of characters + * set session life time * - * @return int + * @param bool $sessionLifeTime + * @return ModuleOptions */ - public function setCaptchaCharNum($captchaCharNum) + public function setSessionLifeTime($sessionLifeTime) { - $this->captchaCharNum = $captchaCharNum; - - return $this->captchaCharNum; + $this->displayExceptions = $sessionLifeTime; + + return $this; } /** - * get captcha number of characters + * get session life time * * @return int */ - public function getCaptchaCharNum() + public function getSessionLifeTime() { - return $this->captchaCharNum; + return $this->sessionLifeTime; } - /** - * set authentication service from config file + * set display exceptions * - * @param bool $authenticationService + * @param bool $displayExceptions * @return ModuleOptions */ - public function setAuthenticationService($authenticationService) + public function setDisplayExceptions($displayExceptions) { - $this->authenticationService = $authenticationService; - - return $this; + $this->displayExceptions = $displayExceptions; + + return $this; } /** - * get authentication service from config file + * get visibility of exception error messages * - * @return string + * @return bool */ - public function getAuthenticationService() + public function getDisplayExceptions() { - return $this->authenticationService; + return $this->displayExceptions; } - } diff --git a/src/CsnUser/Service/Factory/UserFormFactory.php b/src/CsnUser/Service/Factory/UserFormFactory.php index f2de048..ebe1822 100644 --- a/src/CsnUser/Service/Factory/UserFormFactory.php +++ b/src/CsnUser/Service/Factory/UserFormFactory.php @@ -216,7 +216,9 @@ private function addLoginFields() 'name' => 'rememberme', 'type' => 'Zend\Form\Element\Checkbox', 'options' => array( - 'label' => $this->getTranslatorHelper()->translate('Remember me?'), + 'use_hidden_element' => true, + 'checked_value' => '1', + 'unchecked_value' => '0' ), )); } @@ -352,10 +354,10 @@ private function addLoginFilters() ), 'validators' => array( array( - 'name' => 'InArray', + 'name' => 'Regex', 'options' => array( - 'haystack' => array('0', '1'), - ), + 'pattern' => '/^[0-1]{1}$/', + ), ), ) ))); diff --git a/view/csn-user/index/login.phtml b/view/csn-user/index/login.phtml index d95ff05..ac1abaf 100644 --- a/view/csn-user/index/login.phtml +++ b/view/csn-user/index/login.phtml @@ -37,9 +37,13 @@ $form->get('password')->setAttributes(array( )); $form->get('rememberme')->setAttributes(array( - //'class' => 'form-control input-lg', + 'title' => $this->translate('Activate Remember Me Function'), )); +$form->get('rememberme')->setOptions(array( + 'label' => $this->translate('Remember me?'), +)); + $form->get('captcha')->setAttributes(array( 'required' => 'true', 'class' => 'form-control input-lg', From 7849d5bdd5b8b1167a5c6c0744b320a05423c660 Mon Sep 17 00:00:00 2001 From: ghiamar <07Cf0264@Martin> Date: Tue, 13 May 2014 19:58:09 -0300 Subject: [PATCH 09/15] Corrected $sessionManager var to use service manager --- src/CsnUser/Controller/IndexController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CsnUser/Controller/IndexController.php b/src/CsnUser/Controller/IndexController.php index 877758a..88543cc 100644 --- a/src/CsnUser/Controller/IndexController.php +++ b/src/CsnUser/Controller/IndexController.php @@ -171,7 +171,7 @@ public function logoutAction() $auth = $this->getServiceLocator()->get('Zend\Authentication\AuthenticationService'); if ($auth->hasIdentity()) { $auth->clearIdentity(); - $sessionManager = new SessionManager(); + $sessionManager = $this->getServiceLocator()->get('Zend\Session\SessionManager'); $sessionManager->forgetMe(); } From 9ba7229dbb18c1ddfc763d37c5512ac138acbb09 Mon Sep 17 00:00:00 2001 From: ghiamar <07Cf0264@Martin> Date: Tue, 13 May 2014 20:26:13 -0300 Subject: [PATCH 10/15] Little Session Fixes --- src/CsnUser/Controller/IndexController.php | 9 +++------ src/CsnUser/Entity/User.php | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/CsnUser/Controller/IndexController.php b/src/CsnUser/Controller/IndexController.php index 88543cc..ba14e4a 100644 --- a/src/CsnUser/Controller/IndexController.php +++ b/src/CsnUser/Controller/IndexController.php @@ -116,19 +116,16 @@ public function loginAction() if ($this->params()->fromPost('rememberme')) { $useCookies = true; - $cookieLifeTime = 14*24*60*60; + $cookieLifeTime = 14 * 24 * 60 * 60; } else { $useCookies = false; $cookieLifeTime = 0; } - - $sessionLifeTime = $this->getOptions()->getSessionLifeTime(); $sessionManager = $this->getServiceLocator()->get('Zend\Session\SessionManager'); - $sessionManager->getConfig()->setUseCookies($useCookies); $sessionManager->getConfig()->setCookieHttpOnly(true); - $sessionManager->getConfig()->setCookieDomain($this->getRequest()->getUri()->getHost()); - $sessionManager->rememberMe(60*$sessionLifeTime); + $sessionManager->getConfig()->setRememberMeSeconds(60 * $this->getOptions()->getSessionLifeTime()); + $sessionManager->rememberMe($cookieLifeTime); return $this->redirect()->toRoute($this->getOptions()->getLoginRedirectRoute()); } diff --git a/src/CsnUser/Entity/User.php b/src/CsnUser/Entity/User.php index bc19f8c..10cc387 100644 --- a/src/CsnUser/Entity/User.php +++ b/src/CsnUser/Entity/User.php @@ -123,7 +123,7 @@ class User * @Annotation\Required(true) * @Annotation\Options({ * "required":"true", - * "empty_option": "User Role", + * "empty_option": "Select User Role", * "target_class":"CsnUser\Entity\Role", * "property": "name" * }) From e844431912666e84f4eaca7022fcb1dc645d115a Mon Sep 17 00:00:00 2001 From: ghiamar <07Cf0264@Martin> Date: Thu, 15 May 2014 19:33:51 -0300 Subject: [PATCH 11/15] Added route options to login/logout redirect route --- config/csnuser.global.php.dist | 24 +++++++- src/CsnUser/Controller/AdminController.php | 12 ++-- src/CsnUser/Controller/IndexController.php | 8 +-- .../Controller/RegistrationController.php | 12 ++-- src/CsnUser/Options/ModuleOptions.php | 56 +++++++++++++++++++ 5 files changed, 94 insertions(+), 18 deletions(-) diff --git a/config/csnuser.global.php.dist b/config/csnuser.global.php.dist index f64943d..9657468 100644 --- a/config/csnuser.global.php.dist +++ b/config/csnuser.global.php.dist @@ -23,22 +23,42 @@ return array( * * Upon successful login the user will be redirected to the entered route * - * Default value: 'user' + * Default value: 'user-index'' * Accepted values: A valid route name within your application * */ 'login_redirect_route' => 'user-index', + + /** + * Login Redirect Route Options + * + * Options for the login redirect route + * + * Default value: empty array + * Accepted values: array of accepted route options + */ + 'login_redirect_route_options' => array(), /** * Logout Redirect Route * * Upon logging out the user will be redirected to the enterd route * - * Default value: 'user' + * Default value: 'user-index'' * Accepted values: A valid route name within your application */ 'logout_redirect_route' => 'user-index', + /** + * Logout Redirect Route Options + * + * Options for the Logout Redirect Route + * + * Default value: empty array + * Accepted values: array of accepted route options + */ + 'logout_redirect_route_options' => array(), + /** * Sender email dadress * diff --git a/src/CsnUser/Controller/AdminController.php b/src/CsnUser/Controller/AdminController.php index a7f28ab..5cf954f 100755 --- a/src/CsnUser/Controller/AdminController.php +++ b/src/CsnUser/Controller/AdminController.php @@ -56,7 +56,7 @@ class AdminController extends AbstractActionController public function indexAction() { if(!$this->identity()) { - return $this->redirect()->toRoute($this->getOptions()->getLoginRedirectRoute()); + return $this->redirect()->toRoute($this->getOptions()->getLoginRedirectRoute(), $this->getOptions()->getLoginRedirectRouteOptions()); } $users = $this->getEntityManager()->getRepository('CsnUser\Entity\User')->findall(); @@ -73,7 +73,7 @@ public function indexAction() public function createUserAction() { if(!$this->identity()) { - return $this->redirect()->toRoute($this->getOptions()->getLoginRedirectRoute()); + return $this->redirect()->toRoute($this->getOptions()->getLoginRedirectRoute(), $this->getOptions()->getLoginRedirectRouteOptions()); } try { @@ -120,7 +120,7 @@ public function createUserAction() public function editUserAction() { if(!$this->identity()) { - return $this->redirect()->toRoute($this->getOptions()->getLoginRedirectRoute()); + return $this->redirect()->toRoute($this->getOptions()->getLoginRedirectRoute(), $this->getOptions()->getLoginRedirectRouteOptions()); } try { @@ -177,7 +177,7 @@ public function editUserAction() public function deleteUserAction() { if(!$this->identity()) { - return $this->redirect()->toRoute($this->getOptions()->getLoginRedirectRoute()); + return $this->redirect()->toRoute($this->getOptions()->getLoginRedirectRoute(), $this->getOptions()->getLoginRedirectRouteOptions()); } $id = (int) $this->params()->fromRoute('id', 0); @@ -216,7 +216,7 @@ public function deleteUserAction() public function setUserStateAction() { if(!$this->identity()) { - return $this->redirect()->toRoute($this->getOptions()->getLoginRedirectRoute()); + return $this->redirect()->toRoute($this->getOptions()->getLoginRedirectRoute(), $this->getOptions()->getLoginRedirectRouteOptions()); } $id = (int) $this->params()->fromRoute('id', 0); @@ -302,4 +302,4 @@ private function getUserFormHelper() return $this->userFormHelper; } -} \ No newline at end of file +} diff --git a/src/CsnUser/Controller/IndexController.php b/src/CsnUser/Controller/IndexController.php index ba14e4a..f905de3 100644 --- a/src/CsnUser/Controller/IndexController.php +++ b/src/CsnUser/Controller/IndexController.php @@ -67,7 +67,7 @@ public function indexAction() public function loginAction() { if ($user = $this->identity()) { - return $this->redirect()->toRoute($this->getOptions()->getLoginRedirectRoute()); + return $this->redirect()->toRoute($this->getOptions()->getLoginRedirectRoute(), $this->getOptions()->getLoginRedirectRouteOptions()); } $user = new User; @@ -127,7 +127,7 @@ public function loginAction() $sessionManager->getConfig()->setRememberMeSeconds(60 * $this->getOptions()->getSessionLifeTime()); $sessionManager->rememberMe($cookieLifeTime); - return $this->redirect()->toRoute($this->getOptions()->getLoginRedirectRoute()); + return $this->redirect()->toRoute($this->getOptions()->getLoginRedirectRoute(), $this->getOptions()->getLoginRedirectRouteOptions()); } foreach ($authResult->getMessages() as $message) { @@ -162,7 +162,7 @@ public function loginAction() public function logoutAction() { if (!$user = $this->identity()) { - return $this->redirect()->toRoute($this->getOptions()->getLoginRedirectRoute()); + return $this->redirect()->toRoute($this->getOptions()->getLoginRedirectRoute(), $this->getOptions()->getLoginRedirectRouteOptions()); } $auth = $this->getServiceLocator()->get('Zend\Authentication\AuthenticationService'); @@ -172,7 +172,7 @@ public function logoutAction() $sessionManager->forgetMe(); } - return $this->redirect()->toRoute($this->getOptions()->getLogoutRedirectRoute()); + return $this->redirect()->toRoute($this->getOptions()->getLogoutRedirectRoute(), $this->getOptions()->getLogoutRedirectRouteOptions()); } /** diff --git a/src/CsnUser/Controller/RegistrationController.php b/src/CsnUser/Controller/RegistrationController.php index a13c7df..6cd375b 100644 --- a/src/CsnUser/Controller/RegistrationController.php +++ b/src/CsnUser/Controller/RegistrationController.php @@ -58,7 +58,7 @@ class RegistrationController extends AbstractActionController public function indexAction() { if($this->identity()) { - return $this->redirect()->toRoute($this->getOptions()->getLoginRedirectRoute()); + return $this->redirect()->toRoute($this->getOptions()->getLoginRedirectRoute(), $this->getOptions()->getLoginRedirectRouteOptions()); } $user = new User; @@ -121,7 +121,7 @@ public function indexAction() public function editProfileAction() { if(!$user = $this->identity()) { - return $this->redirect()->toRoute($this->getOptions()->getLoginRedirectRoute()); + return $this->redirect()->toRoute($this->getOptions()->getLoginRedirectRoute(), $this->getOptions()->getLoginRedirectRouteOptions()); } $form = $this->getUserFormHelper()->createUserForm($user, 'EditProfile'); @@ -165,7 +165,7 @@ public function editProfileAction() public function changePasswordAction() { if(!$user = $this->identity()) { - return $this->redirect()->toRoute($this->getOptions()->getLoginRedirectRoute()); + return $this->redirect()->toRoute($this->getOptions()->getLoginRedirectRoute(), $this->getOptions()->getLoginRedirectRouteOptions()); } $form = $this->getUserFormHelper()->createUserForm($user, 'ChangePassword'); @@ -205,7 +205,7 @@ public function changePasswordAction() public function resetPasswordAction() { if($user = $this->identity()) { - return $this->redirect()->toRoute($this->getOptions()->getLoginRedirectRoute()); + return $this->redirect()->toRoute($this->getOptions()->getLoginRedirectRoute(), $this->getOptions()->getLoginRedirectRouteOptions()); } $user = new User; @@ -267,7 +267,7 @@ public function resetPasswordAction() public function changeEmailAction() { if(!$user = $this->identity()) { - return $this->redirect()->toRoute($this->getOptions()->getLoginRedirectRoute()); + return $this->redirect()->toRoute($this->getOptions()->getLoginRedirectRoute(), $this->getOptions()->getLoginRedirectRouteOptions()); } $form = $this->getUserFormHelper()->createUserForm($user, 'ChangeEmail'); @@ -311,7 +311,7 @@ public function changeEmailAction() public function changeSecurityQuestionAction() { if(!$user = $this->identity()) { - return $this->redirect()->toRoute($this->getOptions()->getLoginRedirectRoute()); + return $this->redirect()->toRoute($this->getOptions()->getLoginRedirectRoute(), $this->getOptions()->getLoginRedirectRouteOptions()); } $form = $this->getUserFormHelper()->createUserForm($user, 'ChangeSecurityQuestion'); diff --git a/src/CsnUser/Options/ModuleOptions.php b/src/CsnUser/Options/ModuleOptions.php index f09ae5a..b9ffc93 100644 --- a/src/CsnUser/Options/ModuleOptions.php +++ b/src/CsnUser/Options/ModuleOptions.php @@ -27,11 +27,21 @@ class ModuleOptions extends AbstractOptions * @var string */ protected $loginRedirectRoute = 'user'; + + /** + * @var array + */ + protected $loginRedirectRouteOptions = array(); /** * @var string */ protected $logoutRedirectRoute = 'user'; + + /** + * @var array + */ + protected $logoutRedirectRouteOptions = array(); /** * @var string @@ -80,6 +90,29 @@ public function getLoginRedirectRoute() { return $this->loginRedirectRoute; } + + /** + * set login redirect route options + * + * @param array $loginRedirectRouteOptions + * @return ModuleOptions + */ + public function setLoginRedirectRouteOptions($loginRedirectRouteOptions) + { + $this->loginRedirectRouteOptions = $loginRedirectRouteOptions; + + return $this; + } + + /** + * get login redirect route options + * + * @return array + */ + public function getLoginRedirectRouteOptions() + { + return $this->loginRedirectRouteOptions; + } /** * set logout redirect route @@ -103,6 +136,29 @@ public function getLogoutRedirectRoute() { return $this->logoutRedirectRoute; } + + /** + * set logout redirect route options + * + * @param array $logoutRedirectRouteOptions + * @return ModuleOptions + */ + public function setLogoutRedirectRouteOptions($logoutRedirectRouteOptions) + { + $this->logoutRedirectRouteOptions = $logoutRedirectRouteOptions; + + return $this; + } + + /** + * get logout redirect route options + * + * @return array + */ + public function getLogoutRedirectRouteOptions() + { + return $this->logoutRedirectRouteOptions; + } /** * set sender email address From 0d9231e680aa7f1698472196ca7c6718dd3553fb Mon Sep 17 00:00:00 2001 From: ghiamar <07Cf0264@Martin> Date: Fri, 16 May 2014 14:57:13 -0300 Subject: [PATCH 12/15] Added language file --- language/en_US.mo | Bin 0 -> 459 bytes language/en_US.po | 431 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 431 insertions(+) create mode 100644 language/en_US.mo create mode 100644 language/en_US.po diff --git a/language/en_US.mo b/language/en_US.mo new file mode 100644 index 0000000000000000000000000000000000000000..c75b51ca33258ab7a453c528f928ab0b3b98b862 GIT binary patch literal 459 zcmZvX&rZWI48}ol>X9>t95~|AvJREj8Beg4_o{odl*X6>^MSUapkR#P$Si-)KDHq53{qu(fZFf8DajFnm?qHopI zlJU~}4El!9@h@DXqeL7BVFW=J!V?ijNfblS2?7S;fflma{+H`^*4zlKgUq0^6*_Ga zF-GI05@r8h!VzGF#{5!M_~>xx5qucpm zvB`4IX&rsKqj`l=or!#g#*(|3W;YPGTodM%3=CAR3#rOP#4pl$PjE|$%sOSNsgO>D ze%Ft9vTosymLJ*_b|kH1tG}zL1$t;{j&7C+e{(=0NIg#{Ei@rC`7C7&0tS6=>laVI Bg_HmQ literal 0 HcmV?d00001 diff --git a/language/en_US.po b/language/en_US.po new file mode 100644 index 0000000..5c19c2f --- /dev/null +++ b/language/en_US.po @@ -0,0 +1,431 @@ +msgid "" +msgstr "" +"Project-Id-Version: CsnUser\n" +"POT-Creation-Date: 2014-05-16 14:48-0300\n" +"PO-Revision-Date: 2014-05-16 14:53-0300\n" +"Last-Translator: Martin Briglia \n" +"Language-Team: CoolCsn\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 1.5.4\n" +"X-Poedit-KeywordsList: translate\n" +"X-Poedit-Basepath: .\n" +"Language: en_US\n" +"X-Poedit-SearchPath-0: ..\n" + +#: /home/martin/workspace/zf2csn/module/CsnUser/src/CsnUser/Service/Factory/UserFormFactory.php:250 +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/registration.phtml:83 +msgid "Sign In" +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/src/CsnUser/Service/Factory/UserFormFactory.php:379 +msgid "This username is already taken" +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/src/CsnUser/Service/Factory/UserFormFactory.php:389 +#: /home/martin/workspace/zf2csn/module/CsnUser/src/CsnUser/Service/Factory/UserFormFactory.php:468 +msgid "An user with this email already exists" +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/src/CsnUser/Controller/IndexController.php:92 +#: /home/martin/workspace/zf2csn/module/CsnUser/src/CsnUser/Controller/IndexController.php:102 +#: /home/martin/workspace/zf2csn/module/CsnUser/src/CsnUser/Controller/IndexController.php:148 +msgid "Your authentication credentials are not valid" +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/src/CsnUser/Controller/IndexController.php:100 +msgid "Your username is disabled. Please contact an administrator." +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/src/CsnUser/Controller/IndexController.php:138 +msgid "Something went wrong during login! Please, try again later." +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/src/CsnUser/Controller/RegistrationController.php:83 +msgid "Please, confirm your registration!" +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/src/CsnUser/Controller/RegistrationController.php:84 +#, php-format +msgid "Please, click the link to confirm your registration => %s" +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/src/CsnUser/Controller/RegistrationController.php:97 +#: /home/martin/workspace/zf2csn/module/CsnUser/src/CsnUser/Controller/RegistrationController.php:245 +msgid "" +"Something went wrong when trying to send activation email! Please, try again " +"later." +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/src/CsnUser/Controller/RegistrationController.php:144 +msgid "Your profile has been edited" +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/src/CsnUser/Controller/RegistrationController.php:190 +msgid "Your answer is wrong. Please provide the correct answer." +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/src/CsnUser/Controller/RegistrationController.php:230 +msgid "Please, confirm your request to change password!" +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/src/CsnUser/Controller/RegistrationController.php:231 +#, php-format +msgid "" +"Hi, %s. Please, follow this link %s to confirm your request to change " +"password." +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/src/CsnUser/Controller/RegistrationController.php:296 +msgid "Your current password is not correct." +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/src/CsnUser/Controller/RegistrationController.php:336 +msgid "Your password is wrong. Please provide the correct password." +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/src/CsnUser/Controller/RegistrationController.php:373 +msgid "" +"Something went wrong during the activation of your account! Please, try " +"again later." +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/src/CsnUser/Controller/RegistrationController.php:402 +#, php-format +msgid "" +"Hello again %s. Your new password is: %s. Please, follow this link %s to log " +"in with your new password." +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/src/CsnUser/Controller/RegistrationController.php:418 +msgid "" +"An error occured during the confirmation of your password change! Please, " +"try again later." +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/src/CsnUser/Controller/AdminController.php:94 +msgid "User created Successfully" +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/src/CsnUser/Controller/AdminController.php:101 +msgid "Something went wrong during user creation! Please, try again later." +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/src/CsnUser/Controller/AdminController.php:130 +#: /home/martin/workspace/zf2csn/module/CsnUser/src/CsnUser/Controller/AdminController.php:186 +msgid "User ID invalid" +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/src/CsnUser/Controller/AdminController.php:149 +#: /home/martin/workspace/zf2csn/module/CsnUser/src/CsnUser/Controller/AdminController.php:236 +msgid "User Updated Successfully" +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/src/CsnUser/Controller/AdminController.php:156 +msgid "" +"Something went wrong during update user process! Please, try again later." +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/src/CsnUser/Controller/AdminController.php:195 +msgid "User Deleted Successfully" +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/src/CsnUser/Controller/AdminController.php:199 +#: /home/martin/workspace/zf2csn/module/CsnUser/src/CsnUser/Controller/AdminController.php:240 +msgid "" +"Something went wrong during user delete process! Please, try again later." +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/src/CsnUser/Controller/AdminController.php:226 +msgid "User ID or state invalid" +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/layout/nav-menu.phtml:18 +msgid "User Home" +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/layout/nav-menu.phtml:21 +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/edit-profile.phtml:54 +msgid "Edit Profile" +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/layout/nav-menu.phtml:24 +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/index/index.phtml:28 +msgid "Log Out" +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/layout/nav-menu.phtml:29 +msgid "Log in" +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/layout/nav-menu.phtml:32 +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/registration.phtml:78 +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/registration.phtml:89 +msgid "Sign Up" +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/layout/nav-menu.phtml:35 +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/reset-password.phtml:48 +msgid "Reset Password" +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/confirm-email-success.phtml:21 +msgid "Thank you! Your registration has been confirmed." +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/registration.phtml:31 +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/admin/edit-user-form.phtml:30 +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/admin/new-user-form.phtml:30 +msgid "Username" +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/registration.phtml:37 +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/edit-profile.phtml:32 +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/admin/edit-user-form.phtml:36 +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/admin/new-user-form.phtml:36 +msgid "First Name" +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/registration.phtml:43 +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/edit-profile.phtml:38 +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/admin/edit-user-form.phtml:42 +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/admin/new-user-form.phtml:42 +msgid "Last Name" +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/registration.phtml:48 +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/edit-profile.phtml:75 +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/admin/edit-user-form.phtml:48 +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/admin/new-user-form.phtml:48 +msgid "Your Email" +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/registration.phtml:53 +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/index/login.phtml:36 +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/admin/new-user-form.phtml:53 +msgid "Password" +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/registration.phtml:58 +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/admin/new-user-form.phtml:58 +msgid "Confirm Password" +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/registration.phtml:67 +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/admin/edit-user-form.phtml:74 +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/admin/new-user-form.phtml:84 +msgid "Type Your Answer" +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/registration.phtml:73 +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/reset-password.phtml:37 +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/index/login.phtml:50 +msgid "Verify you are human" +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/confirm-email-change-password.phtml:21 +#, php-format +msgid "" +"Confirmation successful! You have a new password. An email has been sent to " +"%s with your new password." +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/change-email-success.phtml:21 +msgid "Thank you! Your email has been changed to " +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/password-change-success.phtml:21 +#, php-format +msgid "" +"An email has been sent to %s. Please, check " +"your inbox and confirm your request to change password!" +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/change-security-question-success.phtml:21 +msgid "Thank you! Your security question has been changed" +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/change-password-success.phtml:21 +msgid "Thank you! Your password has been changed successfully." +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/change-password.phtml:31 +msgid "Confirm New Password" +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/change-password.phtml:36 +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/change-password.phtml:42 +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/edit-profile.phtml:71 +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/admin/edit-user-form.phtml:121 +msgid "Change Password" +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/change-password.phtml:53 +msgid "Security Question" +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/change-password.phtml:57 +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/change-security-question.phtml:63 +msgid "Security Answer" +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/change-password.phtml:62 +msgid "New Password" +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/reset-password.phtml:31 +msgid "Write Your Username or Email" +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/reset-password.phtml:42 +msgid "Send Reset Email" +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/change-security-question.phtml:36 +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/change-security-question.phtml:42 +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/edit-profile.phtml:87 +msgid "Change Security Question" +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/change-security-question.phtml:52 +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/change-email.phtml:57 +msgid "Current Password" +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/change-email.phtml:31 +msgid "New Email" +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/change-email.phtml:36 +msgid "Confirm New Email" +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/change-email.phtml:41 +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/change-email.phtml:47 +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/edit-profile.phtml:79 +msgid "Change Email" +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/registration-success.phtml:21 +#, php-format +msgid "" +"An email has been sent to %s. Please, check " +"your inbox and confirm your registration!" +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/edit-profile.phtml:48 +msgid "Update Profile" +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/edit-profile.phtml:65 +msgid "Your Username" +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/edit-profile.phtml:68 +msgid "Your Password" +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/edit-profile.phtml:83 +msgid "Your Security Question" +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/edit-profile.phtml:91 +msgid "Your First/Last Name" +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/edit-profile.phtml:109 +msgid "Your Language" +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/index/login.phtml:31 +msgid "Username or Email" +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/index/login.phtml:40 +msgid "Activate Remember Me Function" +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/index/login.phtml:44 +msgid "Remember me?" +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/index/login.phtml:55 +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/index/login.phtml:61 +msgid "Log In" +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/index/login.phtml:105 +msgid "Sign up" +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/index/login.phtml:108 +msgid "Forgot your password?" +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/index/index.phtml:22 +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/index/index.phtml:35 +msgid "Welcome" +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/index/index.phtml:32 +msgid "Congratulations! You have successfully logged in." +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/index/index.phtml:35 +msgid "Guest" +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/index/index.phtml:37 +msgid "Please follow the buttons at the top to navigate through the system." +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/admin/edit-user-form.phtml:79 +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/admin/edit-user-form.phtml:86 +msgid "Edit User" +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/admin/new-user-form.phtml:89 +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/admin/index.phtml:37 +msgid "Create User" +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/admin/new-user-form.phtml:96 +msgid "New User" +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/admin/index.phtml:34 +msgid "Users Admin Table" +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/admin/index.phtml:45 +msgid "Name" +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/admin/index.phtml:46 +msgid "Email" +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/admin/index.phtml:47 +msgid "State" +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/admin/index.phtml:48 +msgid "Actions" +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/admin/index.phtml:68 +msgid "Enable" +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/admin/index.phtml:71 +msgid "Edit" +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/admin/index.phtml:73 +msgid "Do you really want to delete this user?" +msgstr "" + +#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/admin/index.phtml:74 +msgid "Delete" +msgstr "" From f4745ebb7d3b8785e2717c58d1c5e1a211197ca8 Mon Sep 17 00:00:00 2001 From: ghiamar <07Cf0264@Martin> Date: Fri, 16 May 2014 20:28:52 -0300 Subject: [PATCH 13/15] Updated README.md with translation instructions Added text domain for translations --- src/CsnUser/Controller/AdminController.php | 22 ++++++++-------- src/CsnUser/Controller/IndexController.php | 10 +++---- .../Controller/RegistrationController.php | 26 +++++++++---------- .../Service/Factory/UserFormFactory.php | 8 +++--- view/csn-user/admin/edit-user-form.phtml | 16 ++++++------ view/csn-user/admin/index.phtml | 22 ++++++++-------- view/csn-user/admin/new-user-form.phtml | 18 ++++++------- view/csn-user/index/index.phtml | 10 +++---- view/csn-user/index/login.phtml | 18 ++++++------- view/csn-user/layout/nav-menu.phtml | 12 ++++----- .../registration/change-email-success.phtml | 2 +- view/csn-user/registration/change-email.phtml | 10 +++---- .../change-password-success.phtml | 2 +- .../registration/change-password.phtml | 12 ++++----- .../change-security-question-success.phtml | 2 +- .../change-security-question.phtml | 8 +++--- .../confirm-email-change-password.phtml | 2 +- .../registration/confirm-email-success.phtml | 2 +- view/csn-user/registration/edit-profile.phtml | 26 +++++++++---------- .../password-change-success.phtml | 2 +- .../registration/registration-success.phtml | 2 +- view/csn-user/registration/registration.phtml | 22 ++++++++-------- .../registration/reset-password.phtml | 8 +++--- 23 files changed, 131 insertions(+), 131 deletions(-) diff --git a/src/CsnUser/Controller/AdminController.php b/src/CsnUser/Controller/AdminController.php index 5cf954f..38b1df0 100755 --- a/src/CsnUser/Controller/AdminController.php +++ b/src/CsnUser/Controller/AdminController.php @@ -91,14 +91,14 @@ public function createUserAction() $user->setPassword(UserCredentialsService::encryptPassword($user->getPassword())); $entityManager->persist($user); $entityManager->flush(); - $this->flashMessenger()->addSuccessMessage($this->getTranslatorHelper()->translate('User created Successfully')); + $this->flashMessenger()->addSuccessMessage($this->getTranslatorHelper()->translate('User created Successfully', 'csnuser')); return $this->redirect()->toRoute('user-admin'); } } } catch (\Exception $e) { return $this->getServiceLocator()->get('csnuser_error_view')->createErrorView( - $this->getTranslatorHelper()->translate('Something went wrong during user creation! Please, try again later.'), + $this->getTranslatorHelper()->translate('Something went wrong during user creation! Please, try again later.', 'csnuser'), $e, $this->getOptions()->getDisplayExceptions(), false @@ -127,7 +127,7 @@ public function editUserAction() $id = (int) $this->params()->fromRoute('id', 0); if ($id == 0) { - $this->flashMessenger()->addErrorMessage($this->getTranslatorHelper()->translate('User ID invalid')); + $this->flashMessenger()->addErrorMessage($this->getTranslatorHelper()->translate('User ID invalid', 'csnuser')); return $this->redirect()->toRoute('user-admin'); } @@ -146,14 +146,14 @@ public function editUserAction() if ($form->isValid()) { $entityManager->persist($user); $entityManager->flush(); - $this->flashMessenger()->addSuccessMessage($this->getTranslatorHelper()->translate('User Updated Successfully')); + $this->flashMessenger()->addSuccessMessage($this->getTranslatorHelper()->translate('User Updated Successfully', 'csnuser')); return $this->redirect()->toRoute('user-admin'); } } } catch (\Exception $e) { return $this->getServiceLocator()->get('csnuser_error_view')->createErrorView( - $this->getTranslatorHelper()->translate('Something went wrong during update user process! Please, try again later.'), + $this->getTranslatorHelper()->translate('Something went wrong during update user process! Please, try again later.', 'csnuser'), $e, $this->getOptions()->getDisplayExceptions(), false @@ -183,7 +183,7 @@ public function deleteUserAction() $id = (int) $this->params()->fromRoute('id', 0); if ($id == 0) { - $this->flashMessenger()->addErrorMessage($this->getTranslatorHelper()->translate('User ID invalid')); + $this->flashMessenger()->addErrorMessage($this->getTranslatorHelper()->translate('User ID invalid', 'csnuser')); return $this->redirect()->toRoute('user-admin'); } @@ -192,11 +192,11 @@ public function deleteUserAction() $user = $entityManager->getRepository('CsnUser\Entity\User')->find($id); $entityManager->remove($user); $entityManager->flush(); - $this->flashMessenger()->addSuccessMessage($this->getTranslatorHelper()->translate('User Deleted Successfully')); + $this->flashMessenger()->addSuccessMessage($this->getTranslatorHelper()->translate('User Deleted Successfully', 'csnuser')); } catch (\Exception $e) { return $this->getServiceLocator()->get('csnuser_error_view')->createErrorView( - $this->getTranslatorHelper()->translate('Something went wrong during user delete process! Please, try again later.'), + $this->getTranslatorHelper()->translate('Something went wrong during user delete process! Please, try again later.', 'csnuser'), $e, $this->getOptions()->getDisplayExceptions(), false @@ -223,7 +223,7 @@ public function setUserStateAction() $state = (int) $this->params()->fromRoute('state', -1); if ($id === 0 || $state === -1) { - $this->flashMessenger()->addErrorMessage($this->getTranslatorHelper()->translate('User ID or state invalid')); + $this->flashMessenger()->addErrorMessage($this->getTranslatorHelper()->translate('User ID or state invalid', 'csnuser')); return $this->redirect()->toRoute('user-admin'); } @@ -233,11 +233,11 @@ public function setUserStateAction() $user->setState($entityManager->find('CsnUser\Entity\State', $state)); $entityManager->persist($user); $entityManager->flush(); - $this->flashMessenger()->addSuccessMessage($this->getTranslatorHelper()->translate('User Updated Successfully')); + $this->flashMessenger()->addSuccessMessage($this->getTranslatorHelper()->translate('User Updated Successfully', 'csnuser')); } catch (\Exception $e) { return $this->getServiceLocator()->get('csnuser_error_view')->createErrorView( - $this->getTranslatorHelper()->translate('Something went wrong during user delete process! Please, try again later.'), + $this->getTranslatorHelper()->translate('Something went wrong during user delete process! Please, try again later.', 'csnuser'), $e, $this->getOptions()->getDisplayExceptions(), false diff --git a/src/CsnUser/Controller/IndexController.php b/src/CsnUser/Controller/IndexController.php index f905de3..208aa47 100644 --- a/src/CsnUser/Controller/IndexController.php +++ b/src/CsnUser/Controller/IndexController.php @@ -89,7 +89,7 @@ public function loginAction() if(!isset($user)) { $message = 'The username or email is not valid!'; return new ViewModel(array( - 'error' => $this->getTranslatorHelper()->translate('Your authentication credentials are not valid'), + 'error' => $this->getTranslatorHelper()->translate('Your authentication credentials are not valid', 'csnuser'), 'form' => $form, 'messages' => $messages, 'navMenu' => $this->getOptions()->getNavMenu() @@ -97,9 +97,9 @@ public function loginAction() } if($user->getState()->getId() < 2) { - $messages = $this->getTranslatorHelper()->translate('Your username is disabled. Please contact an administrator.'); + $messages = $this->getTranslatorHelper()->translate('Your username is disabled. Please contact an administrator.', 'csnuser'); return new ViewModel(array( - 'error' => $this->getTranslatorHelper()->translate('Your authentication credentials are not valid'), + 'error' => $this->getTranslatorHelper()->translate('Your authentication credentials are not valid', 'csnuser'), 'form' => $form, 'messages' => $messages, 'navMenu' => $this->getOptions()->getNavMenu() @@ -135,7 +135,7 @@ public function loginAction() } } catch (\Exception $e) { return $this->getServiceLocator()->get('csnuser_error_view')->createErrorView( - $this->getTranslatorHelper()->translate('Something went wrong during login! Please, try again later.'), + $this->getTranslatorHelper()->translate('Something went wrong during login! Please, try again later.', 'csnuser'), $e, $this->getOptions()->getDisplayExceptions(), $this->getOptions()->getNavMenu() @@ -145,7 +145,7 @@ public function loginAction() } return new ViewModel(array( - 'error' => $this->getTranslatorHelper()->translate('Your authentication credentials are not valid'), + 'error' => $this->getTranslatorHelper()->translate('Your authentication credentials are not valid', 'csnuser'), 'form' => $form, 'messages' => $messages, 'navMenu' => $this->getOptions()->getNavMenu() diff --git a/src/CsnUser/Controller/RegistrationController.php b/src/CsnUser/Controller/RegistrationController.php index 6cd375b..8d25279 100644 --- a/src/CsnUser/Controller/RegistrationController.php +++ b/src/CsnUser/Controller/RegistrationController.php @@ -80,8 +80,8 @@ public function indexAction() $fullLink = $this->getBaseUrl() . $this->url()->fromRoute('user-register', array('action' => 'confirm-email', 'id' => $user->getRegistrationToken())); $this->sendEmail( $user->getEmail(), - $this->getTranslatorHelper()->translate('Please, confirm your registration!'), - sprintf($this->getTranslatorHelper()->translate('Please, click the link to confirm your registration => %s'), $fullLink) + $this->getTranslatorHelper()->translate('Please, confirm your registration!', 'csnuser'), + sprintf($this->getTranslatorHelper()->translate('Please, click the link to confirm your registration => %s', 'csnuser'), $fullLink) ); $entityManager->persist($user); $entityManager->flush(); @@ -94,7 +94,7 @@ public function indexAction() return $viewModel; } catch (\Exception $e) { return $this->getServiceLocator()->get('csnuser_error_view')->createErrorView( - $this->getTranslatorHelper()->translate('Something went wrong when trying to send activation email! Please, try again later.'), + $this->getTranslatorHelper()->translate('Something went wrong when trying to send activation email! Please, try again later.', 'csnuser'), $e, $this->getOptions()->getDisplayExceptions(), $this->getOptions()->getNavMenu() @@ -141,7 +141,7 @@ public function editProfileAction() $entityManager = $this->getEntityManager(); $entityManager->persist($user); $entityManager->flush(); - $message = $this->getTranslatorHelper()->translate('Your profile has been edited'); + $message = $this->getTranslatorHelper()->translate('Your profile has been edited', 'csnuser'); } } @@ -187,7 +187,7 @@ public function changePasswordAction() $viewModel->setTemplate('csn-user/registration/change-password-success'); return $viewModel; } else { - $message = $this->getTranslatorHelper()->translate('Your answer is wrong. Please provide the correct answer.'); + $message = $this->getTranslatorHelper()->translate('Your answer is wrong. Please provide the correct answer.', 'csnuser'); } } } @@ -227,8 +227,8 @@ public function resetPasswordAction() $fullLink = $this->getBaseUrl() . $this->url()->fromRoute('user-register', array( 'action' => 'confirm-email-change-password', 'id' => $user->getRegistrationToken())); $this->sendEmail( $user->getEmail(), - $this->getTranslatorHelper()->translate('Please, confirm your request to change password!'), - sprintf($this->getTranslatorHelper()->translate('Hi, %s. Please, follow this link %s to confirm your request to change password.'), $user->getUsername(), $fullLink) + $this->getTranslatorHelper()->translate('Please, confirm your request to change password!', 'csnuser'), + sprintf($this->getTranslatorHelper()->translate('Hi, %s. Please, follow this link %s to confirm your request to change password.', 'csnuser'), $user->getUsername(), $fullLink) ); $entityManager->persist($user); $entityManager->flush(); @@ -242,7 +242,7 @@ public function resetPasswordAction() return $viewModel; } catch (\Exception $e) { return $this->getServiceLocator()->get('csnuser_error_view')->createErrorView( - $this->getTranslatorHelper()->translate('Something went wrong when trying to send activation email! Please, try again later.'), + $this->getTranslatorHelper()->translate('Something went wrong when trying to send activation email! Please, try again later.', 'csnuser'), $e, $this->getOptions()->getDisplayExceptions(), $this->getOptions()->getNavMenu() @@ -293,7 +293,7 @@ public function changeEmailAction() $viewModel->setTemplate('csn-user/registration/change-email-success'); return $viewModel; } else { - $message = $this->getTranslatorHelper()->translate('Your current password is not correct.'); + $message = $this->getTranslatorHelper()->translate('Your current password is not correct.', 'csnuser'); } } } @@ -333,7 +333,7 @@ public function changeSecurityQuestionAction() $viewModel->setTemplate('csn-user/registration/change-security-question-success'); return $viewModel; } else { - $message = $this->getTranslatorHelper()->translate('Your password is wrong. Please provide the correct password.'); + $message = $this->getTranslatorHelper()->translate('Your password is wrong. Please provide the correct password.', 'csnuser'); } } } @@ -370,7 +370,7 @@ public function confirmEmailAction() } } catch (\Exception $e) { return $this->getServiceLocator()->get('csnuser_error_view')->createErrorView( - $this->getTranslatorHelper()->translate('Something went wrong during the activation of your account! Please, try again later.'), + $this->getTranslatorHelper()->translate('Something went wrong during the activation of your account! Please, try again later.', 'csnuser'), $e, $this->getOptions()->getDisplayExceptions(), $this->getOptions()->getNavMenu() @@ -399,7 +399,7 @@ public function confirmEmailChangePasswordAction() $this->sendEmail( $user->getEmail(), 'Your password has been changed!', - sprintf($this->getTranslatorHelper()->translate('Hello again %s. Your new password is: %s. Please, follow this link %s to log in with your new password.'), $user->getUsername(), $password, $fullLink) + sprintf($this->getTranslatorHelper()->translate('Hello again %s. Your new password is: %s. Please, follow this link %s to log in with your new password.', 'csnuser'), $user->getUsername(), $password, $fullLink) ); $entityManager->persist($user); @@ -415,7 +415,7 @@ public function confirmEmailChangePasswordAction() } } catch (\Exception $e) { return $this->getServiceLocator()->get('csnuser_error_view')->createErrorView( - $this->getTranslatorHelper()->translate('An error occured during the confirmation of your password change! Please, try again later.'), + $this->getTranslatorHelper()->translate('An error occured during the confirmation of your password change! Please, try again later.', 'csnuser'), $e, $this->getOptions()->getDisplayExceptions(), $this->getOptions()->getNavMenu() diff --git a/src/CsnUser/Service/Factory/UserFormFactory.php b/src/CsnUser/Service/Factory/UserFormFactory.php index ebe1822..66012e0 100644 --- a/src/CsnUser/Service/Factory/UserFormFactory.php +++ b/src/CsnUser/Service/Factory/UserFormFactory.php @@ -247,7 +247,7 @@ private function addSignUpFields() 'onclick' => 'window.location="'.$this->getUrlPlugin()->fromRoute('user-index', array('action' => 'login')).'"', ), 'options' => array( - 'label' => $this->getTranslatorHelper()->translate('Sign In'), + 'label' => $this->getTranslatorHelper()->translate('Sign In', 'csnuser'), ) )); } @@ -376,7 +376,7 @@ private function addSignUpFilters() 'object_repository' => $entityManager->getRepository('CsnUser\Entity\User'), 'fields' => array('username'), 'messages' => array( - 'objectFound' => $this->getTranslatorHelper()->translate('This username is already taken'), + 'objectFound' => $this->getTranslatorHelper()->translate('This username is already taken', 'csnuser'), ), )) ); @@ -386,7 +386,7 @@ private function addSignUpFilters() 'object_repository' => $entityManager->getRepository('CsnUser\Entity\User'), 'fields' => array('email'), 'messages' => array( - 'objectFound' => $this->getTranslatorHelper()->translate('An user with this email already exists'), + 'objectFound' => $this->getTranslatorHelper()->translate('An user with this email already exists', 'csnuser'), ), )) ); @@ -465,7 +465,7 @@ private function addChangeEmailFilters() 'object_repository' => $this->getEntityManager()->getRepository('CsnUser\Entity\User'), 'fields' => array('email'), 'messages' => array( - 'objectFound' => $this->getTranslatorHelper()->translate('An user with this email already exists'), + 'objectFound' => $this->getTranslatorHelper()->translate('An user with this email already exists', 'csnuser'), ), ), ), diff --git a/view/csn-user/admin/edit-user-form.phtml b/view/csn-user/admin/edit-user-form.phtml index 31d9c38..6bf9309 100644 --- a/view/csn-user/admin/edit-user-form.phtml +++ b/view/csn-user/admin/edit-user-form.phtml @@ -27,25 +27,25 @@ $form->setAttributes(array( $form->get('username')->setAttributes(array( 'required' => 'true', 'class' => 'form-control input-lg', - 'placeholder' => $this->translate('Username') + 'placeholder' => $this->translate('Username', 'csnuser') )); $form->get('firstName')->setAttributes(array( 'required' => 'false', 'class' => 'form-control input-lg', - 'placeholder' => $this->translate('First Name') + 'placeholder' => $this->translate('First Name', 'csnuser') )); $form->get('lastName')->setAttributes(array( 'required' => 'false', 'class' => 'form-control input-lg', - 'placeholder' => $this->translate('Last Name') + 'placeholder' => $this->translate('Last Name', 'csnuser') )); $form->get('email')->setAttributes(array( 'required' => 'true', 'class' => 'form-control input-lg', - 'placeholder' => $this->translate('Your Email') + 'placeholder' => $this->translate('Your Email', 'csnuser') )); $form->get('language')->setAttributes(array( @@ -71,19 +71,19 @@ $form->get('question')->setAttributes(array( $form->get('answer')->setAttributes(array( 'required' => 'true', 'class' => 'form-control input-lg', - 'placeholder' => $this->translate('Type Your Answer') + 'placeholder' => $this->translate('Type Your Answer', 'csnuser') )); $form->get('submit')->setAttributes(array( 'class' => 'btn btn btn-success btn-lg', - 'value' => $this->translate('Edit User') + 'value' => $this->translate('Edit User', 'csnuser') )); $form->prepare(); ?>
-

translate('Edit User')?>

+

translate('Edit User', 'csnuser')?>

@@ -118,7 +118,7 @@ $form->prepare(); Change user Password: ******
- translate('Change Password'); ?> + translate('Change Password', 'csnuser'); ?>
diff --git a/view/csn-user/admin/index.phtml b/view/csn-user/admin/index.phtml index 6f4a391..4bea485 100644 --- a/view/csn-user/admin/index.phtml +++ b/view/csn-user/admin/index.phtml @@ -31,10 +31,10 @@ $flashMessenger = $this->flashMessenger() render('success', array('alert', 'alert-dismissable', 'alert-success')); ?>

- translate('Users Admin Table') ?> + translate('Users Admin Table', 'csnuser') ?>

- translate('Create User') ?> + translate('Create User', 'csnuser') ?>
@@ -42,10 +42,10 @@ $flashMessenger = $this->flashMessenger() Id - translate('Name') ?> - translate('Email') ?> - translate('State') ?> - translate('Actions') ?> + translate('Name', 'csnuser') ?> + translate('Email', 'csnuser') ?> + translate('State', 'csnuser') ?> + translate('Actions', 'csnuser') ?> flashMessenger() getEmail(); ?> - translate($user->getState()->getState()) ?> + translate($user->getState()->getState(), 'csnuser') ?> - translate(($user->getState()->getId() == 1) ? 'Enable' : 'Disable') ?> + translate(($user->getState()->getId() == 1) ? 'Enable' : 'Disable', 'csnuser') ?> | - translate('Edit') ?> + translate('Edit', 'csnuser') ?> | - - translate('Delete') ?> + + translate('Delete', 'csnuser') ?> diff --git a/view/csn-user/admin/new-user-form.phtml b/view/csn-user/admin/new-user-form.phtml index 8a976dc..65ad93d 100755 --- a/view/csn-user/admin/new-user-form.phtml +++ b/view/csn-user/admin/new-user-form.phtml @@ -27,35 +27,35 @@ $form->setAttributes(array( $form->get('username')->setAttributes(array( 'required' => 'true', 'class' => 'form-control input-lg', - 'placeholder' => $this->translate('Username') + 'placeholder' => $this->translate('Username', 'csnuser') )); $form->get('firstName')->setAttributes(array( 'required' => 'false', 'class' => 'form-control input-lg', - 'placeholder' => $this->translate('First Name') + 'placeholder' => $this->translate('First Name', 'csnuser') )); $form->get('lastName')->setAttributes(array( 'required' => 'false', 'class' => 'form-control input-lg', - 'placeholder' => $this->translate('Last Name') + 'placeholder' => $this->translate('Last Name', 'csnuser') )); $form->get('email')->setAttributes(array( 'required' => 'true', 'class' => 'form-control input-lg', - 'placeholder' => $this->translate('Your Email') + 'placeholder' => $this->translate('Your Email', 'csnuser') )); $form->get('password')->setAttributes(array( 'class' => 'form-control input-lg', - 'placeholder' => $this->translate('Password') + 'placeholder' => $this->translate('Password', 'csnuser') )); $form->get('passwordVerify')->setAttributes(array( 'class' => 'form-control input-lg', - 'placeholder' => $this->translate('Confirm Password') + 'placeholder' => $this->translate('Confirm Password', 'csnuser') )); $form->get('language')->setAttributes(array( @@ -81,19 +81,19 @@ $form->get('question')->setAttributes(array( $form->get('answer')->setAttributes(array( 'required' => 'true', 'class' => 'form-control input-lg', - 'placeholder' => $this->translate('Type Your Answer') + 'placeholder' => $this->translate('Type Your Answer', 'csnuser') )); $form->get('submit')->setAttributes(array( 'class' => 'btn btn btn-success btn-lg', - 'value' => $this->translate('Create User') + 'value' => $this->translate('Create User', 'csnuser') )); $form->prepare(); ?>
-

translate('New User')?>

+

translate('New User', 'csnuser')?>

diff --git a/view/csn-user/index/index.phtml b/view/csn-user/index/index.phtml index 26cc3ec..acef9dd 100644 --- a/view/csn-user/index/index.phtml +++ b/view/csn-user/index/index.phtml @@ -19,22 +19,22 @@ echo $this->partial('csn-user/layout/nav-menu', array('navMenu' => $this->navMen
identity()) { ?>

- translate('Welcome') ?> + translate('Welcome', 'csnuser') ?> escapeHtml($user->getUsername()); ?>

- translate('Log Out'); ?> + translate('Log Out', 'csnuser'); ?>
- translate('Congratulations! You have successfully logged in.') ?> + translate('Congratulations! You have successfully logged in.', 'csnuser') ?>
-

translate('Welcome') ?> translate('Guest') ?>!

+

translate('Welcome', 'csnuser') ?> translate('Guest', 'csnuser') ?>!

- translate('Please follow the buttons at the top to navigate through the system.') ?> + translate('Please follow the buttons at the top to navigate through the system.', 'csnuser') ?>
diff --git a/view/csn-user/index/login.phtml b/view/csn-user/index/login.phtml index ac1abaf..a3abe42 100644 --- a/view/csn-user/index/login.phtml +++ b/view/csn-user/index/login.phtml @@ -28,37 +28,37 @@ $form->setAttributes(array( $form->get('usernameOrEmail')->setAttributes(array( 'class' => 'form-control input-lg', - 'placeholder' => $this->translate('Username or Email') + 'placeholder' => $this->translate('Username or Email', 'csnuser') )); $form->get('password')->setAttributes(array( 'class' => 'form-control input-lg', - 'placeholder' => $this->translate('Password') + 'placeholder' => $this->translate('Password', 'csnuser') )); $form->get('rememberme')->setAttributes(array( - 'title' => $this->translate('Activate Remember Me Function'), + 'title' => $this->translate('Activate Remember Me Function', 'csnuser'), )); $form->get('rememberme')->setOptions(array( - 'label' => $this->translate('Remember me?'), + 'label' => $this->translate('Remember me?', 'csnuser'), )); $form->get('captcha')->setAttributes(array( 'required' => 'true', 'class' => 'form-control input-lg', - 'placeholder' => $this->translate('Verify you are human') + 'placeholder' => $this->translate('Verify you are human', 'csnuser') )); $form->get('submit')->setAttributes(array( 'class' => 'btn btn btn-success btn-lg', - 'value' => $this->translate('Log In') + 'value' => $this->translate('Log In', 'csnuser') )); $form->prepare(); ?>
-

translate('Log In')?>

+

translate('Log In', 'csnuser')?>

@@ -102,10 +102,10 @@ $form->prepare(); diff --git a/view/csn-user/layout/nav-menu.phtml b/view/csn-user/layout/nav-menu.phtml index 0f867e7..6721533 100644 --- a/view/csn-user/layout/nav-menu.phtml +++ b/view/csn-user/layout/nav-menu.phtml @@ -15,24 +15,24 @@ if($this->navMenu == true){ if($this->user) { ?> - translate('User Home'); ?> + translate('User Home', 'csnuser'); ?> - translate('Edit Profile'); ?> + translate('Edit Profile', 'csnuser'); ?> - translate('Log Out'); ?> + translate('Log Out', 'csnuser'); ?> - translate('Log in'); ?> + translate('Log in', 'csnuser'); ?> - translate('Sign Up'); ?> + translate('Sign Up', 'csnuser'); ?> - translate('Reset Password'); ?> + translate('Reset Password', 'csnuser'); ?> diff --git a/view/csn-user/registration/change-email-success.phtml b/view/csn-user/registration/change-email-success.phtml index 499705c..ca6cb57 100644 --- a/view/csn-user/registration/change-email-success.phtml +++ b/view/csn-user/registration/change-email-success.phtml @@ -18,6 +18,6 @@ echo $this->partial('csn-user/layout/nav-menu', array('navMenu' => $this->navMen

- translate('Thank you! Your email has been changed to ') . '' . $this->email . '' ?> + translate('Thank you! Your email has been changed to ', 'csnuser') . '' . $this->email . '' ?>

diff --git a/view/csn-user/registration/change-email.phtml b/view/csn-user/registration/change-email.phtml index 5b2fe7b..a35578a 100644 --- a/view/csn-user/registration/change-email.phtml +++ b/view/csn-user/registration/change-email.phtml @@ -28,23 +28,23 @@ $form->setAttributes(array( $form->get('newEmail')->setAttributes(array( 'class' => 'form-control input-lg', - 'placeholder' => $this->translate('New Email') + 'placeholder' => $this->translate('New Email', 'csnuser') )); $form->get('newEmailVerify')->setAttributes(array( 'class' => 'form-control input-lg', - 'placeholder' => $this->translate('Confirm New Email') + 'placeholder' => $this->translate('Confirm New Email', 'csnuser') )); $form->get('submit')->setAttributes(array( 'class' => 'btn btn btn-success btn-lg', - 'value' => $this->translate('Change Email') + 'value' => $this->translate('Change Email', 'csnuser') )); $form->prepare(); ?>
-

translate('Change Email')?>

+

translate('Change Email', 'csnuser')?>

@@ -54,7 +54,7 @@ $form->prepare(); message ?>
- + get('password'); echo $this->formElementErrors($element); diff --git a/view/csn-user/registration/change-password-success.phtml b/view/csn-user/registration/change-password-success.phtml index 0ac88be..61b48c2 100644 --- a/view/csn-user/registration/change-password-success.phtml +++ b/view/csn-user/registration/change-password-success.phtml @@ -18,6 +18,6 @@ echo $this->partial('csn-user/layout/nav-menu', array('navMenu' => $this->navMen

- translate('Thank you! Your password has been changed successfully.')?> + translate('Thank you! Your password has been changed successfully.', 'csnuser')?>

diff --git a/view/csn-user/registration/change-password.phtml b/view/csn-user/registration/change-password.phtml index 048754f..737ba63 100644 --- a/view/csn-user/registration/change-password.phtml +++ b/view/csn-user/registration/change-password.phtml @@ -28,18 +28,18 @@ $form->setAttributes(array( $form->get('newPasswordVerify')->setAttributes(array( 'class' => 'form-control input-lg', - 'placeholder' => $this->translate('Confirm New Password') + 'placeholder' => $this->translate('Confirm New Password', 'csnuser') )); $form->get('submit')->setAttributes(array( 'class' => 'btn btn btn-success btn-lg', - 'value' => $this->translate('Change Password') + 'value' => $this->translate('Change Password', 'csnuser') )); $form->prepare(); ?>
-

translate('Change Password')?>

+

translate('Change Password', 'csnuser')?>

@@ -50,16 +50,16 @@ $form->prepare();
- translate('Security Question') ?>: + translate('Security Question', 'csnuser') ?>:
question ?>
- + get('answer'); echo $this->formElementErrors($element); ?> - + get('password'); echo $this->formElementErrors($element); diff --git a/view/csn-user/registration/change-security-question-success.phtml b/view/csn-user/registration/change-security-question-success.phtml index 7941c40..a3fa011 100644 --- a/view/csn-user/registration/change-security-question-success.phtml +++ b/view/csn-user/registration/change-security-question-success.phtml @@ -18,6 +18,6 @@ echo $this->partial('csn-user/layout/nav-menu', array('navMenu' => $this->navMen

- translate('Thank you! Your security question has been changed') ?> + translate('Thank you! Your security question has been changed', 'csnuser') ?>

diff --git a/view/csn-user/registration/change-security-question.phtml b/view/csn-user/registration/change-security-question.phtml index 3dac747..cc0d798 100644 --- a/view/csn-user/registration/change-security-question.phtml +++ b/view/csn-user/registration/change-security-question.phtml @@ -33,13 +33,13 @@ $form->get('question')->setAttributes(array( $form->get('submit')->setAttributes(array( 'class' => 'btn btn btn-success btn-lg', - 'value' => $this->translate('Change Security Question') + 'value' => $this->translate('Change Security Question', 'csnuser') )); $form->prepare(); ?>
-

translate('Change Security Question')?>

+

translate('Change Security Question', 'csnuser')?>

@@ -49,7 +49,7 @@ $form->prepare(); message ?>
- + get('password'); //echo $this->formElement($element); @@ -60,7 +60,7 @@ $form->prepare(); echo $this->formElement($element); echo $this->formElementErrors($element); ?> - + get('answer'); echo $this->formElementErrors($element); diff --git a/view/csn-user/registration/confirm-email-change-password.phtml b/view/csn-user/registration/confirm-email-change-password.phtml index a94377c..a5d2642 100644 --- a/view/csn-user/registration/confirm-email-change-password.phtml +++ b/view/csn-user/registration/confirm-email-change-password.phtml @@ -18,6 +18,6 @@ echo $this->partial('csn-user/layout/nav-menu', array('navMenu' => $this->navMen

- translate('Confirmation successful! You have a new password. An email has been sent to %s with your new password.'), $email);?> + translate('Confirmation successful! You have a new password. An email has been sent to %s with your new password.', 'csnuser'), $email);?>

diff --git a/view/csn-user/registration/confirm-email-success.phtml b/view/csn-user/registration/confirm-email-success.phtml index 8881388..e0f2733 100644 --- a/view/csn-user/registration/confirm-email-success.phtml +++ b/view/csn-user/registration/confirm-email-success.phtml @@ -18,6 +18,6 @@ echo $this->partial('csn-user/layout/nav-menu', array('navMenu' => $this->navMen

- translate('Thank you! Your registration has been confirmed.') ?> + translate('Thank you! Your registration has been confirmed.', 'csnuser') ?>

diff --git a/view/csn-user/registration/edit-profile.phtml b/view/csn-user/registration/edit-profile.phtml index 406c16f..db9ffd1 100644 --- a/view/csn-user/registration/edit-profile.phtml +++ b/view/csn-user/registration/edit-profile.phtml @@ -29,13 +29,13 @@ $form->setAttributes(array( $form->get('firstName')->setAttributes(array( 'required' => 'false', 'class' => 'form-control input-lg', - 'placeholder' => $this->translate('First Name') + 'placeholder' => $this->translate('First Name', 'csnuser') )); $form->get('lastName')->setAttributes(array( 'required' => 'false', 'class' => 'form-control input-lg', - 'placeholder' => $this->translate('Last Name') + 'placeholder' => $this->translate('Last Name', 'csnuser') )); $form->get('language')->setAttributes(array( @@ -45,13 +45,13 @@ $form->get('language')->setAttributes(array( $form->get('submit')->setAttributes(array( 'class' => 'btn btn btn-success btn-lg', - 'value' => $this->translate('Update Profile') + 'value' => $this->translate('Update Profile', 'csnuser') )); $form->prepare(); ?>
-

translate('Edit Profile')?>

+

translate('Edit Profile', 'csnuser')?>

@@ -62,33 +62,33 @@ $form->prepare();
- translate('Your Username') ?>: username ?> + translate('Your Username', 'csnuser') ?>: username ?>
- translate('Your Password') ?>: ****** + translate('Your Password', 'csnuser') ?>: ******
- translate('Change Password'); ?> + translate('Change Password', 'csnuser'); ?>
- translate('Your Email') ?>: + translate('Your Email', 'csnuser') ?>: email ?>
- translate('Change Email'); ?> + translate('Change Email', 'csnuser'); ?>
- translate('Your Security Question') ?>: + translate('Your Security Question', 'csnuser') ?>: securityQuestion ?>
- translate('Change Security Question'); ?> + translate('Change Security Question', 'csnuser'); ?>
- translate('Your First/Last Name') ?>: + translate('Your First/Last Name', 'csnuser') ?>:
@@ -106,7 +106,7 @@ $form->prepare(); ?>
- translate('Your Language') ?>: + translate('Your Language', 'csnuser') ?>:
get('language'); diff --git a/view/csn-user/registration/password-change-success.phtml b/view/csn-user/registration/password-change-success.phtml index 4d50ace..e41398d 100644 --- a/view/csn-user/registration/password-change-success.phtml +++ b/view/csn-user/registration/password-change-success.phtml @@ -18,6 +18,6 @@ echo $this->partial('csn-user/layout/nav-menu', array('navMenu' => $this->navMen

- translate('An email has been sent to %s. Please, check your inbox and confirm your request to change password!'), $email);?> + translate('An email has been sent to %s. Please, check your inbox and confirm your request to change password!', 'csnuser'), $email);?>

diff --git a/view/csn-user/registration/registration-success.phtml b/view/csn-user/registration/registration-success.phtml index 5f81f2b..48c90e7 100644 --- a/view/csn-user/registration/registration-success.phtml +++ b/view/csn-user/registration/registration-success.phtml @@ -18,6 +18,6 @@ echo $this->partial('csn-user/layout/nav-menu', array('navMenu' => $this->navMen

- translate('An email has been sent to %s. Please, check your inbox and confirm your registration!'), $email);?> + translate('An email has been sent to %s. Please, check your inbox and confirm your registration!', 'csnuser'), $email);?>

diff --git a/view/csn-user/registration/registration.phtml b/view/csn-user/registration/registration.phtml index 270615f..795d514 100644 --- a/view/csn-user/registration/registration.phtml +++ b/view/csn-user/registration/registration.phtml @@ -28,34 +28,34 @@ $form->setAttributes(array( $form->get('username')->setAttributes(array( 'class' => 'form-control input-lg', - 'placeholder' => $this->translate('Username') + 'placeholder' => $this->translate('Username', 'csnuser') )); $form->get('firstName')->setAttributes(array( 'required' => 'false', 'class' => 'form-control input-lg', - 'placeholder' => $this->translate('First Name') + 'placeholder' => $this->translate('First Name', 'csnuser') )); $form->get('lastName')->setAttributes(array( 'required' => 'false', 'class' => 'form-control input-lg', - 'placeholder' => $this->translate('Last Name') + 'placeholder' => $this->translate('Last Name', 'csnuser') )); $form->get('email')->setAttributes(array( 'class' => 'form-control input-lg', - 'placeholder' => $this->translate('Your Email') + 'placeholder' => $this->translate('Your Email', 'csnuser') )); $form->get('password')->setAttributes(array( 'class' => 'form-control input-lg', - 'placeholder' => $this->translate('Password') + 'placeholder' => $this->translate('Password', 'csnuser') )); $form->get('passwordVerify')->setAttributes(array( 'class' => 'form-control input-lg', - 'placeholder' => $this->translate('Confirm Password') + 'placeholder' => $this->translate('Confirm Password', 'csnuser') )); $form->get('question')->setAttributes(array( @@ -64,29 +64,29 @@ $form->get('question')->setAttributes(array( $form->get('answer')->setAttributes(array( 'class' => 'form-control input-lg', - 'placeholder' => $this->translate('Type Your Answer') + 'placeholder' => $this->translate('Type Your Answer', 'csnuser') )); $form->get('captcha')->setAttributes(array( 'required' => 'true', 'class' => 'form-control input-lg', - 'placeholder' => $this->translate('Verify you are human') + 'placeholder' => $this->translate('Verify you are human', 'csnuser') )); $form->get('submit')->setAttributes(array( 'class' => 'btn btn btn-success btn-lg', - 'value' => $this->translate('Sign Up') + 'value' => $this->translate('Sign Up', 'csnuser') )); $form->get('login')->setAttributes(array( 'class' => 'btn btn btn-warning btn-lg', - 'label' => $this->translate('Sign In') + 'label' => $this->translate('Sign In', 'csnuser') )); $form->prepare(); ?>
-

translate('Sign Up')?>

+

translate('Sign Up', 'csnuser')?>

diff --git a/view/csn-user/registration/reset-password.phtml b/view/csn-user/registration/reset-password.phtml index 90605c7..5351a2a 100644 --- a/view/csn-user/registration/reset-password.phtml +++ b/view/csn-user/registration/reset-password.phtml @@ -28,24 +28,24 @@ $form->setAttributes(array( $form->get('usernameOrEmail')->setAttributes(array( 'class' => 'form-control input-lg', - 'placeholder' => $this->translate('Write Your Username or Email') + 'placeholder' => $this->translate('Write Your Username or Email', 'csnuser') )); $form->get('captcha')->setAttributes(array( 'required' => 'true', 'class' => 'form-control input-lg', - 'placeholder' => $this->translate('Verify you are human') + 'placeholder' => $this->translate('Verify you are human', 'csnuser') )); $form->get('submit')->setAttributes(array( 'class' => 'btn btn btn-success btn-lg', - 'value' => $this->translate('Send Reset Email') + 'value' => $this->translate('Send Reset Email', 'csnuser') )); $form->prepare(); ?>
-

translate('Reset Password')?>

+

translate('Reset Password', 'csnuser')?>

From 6a20b1416badede27d986c4e7dd138d288c3c805 Mon Sep 17 00:00:00 2001 From: ghiamar <07Cf0264@Martin> Date: Fri, 16 May 2014 20:29:38 -0300 Subject: [PATCH 14/15] Updated README.md with translation instructions Added text domain for translations --- README.md | 13 +++ language/en_US.mo | Bin 459 -> 489 bytes language/en_US.po | 267 +++++++++++++++++++++++----------------------- 3 files changed, 146 insertions(+), 134 deletions(-) diff --git a/README.md b/README.md index 4a5bc6e..1a3fe2c 100644 --- a/README.md +++ b/README.md @@ -82,6 +82,19 @@ The following options are available: >### It is ready? ### Navigate to *[hostname]/user* in your browser to view different options for login, registration, forgotten password, etc. +Enable module translations +-------------------------- +If you wish to enable module translations, you need to add this array to `translation_file_patterns` key in your `translators` key in Zend Skeleton Application **Application** module config `module.config.php` file. After that, you may proceed to create your own translation files that are located in `CsnUser/language` + +``` +array( + 'type' => 'gettext', + 'base_dir' => __DIR__ . '/../../CsnUser/language', + 'pattern' => '%s.mo', + 'text_domain' => 'csnuser', +) +``` + Routes ------------ The following routes are available: diff --git a/language/en_US.mo b/language/en_US.mo index c75b51ca33258ab7a453c528f928ab0b3b98b862..c4a59469730cd2861b7d61555ce0047cf1663f0a 100644 GIT binary patch delta 81 zcmX@j{E~Ts3gh~Ts(vg+23Cd>%T-uGwB^JFVf;RcdFiEz>8Vx2w>VMQCp delta 52 zcmaFKe42TJ3gg6ys(vhnCRQdB%T-u`w5jpL1!0rf7+3N8B<7`;CZ?xaDWvAbhXzkR H%P0c?v}X{* diff --git a/language/en_US.po b/language/en_US.po index 5c19c2f..ad68a00 100644 --- a/language/en_US.po +++ b/language/en_US.po @@ -1,431 +1,430 @@ msgid "" msgstr "" "Project-Id-Version: CsnUser\n" -"POT-Creation-Date: 2014-05-16 14:48-0300\n" -"PO-Revision-Date: 2014-05-16 14:53-0300\n" +"POT-Creation-Date: 2014-05-16 20:18-0300\n" +"PO-Revision-Date: 2014-05-16 20:19-0300\n" "Last-Translator: Martin Briglia \n" "Language-Team: CoolCsn\n" +"Language: en_US\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Poedit 1.5.4\n" "X-Poedit-KeywordsList: translate\n" "X-Poedit-Basepath: .\n" -"Language: en_US\n" +"X-Poedit-SourceCharset: UTF-8\n" "X-Poedit-SearchPath-0: ..\n" -#: /home/martin/workspace/zf2csn/module/CsnUser/src/CsnUser/Service/Factory/UserFormFactory.php:250 -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/registration.phtml:83 +#: ../src/CsnUser/Service/Factory/UserFormFactory.php:250 +#: ../view/csn-user/registration/registration.phtml:83 msgid "Sign In" msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/src/CsnUser/Service/Factory/UserFormFactory.php:379 +#: ../src/CsnUser/Service/Factory/UserFormFactory.php:379 msgid "This username is already taken" msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/src/CsnUser/Service/Factory/UserFormFactory.php:389 -#: /home/martin/workspace/zf2csn/module/CsnUser/src/CsnUser/Service/Factory/UserFormFactory.php:468 +#: ../src/CsnUser/Service/Factory/UserFormFactory.php:389 +#: ../src/CsnUser/Service/Factory/UserFormFactory.php:468 msgid "An user with this email already exists" msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/src/CsnUser/Controller/IndexController.php:92 -#: /home/martin/workspace/zf2csn/module/CsnUser/src/CsnUser/Controller/IndexController.php:102 -#: /home/martin/workspace/zf2csn/module/CsnUser/src/CsnUser/Controller/IndexController.php:148 +#: ../src/CsnUser/Controller/IndexController.php:92 +#: ../src/CsnUser/Controller/IndexController.php:102 +#: ../src/CsnUser/Controller/IndexController.php:148 msgid "Your authentication credentials are not valid" msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/src/CsnUser/Controller/IndexController.php:100 +#: ../src/CsnUser/Controller/IndexController.php:100 msgid "Your username is disabled. Please contact an administrator." msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/src/CsnUser/Controller/IndexController.php:138 +#: ../src/CsnUser/Controller/IndexController.php:138 msgid "Something went wrong during login! Please, try again later." msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/src/CsnUser/Controller/RegistrationController.php:83 +#: ../src/CsnUser/Controller/RegistrationController.php:83 msgid "Please, confirm your registration!" msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/src/CsnUser/Controller/RegistrationController.php:84 +#: ../src/CsnUser/Controller/RegistrationController.php:84 #, php-format msgid "Please, click the link to confirm your registration => %s" msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/src/CsnUser/Controller/RegistrationController.php:97 -#: /home/martin/workspace/zf2csn/module/CsnUser/src/CsnUser/Controller/RegistrationController.php:245 +#: ../src/CsnUser/Controller/RegistrationController.php:97 +#: ../src/CsnUser/Controller/RegistrationController.php:245 msgid "" "Something went wrong when trying to send activation email! Please, try again " "later." msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/src/CsnUser/Controller/RegistrationController.php:144 +#: ../src/CsnUser/Controller/RegistrationController.php:144 msgid "Your profile has been edited" msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/src/CsnUser/Controller/RegistrationController.php:190 +#: ../src/CsnUser/Controller/RegistrationController.php:190 msgid "Your answer is wrong. Please provide the correct answer." msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/src/CsnUser/Controller/RegistrationController.php:230 +#: ../src/CsnUser/Controller/RegistrationController.php:230 msgid "Please, confirm your request to change password!" msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/src/CsnUser/Controller/RegistrationController.php:231 +#: ../src/CsnUser/Controller/RegistrationController.php:231 #, php-format msgid "" "Hi, %s. Please, follow this link %s to confirm your request to change " "password." msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/src/CsnUser/Controller/RegistrationController.php:296 +#: ../src/CsnUser/Controller/RegistrationController.php:296 msgid "Your current password is not correct." msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/src/CsnUser/Controller/RegistrationController.php:336 +#: ../src/CsnUser/Controller/RegistrationController.php:336 msgid "Your password is wrong. Please provide the correct password." msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/src/CsnUser/Controller/RegistrationController.php:373 +#: ../src/CsnUser/Controller/RegistrationController.php:373 msgid "" "Something went wrong during the activation of your account! Please, try " "again later." msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/src/CsnUser/Controller/RegistrationController.php:402 +#: ../src/CsnUser/Controller/RegistrationController.php:402 #, php-format msgid "" "Hello again %s. Your new password is: %s. Please, follow this link %s to log " "in with your new password." msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/src/CsnUser/Controller/RegistrationController.php:418 +#: ../src/CsnUser/Controller/RegistrationController.php:418 msgid "" "An error occured during the confirmation of your password change! Please, " "try again later." msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/src/CsnUser/Controller/AdminController.php:94 +#: ../src/CsnUser/Controller/AdminController.php:94 msgid "User created Successfully" msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/src/CsnUser/Controller/AdminController.php:101 +#: ../src/CsnUser/Controller/AdminController.php:101 msgid "Something went wrong during user creation! Please, try again later." msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/src/CsnUser/Controller/AdminController.php:130 -#: /home/martin/workspace/zf2csn/module/CsnUser/src/CsnUser/Controller/AdminController.php:186 +#: ../src/CsnUser/Controller/AdminController.php:130 +#: ../src/CsnUser/Controller/AdminController.php:186 msgid "User ID invalid" msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/src/CsnUser/Controller/AdminController.php:149 -#: /home/martin/workspace/zf2csn/module/CsnUser/src/CsnUser/Controller/AdminController.php:236 +#: ../src/CsnUser/Controller/AdminController.php:149 +#: ../src/CsnUser/Controller/AdminController.php:236 msgid "User Updated Successfully" msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/src/CsnUser/Controller/AdminController.php:156 +#: ../src/CsnUser/Controller/AdminController.php:156 msgid "" "Something went wrong during update user process! Please, try again later." msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/src/CsnUser/Controller/AdminController.php:195 +#: ../src/CsnUser/Controller/AdminController.php:195 msgid "User Deleted Successfully" msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/src/CsnUser/Controller/AdminController.php:199 -#: /home/martin/workspace/zf2csn/module/CsnUser/src/CsnUser/Controller/AdminController.php:240 +#: ../src/CsnUser/Controller/AdminController.php:199 +#: ../src/CsnUser/Controller/AdminController.php:240 msgid "" "Something went wrong during user delete process! Please, try again later." msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/src/CsnUser/Controller/AdminController.php:226 +#: ../src/CsnUser/Controller/AdminController.php:226 msgid "User ID or state invalid" msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/layout/nav-menu.phtml:18 +#: ../view/csn-user/layout/nav-menu.phtml:18 msgid "User Home" msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/layout/nav-menu.phtml:21 -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/edit-profile.phtml:54 +#: ../view/csn-user/layout/nav-menu.phtml:21 +#: ../view/csn-user/registration/edit-profile.phtml:54 msgid "Edit Profile" msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/layout/nav-menu.phtml:24 -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/index/index.phtml:28 +#: ../view/csn-user/layout/nav-menu.phtml:24 +#: ../view/csn-user/index/index.phtml:28 msgid "Log Out" msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/layout/nav-menu.phtml:29 +#: ../view/csn-user/layout/nav-menu.phtml:29 msgid "Log in" msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/layout/nav-menu.phtml:32 -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/registration.phtml:78 -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/registration.phtml:89 +#: ../view/csn-user/layout/nav-menu.phtml:32 +#: ../view/csn-user/registration/registration.phtml:78 +#: ../view/csn-user/registration/registration.phtml:89 msgid "Sign Up" msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/layout/nav-menu.phtml:35 -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/reset-password.phtml:48 +#: ../view/csn-user/layout/nav-menu.phtml:35 +#: ../view/csn-user/registration/reset-password.phtml:48 msgid "Reset Password" msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/confirm-email-success.phtml:21 +#: ../view/csn-user/registration/confirm-email-success.phtml:21 msgid "Thank you! Your registration has been confirmed." msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/registration.phtml:31 -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/admin/edit-user-form.phtml:30 -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/admin/new-user-form.phtml:30 +#: ../view/csn-user/registration/registration.phtml:31 +#: ../view/csn-user/admin/edit-user-form.phtml:30 +#: ../view/csn-user/admin/new-user-form.phtml:30 msgid "Username" msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/registration.phtml:37 -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/edit-profile.phtml:32 -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/admin/edit-user-form.phtml:36 -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/admin/new-user-form.phtml:36 +#: ../view/csn-user/registration/registration.phtml:37 +#: ../view/csn-user/registration/edit-profile.phtml:32 +#: ../view/csn-user/admin/edit-user-form.phtml:36 +#: ../view/csn-user/admin/new-user-form.phtml:36 msgid "First Name" msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/registration.phtml:43 -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/edit-profile.phtml:38 -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/admin/edit-user-form.phtml:42 -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/admin/new-user-form.phtml:42 +#: ../view/csn-user/registration/registration.phtml:43 +#: ../view/csn-user/registration/edit-profile.phtml:38 +#: ../view/csn-user/admin/edit-user-form.phtml:42 +#: ../view/csn-user/admin/new-user-form.phtml:42 msgid "Last Name" msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/registration.phtml:48 -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/edit-profile.phtml:75 -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/admin/edit-user-form.phtml:48 -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/admin/new-user-form.phtml:48 +#: ../view/csn-user/registration/registration.phtml:48 +#: ../view/csn-user/registration/edit-profile.phtml:75 +#: ../view/csn-user/admin/edit-user-form.phtml:48 +#: ../view/csn-user/admin/new-user-form.phtml:48 msgid "Your Email" msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/registration.phtml:53 -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/index/login.phtml:36 -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/admin/new-user-form.phtml:53 +#: ../view/csn-user/registration/registration.phtml:53 +#: ../view/csn-user/index/login.phtml:36 +#: ../view/csn-user/admin/new-user-form.phtml:53 msgid "Password" msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/registration.phtml:58 -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/admin/new-user-form.phtml:58 +#: ../view/csn-user/registration/registration.phtml:58 +#: ../view/csn-user/admin/new-user-form.phtml:58 msgid "Confirm Password" msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/registration.phtml:67 -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/admin/edit-user-form.phtml:74 -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/admin/new-user-form.phtml:84 +#: ../view/csn-user/registration/registration.phtml:67 +#: ../view/csn-user/admin/edit-user-form.phtml:74 +#: ../view/csn-user/admin/new-user-form.phtml:84 msgid "Type Your Answer" msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/registration.phtml:73 -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/reset-password.phtml:37 -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/index/login.phtml:50 +#: ../view/csn-user/registration/registration.phtml:73 +#: ../view/csn-user/registration/reset-password.phtml:37 +#: ../view/csn-user/index/login.phtml:50 msgid "Verify you are human" msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/confirm-email-change-password.phtml:21 +#: ../view/csn-user/registration/confirm-email-change-password.phtml:21 #, php-format msgid "" "Confirmation successful! You have a new password. An email has been sent to " "%s with your new password." msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/change-email-success.phtml:21 +#: ../view/csn-user/registration/change-email-success.phtml:21 msgid "Thank you! Your email has been changed to " msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/password-change-success.phtml:21 +#: ../view/csn-user/registration/password-change-success.phtml:21 #, php-format msgid "" "An email has been sent to %s. Please, check " "your inbox and confirm your request to change password!" msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/change-security-question-success.phtml:21 +#: ../view/csn-user/registration/change-security-question-success.phtml:21 msgid "Thank you! Your security question has been changed" msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/change-password-success.phtml:21 +#: ../view/csn-user/registration/change-password-success.phtml:21 msgid "Thank you! Your password has been changed successfully." msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/change-password.phtml:31 +#: ../view/csn-user/registration/change-password.phtml:31 msgid "Confirm New Password" msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/change-password.phtml:36 -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/change-password.phtml:42 -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/edit-profile.phtml:71 -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/admin/edit-user-form.phtml:121 +#: ../view/csn-user/registration/change-password.phtml:36 +#: ../view/csn-user/registration/change-password.phtml:42 +#: ../view/csn-user/registration/edit-profile.phtml:71 +#: ../view/csn-user/admin/edit-user-form.phtml:121 msgid "Change Password" msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/change-password.phtml:53 +#: ../view/csn-user/registration/change-password.phtml:53 msgid "Security Question" msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/change-password.phtml:57 -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/change-security-question.phtml:63 +#: ../view/csn-user/registration/change-password.phtml:57 +#: ../view/csn-user/registration/change-security-question.phtml:63 msgid "Security Answer" msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/change-password.phtml:62 +#: ../view/csn-user/registration/change-password.phtml:62 msgid "New Password" msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/reset-password.phtml:31 +#: ../view/csn-user/registration/reset-password.phtml:31 msgid "Write Your Username or Email" msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/reset-password.phtml:42 +#: ../view/csn-user/registration/reset-password.phtml:42 msgid "Send Reset Email" msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/change-security-question.phtml:36 -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/change-security-question.phtml:42 -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/edit-profile.phtml:87 +#: ../view/csn-user/registration/change-security-question.phtml:36 +#: ../view/csn-user/registration/change-security-question.phtml:42 +#: ../view/csn-user/registration/edit-profile.phtml:87 msgid "Change Security Question" msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/change-security-question.phtml:52 -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/change-email.phtml:57 +#: ../view/csn-user/registration/change-security-question.phtml:52 +#: ../view/csn-user/registration/change-email.phtml:57 msgid "Current Password" msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/change-email.phtml:31 +#: ../view/csn-user/registration/change-email.phtml:31 msgid "New Email" msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/change-email.phtml:36 +#: ../view/csn-user/registration/change-email.phtml:36 msgid "Confirm New Email" msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/change-email.phtml:41 -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/change-email.phtml:47 -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/edit-profile.phtml:79 +#: ../view/csn-user/registration/change-email.phtml:41 +#: ../view/csn-user/registration/change-email.phtml:47 +#: ../view/csn-user/registration/edit-profile.phtml:79 msgid "Change Email" msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/registration-success.phtml:21 +#: ../view/csn-user/registration/registration-success.phtml:21 #, php-format msgid "" "An email has been sent to %s. Please, check " "your inbox and confirm your registration!" msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/edit-profile.phtml:48 +#: ../view/csn-user/registration/edit-profile.phtml:48 msgid "Update Profile" msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/edit-profile.phtml:65 +#: ../view/csn-user/registration/edit-profile.phtml:65 msgid "Your Username" msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/edit-profile.phtml:68 +#: ../view/csn-user/registration/edit-profile.phtml:68 msgid "Your Password" msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/edit-profile.phtml:83 +#: ../view/csn-user/registration/edit-profile.phtml:83 msgid "Your Security Question" msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/edit-profile.phtml:91 +#: ../view/csn-user/registration/edit-profile.phtml:91 msgid "Your First/Last Name" msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/registration/edit-profile.phtml:109 +#: ../view/csn-user/registration/edit-profile.phtml:109 msgid "Your Language" msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/index/login.phtml:31 +#: ../view/csn-user/index/login.phtml:31 msgid "Username or Email" msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/index/login.phtml:40 +#: ../view/csn-user/index/login.phtml:40 msgid "Activate Remember Me Function" msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/index/login.phtml:44 +#: ../view/csn-user/index/login.phtml:44 msgid "Remember me?" msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/index/login.phtml:55 -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/index/login.phtml:61 +#: ../view/csn-user/index/login.phtml:55 ../view/csn-user/index/login.phtml:61 msgid "Log In" msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/index/login.phtml:105 +#: ../view/csn-user/index/login.phtml:105 msgid "Sign up" msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/index/login.phtml:108 +#: ../view/csn-user/index/login.phtml:108 msgid "Forgot your password?" msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/index/index.phtml:22 -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/index/index.phtml:35 +#: ../view/csn-user/index/index.phtml:22 ../view/csn-user/index/index.phtml:35 msgid "Welcome" msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/index/index.phtml:32 +#: ../view/csn-user/index/index.phtml:32 msgid "Congratulations! You have successfully logged in." msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/index/index.phtml:35 +#: ../view/csn-user/index/index.phtml:35 msgid "Guest" msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/index/index.phtml:37 +#: ../view/csn-user/index/index.phtml:37 msgid "Please follow the buttons at the top to navigate through the system." msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/admin/edit-user-form.phtml:79 -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/admin/edit-user-form.phtml:86 +#: ../view/csn-user/admin/edit-user-form.phtml:79 +#: ../view/csn-user/admin/edit-user-form.phtml:86 msgid "Edit User" msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/admin/new-user-form.phtml:89 -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/admin/index.phtml:37 +#: ../view/csn-user/admin/new-user-form.phtml:89 +#: ../view/csn-user/admin/index.phtml:37 msgid "Create User" msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/admin/new-user-form.phtml:96 +#: ../view/csn-user/admin/new-user-form.phtml:96 msgid "New User" msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/admin/index.phtml:34 +#: ../view/csn-user/admin/index.phtml:34 msgid "Users Admin Table" msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/admin/index.phtml:45 +#: ../view/csn-user/admin/index.phtml:45 msgid "Name" msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/admin/index.phtml:46 +#: ../view/csn-user/admin/index.phtml:46 msgid "Email" msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/admin/index.phtml:47 +#: ../view/csn-user/admin/index.phtml:47 msgid "State" msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/admin/index.phtml:48 +#: ../view/csn-user/admin/index.phtml:48 msgid "Actions" msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/admin/index.phtml:68 +#: ../view/csn-user/admin/index.phtml:68 msgid "Enable" msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/admin/index.phtml:71 +#: ../view/csn-user/admin/index.phtml:71 msgid "Edit" msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/admin/index.phtml:73 +#: ../view/csn-user/admin/index.phtml:73 msgid "Do you really want to delete this user?" msgstr "" -#: /home/martin/workspace/zf2csn/module/CsnUser/view/csn-user/admin/index.phtml:74 +#: ../view/csn-user/admin/index.phtml:74 msgid "Delete" msgstr "" From 0947b1c4917cc34462814c608a86de968adb2b17 Mon Sep 17 00:00:00 2001 From: ghiamar <07Cf0264@Martin> Date: Fri, 16 May 2014 20:31:57 -0300 Subject: [PATCH 15/15] Fixed README.md typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1a3fe2c..06eb470 100644 --- a/README.md +++ b/README.md @@ -84,7 +84,7 @@ Navigate to *[hostname]/user* in your browser to view different options for logi Enable module translations -------------------------- -If you wish to enable module translations, you need to add this array to `translation_file_patterns` key in your `translators` key in Zend Skeleton Application **Application** module config `module.config.php` file. After that, you may proceed to create your own translation files that are located in `CsnUser/language` +If you wish to enable module translations, you need to add this array to `translation_file_patterns` key in your `translator` key in Zend Skeleton Application **Application** module config `module.config.php` file. After that, you may proceed to create your own translation files that are located in `CsnUser/language` ``` array(