Changeset 5021 for trunk/include
- Timestamp:
- Mar 2, 2010, 3:54:22 PM (14 years ago)
- Location:
- trunk/include
- Files:
-
- 4 added
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/calendar_base.class.php
r5014 r5021 96 96 elseif ('any' === $date_component ) 97 97 { 98 $label = l10n(' calendar_any');98 $label = l10n('All'); 99 99 } 100 100 return $label; … … 193 193 ); 194 194 $nav_bar_datas[]=array( 195 'LABEL' => l10n(' calendar_any'),195 'LABEL' => l10n('All'), 196 196 'URL' => $url 197 197 ); -
trunk/include/common.inc.php
r5014 r5021 174 174 $user['internal_status']['guest_must_be_guest'] === true) 175 175 { 176 $header_msgs[] = l10n(' guest_must_be_guest');176 $header_msgs[] = l10n('Bad status for user "guest", using default status. Please notify the webmaster.'); 177 177 } 178 178 179 179 if ($conf['gallery_locked']) 180 180 { 181 $header_msgs[] = l10n(' gallery_locked_message');181 $header_msgs[] = l10n('The gallery is locked for maintenance. Please, come back later.'); 182 182 183 183 if ( script_basename() != 'identification' and !is_admin() ) … … 186 186 @header('Retry-After: 900'); 187 187 header('Content-Type: text/html; charset='.get_pwg_charset()); 188 echo '<a href="'.get_absolute_root_url(false).'identification.php">'.l10n(' gallery_locked_message').'</a>';188 echo '<a href="'.get_absolute_root_url(false).'identification.php">'.l10n('The gallery is locked for maintenance. Please, come back later.').'</a>'; 189 189 echo str_repeat( ' ', 512); //IE6 doesn't error output if below a size 190 190 exit(); … … 204 204 if (is_adviser()) 205 205 { 206 $header_msgs[] = l10n(' adviser_mode_enabled');206 $header_msgs[] = l10n('Adviser mode enabled'); 207 207 } 208 208 -
trunk/include/functions.inc.php
r5014 r5021 31 31 include_once( PHPWG_ROOT_PATH .'include/functions_url.inc.php' ); 32 32 include_once( PHPWG_ROOT_PATH .'include/functions_plugins.inc.php' ); 33 include_once( PHPWG_ROOT_PATH .'include/php-gettext/gettext.inc.php' ); 33 34 34 35 //----------------------------------------------------------- generic functions … … 40 41 ); 41 42 if (!empty($fields)) 42 { 43 { 43 44 $fields = ','.$fields; 44 45 } … … 174 175 if ($mkd==false) 175 176 { 176 !($flags&MKGETDIR_DIE_ON_ERROR) or fatal_error( "$dir ".l10n('no _write_access'));177 !($flags&MKGETDIR_DIE_ON_ERROR) or fatal_error( "$dir ".l10n('no write access')); 177 178 return false; 178 179 } … … 190 191 if ( !is_writable($dir) ) 191 192 { 192 !($flags&MKGETDIR_DIE_ON_ERROR) or fatal_error( "$dir ".l10n('no _write_access'));193 !($flags&MKGETDIR_DIE_ON_ERROR) or fatal_error( "$dir ".l10n('no write access')); 193 194 return false; 194 195 } … … 214 215 { 215 216 array_push($errors, 216 '['.$dirname.'] : '.l10n('no _write_access'));217 '['.$dirname.'] : '.l10n('no write access')); 217 218 return false; 218 219 } … … 621 622 if (empty($msg)) 622 623 { 623 $msg = nl2br(l10n(' redirect_msg'));624 $msg = nl2br(l10n('Redirection...')); 624 625 } 625 626 … … 867 868 * @return string 868 869 */ 869 function l10n($key) 870 { 871 global $lang, $conf; 872 873 if ($conf['debug_l10n'] and !isset($lang[$key]) and !empty($key)) 874 { 875 trigger_error('[l10n] language key "'.$key.'" is not defined', E_USER_WARNING); 876 } 877 878 return isset($lang[$key]) ? $lang[$key] : $key; 870 function l10n($key, $textdomain='messages') 871 { 872 global $user; 873 874 if (empty($user['language'])) 875 { 876 $locale = $GLOBALS['language']; 877 } 878 else 879 { 880 $locale = $user['language']; 881 } 882 883 T_setlocale(LC_ALL, $locale.'.UTF-8'); 884 885 // Specify location of translation tables 886 T_bindtextdomain($textdomain, "./language"); 887 888 // Choose domain 889 T_textdomain($textdomain); 890 891 return T_gettext($key); 879 892 } 880 893 … … 888 901 * @return string 889 902 */ 890 function l10n_dec($singular_fmt_key, $plural_fmt_key, $decimal) 891 { 892 global $lang_info; 893 894 return 895 sprintf( 896 l10n(( 897 (($decimal > 1) or ($decimal == 0 and $lang_info['zero_plural'])) 898 ? $plural_fmt_key 899 : $singular_fmt_key 900 )), $decimal); 901 } 903 function l10n_dec($singular_fmt_key, $plural_fmt_key, 904 $decimal, $textdomain='messages') 905 { 906 global $user; 907 908 if (empty($user['language'])) 909 { 910 $locale = $GLOBALS['language']; 911 } 912 else 913 { 914 $locale = $user['language']; 915 } 916 917 T_setlocale(LC_ALL, $locale.'.UTF-8'); 918 919 // Specify location of translation tables 920 T_bindtextdomain($textdomain, "./language"); 921 922 // Choose domain 923 T_textdomain($textdomain); 924 925 return sprintf(T_ngettext($singular_fmt_key, 926 $plural_fmt_key, 927 $decimal), 928 $decimal 929 ); 930 } 931 902 932 /* 903 933 * returns a single element to use with l10n_args … … 1436 1466 { 1437 1467 $cache['get_icon']['title'] = sprintf( 1438 l10n(' elements posted during the last %d days'),1468 l10n('images posted during the last %d days'), 1439 1469 $user['recent_period'] 1440 1470 ); -
trunk/include/functions_category.inc.php
r5014 r5021 287 287 return trigger_event('get_category_preferred_image_orders', 288 288 array( 289 array(l10n(' default_sort'), '', true),289 array(l10n('Default'), '', true), 290 290 array(l10n('Average rate'), 'average_rate DESC', $conf['rate']), 291 array(l10n(' most_visited_cat'), 'hit DESC', true),291 array(l10n('Most visited'), 'hit DESC', true), 292 292 array(l10n('Creation date'), 'date_creation DESC', true), 293 293 array(l10n('Post date'), 'date_available DESC', true), … … 298 298 ('categories' == @$page['section'] and !isset($page['flat']) and !isset($page['chronology_field']) ) 299 299 ), 300 array( l10n(' permissions'), 'level DESC', is_admin() )300 array( l10n('Permissions'), 'level DESC', is_admin() ) 301 301 )); 302 302 } … … 480 480 if (! $short_message) 481 481 { 482 $display_text.= ' '.l10n('i mages_available_cpl');482 $display_text.= ' '.l10n('in this category'); 483 483 } 484 484 } -
trunk/include/functions_comment.inc.php
r5014 r5021 104 104 if ( $row['user_exists'] == 1 ) 105 105 { 106 array_push($infos, l10n(' comment_user_exists') );106 array_push($infos, l10n('This login is already used by another user') ); 107 107 $comment_action='reject'; 108 108 } … … 141 141 if ( pwg_db_num_rows( pwg_query( $query ) ) > 0 ) 142 142 { 143 array_push( $infos, l10n(' comment_anti-flood') );143 array_push( $infos, l10n('Anti-flood system : please wait for a moment before trying to post another comment') ); 144 144 $comment_action='reject'; 145 145 } … … 269 269 if ( pwg_db_num_rows( pwg_query( $query ) ) > 0 ) 270 270 { 271 //?? array_push( $infos, l10n(' comment_anti-flood') );271 //?? array_push( $infos, l10n('Anti-flood system : please wait for a moment before trying to post another comment') ); 272 272 $comment_action='reject'; 273 273 } -
trunk/include/functions_html.inc.php
r5014 r5021 293 293 { 294 294 echo '<meta http-equiv="Content-Type" content="text/html; charset=utf-8">'; 295 echo '<div style="text-align:center;">'.l10n(' access_forbiden').'<br>';296 echo '<a href="'.get_root_url().' identification.php">'.l10n('identification').'</a> ';297 echo '<a href="'.make_index_url().'">'.l10n(' home').'</a></div>';295 echo '<div style="text-align:center;">'.l10n('You are not authorized to access the requested page').'<br>'; 296 echo '<a href="'.get_root_url().'Identification.php">'.l10n('Identification').'</a> '; 297 echo '<a href="'.make_index_url().'">'.l10n('Home').'</a></div>'; 298 298 echo str_repeat( ' ', 512); //IE6 doesn't error output if below a size 299 299 exit(); … … 400 400 { 401 401 global $page; 402 $title = count($page['tags']) > 1 ? l10n('Tag s') : l10n('Tag');402 $title = count($page['tags']) > 1 ? l10n('Tag') : l10n('Tag'); 403 403 $title.= ' '; 404 404 … … 415 415 ) 416 416 .'" title="' 417 .l10n('See elements linked to this tag only')417 .l10n('See images linked to this tag only') 418 418 .'">' 419 419 .$page['tags'][$i]['name'] … … 432 432 ) 433 433 .'" style="border:none;" title="' 434 .l10n('remove this tag ')434 .l10n('remove this tag from the list') 435 435 .'"><img src="' 436 436 .get_root_url().get_themeconf('icon_dir').'/remove_s.png' -
trunk/include/functions_mail.inc.php
r5014 r5021 647 647 'PHPWG_URL' => PHPWG_URL, 648 648 649 'TITLE_MAIL' => urlencode(l10n(' title_send_mail')),649 'TITLE_MAIL' => urlencode(l10n('A comment on your site')), 650 650 'MAIL' => get_webmaster_mail_address() 651 651 )); -
trunk/include/functions_notification.inc.php
r5014 r5021 530 530 .' (' 531 531 .'<a href="'.make_index_url(array('section'=>'recent_pics')).'">' 532 .l10n(' recent_pics_cat').'</a>'532 .l10n('Recent pictures').'</a>' 533 533 .')' 534 534 .'</li><br>'; -
trunk/include/functions_user.inc.php
r5014 r5021 48 48 if ( !preg_match( $regex, $mail_address ) ) 49 49 { 50 return l10n(' reg_err_mail_address');50 return l10n('mail address must be like xxx@yyy.eee (example : jack@altern.org)'); 51 51 } 52 52 … … 62 62 if ($count != 0) 63 63 { 64 return l10n(' reg_err_mail_address_dbl');64 return l10n('a user use already this mail address'); 65 65 } 66 66 } … … 87 87 if ($count > 0) 88 88 { 89 return l10n(' reg_err_login5');89 return l10n('this login is already used'); 90 90 } 91 91 } … … 99 99 if ($login == '') 100 100 { 101 array_push($errors, l10n(' reg_err_login1'));101 array_push($errors, l10n('Please, enter a login')); 102 102 } 103 103 if (preg_match('/^.* $/', $login)) 104 104 { 105 array_push($errors, l10n(' reg_err_login2'));105 array_push($errors, l10n('login mustn\'t end with a space character')); 106 106 } 107 107 if (preg_match('/^ .*$/', $login)) 108 108 { 109 array_push($errors, l10n(' reg_err_login3'));109 array_push($errors, l10n('login mustn\'t start with a space character')); 110 110 } 111 111 if (get_userid($login)) 112 112 { 113 array_push($errors, l10n(' reg_err_login5'));113 array_push($errors, l10n('this login is already used')); 114 114 } 115 115 $mail_error = validate_mail_address(null, $mail_address); -
trunk/include/menubar.inc.php
r5014 r5021 149 149 array( 150 150 'URL' => make_index_url(array('section' => 'favorites')), 151 'TITLE' => l10n(' favorite_cat_hint'),152 'NAME' => l10n(' favorite_cat')151 'TITLE' => l10n('display my favorites pictures'), 152 'NAME' => l10n('My favorites') 153 153 ); 154 154 } … … 157 157 array( 158 158 'URL' => make_index_url(array('section' => 'most_visited')), 159 'TITLE' => l10n(' most_visited_cat_hint'),160 'NAME' => l10n(' most_visited_cat')159 'TITLE' => l10n('display most visited pictures'), 160 'NAME' => l10n('Most visited') 161 161 ); 162 162 … … 166 166 array( 167 167 'URL' => make_index_url(array('section' => 'best_rated')), 168 'TITLE' => l10n(' best_rated_cat_hint'),169 'NAME' => l10n(' best_rated_cat')168 'TITLE' => l10n('display best rated items'), 169 'NAME' => l10n('Best rated') 170 170 ); 171 171 } … … 174 174 array( 175 175 'URL' => get_root_url().'random.php', 176 'TITLE' => l10n(' random_cat_hint'),177 'NAME' => l10n(' random_cat'),176 'TITLE' => l10n('display a set of random pictures'), 177 'NAME' => l10n('Random pictures'), 178 178 'REL'=> 'rel="nofollow"' 179 179 ); … … 182 182 array( 183 183 'URL' => make_index_url(array('section' => 'recent_pics')), 184 'TITLE' => l10n(' recent_pics_cat_hint'),185 'NAME' => l10n(' recent_pics_cat'),184 'TITLE' => l10n('display most recent pictures'), 185 'NAME' => l10n('Recent pictures'), 186 186 ); 187 187 … … 189 189 array( 190 190 'URL' => make_index_url(array('section' => 'recent_cats')), 191 'TITLE' => l10n(' recent_cats_cat_hint'),192 'NAME' => l10n(' recent_cats_cat'),191 'TITLE' => l10n('display recently updated categories'), 192 'NAME' => l10n('Recent categories'), 193 193 ); 194 194 … … 205 205 ) 206 206 ), 207 'TITLE' => l10n(' calendar_hint'),208 'NAME' => l10n(' calendar'),207 'TITLE' => l10n('display each day with pictures, month per month'), 208 'NAME' => l10n('Calendar'), 209 209 'REL'=> 'rel="nofollow"' 210 210 ); … … 231 231 $block->data['search'] = 232 232 array( 233 'TITLE'=>l10n(' hint_search'),233 'TITLE'=>l10n('search'), 234 234 'NAME'=>l10n('Search'), 235 235 'URL'=> get_root_url().'search.php', … … 240 240 $block->data['comments'] = 241 241 array( 242 'TITLE'=>l10n(' hint_comments'),243 'NAME'=>l10n(' comments'),242 'TITLE'=>l10n('See last users comments'), 243 'NAME'=>l10n('Comments'), 244 244 'URL'=> get_root_url().'comments.php', 245 245 ); … … 248 248 $block->data['about'] = 249 249 array( 250 'TITLE' => l10n(' about_page_title'),250 'TITLE' => l10n('About Piwigo'), 251 251 'NAME' => l10n('About'), 252 252 'URL' => get_root_url().'about.php', -
trunk/include/picture_comment.inc.php
r5014 r5021 59 59 { 60 60 case 'moderate': 61 array_push( $infos, l10n(' comment_to_validate') );61 array_push( $infos, l10n('An administrator must authorize your comment before it is visible.') ); 62 62 case 'validate': 63 array_push( $infos, l10n(' comment_added'));63 array_push( $infos, l10n('Your comment has been registered')); 64 64 break; 65 65 case 'reject': 66 66 set_status_header(403); 67 array_push($infos, l10n(' comment_not_added') );67 array_push($infos, l10n('Your comment has NOT been registered because it did not pass the validation rules') ); 68 68 break; 69 69 default: -
trunk/include/section_init.inc.php
r5014 r5021 238 238 else 239 239 { 240 $page['title'] = l10n(' no_category');240 $page['title'] = l10n('Home'); 241 241 } 242 242 … … 362 362 'items' => $search_result['items'], 363 363 'title' => '<a href="'.duplicate_index_url(array('start'=>0)).'">' 364 .l10n(' search_result').'</a>',364 .l10n('Search results').'</a>', 365 365 ) 366 366 ); … … 376 376 $page, 377 377 array( 378 'title' => l10n(' favorites')378 'title' => l10n('Favorites') 379 379 ) 380 380 ); … … 457 457 array( 458 458 'title' => '<a href="'.duplicate_index_url(array('start'=>0)).'">' 459 .l10n(' recent_pics_cat').'</a>',459 .l10n('Recent pictures').'</a>', 460 460 'items' => array_from_query($query, 'id'), 461 461 ) … … 470 470 $page, 471 471 array( 472 'title' => l10n(' recent_cats_cat'),472 'title' => l10n('Recent categories'), 473 473 ) 474 474 ); … … 495 495 array( 496 496 'title' => '<a href="'.duplicate_index_url(array('start'=>0)).'">' 497 .$conf['top_number'].' '.l10n(' most_visited_cat').'</a>',497 .$conf['top_number'].' '.l10n('Most visited').'</a>', 498 498 'items' => array_from_query($query, 'id'), 499 499 ) … … 521 521 array( 522 522 'title' => '<a href="'.duplicate_index_url(array('start'=>0)).'">' 523 .$conf['top_number'].' '.l10n(' best_rated_cat').'</a>',523 .$conf['top_number'].' '.l10n('Best rated').'</a>', 524 524 'items' => array_from_query($query, 'id'), 525 525 ) … … 544 544 array( 545 545 'title' => '<a href="'.duplicate_index_url(array('start'=>0)).'">' 546 .l10n(' random_cat').'</a>',546 .l10n('Random pictures').'</a>', 547 547 'items' => array_from_query($query, 'id'), 548 548 ) -
trunk/include/ws_functions.inc.php
r5014 r5021 563 563 { 564 564 case 'reject': 565 array_push($infos, l10n(' comment_not_added') );565 array_push($infos, l10n('Your comment has NOT been registered because it did not pass the validation rules') ); 566 566 return new PwgError(403, implode("\n", $infos) ); 567 567 case 'validate':
Note: See TracChangeset
for help on using the changeset viewer.