mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-08-08 09:43:01 +02:00
- 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
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -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>');
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user