From 2e890e9597da29346a1fbe0db45f48e4a2be86e7 Mon Sep 17 00:00:00 2001 From: nikrou Date: Tue, 2 Mar 2010 14:54:22 +0000 Subject: Feature 1451 : localization with gettext Use php-gettext (developpement version rev43, because of php5.3) as fallback Use native language (english) instead of key for translation Keep directory en_UK for english customization Need some refactoring for plurals Todo : managing plugins in the same way git-svn-id: http://piwigo.org/svn/trunk@5021 68402e56-0260-453c-a942-63ccdbb3a9ee --- admin/user_list.php | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'admin/user_list.php') diff --git a/admin/user_list.php b/admin/user_list.php index 6054d0160..1583de0a1 100644 --- a/admin/user_list.php +++ b/admin/user_list.php @@ -168,10 +168,10 @@ include_once(PHPWG_ROOT_PATH.'admin/include/functions.php'); check_status(ACCESS_ADMINISTRATOR); $page['order_by_items'] = array( - 'id' => l10n('registration_date'), + 'id' => l10n('registration date'), 'username' => l10n('Username'), 'level' => l10n('Privacy level'), - 'language' => l10n('language'), + 'Language' => l10n('Language'), ); $page['direction_items'] = array( @@ -191,19 +191,19 @@ if ($conf['double_password_type_in_admin'] == true) { if(empty($_POST['password'])) { - array_push($page['errors'], l10n('Password is missing')); + array_push($page['errors'], l10n('Password is missing. Please enter the password.')); } else if(empty($_POST['password_conf'])) { - array_push($page['errors'], l10n('Password confirmation is missing')); + array_push($page['errors'], l10n('Password confirmation is missing. Please confirm the chosen password.')); } else if(empty($_POST['email'])) { - array_push($page['errors'], l10n('Email address is missing')); + array_push($page['errors'], l10n('Email address is missing. Please specify an email address.')); } else if ($_POST['password'] != $_POST['password_conf']) { - array_push($page['errors'], l10n('Password confirmation error')); + array_push($page['errors'], l10n('Password confirmation error.')); } else { @@ -215,7 +215,7 @@ if ($conf['double_password_type_in_admin'] == true) array_push( $page['infos'], sprintf( - l10n('user "%s" added'), + l10n('user \"%s\" added'), $_POST['login'] ) ); @@ -235,7 +235,7 @@ else if ($conf['double_password_type_in_admin'] == false) array_push( $page['infos'], sprintf( - l10n('user "%s" added'), + l10n('user \"%s\" added'), $_POST['login'] ) ); @@ -693,7 +693,7 @@ foreach ($visible_user_list as $local_user) } $properties[] = (isset($local_user['enabled_high']) and ($local_user['enabled_high'] == 'true')) - ? l10n('is_high_enabled') : l10n('is_high_disabled'); + ? l10n('') : l10n(''); $template->append( 'users', @@ -704,12 +704,12 @@ foreach ($visible_user_list as $local_user) 'U_PERM' => $perm_url.$local_user['id'], 'USERNAME' => stripslashes($local_user['username']) .($local_user['id'] == $conf['guest_id'] - ? '
['.l10n('is_the_guest').']' : '') + ? '
['.l10n('guest').']' : '') .($local_user['id'] == $conf['default_user_id'] - ? '
['.l10n('is_the_default').']' : ''), + ? '
['.l10n('default values').']' : ''), 'STATUS' => l10n('user_status_'. $local_user['status']).(($local_user['adviser'] == 'true') - ? '
['.l10n('adviser').']' : ''), + ? '
['.l10n('Adviser').']' : ''), 'EMAIL' => get_email_address_as_display_text($local_user['email']), 'GROUPS' => $groups_string, 'PROPERTIES' => implode( ', ', $properties), -- cgit v1.2.3