diff options
author | rub <rub@piwigo.org> | 2008-01-30 22:07:07 +0000 |
---|---|---|
committer | rub <rub@piwigo.org> | 2008-01-30 22:07:07 +0000 |
commit | 69159c0e9238fd369dca2181af6fb9de47b14440 (patch) | |
tree | 545ea813c006506d1bde84e0da8cc5f7b686cd03 /admin | |
parent | d5015da6ec45bbb08732b28dfbfe9e089504c08d (diff) |
Replace old use of $lang by l10n function.
git-svn-id: http://piwigo.org/svn/trunk@2201 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r-- | admin/cat_list.php | 18 | ||||
-rw-r--r-- | admin/cat_modify.php | 30 | ||||
-rw-r--r-- | admin/cat_options.php | 28 | ||||
-rw-r--r-- | admin/configuration.php | 16 | ||||
-rw-r--r-- | admin/element_set.php | 2 | ||||
-rw-r--r-- | admin/element_set_global.php | 2 | ||||
-rw-r--r-- | admin/element_set_unit.php | 2 | ||||
-rw-r--r-- | admin/group_list.php | 4 | ||||
-rw-r--r-- | admin/group_perm.php | 6 | ||||
-rw-r--r-- | admin/history.php | 2 | ||||
-rw-r--r-- | admin/picture_modify.php | 2 | ||||
-rw-r--r-- | admin/thumbnail.php | 52 | ||||
-rw-r--r-- | admin/user_list.php | 18 | ||||
-rw-r--r-- | admin/user_perm.php | 4 | ||||
-rw-r--r-- | admin/ws_checker.php | 12 |
15 files changed, 99 insertions, 99 deletions
diff --git a/admin/cat_list.php b/admin/cat_list.php index e11e13b8b..aac736a21 100644 --- a/admin/cat_list.php +++ b/admin/cat_list.php @@ -71,7 +71,7 @@ $categories = array(); $base_url = PHPWG_ROOT_PATH.'admin.php?page=cat_list'; $navigation = '<a class="" href="'.$base_url.'">'; -$navigation.= $lang['home']; +$navigation.= l10n('home'); $navigation.= '</a>'; // +-----------------------------------------------------------------------+ @@ -81,7 +81,7 @@ $navigation.= '</a>'; if (isset($_GET['delete']) and is_numeric($_GET['delete']) and !is_adviser()) { delete_categories(array($_GET['delete'])); - array_push($page['infos'], $lang['cat_virtual_deleted']); + array_push($page['infos'], l10n('cat_virtual_deleted')); ordering(); update_global_rank(); } @@ -166,13 +166,13 @@ $template->assign_vars(array( 'CATEGORIES_NAV'=>$navigation, 'F_ACTION'=>$form_action, - 'L_ADD_VIRTUAL'=>$lang['cat_add'], - 'L_SUBMIT'=>$lang['submit'], - 'L_STORAGE'=>$lang['storage'], - 'L_NB_IMG'=>$lang['pictures'], - 'L_MOVE_UP'=>$lang['up'], - 'L_EDIT'=>$lang['edit'], - 'L_DELETE'=>$lang['delete'], + 'L_ADD_VIRTUAL'=>l10n('cat_add'), + 'L_SUBMIT'=>l10n('submit'), + 'L_STORAGE'=>l10n('storage'), + 'L_NB_IMG'=>l10n('pictures'), + 'L_MOVE_UP'=>l10n('up'), + 'L_EDIT'=>l10n('edit'), + 'L_DELETE'=>l10n('delete'), )); $tpl = array('cat_first','cat_last'); diff --git a/admin/cat_modify.php b/admin/cat_modify.php index 63da625c5..6f3c4b075 100644 --- a/admin/cat_modify.php +++ b/admin/cat_modify.php @@ -113,7 +113,7 @@ WHERE '; } pwg_query($query); - array_push($page['infos'], $lang['editcat_confirm']); + array_push($page['infos'], l10n('editcat_confirm')); } else if (isset($_POST['set_random_representant'])) { @@ -262,20 +262,20 @@ $template->assign_vars( 'IMG_ORDER_DEFAULT' => empty($category['image_order']) ? 'checked="checked"' : '', - 'L_EDIT_NAME' => $lang['name'], - 'L_STORAGE' => $lang['storage'], - 'L_REMOTE_SITE' => $lang['remote_site'], - 'L_EDIT_COMMENT' => $lang['description'], - 'L_EDIT_STATUS' => $lang['conf_access'], - 'L_STATUS_PUBLIC' => $lang['public'], - 'L_STATUS_PRIVATE' => $lang['private'], - 'L_EDIT_LOCK' => $lang['lock'], - 'L_EDIT_UPLOADABLE' => $lang['editcat_uploadable'], - 'L_EDIT_COMMENTABLE' => $lang['comments'], - 'L_YES' => $lang['yes'], - 'L_NO' => $lang['no'], - 'L_SUBMIT' => $lang['submit'], - 'L_SET_RANDOM_REPRESENTANT'=>$lang['cat_representant'], + 'L_EDIT_NAME' => l10n('name'), + 'L_STORAGE' => l10n('storage'), + 'L_REMOTE_SITE' => l10n('remote_site'), + 'L_EDIT_COMMENT' => l10n('description'), + 'L_EDIT_STATUS' => l10n('conf_access'), + 'L_STATUS_PUBLIC' => l10n('public'), + 'L_STATUS_PRIVATE' => l10n('private'), + 'L_EDIT_LOCK' => l10n('lock'), + 'L_EDIT_UPLOADABLE' => l10n('editcat_uploadable'), + 'L_EDIT_COMMENTABLE' => l10n('comments'), + 'L_YES' => l10n('yes'), + 'L_NO' => l10n('no'), + 'L_SUBMIT' => l10n('submit'), + 'L_SET_RANDOM_REPRESENTANT'=>l10n('cat_representant'), 'U_JUMPTO' => make_index_url( array( diff --git a/admin/cat_options.php b/admin/cat_options.php index 13f8d0b80..0a9b93e8f 100644 --- a/admin/cat_options.php +++ b/admin/cat_options.php @@ -154,8 +154,8 @@ $base_url = PHPWG_ROOT_PATH.'admin.php?page=cat_options&section='; $template->assign_vars( array( - 'L_SUBMIT'=>$lang['submit'], - 'L_RESET'=>$lang['reset'], + 'L_SUBMIT'=>l10n('submit'), + 'L_RESET'=>l10n('reset'), 'U_HELP' => PHPWG_ROOT_PATH.'/popuphelp.php?page=cat_options', @@ -238,9 +238,9 @@ SELECT id,name,uppercats,global_rank ;'; $template->assign_vars( array( - 'L_SECTION' => $lang['cat_upload_title'], - 'L_CAT_OPTIONS_TRUE' => $lang['authorized'], - 'L_CAT_OPTIONS_FALSE' => $lang['forbidden'], + 'L_SECTION' => l10n('cat_upload_title'), + 'L_CAT_OPTIONS_TRUE' => l10n('authorized'), + 'L_CAT_OPTIONS_FALSE' => l10n('forbidden'), ) ); break; @@ -259,9 +259,9 @@ SELECT id,name,uppercats,global_rank ;'; $template->assign_vars( array( - 'L_SECTION' => $lang['cat_comments_title'], - 'L_CAT_OPTIONS_TRUE' => $lang['authorized'], - 'L_CAT_OPTIONS_FALSE' => $lang['forbidden'], + 'L_SECTION' => l10n('cat_comments_title'), + 'L_CAT_OPTIONS_TRUE' => l10n('authorized'), + 'L_CAT_OPTIONS_FALSE' => l10n('forbidden'), ) ); break; @@ -280,9 +280,9 @@ SELECT id,name,uppercats,global_rank ;'; $template->assign_vars( array( - 'L_SECTION' => $lang['cat_lock_title'], - 'L_CAT_OPTIONS_TRUE' => $lang['unlocked'], - 'L_CAT_OPTIONS_FALSE' => $lang['locked'], + 'L_SECTION' => l10n('cat_lock_title'), + 'L_CAT_OPTIONS_TRUE' => l10n('unlocked'), + 'L_CAT_OPTIONS_FALSE' => l10n('locked'), ) ); break; @@ -301,9 +301,9 @@ SELECT id,name,uppercats,global_rank ;'; $template->assign_vars( array( - 'L_SECTION' => $lang['cat_status_title'], - 'L_CAT_OPTIONS_TRUE' => $lang['cat_public'], - 'L_CAT_OPTIONS_FALSE' => $lang['cat_private'], + 'L_SECTION' => l10n('cat_status_title'), + 'L_CAT_OPTIONS_TRUE' => l10n('cat_public'), + 'L_CAT_OPTIONS_FALSE' => l10n('cat_private'), ) ); break; diff --git a/admin/configuration.php b/admin/configuration.php index 7e0b2a9c3..4a44efc05 100644 --- a/admin/configuration.php +++ b/admin/configuration.php @@ -81,7 +81,7 @@ if (isset($_POST['submit']) and !is_adviser()) { if ( !url_is_remote($_POST['gallery_url']) ) { - array_push($page['errors'], $lang['conf_gallery_url_error']); + array_push($page['errors'], l10n('conf_gallery_url_error')); } foreach( $main_checkboxes as $checkbox) { @@ -105,7 +105,7 @@ if (isset($_POST['submit']) and !is_adviser()) or $_POST['nb_comment_page'] < 5 or $_POST['nb_comment_page'] > 50) { - array_push($page['errors'], $lang['conf_nb_comment_page_error']); + array_push($page['errors'], l10n('conf_nb_comment_page_error')); } foreach( $comments_checkboxes as $checkbox) { @@ -147,7 +147,7 @@ WHERE param = \''.$row['param'].'\' pwg_query($query); } } - array_push($page['infos'], $lang['conf_confirmation']); + array_push($page['infos'], l10n('conf_confirmation')); } //------------------------------------------------------ $conf reinitialization @@ -192,10 +192,10 @@ $action.= '&section='.$page['section']; $template->assign_vars( array( - 'L_YES'=>$lang['yes'], - 'L_NO'=>$lang['no'], - 'L_SUBMIT'=>$lang['submit'], - 'L_RESET'=>$lang['reset'], + 'L_YES'=>l10n('yes'), + 'L_NO'=>l10n('no'), + 'L_SUBMIT'=>l10n('submit'), + 'L_RESET'=>l10n('reset'), 'U_HELP' => PHPWG_ROOT_PATH.'popuphelp.php?page=configuration', @@ -281,7 +281,7 @@ switch ($page['section']) { // Reload user $edit_user = build_user($conf['default_user_id'], false); - array_push($page['infos'], $lang['conf_confirmation']); + array_push($page['infos'], l10n('conf_confirmation')); } } $page['errors'] = array_merge($page['errors'], $errors); diff --git a/admin/element_set.php b/admin/element_set.php index fe005ee44..4d096a1e3 100644 --- a/admin/element_set.php +++ b/admin/element_set.php @@ -124,7 +124,7 @@ SELECT image_id } else if ('caddie' == $_GET['cat']) { - $page['title'] = $lang['caddie']; + $page['title'] = l10n('caddie'); $query = ' SELECT element_id diff --git a/admin/element_set_global.php b/admin/element_set_global.php index 6cb0aab39..a6d3eb282 100644 --- a/admin/element_set_global.php +++ b/admin/element_set_global.php @@ -213,7 +213,7 @@ $template->assign_vars( array( 'CATEGORIES_NAV'=>$page['title'], - 'L_SUBMIT'=>$lang['submit'], + 'L_SUBMIT'=>l10n('submit'), 'U_DISPLAY'=>$base_url.get_query_string_diff(array('display')), diff --git a/admin/element_set_unit.php b/admin/element_set_unit.php index c58c53649..cefd8ee4c 100644 --- a/admin/element_set_unit.php +++ b/admin/element_set_unit.php @@ -140,7 +140,7 @@ $template->assign_vars( array( 'CATEGORIES_NAV'=>$page['title'], - 'L_SUBMIT'=>$lang['submit'], + 'L_SUBMIT'=>l10n('submit'), 'U_ELEMENTS_PAGE' =>$base_url.get_query_string_diff(array('display','start')), diff --git a/admin/group_list.php b/admin/group_list.php index c5bd7ac70..2d8bbfbee 100644 --- a/admin/group_list.php +++ b/admin/group_list.php @@ -87,7 +87,7 @@ if (isset($_POST['submit_add']) and !is_adviser()) { if (empty($_POST['groupname'])) { - array_push($page['errors'], $lang['group_add_error1']); + array_push($page['errors'], l10n('group_add_error1')); } if (count($page['errors']) == 0) { @@ -100,7 +100,7 @@ SELECT COUNT(*) list($count) = mysql_fetch_row(pwg_query($query)); if ($count != 0) { - array_push($page['errors'], $lang['group_add_error2']); + array_push($page['errors'], l10n('group_add_error2')); } } if (count($page['errors']) == 0) diff --git a/admin/group_perm.php b/admin/group_perm.php index afec1fb09..0ddc4114d 100644 --- a/admin/group_perm.php +++ b/admin/group_perm.php @@ -141,9 +141,9 @@ $template->assign_vars( get_groupname($page['group'] ) ), - 'L_CAT_OPTIONS_TRUE'=>$lang['authorized'], - 'L_CAT_OPTIONS_FALSE'=>$lang['forbidden'], - 'L_CAT_OPTIONS_INFO'=>$lang['permuser_info'], + 'L_CAT_OPTIONS_TRUE'=>l10n('authorized'), + 'L_CAT_OPTIONS_FALSE'=>l10n('forbidden'), + 'L_CAT_OPTIONS_INFO'=>l10n('permuser_info'), 'F_ACTION' => PHPWG_ROOT_PATH. diff --git a/admin/history.php b/admin/history.php index 0a5d64284..5c2264384 100644 --- a/admin/history.php +++ b/admin/history.php @@ -146,7 +146,7 @@ INSERT INTO '.SEARCH_TABLE.' } else { - array_push($page['errors'], $lang['search_one_clause_at_least']); + array_push($page['errors'], l10n('search_one_clause_at_least')); } } diff --git a/admin/picture_modify.php b/admin/picture_modify.php index f40bae137..10f42d34c 100644 --- a/admin/picture_modify.php +++ b/admin/picture_modify.php @@ -65,7 +65,7 @@ if (isset($_POST['date_creation_action']) $_POST['date_creation_year']) ) { - array_push($page['errors'], $lang['err_date']); + array_push($page['errors'], l10n('err_date')); } } diff --git a/admin/thumbnail.php b/admin/thumbnail.php index 345d08b3e..44c749236 100644 --- a/admin/thumbnail.php +++ b/admin/thumbnail.php @@ -119,7 +119,7 @@ function RatioResizeImg($path, $newWidth, $newHeight, $tn_ext) // creation and backup of final picture if (!is_writable($tndir)) { - array_push($page['errors'], '['.$tndir.'] : '.$lang['no_write_access']); + array_push($page['errors'], '['.$tndir.'] : '.l10n('no_write_access')); return false; } imagejpeg($destImage, $dest_file); @@ -140,14 +140,14 @@ function RatioResizeImg($path, $newWidth, $newHeight, $tn_ext) // error else { - echo $lang['tn_no_support']." "; + echo l10n('tn_no_support')." "; if ( isset( $extenstion ) ) { - echo $lang['tn_format'].' '.$extension; + echo l10n('tn_format').' '.$extension; } else { - echo $lang['tn_thisformat']; + echo l10n('tn_thisformat'); } exit(); } @@ -161,26 +161,26 @@ $stats = array(); $template->set_filenames( array('thumbnail'=>'admin/thumbnail.tpl') ); $template->assign_vars(array( - 'L_THUMBNAIL_TITLE'=>$lang['tn_dirs_title'], - 'L_UNLINK'=>$lang['tn_no_missing'], - 'L_MISSING_THUMBNAILS'=>$lang['tn_dirs_alone'], - 'L_RESULTS'=>$lang['tn_results_title'], - 'L_PATH'=>$lang['path'], - 'L_FILESIZE'=>$lang['filesize'], - 'L_GENERATED'=>$lang['tn_results_gen_time'], - 'L_THUMBNAIL'=>$lang['thumbnail'], - 'L_PARAMS'=>$lang['tn_params_title'], - 'L_GD'=>$lang['tn_params_GD'], - 'L_CREATE'=>$lang['tn_params_create'], - 'L_SUBMIT'=>$lang['submit'], - 'L_REMAINING'=>$lang['tn_alone_title'], - 'L_TN_STATS'=>$lang['tn_stats'], - 'L_TN_NB_STATS'=>$lang['tn_stats_nb'], - 'L_TN_TOTAL'=>$lang['tn_stats_total'], - 'L_TN_MAX'=>$lang['tn_stats_max'], - 'L_TN_MIN'=>$lang['tn_stats_min'], - 'L_TN_AVERAGE'=>$lang['tn_stats_mean'], - 'L_ALL'=>$lang['tn_all'], + 'L_THUMBNAIL_TITLE'=>l10n('tn_dirs_title'), + 'L_UNLINK'=>l10n('tn_no_missing'), + 'L_MISSING_THUMBNAILS'=>l10n('tn_dirs_alone'), + 'L_RESULTS'=>l10n('tn_results_title'), + 'L_PATH'=>l10n('path'), + 'L_FILESIZE'=>l10n('filesize'), + 'L_GENERATED'=>l10n('tn_results_gen_time'), + 'L_THUMBNAIL'=>l10n('thumbnail'), + 'L_PARAMS'=>l10n('tn_params_title'), + 'L_GD'=>l10n('tn_params_GD'), + 'L_CREATE'=>l10n('tn_params_create'), + 'L_SUBMIT'=>l10n('submit'), + 'L_REMAINING'=>l10n('tn_alone_title'), + 'L_TN_STATS'=>l10n('tn_stats'), + 'L_TN_NB_STATS'=>l10n('tn_stats_nb'), + 'L_TN_TOTAL'=>l10n('tn_stats_total'), + 'L_TN_MAX'=>l10n('tn_stats_max'), + 'L_TN_MIN'=>l10n('tn_stats_min'), + 'L_TN_AVERAGE'=>l10n('tn_stats_mean'), + 'L_ALL'=>l10n('tn_all'), 'U_HELP' => PHPWG_ROOT_PATH.'popuphelp.php?page=thumbnail', @@ -254,11 +254,11 @@ if (isset($_POST['submit'])) // checking criteria if (!ereg('^[0-9]{2,3}$', $_POST['width']) or $_POST['width'] < 10) { - array_push($page['errors'], $lang['tn_err_width'].' 10'); + array_push($page['errors'], l10n('tn_err_width').' 10'); } if (!ereg('^[0-9]{2,3}$', $_POST['height']) or $_POST['height'] < 10) { - array_push($page['errors'], $lang['tn_err_height'].' 10'); + array_push($page['errors'], l10n('tn_err_height').' 10'); } // picture miniaturization diff --git a/admin/user_list.php b/admin/user_list.php index 44da05558..6e648101f 100644 --- a/admin/user_list.php +++ b/admin/user_list.php @@ -178,15 +178,15 @@ include_once(PHPWG_ROOT_PATH.'admin/include/functions.php'); check_status(ACCESS_ADMINISTRATOR); $page['order_by_items'] = array( - 'id' => $lang['registration_date'], - 'username' => $lang['Username'], + 'id' => l10n('registration_date'), + 'username' => l10n('Username'), 'level' => l10n('Privacy level'), 'language' => l10n('language'), ); $page['direction_items'] = array( - 'asc' => $lang['ascending'], - 'desc' => $lang['descending'] + 'asc' => l10n('ascending'), + 'desc' => l10n('descending') ); // +-----------------------------------------------------------------------+ @@ -568,7 +568,7 @@ foreach (get_enums(USER_INFOS_TABLE, 'status') as $status) $blockname, array( 'VALUE' => $status, - 'CONTENT' => $lang['user_status_'.$status], + 'CONTENT' => l10n('user_status_'.$status), 'SELECTED' => $selected )); } @@ -688,7 +688,7 @@ foreach (get_enums(USER_INFOS_TABLE, 'status') as $status) $blockname, array( 'VALUE' => $status, - 'CONTENT' => $lang['user_status_'.$status], + 'CONTENT' => l10n('user_status_'.$status), 'SELECTED' => $selected )); } @@ -838,7 +838,7 @@ foreach ($visible_user_list as $num => $local_user) } $properties[] = (isset($local_user['enabled_high']) and ($local_user['enabled_high'] == 'true')) - ? $lang['is_high_enabled'] : $lang['is_high_disabled']; + ? l10n('is_high_enabled') : l10n('is_high_disabled'); $template->assign_block_vars( 'user', @@ -853,8 +853,8 @@ foreach ($visible_user_list as $num => $local_user) ? '<BR />['.l10n('is_the_guest').']' : '') .($local_user['id'] == $conf['default_user_id'] ? '<BR />['.l10n('is_the_default').']' : ''), - 'STATUS' => $lang['user_status_'. - $local_user['status']].(($local_user['adviser'] == 'true') + 'STATUS' => l10n('user_status_'. + $local_user['status']).(($local_user['adviser'] == 'true') ? '<BR />['.l10n('adviser').']' : ''), 'EMAIL' => get_email_address_as_display_text($local_user['email']), 'GROUPS' => $groups_string, diff --git a/admin/user_perm.php b/admin/user_perm.php index cfe15842c..c5e2348d1 100644 --- a/admin/user_perm.php +++ b/admin/user_perm.php @@ -134,8 +134,8 @@ $template->assign_vars( get_username($page['user'] ) ), - 'L_CAT_OPTIONS_TRUE'=>$lang['authorized'], - 'L_CAT_OPTIONS_FALSE'=>$lang['forbidden'], + 'L_CAT_OPTIONS_TRUE'=>l10n('authorized'), + 'L_CAT_OPTIONS_FALSE'=>l10n('forbidden'), 'F_ACTION' => PHPWG_ROOT_PATH. diff --git a/admin/ws_checker.php b/admin/ws_checker.php index cec12d4e9..6a5efb4fc 100644 --- a/admin/ws_checker.php +++ b/admin/ws_checker.php @@ -157,7 +157,7 @@ VALUES (' . " $template->assign_block_vars( 'update_result', array( - 'UPD_ELEMENT'=> $lang['ws_adding_legend'].$lang['ws_success_upd'], + 'UPD_ELEMENT'=> l10n('ws_adding_legend').l10n('ws_success_upd'), ) ); } @@ -179,14 +179,14 @@ if (isset($_POST['wsu_submit'])) $template->assign_block_vars( 'update_result', array( - 'UPD_ELEMENT'=> $lang['ws_update_legend'].$lang['ws_success_upd'], + 'UPD_ELEMENT'=> l10n('ws_update_legend').l10n('ws_success_upd'), ) ); } else { $template->assign_block_vars( 'update_result', array( - 'UPD_ELEMENT'=> $lang['ws_update_legend'].$lang['ws_failed_upd'], + 'UPD_ELEMENT'=> l10n('ws_update_legend').l10n('ws_failed_upd'), ) ); } @@ -205,15 +205,15 @@ if (isset($_POST['wsX_submit'])) $template->assign_block_vars( 'update_result', array( - 'UPD_ELEMENT'=> $lang['ws_delete_legend'].$lang['ws_success_upd'], + 'UPD_ELEMENT'=> l10n('ws_delete_legend').l10n('ws_success_upd'), ) ); } else { $template->assign_block_vars( 'update_result', array( - 'UPD_ELEMENT'=> $lang['Not selected / Not confirmed'] - .$lang['ws_failed_upd'], + 'UPD_ELEMENT'=> l10n('Not selected / Not confirmed') + .l10n('ws_failed_upd'), ) ); } |