diff --git a/Controller/GrouperGroupsController.php b/Controller/GrouperGroupsController.php index db63416..9fee013 100644 --- a/Controller/GrouperGroupsController.php +++ b/Controller/GrouperGroupsController.php @@ -20,7 +20,7 @@ public function index() { public function groupUser() { - $this->set('title', 'Grouper Groups:'); + $this->set('title', _txt('pl.grouperlite.title.root')); //TODO - Change to get userid somehow $this->set('groupergroupsmember', $this->GrouperGroup->optinGroups($this->userId)); } @@ -31,13 +31,13 @@ public function groupInfo() $details = $this->GrouperGroup->groupDescriptions($name); $this->set('groupname', $name); - $this->set('title', 'Group configuration and attributes'); + $this->set('title', _txt('pl.grouperlite.title.groupinfo')); $this->set('groupergroupsdetail', $details[0]); } public function groupOwner() { - $this->set('title', 'Grouper Groups I Manage:'); + $this->set('title', _txt('pl.grouperlite.title.groupowner')); if (isset($this->request->data['search'])){ $searchCriteria = urldecode($this->request->data['search']); $this->set('groupergroupsowner', $this->GrouperGroup->getSearchedGroups($this->userId, $searchCriteria, 'groupOwner')); @@ -49,7 +49,7 @@ public function groupOwner() public function groupOptin() { - $this->set('title', 'Grouper Groups I Can Join:'); + $this->set('title', _txt('pl.grouperlite.title.groupoptin')); if (isset($this->request->data['search'])){ $searchCriteria = urldecode($this->request->data['search']); @@ -62,7 +62,7 @@ public function groupOptin() public function emailListsOptin() { - $this->set('title', 'Email lists'); + $this->set('title', _txt('pl.grouperlite.title.emaillists')); // mock data $this->set('group', array( 'member' => true, @@ -74,7 +74,7 @@ public function emailListsOptin() public function emailListsManaged() { - $this->set('title', 'Email lists I manage'); + $this->set('title', _txt('pl.grouperlite.title.emaillistsmanaged')); // mock data $this->set('group', array( 'member' => true, @@ -86,7 +86,7 @@ public function emailListsManaged() public function emailListInfo() { - $this->set('title', 'Email list configuration and attributes'); + $this->set('title', _txt('pl.grouperlite.title.emaillistsinfo')); // mock data $this->set('groupergroupsdetail', array( 'member' => true, @@ -103,7 +103,7 @@ public function emailListInfo() } public function groupCreateForm() { - $this->set('title', 'Create Grouper Group'); + $this->set('title', _txt('pl.grouperlite.title.groupcreate')); } public function groupCreate() @@ -120,13 +120,13 @@ public function joinGroup() if ($this->request->is('post')) { $name = $this->request->data['GroupName']; if($this->GrouperGroup->joinGroup($this->userId, $name)) { - $this->Flash->success(__('You have been added to the group!')); + $this->Flash->success(__(_txt('You have been added to the group!'))); } else { - $this->Flash->error(__('You are unable to join the group!')); + $this->Flash->error(__(_txt('You are unable to join the group!'))); } return $this->redirect(array('action' => 'groupoptin')); } - $this->Flash->error(__('An error occurred in joining the group, please try again later.')); + $this->Flash->error(__(_txt('An error occurred in joining the group, please try again later.'))); } @@ -135,13 +135,13 @@ public function leaveGroup() if ($this->request->is('post')) { $name = $this->request->data['GroupName']; if($this->GrouperGroup->leaveGroup($this->userId, $name)) { - $this->Flash->success(__('You have been deleted from the group!')); + $this->Flash->success(__(_txt('You have been deleted from the group!'))); } else { - $this->Flash->error(__('You are unable to delete the group!')); + $this->Flash->error(__(_txt('You are unable to delete the group!'))); } return $this->redirect(array('action' => 'groupoptin')); } - $this->Flash->error(__('An error occurred in leaving the group, please try again later.')); + $this->Flash->error(__(_txt('An error occurred in leaving the group, please try again later.'))); } /** diff --git a/Lib/lang.php b/Lib/lang.php index aa89932..a76d0cf 100644 --- a/Lib/lang.php +++ b/Lib/lang.php @@ -2,12 +2,30 @@ $cm_grouper_lite_texts['en_US'] = array( + 'pl.grouperlite.crumb.root' => 'Grouper groups', 'pl.grouperlite.nav.groups' => 'Groups', 'pl.grouperlite.nav.groups-presided' => 'Groups I preside over', 'pl.grouperlite.nav.email-lists' => 'Email lists', 'pl.grouperlite.nav.email-lists-managed' => 'Email lists I manage', 'pl.grouperlite.nav.create-group' => 'Create group', + 'pl.grouperlite.title.root' => 'Grouper Groups:', + 'pl.grouperlite.title.groupinfo' => 'Group configuration and attributes', + 'pl.grouperlite.title.groupowner' => 'Grouper Groups I Manage', + 'pl.grouperlite.title.groupoptin' => 'Grouper Groups I Can Join', + 'pl.grouperlite.title.emaillists' => 'Email lists', + 'pl.grouperlite.title.emaillistsmanaged' => 'Email lists I manage', + 'pl.grouperlite.title.emaillistsinfo' => 'Email list configuration and attributes', + 'pl.grouperlite.title.groupcreate' => 'Create Grouper Group', + + 'pl.grouperlite.message.flash.join-group-success' => 'You have been added to the group!', + 'pl.grouperlite.message.flash.join-group-failed' => 'You are unable to join the group!', + 'pl.grouperlite.message.flash.join-group-error' => 'An error occurred in joining the group, please try again later.', + + 'pl.grouperlite.message.flash.leave-group-success' => 'You have been deleted from the group!', + 'pl.grouperlite.message.flash.leave-group-failed' => 'You are unable to delete the group!', + 'pl.grouperlite.message.flash.leave-group-error' => 'An error occurred in leaving the group, please try again later.', + 'pl.grouperlite.table.name' => 'Name', 'pl.grouperlite.table.description' => 'Description', 'pl.grouperlite.table.status' => 'Status', @@ -24,6 +42,26 @@ 'pl.grouperlite.action.subscribe' => 'Subscribe', 'pl.grouperlite.action.unsubscribe' => 'Unsubscribe', 'pl.grouperlite.action.search' => 'Search', + 'pl.grouperlite.action.remove' => 'Remove', + + 'pl.grouperlite.form.group.template.label' => 'Select a template', + 'pl.grouperlite.form.group.template.empty' => '(choose one)', + 'pl.grouperlite.form.group.name.label' => 'Display name', + 'pl.grouperlite.form.group.name.help' => 'Name is the label that identifies this group, and might change.', + 'pl.grouperlite.form.group.stem.label' => 'Create in this folder:', + 'pl.grouperlite.form.group.stem.help' => 'Enter a folder name.', + 'pl.grouperlite.form.group.description.label' => 'Description:', + 'pl.grouperlite.form.group.description.help' => 'Description contains notes about the group, which could include: what the group represents, why it was created, etc.', + 'pl.grouperlite.form.group.privs.label' => 'Privileges', + 'pl.grouperlite.form.group.privs.label.READ' => 'READ', + 'pl.grouperlite.form.group.privs.label.VIEW' => 'VIEW', + 'pl.grouperlite.form.group.privs.label.OPTIN' => 'OPTIN', + 'pl.grouperlite.form.group.privs.label.OPTOUT' => 'OPTOUT', + 'pl.grouperlite.form.group.privs.label.ATTRIBUTE_READ' => 'ATTRIBUTE READ', + 'pl.grouperlite.form.group.subs.label' => 'Subscribers:', + 'pl.grouperlite.form.group.subs.help' => 'Select subscribers to add to the group.', + 'pl.grouperlite.form.group.subs.placeholder' => 'Search subscribers', + 'pl.grouperlite.form.group.action.save' => 'Save Group', 'pl.grouperlite.search.tags.text' => 'Search', ); \ No newline at end of file diff --git a/View/Elements/Components/search.ctp b/View/Elements/Components/search.ctp index 05d861f..f22b80b 100644 --- a/View/Elements/Components/search.ctp +++ b/View/Elements/Components/search.ctp @@ -1,5 +1,5 @@ + +