diff options
author | rvelices <rv-github@modusoptimus.com> | 2008-03-08 01:38:37 +0000 |
---|---|---|
committer | rvelices <rv-github@modusoptimus.com> | 2008-03-08 01:38:37 +0000 |
commit | fe23062161d1e50a97685822c8ab94cdc2d43263 (patch) | |
tree | e3455673a4ebedc519afc03b1195a21eb4edb398 /include | |
parent | c68914a3b962b39f341eb4a42f467f7c1143a8b9 (diff) |
- upload.tpl goes smarty
- start some language cleanup and a small attempt to standardize a bit ...
- debug_language now calls trigger_error instead of echo when missing language key
git-svn-id: http://piwigo.org/svn/trunk@2265 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include')
-rw-r--r-- | include/calendar_monthly.class.php | 16 | ||||
-rw-r--r-- | include/functions.inc.php | 2 | ||||
-rw-r--r-- | include/functions_category.inc.php | 4 | ||||
-rw-r--r-- | include/functions_html.inc.php | 18 |
4 files changed, 20 insertions, 20 deletions
diff --git a/include/calendar_monthly.class.php b/include/calendar_monthly.class.php index ec3a656bc..afec4b000 100644 --- a/include/calendar_monthly.class.php +++ b/include/calendar_monthly.class.php @@ -480,16 +480,16 @@ SELECT id, file,tn_ext,path, width, height, DAYOFWEEK('.$this->date_field.')-1 a ) ) ); - $alt = $wday_labels[$dow] . ' ' . $day. - ' ('.sprintf("%d ".l10n('pictures'), $items[$day]['nb_images']).')'; $tpl_crt_week[] = array( - 'DAY' => $day, - 'IMAGE' => $items[$day]['tn_url'], - 'U_IMG_LINK'=> $url, - 'IMAGE_STYLE' => $css_style, - 'IMAGE_ALT' => $alt, + 'DAY' => $day, + 'DOW' => $dow, + 'NB_ELEMENTS' => $items[$day]['nb_images'], + 'IMAGE' => $items[$day]['tn_url'], + 'U_IMG_LINK' => $url, + 'IMAGE_STYLE' => $css_style, + 'IMAGE_ALT' => $items[$day]['file'], ); } } @@ -514,4 +514,4 @@ SELECT id, file,tn_ext,path, width, height, DAYOFWEEK('.$this->date_field.')-1 a } } -?>
\ No newline at end of file +?> diff --git a/include/functions.inc.php b/include/functions.inc.php index bc08ce41d..ff0ca41b0 100644 --- a/include/functions.inc.php +++ b/include/functions.inc.php @@ -1084,7 +1084,7 @@ function l10n($key) if ($conf['debug_l10n'] and !isset($lang[$key]) and !empty($key)) { - echo '[l10n] language key "'.$key.'" is not defined<br />'; + trigger_error('[l10n] language key "'.$key.'" is not defined', E_USER_NOTICE); } return isset($lang[$key]) ? $lang[$key] : $key; diff --git a/include/functions_category.inc.php b/include/functions_category.inc.php index cbbe2fce9..e0e410c1e 100644 --- a/include/functions_category.inc.php +++ b/include/functions_category.inc.php @@ -466,7 +466,7 @@ function get_display_images_count($cat_nb_images, $cat_count_images, $cat_count_ } //at least one image direct or indirect - $display_text.= l10n_dec('image_available', 'images_available', $cat_count_images); + $display_text.= l10n_dec('%d element', '%d elements', $cat_count_images); if ($cat_count_categories == 0 or $cat_nb_images == $cat_count_images) { @@ -485,4 +485,4 @@ function get_display_images_count($cat_nb_images, $cat_count_images, $cat_count_ return $display_text; } -?>
\ No newline at end of file +?> diff --git a/include/functions_html.inc.php b/include/functions_html.inc.php index 2b0486e70..36d56aea9 100644 --- a/include/functions_html.inc.php +++ b/include/functions_html.inc.php @@ -26,7 +26,7 @@ function get_icon($date, $is_child_date = false) { - global $page, $user, $lang; + global $page, $user; if (empty($date)) { @@ -54,8 +54,10 @@ function get_icon($date, $is_child_date = false) if ( !isset($page['get_icon_cache']['_icons_'] ) ) { $icons = array(false => 'recent', true => 'recent_by_child' ); - $title = l10n('recent_image').' '.$user['recent_period'] - .' '.l10n('days'); + $title = sprintf( + l10n('elements posted during the last %d days'), + $user['recent_period'] + ); foreach ($icons as $key => $icon) { $icon_url = get_themeconf('icon_dir').'/'.$icon.'.png'; @@ -78,7 +80,7 @@ function create_navigation_bar( $url, $nb_element, $start, $nb_element_page, $clean_url = false ) { - global $lang, $conf; + global $conf; $pages_around = $conf['paginate_pages_around']; $start_str = $clean_url ? '/start-' : @@ -374,8 +376,6 @@ SELECT id, name, permalink */ function get_html_menu_category($categories, $selected_category) { - global $lang; - $ref_level = 0; $level = 0; @@ -558,7 +558,7 @@ function name_compare($a, $b) */ function access_denied() { - global $user, $lang; + global $user; $login_url = get_root_url().'identification.php?redirect=' @@ -649,7 +649,7 @@ function get_tags_content_title() ) ) .'" title="' - .l10n('See pictures linked to this tag only') + .l10n('See elements linked to this tag only') .'">' .$page['tags'][$i]['name'] .'</a>'; @@ -747,4 +747,4 @@ function render_category_literal_description($desc) { return strip_tags($desc, '<span><p><a><br><b><i><small><big><strong><em>'); } -?>
\ No newline at end of file +?> |