From 4b120aed1043e3dd8cb0ee5f76789cc6087bc8fa Mon Sep 17 00:00:00 2001 From: Yung Han Khoe Date: Fri, 16 May 2008 21:23:56 +0000 Subject: [PATCH] Updated internationalization and hoverhelp --- lib/WebGUI/Asset/Wobject/UserList.pm | 37 ++++---- lib/WebGUI/i18n/English/Asset_UserList.pm | 111 ++++++++++++++++++++++ 2 files changed, 132 insertions(+), 16 deletions(-) create mode 100644 lib/WebGUI/i18n/English/Asset_UserList.pm diff --git a/lib/WebGUI/Asset/Wobject/UserList.pm b/lib/WebGUI/Asset/Wobject/UserList.pm index 96da17edf..3a775be04 100644 --- a/lib/WebGUI/Asset/Wobject/UserList.pm +++ b/lib/WebGUI/Asset/Wobject/UserList.pm @@ -104,38 +104,43 @@ sub definition { showGroupId=>{ fieldType=>"group", - defaultValue=>"", - label=>$i18n->get("Group to show"), + defaultValue=>"7", + label=>$i18n->get("Group to show label"), + hoverHelp=>$i18n->get('Group to show description'), tab=>"display", }, hideGroupId=>{ fieldType=>"group", - defaultValue=>"", - label=>$i18n->get("Group to hide"), - tab=>"display", + defaultValue=>"3", + label=>$i18n->get("Group to hide label"), + hoverHelp=>$i18n->get('Group to hide description'), + tab=>"display", }, usersPerPage=>{ fieldType=>"integer", defaultValue=>"25", tab=>"display", - label=>'Users per Page', + hoverHelp=>$i18n->get('Users per page description'), + label=>$i18n->get("Users per page label"), }, alphabet=>{ fieldType=>"text", defaultValue=>"", tab=>"display", - label=>'Alphabet', + label=>$i18n->get("alphabet label"), + hoverHelp=>$i18n->get('alphabet description'), }, showOnlyVisibleAsNamed=>{ fieldType=>"yesNo", defaultValue=>"0", tab=>"display", - label=>'Show only visible fields as named tmpl_vars.', + label=>$i18n->get("showOnlyVisibleAsNamed label"), + hoverHelp=>$i18n->get('showOnlyVisibleAsNamed description'), }, ); push(@{$definition}, { - assetName=>"UserList", + assetName=>$i18n->get('assetName'), icon=>'userlist.gif', autoGenerateForms=>1, tableName=>'UserList', @@ -392,9 +397,9 @@ sub view { "profileField_label"=>WebGUI::Operation::Shared::secureEval($self->session,$profileField->{label}), }); } - $var{"numberOfProfileFields"} = scalar(@profileFields); - $var{"profileNotPublic_message"} = $i18n->get("Profile not public"); - $var{"emailNotPublic_message"} = $i18n->get("Email not public"); + $var{numberOfProfileFields} = scalar(@profileFields); + $var{profileNotPublic_message} = $i18n->get('Profile not public message'); + $var{emailNotPublic_message} = $i18n->get('Email not public message'); $var{profileField_loop} = \@profileField_loop; $var{user_loop} = \@users; $p->appendTemplateVars(\%var); @@ -406,18 +411,18 @@ sub view { name=>'searchType', value=>'or', options=> { - 'or' => 'or', - 'and' => 'and', + 'or' => $i18n->get('or label'), + 'and' => $i18n->get('and label'), } }); - $var{'searchFormQuery_label'} = $i18n->get('query'); + $var{'searchFormQuery_label'} = $i18n->get('query label'); $var{'searchFormQuery_form'} = WebGUI::Form::text($self->session,{ name=>'search', value=>$self->session->form->process("search"), }); - $var{searchFormSubmit} = WebGUI::Form::submit($self->session,{value => "Search"}); + $var{searchFormSubmit} = WebGUI::Form::submit($self->session,{value => $i18n->get('submit search label')}); $var{searchFormFooter} = WebGUI::Form::formFooter($self->session); $var{alphabetSearchLoop} = $self->getAlphabetSearchLoop("lastName",$self->get("alphabet")); diff --git a/lib/WebGUI/i18n/English/Asset_UserList.pm b/lib/WebGUI/i18n/English/Asset_UserList.pm new file mode 100644 index 000000000..a9edfdc44 --- /dev/null +++ b/lib/WebGUI/i18n/English/Asset_UserList.pm @@ -0,0 +1,111 @@ +package WebGUI::i18n::English::Asset_UserList; + +our $I18N = { + 'assetName' => { + message => q|User List|, + lastUpdated => 1081514049, + }, + + 'UserList Add/Edit' => { + message => q|User List Add/Edit|, + lastUpdated => 1081514049 + }, + + 'UserList Template' => { + message => q|User List Template|, + lastUpdated => 1081514049 + }, + + 'Edit/Add UserList' => { + message => q|Edit/Add User List|, + lastUpdated => 1081514049 + }, + + 'Group to show label' => { + message => q|Group to show|, + lastUpdated => 1081514049 + }, + + 'Group to show description' => { + message => q|Only users in this group will be shown in the user list. The default value is +'Everyone'.|, + lastUpdated => 1081514049 + }, + + 'Group to hide label' => { + message => q|Group to hide|, + lastUpdated => 1081514049 + }, + + 'Group to hide description' => { + message => q|Select a group to hide from the user list. The default value is 'Admins'.|, + lastUpdated => 1081514049 + }, + + 'Users per page label' => { + message => q|Users per page|, + lastUpdated => 1081514049 + }, + + 'Users per page description' => { + message => q|The number of users per page|, + lastUpdated => 1081514049 + }, + + 'showOnlyVisibleAsNamed label' => { + message => q|Show only visible fields as named tmpl_vars|, + lastUpdated => 1081514049 + }, + + 'showOnlyVisibleAsNamed description' => { + message => q|If set to Yes then only fields that are set to 'visible' in the user profile settings +will be available as named tmpl_vars|, + lastUpdated => 1081514049 + }, + + 'alphabet label' => { + message => q|Alphabet|, + lastUpdated => 1081514049 + }, + + 'alphabet description' => { + message => q|The alphabet that is used for the alphabet search. Has to be a string of comma +seperated values|, + lastUpdated => 1081514049 + }, + + 'Profile not public message' => { + message => q|Profile not public|, + lastUpdated => 1081514049 + }, + + 'Email not public message' => { + message => q|Email not public|, + lastUpdated => 1081514049 + }, + + 'query label' => { + message => q|Query|, + lastUpdated => 1081514049 + }, + + 'submit search label' => { + message => q|Search|, + lastUpdated => 1081514049 + }, + + 'or label' => { + message => q|Or|, + lastUpdated => 1081514049 + }, + + 'and label' => { + message => q|And|, + lastUpdated => 1081514049 + }, + + +}; + +1; +