aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--admin/album_notification.php4
-rw-r--r--admin/batch_manager_global.php4
-rw-r--r--admin/cat_modify.php10
-rw-r--r--admin/group_list.php26
-rw-r--r--admin/group_perm.php7
-rw-r--r--admin/history.php5
-rw-r--r--admin/intro.php9
-rw-r--r--admin/languages_new.php10
-rw-r--r--admin/notification_by_mail.php4
-rw-r--r--admin/picture_modify.php10
-rw-r--r--admin/plugins_new.php2
-rw-r--r--admin/tags.php24
-rw-r--r--admin/themes/default/template/batch_manager_global.tpl6
-rw-r--r--admin/themes/default/template/cat_perm.tpl2
-rw-r--r--admin/themes/default/template/configuration.tpl20
-rw-r--r--admin/themes/default/template/install.tpl2
-rw-r--r--admin/themes/default/template/intro.tpl2
-rw-r--r--admin/themes/default/template/photos_add_direct.tpl14
-rw-r--r--admin/themes/default/template/plugins_installed.tpl4
-rw-r--r--admin/themes/default/template/plugins_new.tpl2
-rw-r--r--admin/themes/default/template/themes_installed.tpl2
-rw-r--r--admin/themes/default/template/updates_ext.tpl6
-rw-r--r--admin/themes/default/template/updates_pwg.tpl14
-rw-r--r--admin/themes/default/template/upgrade.tpl8
-rw-r--r--admin/themes_installed.php8
-rw-r--r--admin/themes_new.php10
-rw-r--r--admin/user_list.php8
-rw-r--r--admin/user_perm.php7
-rw-r--r--comments.php4
-rw-r--r--feed.php2
-rw-r--r--include/calendar_weekly.class.php2
-rw-r--r--include/category_cats.inc.php4
-rw-r--r--include/functions.inc.php10
-rw-r--r--include/no_photo_yet.inc.php4
-rw-r--r--include/template.class.php4
-rw-r--r--include/ws_functions.inc.php4
-rw-r--r--install.php2
-rw-r--r--password.php8
-rw-r--r--picture.php3
-rw-r--r--plugins/LocalFilesEditor/admin.php2
-rw-r--r--search.php16
-rw-r--r--search_rules.php15
-rw-r--r--upgrade.php2
43 files changed, 139 insertions, 173 deletions
diff --git a/admin/album_notification.php b/admin/album_notification.php
index 322776302..30c1d9bb7 100644
--- a/admin/album_notification.php
+++ b/admin/album_notification.php
@@ -115,8 +115,8 @@ SELECT
array_push(
$page['infos'],
- sprintf(
- l10n('An information email was sent to group "%s"'),
+ l10n(
+ 'An information email was sent to group "%s"',
$group_name
)
);
diff --git a/admin/batch_manager_global.php b/admin/batch_manager_global.php
index b64324b2d..d3cb4774a 100644
--- a/admin/batch_manager_global.php
+++ b/admin/batch_manager_global.php
@@ -415,10 +415,10 @@ DELETE
if ('generate_derivatives' == $action)
{
if ($_POST['regenerateSuccess'] != '0')
- array_push($page['infos'], sprintf(l10n('%s photos have been regenerated'), $_POST['regenerateSuccess']));
+ array_push($page['infos'], l10n('%s photos have been regenerated', $_POST['regenerateSuccess']));
if ($_POST['regenerateError'] != '0')
- array_push($page['warnings'], sprintf(l10n('%s photos can not be regenerated'), $_POST['regenerateError']));
+ array_push($page['warnings'], l10n('%s photos can not be regenerated', $_POST['regenerateError']));
}
diff --git a/admin/cat_modify.php b/admin/cat_modify.php
index 1f83f1f3e..7edda9fe3 100644
--- a/admin/cat_modify.php
+++ b/admin/cat_modify.php
@@ -268,16 +268,16 @@ SELECT
if ($min_date == $max_date)
{
- $intro = sprintf(
- l10n('This album contains %d photos, added on %s.'),
+ $intro = l10n(
+ 'This album contains %d photos, added on %s.',
$image_count,
format_date($min_date)
);
}
else
{
- $intro = sprintf(
- l10n('This album contains %d photos, added between %s and %s.'),
+ $intro = l10n(
+ 'This album contains %d photos, added between %s and %s.',
$image_count,
format_date($min_date),
format_date($max_date)
@@ -289,7 +289,7 @@ else
$intro = l10n('This album contains no photo.');
}
-$intro.= '<br>'.sprintf(l10n('Numeric identifier : %d'), $category['id']);
+$intro.= '<br>'.l10n('Numeric identifier : %d', $category['id']);
$template->assign('INTRO', $intro);
diff --git a/admin/group_list.php b/admin/group_list.php
index 390107613..77049b9fa 100644
--- a/admin/group_list.php
+++ b/admin/group_list.php
@@ -72,10 +72,7 @@ INSERT INTO '.GROUPS_TABLE.'
;';
pwg_query($query);
- array_push(
- $page['infos'],
- sprintf(l10n('group "%s" added'), $_POST['groupname'])
- );
+ $page['infos'][] = l10n('group "%s" added', $_POST['groupname']);
}
}
@@ -153,10 +150,7 @@ if (isset($_POST['submit']) and isset($_POST['selectAction']) and isset($_POST['
;';
pwg_query($query);
- array_push(
- $page['infos'],
- sprintf(l10n('group "%s" deleted'), $groupname)
- );
+ $page['infos'][] = l10n('group "%s" deleted', $groupname);
}
}
@@ -236,10 +230,8 @@ SELECT COUNT(*)
}
mass_inserts(USER_GROUP_TABLE, array('user_id','group_id'), $usr_grp);
mass_inserts(GROUP_ACCESS_TABLE, array('group_id','cat_id'), $grp_access);
- array_push(
- $page['infos'],
- sprintf(l10n('group "%s" added'), $_POST['merge'])
- );
+
+ $page['infos'][] = l10n('group "%s" added', $_POST['merge']);
}
// +
@@ -313,10 +305,7 @@ SELECT COUNT(*)
}
mass_inserts(USER_GROUP_TABLE, array('user_id','group_id'), $usr_grp);
- array_push(
- $page['infos'],
- sprintf(l10n('group "%s" added'), $_POST['duplicate_'.$group.''])
- );
+ $page['infos'][] = l10n('group "%s" added', $_POST['duplicate_'.$group.'']);
}
}
@@ -344,10 +333,7 @@ SELECT COUNT(*)
;';
pwg_query($query);
- array_push(
- $page['infos'],
- sprintf(l10n('group "%s" updated'), $groupname)
- );
+ $page['infos'][] = l10n('group "%s" updated', $groupname);
}
}
}
diff --git a/admin/group_perm.php b/admin/group_perm.php
index 1be0c80b7..d31102a4d 100644
--- a/admin/group_perm.php
+++ b/admin/group_perm.php
@@ -131,10 +131,9 @@ $template->set_filenames(
$template->assign(
array(
'TITLE' =>
- sprintf(
- l10n('Manage permissions for group "%s"'),
- get_groupname($page['group']
- )
+ l10n(
+ 'Manage permissions for group "%s"',
+ get_groupname($page['group'])
),
'L_CAT_OPTIONS_TRUE'=>l10n('Authorized'),
'L_CAT_OPTIONS_FALSE'=>l10n('Forbidden'),
diff --git a/admin/history.php b/admin/history.php
index bce07a772..b74f48399 100644
--- a/admin/history.php
+++ b/admin/history.php
@@ -533,10 +533,7 @@ SELECT
),
'MEMBERS' => sprintf(
l10n_dec('%d member', '%d members', $summary['nb_members']).': %s',
- implode(
- ', ',
- $member_strings
- )
+ implode(', ', $member_strings)
),
'GUESTS' => l10n_dec(
'%d guest', '%d guests',
diff --git a/admin/intro.php b/admin/intro.php
index c454e50b4..b8d6c8dd4 100644
--- a/admin/intro.php
+++ b/admin/intro.php
@@ -212,7 +212,7 @@ $template->assign(
'DB_IMAGE_TAG' => l10n_dec('%d association', '%d associations', $nb_image_tag),
'DB_USERS' => l10n_dec('%d user', '%d users', $nb_users),
'DB_GROUPS' => l10n_dec('%d group', '%d groups', $nb_groups),
- 'DB_RATES' => ($nb_rates == 0) ? l10n('no rate') : sprintf(l10n('%d rates'), $nb_rates),
+ 'DB_RATES' => ($nb_rates == 0) ? l10n('no rate') : l10n('%d rates', $nb_rates),
'U_CHECK_UPGRADE' => PHPWG_ROOT_PATH.'admin.php?action=check_upgrade',
'U_PHPINFO' => PHPWG_ROOT_PATH.'admin.php?action=phpinfo',
'PHP_DATATIME' => $php_current_timestamp,
@@ -243,7 +243,7 @@ SELECT COUNT(*)
'unvalidated',
array(
'URL' => PHPWG_ROOT_PATH.'admin.php?page=comments',
- 'INFO' => sprintf(l10n('%d waiting for validation'), $nb_comments)
+ 'INFO' => l10n('%d waiting for validation', $nb_comments)
)
);
}
@@ -261,10 +261,7 @@ SELECT MIN(date_available)
'first_added',
array(
'DB_DATE' =>
- sprintf(
- l10n('first photo added on %s'),
- format_date($first_date)
- )
+ l10n('first photo added on %s', format_date($first_date))
)
);
}
diff --git a/admin/languages_new.php b/admin/languages_new.php
index da0d31bfd..1b05a257c 100644
--- a/admin/languages_new.php
+++ b/admin/languages_new.php
@@ -42,13 +42,7 @@ $languages->get_db_languages();
$languages_dir = PHPWG_ROOT_PATH.'language';
if (!is_writable($languages_dir))
{
- array_push(
- $page['errors'],
- sprintf(
- l10n('Add write access to the "%s" directory'),
- 'language'
- )
- );
+ $page['errors'][] = l10n('Add write access to the "%s" directory', 'language');
}
// +-----------------------------------------------------------------------+
@@ -99,7 +93,7 @@ if (isset($_GET['installstatus']))
default:
array_push(
$page['errors'],
- sprintf(l10n('An error occured during extraction (%s).'), htmlspecialchars($_GET['installstatus']))
+ l10n('An error occured during extraction (%s).', htmlspecialchars($_GET['installstatus']))
);
}
}
diff --git a/admin/notification_by_mail.php b/admin/notification_by_mail.php
index 9b773d870..b72a5c69b 100644
--- a/admin/notification_by_mail.php
+++ b/admin/notification_by_mail.php
@@ -173,8 +173,8 @@ order by
array_push
(
$page['infos'],
- sprintf(
- l10n('User %s [%s] added.'),
+ l10n(
+ 'User %s [%s] added.',
stripslashes($nbm_user['username']),
get_email_address_as_display_text($nbm_user['mail_address'])
)
diff --git a/admin/picture_modify.php b/admin/picture_modify.php
index 771f72410..68ebe7c7d 100644
--- a/admin/picture_modify.php
+++ b/admin/picture_modify.php
@@ -306,12 +306,12 @@ while ($user_row = pwg_db_fetch_assoc($result))
}
$intro_vars = array(
- 'file' => sprintf(l10n('Original file : %s'), $row['file']),
- 'add_date' => sprintf(l10n('Posted %s on %s'), time_since($row['date_available'], 'year'), format_date($row['date_available'], false, false)),
- 'added_by' => sprintf(l10n('Added by %s'), $row['added_by']),
+ 'file' => l10n('Original file : %s', $row['file']),
+ 'add_date' => l10n('Posted %s on %s', time_since($row['date_available'], 'year'), format_date($row['date_available'], false, false)),
+ 'added_by' => l10n('Added by %s', $row['added_by']),
'size' => $row['width'].'&times;'.$row['height'].' pixels, '.sprintf('%.2f', $row['filesize']/1024).'MB',
- 'stats' => sprintf(l10n('Visited %d times'), $row['hit']),
- 'id' => sprintf(l10n('Numeric identifier : %d'), $row['id']),
+ 'stats' => l10n('Visited %d times', $row['hit']),
+ 'id' => l10n('Numeric identifier : %d', $row['id']),
);
if ($conf['rate'] and !empty($row['rating_score']))
diff --git a/admin/plugins_new.php b/admin/plugins_new.php
index 57b05ce57..e17c97729 100644
--- a/admin/plugins_new.php
+++ b/admin/plugins_new.php
@@ -76,7 +76,7 @@ if (isset($_GET['installstatus']))
default:
array_push($page['errors'],
- sprintf(l10n('An error occured during extraction (%s).'), htmlspecialchars($_GET['installstatus'])),
+ l10n('An error occured during extraction (%s).', htmlspecialchars($_GET['installstatus'])),
l10n('Please check "plugins" folder and sub-folders permissions (CHMOD).'));
}
}
diff --git a/admin/tags.php b/admin/tags.php
index 5da902840..4927fc4f3 100644
--- a/admin/tags.php
+++ b/admin/tags.php
@@ -71,8 +71,8 @@ SELECT id, name
{
array_push(
$page['errors'],
- sprintf(
- l10n('Tag "%s" already exists'),
+ l10n(
+ 'Tag "%s" already exists',
$tag_name
)
);
@@ -136,8 +136,8 @@ SELECT id, name
{
array_push(
$page['errors'],
- sprintf(
- l10n('Tag "%s" already exists'),
+ l10n(
+ 'Tag "%s" already exists',
$tag_name
)
);
@@ -190,8 +190,8 @@ SELECT id, name
}
array_push(
$page['infos'],
- sprintf(
- l10n('Tag "%s" is now a duplicate of "%s"'),
+ l10n(
+ 'Tag "%s" is now a duplicate of "%s"',
stripslashes($tag_name),
$current_name_of[$tag_id]
)
@@ -300,8 +300,8 @@ SELECT
array_push(
$page['infos'],
- sprintf(
- l10n('Tags <em>%s</em> merged into tag <em>%s</em>'),
+ l10n(
+ 'Tags <em>%s</em> merged into tag <em>%s</em>',
implode(', ', $tags_deleted),
$name_of_tag[$destination_tag_id]
)
@@ -380,8 +380,8 @@ SELECT id
array_push(
$page['infos'],
- sprintf(
- l10n('Tag "%s" was added'),
+ l10n(
+ 'Tag "%s" was added',
stripslashes($tag_name)
)
);
@@ -390,8 +390,8 @@ SELECT id
{
array_push(
$page['errors'],
- sprintf(
- l10n('Tag "%s" already exists'),
+ l10n(
+ 'Tag "%s" already exists',
stripslashes($tag_name)
)
);
diff --git a/admin/themes/default/template/batch_manager_global.tpl b/admin/themes/default/template/batch_manager_global.tpl
index 6b6ec12ef..f3d6bf314 100644
--- a/admin/themes/default/template/batch_manager_global.tpl
+++ b/admin/themes/default/template/batch_manager_global.tpl
@@ -677,15 +677,15 @@ $(document).ready(function() {
{'Dimensions'|@translate}
<blockquote>
- {'Width'|@translate} <span id="filter_dimension_width_info">{'between %d and %d pixels'|@translate|sprintf:$dimensions.selected.min_width:$dimensions.selected.max_width}</span>
+ {'Width'|@translate} <span id="filter_dimension_width_info">{'between %d and %d pixels'|@translate:$dimensions.selected.min_width:$dimensions.selected.max_width}</span>
| <a class="dimensions-choice" data-type="width" data-min="{$dimensions.bounds.min_width}" data-max="{$dimensions.bounds.max_width}">{'Reset'|@translate}</a>
<div id="filter_dimension_width_slider"></div>
- {'Height'|@translate} <span id="filter_dimension_height_info">{'between %d and %d pixels'|@translate|sprintf:$dimensions.selected.min_height:$dimensions.selected.max_height}</span>
+ {'Height'|@translate} <span id="filter_dimension_height_info">{'between %d and %d pixels'|@translate:$dimensions.selected.min_height:$dimensions.selected.max_height}</span>
| <a class="dimensions-choice" data-type="height" data-min="{$dimensions.bounds.min_height}" data-max="{$dimensions.bounds.max_height}">{'Reset'|@translate}</a>
<div id="filter_dimension_height_slider"></div>
- {'Ratio'|@translate} ({'Width'|@translate}/{'Height'|@translate}) <span id="filter_dimension_ratio_info">{'between %.2f and %.2f'|@translate|sprintf:$dimensions.selected.min_ratio:$dimensions.selected.max_ratio}</span>
+ {'Ratio'|@translate} ({'Width'|@translate}/{'Height'|@translate}) <span id="filter_dimension_ratio_info">{'between %.2f and %.2f'|@translate:$dimensions.selected.min_ratio:$dimensions.selected.max_ratio}</span>
{if isset($dimensions.ratio_portrait)}
| <a class="dimensions-choice" data-type="ratio" data-min="{$dimensions.ratio_portrait.min}" data-max="{$dimensions.ratio_portrait.max}">{'Portrait'|@translate}</a>
{/if}
diff --git a/admin/themes/default/template/cat_perm.tpl b/admin/themes/default/template/cat_perm.tpl
index 471736569..0415c87a4 100644
--- a/admin/themes/default/template/cat_perm.tpl
+++ b/admin/themes/default/template/cat_perm.tpl
@@ -76,7 +76,7 @@ jQuery(document).ready(function() {
{if isset($nb_users_granted_indirect)}
<p>
- {'%u users have automatic permission because they belong to a granted group.'|@translate|@sprintf:$nb_users_granted_indirect}
+ {'%u users have automatic permission because they belong to a granted group.'|@translate:$nb_users_granted_indirect}
<a href="#" id="indirectPermissionsDetailsHide" style="display:none">{'hide details'|@translate}</a>
<a href="#" id="indirectPermissionsDetailsShow">{'show details'|@translate}</a>
diff --git a/admin/themes/default/template/configuration.tpl b/admin/themes/default/template/configuration.tpl
index ba1835d23..aab3afd00 100644
--- a/admin/themes/default/template/configuration.tpl
+++ b/admin/themes/default/template/configuration.tpl
@@ -610,7 +610,7 @@ jQuery(document).ready(function() {
<li>
<label>
<input type="checkbox" name="menubar_filter_icon" {if ($display.menubar_filter_icon)}checked="checked"{/if}>
- {'Activate icon "%s"'|@translate|@sprintf:('display only recently posted photos'|@translate|@ucfirst)}
+ {'Activate icon "%s"'|@translate:('display only recently posted photos'|@translate|@ucfirst)}
</label>
</li>
@@ -624,35 +624,35 @@ jQuery(document).ready(function() {
<li>
<label>
<input type="checkbox" name="index_sort_order_input" {if ($display.index_sort_order_input)}checked="checked"{/if}>
- {'Activate icon "%s"'|@translate|@sprintf:('Sort order'|@translate)}
+ {'Activate icon "%s"'|@translate:('Sort order'|@translate)}
</label>
</li>
<li>
<label>
<input type="checkbox" name="index_flat_icon" {if ($display.index_flat_icon)}checked="checked"{/if}>
- {'Activate icon "%s"'|@translate|@sprintf:('display all photos in all sub-albums'|@translate|@ucfirst)}
+ {'Activate icon "%s"'|@translate:('display all photos in all sub-albums'|@translate|@ucfirst)}
</label>
</li>
<li>
<label>
<input type="checkbox" name="index_posted_date_icon" {if ($display.index_posted_date_icon)}checked="checked"{/if}>
- {'Activate icon "%s"'|@translate|@sprintf:('display a calendar by posted date'|@translate|@ucfirst)}
+ {'Activate icon "%s"'|@translate:('display a calendar by posted date'|@translate|@ucfirst)}
</label>
</li>
<li>
<label>
<input type="checkbox" name="index_created_date_icon" {if ($display.index_created_date_icon)}checked="checked"{/if}>
- {'Activate icon "%s"'|@translate|@sprintf:('display a calendar by creation date'|@translate|@ucfirst)}
+ {'Activate icon "%s"'|@translate:('display a calendar by creation date'|@translate|@ucfirst)}
</label>
</li>
<li>
<label>
<input type="checkbox" name="index_slideshow_icon" {if ($display.index_slideshow_icon)}checked="checked"{/if}>
- {'Activate icon "%s"'|@translate|@sprintf:('slideshow'|@translate|@ucfirst)}
+ {'Activate icon "%s"'|@translate:('slideshow'|@translate|@ucfirst)}
</label>
</li>
@@ -671,28 +671,28 @@ jQuery(document).ready(function() {
<li>
<label>
<input type="checkbox" name="picture_slideshow_icon" {if ($display.picture_slideshow_icon)}checked="checked"{/if}>
- {'Activate icon "%s"'|@translate|@sprintf:('slideshow'|@translate|@ucfirst)}
+ {'Activate icon "%s"'|@translate:('slideshow'|@translate|@ucfirst)}
</label>
</li>
<li>
<label>
<input type="checkbox" name="picture_metadata_icon" {if ($display.picture_metadata_icon)}checked="checked"{/if}>
- {'Activate icon "%s"'|@translate|@sprintf:('Show file metadata'|@translate)}
+ {'Activate icon "%s"'|@translate:('Show file metadata'|@translate)}
</label>
</li>
<li>
<label>
<input type="checkbox" name="picture_download_icon" {if ($display.picture_download_icon)}checked="checked"{/if}>
- {'Activate icon "%s"'|@translate|@sprintf:('Download this file'|@translate|@ucfirst)}
+ {'Activate icon "%s"'|@translate:('Download this file'|@translate|@ucfirst)}
</label>
</li>
<li>
<label>
<input type="checkbox" name="picture_favorite_icon" {if ($display.picture_favorite_icon)}checked="checked"{/if}>
- {'Activate icon "%s"'|@translate|@sprintf:('add this photo to your favorites'|@translate|@ucfirst)}
+ {'Activate icon "%s"'|@translate:('add this photo to your favorites'|@translate|@ucfirst)}
</label>
</li>
diff --git a/admin/themes/default/template/install.tpl b/admin/themes/default/template/install.tpl
index a668c2c16..082259338 100644
--- a/admin/themes/default/template/install.tpl
+++ b/admin/themes/default/template/install.tpl
@@ -279,7 +279,7 @@ jQuery().ready(function(){ldelim}
<td colspan="2">
<label>
<input type="checkbox" name="newsletter_subscribe"{if $F_NEWSLETTER_SUBSCRIBE} checked="checked"{/if}>
- <span class="cluetip" title="{'Piwigo Announcements Newsletter'|@translate}|{'Keep in touch with Piwigo project, subscribe to Piwigo Announcement Newsletter. You will receive emails when a new release is available (sometimes including a security bug fix, it\'s important to know and upgrade) and when major events happen to the project. Only a few emails a year.'|@translate|@htmlspecialchars|@nl2br}">{'Subscribe %s to Piwigo Announcements Newsletter'|@translate|@sprintf:$EMAIL}</span>
+ <span class="cluetip" title="{'Piwigo Announcements Newsletter'|@translate}|{'Keep in touch with Piwigo project, subscribe to Piwigo Announcement Newsletter. You will receive emails when a new release is available (sometimes including a security bug fix, it\'s important to know and upgrade) and when major events happen to the project. Only a few emails a year.'|@translate|@htmlspecialchars|@nl2br}">{'Subscribe %s to Piwigo Announcements Newsletter'|@translate:$EMAIL}</span>
</label>
<br>
<label>
diff --git a/admin/themes/default/template/intro.tpl b/admin/themes/default/template/intro.tpl
index 1c423b395..926527e0e 100644
--- a/admin/themes/default/template/intro.tpl
+++ b/admin/themes/default/template/intro.tpl
@@ -42,7 +42,7 @@ jQuery().ready(function(){
<li><a href="{$PHPWG_URL}" class="externalLink">Piwigo</a> {$PWG_VERSION}</li>
<li><a href="{$U_CHECK_UPGRADE}">{'Check for upgrade'|@translate}</a></li>
{if isset($SUBSCRIBE_BASE_URL)}
- <li><a href="{$SUBSCRIBE_BASE_URL}{$EMAIL}" class="externalLink cluetip" title="{'Piwigo Announcements Newsletter'|@translate}|{'Keep in touch with Piwigo project, subscribe to Piwigo Announcement Newsletter. You will receive emails when a new release is available (sometimes including a security bug fix, it\'s important to know and upgrade) and when major events happen to the project. Only a few emails a year.'|@translate|@htmlspecialchars|@nl2br}">{'Subscribe %s to Piwigo Announcements Newsletter'|@translate|@sprintf:$EMAIL}</a></li>
+ <li><a href="{$SUBSCRIBE_BASE_URL}{$EMAIL}" class="externalLink cluetip" title="{'Piwigo Announcements Newsletter'|@translate}|{'Keep in touch with Piwigo project, subscribe to Piwigo Announcement Newsletter. You will receive emails when a new release is available (sometimes including a security bug fix, it\'s important to know and upgrade) and when major events happen to the project. Only a few emails a year.'|@translate|@htmlspecialchars|@nl2br}">{'Subscribe %s to Piwigo Announcements Newsletter'|@translate:$EMAIL}</a></li>
{/if}
</ul>
</dd>
diff --git a/admin/themes/default/template/photos_add_direct.tpl b/admin/themes/default/template/photos_add_direct.tpl
index 623658e7e..ef9582f2e 100644
--- a/admin/themes/default/template/photos_add_direct.tpl
+++ b/admin/themes/default/template/photos_add_direct.tpl
@@ -290,15 +290,15 @@ var sizeLimit = Math.round({$upload_max_filesize} / 1024); /* in KBytes */
<fieldset>
<legend>{'Select files'|@translate}</legend>
- {if isset($original_resize_maxheight)}<p class="uploadInfo">{'The picture dimensions will be reduced to %dx%d pixels.'|@translate|@sprintf:$original_resize_maxwidth:$original_resize_maxheight}</p>{/if}
+ {if isset($original_resize_maxheight)}<p class="uploadInfo">{'The picture dimensions will be reduced to %dx%d pixels.'|@translate:$original_resize_maxwidth:$original_resize_maxheight}</p>{/if}
<p id="uploadWarningsSummary">{$upload_max_filesize_shorthand}B. {$upload_file_types}. {if isset($max_upload_resolution)}{$max_upload_resolution}Mpx{/if} <a class="icon-info-circled-1 showInfo" title="{'Learn more'|@translate}"></a></p>
<p id="uploadWarnings">
-{'Maximum file size: %sB.'|@translate|@sprintf:$upload_max_filesize_shorthand}
-{'Allowed file types: %s.'|@translate|@sprintf:$upload_file_types}
+{'Maximum file size: %sB.'|@translate:$upload_max_filesize_shorthand}
+{'Allowed file types: %s.'|@translate:$upload_file_types}
{if isset($max_upload_resolution)}
-{'Approximate maximum resolution: %dM pixels (that\'s %dx%d pixels).'|@translate|@sprintf:$max_upload_resolution:$max_upload_width:$max_upload_height}
+{'Approximate maximum resolution: %dM pixels (that\'s %dx%d pixels).'|@translate:$max_upload_resolution:$max_upload_width:$max_upload_height}
{/if}
</p>
@@ -310,14 +310,14 @@ var sizeLimit = Math.round({$upload_max_filesize} / 1024); /* in KBytes */
<a href="javascript:">{'+ Add an upload box'|@translate}</a>
</div>
- <p id="uploadModeInfos">{'You are using the Browser uploader. Try the <a href="%s">Flash uploader</a> instead.'|@translate|@sprintf:$switch_url}</p>
+ <p id="uploadModeInfos">{'You are using the Browser uploader. Try the <a href="%s">Flash uploader</a> instead.'|@translate:$switch_url}</p>
{elseif $upload_mode eq 'multiple'}
<div id="uploadify">You've got a problem with your JavaScript</div>
<div id="fileQueue" style="display:none"></div>
- <p id="uploadModeInfos">{'You are using the Flash uploader. Problems? Try the <a href="%s">Browser uploader</a> instead.'|@translate|@sprintf:$switch_url}</p>
+ <p id="uploadModeInfos">{'You are using the Flash uploader. Problems? Try the <a href="%s">Browser uploader</a> instead.'|@translate:$switch_url}</p>
{/if}
</fieldset>
@@ -345,7 +345,7 @@ var sizeLimit = Math.round({$upload_max_filesize} / 1024); /* in KBytes */
</form>
<div id="uploadProgress" style="display:none">
-{'Photo %s of %s'|@translate|@sprintf:'<span id="progressCurrent">1</span>':'<span id="progressMax">10</span>'}
+{'Photo %s of %s'|@translate:'<span id="progressCurrent">1</span>':'<span id="progressMax">10</span>'}
<br>
<div id="progressbar"></div>
</div>
diff --git a/admin/themes/default/template/plugins_installed.tpl b/admin/themes/default/template/plugins_installed.tpl
index 42525322e..9864abd9d 100644
--- a/admin/themes/default/template/plugins_installed.tpl
+++ b/admin/themes/default/template/plugins_installed.tpl
@@ -162,7 +162,7 @@ jQuery(document).ready(function() {
{'Version'|@translate} {$plugin.VERSION}
{if not empty($author)}
- | {'By %s'|@translate|@sprintf:$author}
+ | {'By %s'|@translate:$author}
{/if}
{if not empty($plugin.VISIT_URL)}
@@ -183,7 +183,7 @@ jQuery(document).ready(function() {
<div id="{$plugin.ID}" class="pluginMiniBox {$plugin.STATE}">
<div class="pluginMiniBoxNameCell">
{$plugin.NAME}
- <a class="icon-info-circled-1 showInfo" title="{if !empty($author)}{'By %s'|@translate|@sprintf:$author} | {/if}{'Version'|@translate} {$version}<br/>{$plugin.DESC|@escape:'html'}"></a>
+ <a class="icon-info-circled-1 showInfo" title="{if !empty($author)}{'By %s'|@translate:$author} | {/if}{'Version'|@translate} {$version}<br/>{$plugin.DESC|@escape:'html'}"></a>
</div>
<div class="pluginActions">
<div>
diff --git a/admin/themes/default/template/plugins_new.tpl b/admin/themes/default/template/plugins_new.tpl
index ad406fed0..3ccfcaeec 100644
--- a/admin/themes/default/template/plugins_new.tpl
+++ b/admin/themes/default/template/plugins_new.tpl
@@ -77,7 +77,7 @@ jQuery(document).ready(function(){
<td>
<em>{'Downloads'|@translate}: {$plugin.DOWNLOADS}</em>
{'Version'|@translate} {$plugin.VERSION}
- | {'By %s'|@translate|@sprintf:$plugin.AUTHOR}
+ | {'By %s'|@translate:$plugin.AUTHOR}
| <a class="externalLink" href="{$plugin.EXT_URL}">{'Visit plugin site'|@translate}</a>
</td>
</tr>
diff --git a/admin/themes/default/template/themes_installed.tpl b/admin/themes/default/template/themes_installed.tpl
index 083e3a337..47495df7c 100644
--- a/admin/themes/default/template/themes_installed.tpl
+++ b/admin/themes/default/template/themes_installed.tpl
@@ -58,7 +58,7 @@ jQuery(document).ready(function() {
<div class="themeBox{if $theme.IS_DEFAULT} themeDefault{/if}">
<div class="themeName">
{$theme.NAME} {if $theme.IS_DEFAULT}<em>({'default'|@translate})</em>{/if} {if $theme.IS_MOBILE}<em>({'Mobile'|@translate})</em>{/if}
- <a class="icon-info-circled-1 showInfo" title="{if !empty($author)}{'By %s'|@translate|@sprintf:$author} | {/if}{'Version'|@translate} {$version}<br/>{$theme.DESC|@escape:'html'}"></a>
+ <a class="icon-info-circled-1 showInfo" title="{if !empty($author)}{'By %s'|@translate:$author} | {/if}{'Version'|@translate} {$version}<br/>{$theme.DESC|@escape:'html'}"></a>
</div>
<div class="themeShot"><a href="{$theme.SCREENSHOT}" class="preview-box" title="{$theme.NAME}"><img src="{$theme.SCREENSHOT}" alt=""></a></div>
<div class="themeActions">
diff --git a/admin/themes/default/template/updates_ext.tpl b/admin/themes/default/template/updates_ext.tpl
index d58a42397..7d65c254a 100644
--- a/admin/themes/default/template/updates_ext.tpl
+++ b/admin/themes/default/template/updates_ext.tpl
@@ -180,7 +180,7 @@ checkFieldsets();
<img src="{$ROOT_URL}{$themeconf.admin_icon_dir}/plus.gif" alt="" class="button_{$plugin.ID}">
<img src="{$ROOT_URL}{$themeconf.admin_icon_dir}/minus.gif" alt="" class="button_{$plugin.ID}" style="display:none;">
{'New Version'|@translate} : {$plugin.NEW_VERSION}
- | {'By %s'|@translate|@sprintf:$plugin.AUTHOR}
+ | {'By %s'|@translate:$plugin.AUTHOR}
</td>
</tr>
<tr>
@@ -222,7 +222,7 @@ checkFieldsets();
<img src="{$ROOT_URL}{$themeconf.admin_icon_dir}/plus.gif" alt="" class="button_{$theme.ID}">
<img src="{$ROOT_URL}{$themeconf.admin_icon_dir}/minus.gif" alt="" class="button_{$theme.ID}" style="display:none;">
{'New Version'|@translate} : {$theme.NEW_VERSION}
- | {'By %s'|@translate|@sprintf:$theme.AUTHOR}
+ | {'By %s'|@translate:$theme.AUTHOR}
</td>
</tr>
<tr>
@@ -264,7 +264,7 @@ checkFieldsets();
<img src="{$ROOT_URL}{$themeconf.admin_icon_dir}/plus.gif" alt="" class="button_{$language.ID}">
<img src="{$ROOT_URL}{$themeconf.admin_icon_dir}/minus.gif" alt="" class="button_{$language.ID}" style="display:none;">
{'New Version'|@translate} : {$language.NEW_VERSION}
- | {'By %s'|@translate|@sprintf:$language.AUTHOR}
+ | {'By %s'|@translate:$language.AUTHOR}
</td>
</tr>
<tr>
diff --git a/admin/themes/default/template/updates_pwg.tpl b/admin/themes/default/template/updates_pwg.tpl
index 5b1bf3238..8205d9f25 100644
--- a/admin/themes/default/template/updates_pwg.tpl
+++ b/admin/themes/default/template/updates_pwg.tpl
@@ -41,11 +41,11 @@ li { margin: 5px; }
<h4>{'Two updates are available'|@translate}:</h4>
<p>
<ul>
- <li><a href="admin.php?page=updates&amp;step=2&amp;to={$MINOR_VERSION}"><strong>{'Update to Piwigo %s'|@translate|@sprintf:$MINOR_VERSION}</strong></a>: {'This is a minor update, with only bug corrections.'|@translate}</li>
- <li><a href="admin.php?page=updates&amp;step=3&amp;to={$MAJOR_VERSION}"><strong>{'Update to Piwigo %s'|@translate|@sprintf:$MAJOR_VERSION}</strong></a>: {'This is a major update, with <a href="%s">new exciting features</a>.'|@translate|@sprintf:$RELEASE_URL} {'Some themes and plugins may be not available yet.'|@translate}</li>
+ <li><a href="admin.php?page=updates&amp;step=2&amp;to={$MINOR_VERSION}"><strong>{'Update to Piwigo %s'|@translate:$MINOR_VERSION}</strong></a>: {'This is a minor update, with only bug corrections.'|@translate}</li>
+ <li><a href="admin.php?page=updates&amp;step=3&amp;to={$MAJOR_VERSION}"><strong>{'Update to Piwigo %s'|@translate:$MAJOR_VERSION}</strong></a>: {'This is a major update, with <a href="%s">new exciting features</a>.'|@translate:$RELEASE_URL} {'Some themes and plugins may be not available yet.'|@translate}</li>
</ul>
</p>
-<p>{'You can update to Piwigo %s directly, without upgrading to Piwigo %s (recommended).'|@translate|@sprintf:$MAJOR_VERSION:$MINOR_VERSION}</p>
+<p>{'You can update to Piwigo %s directly, without upgrading to Piwigo %s (recommended).'|@translate:$MAJOR_VERSION:$MINOR_VERSION}</p>
{/if}
{if $STEP == 2}
@@ -54,7 +54,7 @@ li { margin: 5px; }
{'This is a minor update, with only bug corrections.'|@translate}
</p>
<form action="" method="post">
-<p><input type="submit" name="submit" value="{'Update to Piwigo %s'|@translate|@sprintf:$UPGRADE_TO}"></p>
+<p><input type="submit" name="submit" value="{'Update to Piwigo %s'|@translate:$UPGRADE_TO}"></p>
<p class="autoupdate_bar" style="display:none;">&nbsp; {'Update in progress...'|@translate}<br><img src="admin/themes/default/images/ajax-loader-bar.gif"></p>
<p><input type="hidden" name="upgrade_to" value="{$UPGRADE_TO}"></p>
</form>
@@ -63,7 +63,7 @@ li { margin: 5px; }
{if $STEP == 3}
<p>
{'A new version of Piwigo is available.'|@translate}<br>
- {'This is a major update, with <a href="%s">new exciting features</a>.'|@translate|@sprintf:$RELEASE_URL} {'Some themes and plugins may be not available yet.'|@translate}
+ {'This is a major update, with <a href="%s">new exciting features</a>.'|@translate:$RELEASE_URL} {'Some themes and plugins may be not available yet.'|@translate}
</p>
<form action="" method="post">
@@ -76,7 +76,7 @@ li { margin: 5px; }
{counter assign=i}
<fieldset>
- <legend>{'Update to Piwigo %s'|@translate|@sprintf:$UPGRADE_TO}</legend>
+ <legend>{'Update to Piwigo %s'|@translate:$UPGRADE_TO}</legend>
{if !empty($missing.plugins)}
<p><i>{'Following plugins may not be compatible with the new version of Piwigo:'|@translate}</i></p>
<p><ul>{foreach from=$missing.plugins item=plugin}<li><a href="{$plugin.uri}" class="externalLink">{$plugin.name}</a></li>{/foreach}</ul><br></p>
@@ -89,7 +89,7 @@ li { margin: 5px; }
{if !empty($missing.plugins) or !empty($missing.themes)}
<p><label><input type="checkbox" name="understand"> &nbsp;{'I decide to update anyway'|@translate}</label></p>
{/if}
- <p><input type="submit" name="submit" value="{'Update to Piwigo %s'|@translate|@sprintf:$UPGRADE_TO}" {if !empty($missing.plugins) or !empty($missing.themes)}disabled="disabled"{/if}>
+ <p><input type="submit" name="submit" value="{'Update to Piwigo %s'|@translate:$UPGRADE_TO}" {if !empty($missing.plugins) or !empty($missing.themes)}disabled="disabled"{/if}>
</p>
<p class="autoupdate_bar" style="display:none;">&nbsp; {'Update in progress...'|@translate}<br><img src="admin/themes/default/images/ajax-loader-bar.gif"></p>
</fieldset>
diff --git a/admin/themes/default/template/upgrade.tpl b/admin/themes/default/template/upgrade.tpl
index f859ed56e..641f1b23e 100644
--- a/admin/themes/default/template/upgrade.tpl
+++ b/admin/themes/default/template/upgrade.tpl
@@ -161,7 +161,7 @@ input[type="text"]:focus, input[type="password"]:focus, select:focus {
</tr>
</table>
-<p>{'This page proposes to upgrade your database corresponding to your old version of Piwigo to the current version. The upgrade assistant thinks you are currently running a <strong>release %s</strong> (or equivalent).'|@translate|@sprintf:$introduction.CURRENT_RELEASE}</p>
+<p>{'This page proposes to upgrade your database corresponding to your old version of Piwigo to the current version. The upgrade assistant thinks you are currently running a <strong>release %s</strong> (or equivalent).'|@translate:$introduction.CURRENT_RELEASE}</p>
{if isset($login)}
<p>{'Only administrator can run upgrade: please sign in below.'|@translate}</p>
{/if}
@@ -180,19 +180,19 @@ input[type="text"]:focus, input[type="password"]:focus, select:focus {
{/if}
</fieldset>
<p style="text-align: center;">
-<input class="submit" type="submit" name="submit" value="{'Upgrade from version %s to %s'|@translate|@sprintf:$introduction.CURRENT_RELEASE:$RELEASE}">
+<input class="submit" type="submit" name="submit" value="{'Upgrade from version %s to %s'|@translate:$introduction.CURRENT_RELEASE:$RELEASE}">
</p>
</form>
<!--
<p style="text-align: center;">
-<a href="{$introduction.RUN_UPGRADE_URL}">{'Upgrade from version %s to %s'|@translate|@sprintf:$introduction.CURRENT_RELEASE:$RELEASE}</a>
+<a href="{$introduction.RUN_UPGRADE_URL}">{'Upgrade from version %s to %s'|@translate:$introduction.CURRENT_RELEASE:$RELEASE}</a>
</p>
-->
{/if}
{if isset($upgrade)}
-<h2>{'Upgrade from version %s to %s'|@translate|@sprintf:$upgrade.VERSION:$RELEASE}</h2>
+<h2>{'Upgrade from version %s to %s'|@translate:$upgrade.VERSION:$RELEASE}</h2>
<fieldset>
<legend>{'Statistics'|@translate}</legend>
diff --git a/admin/themes_installed.php b/admin/themes_installed.php
index 8371edc48..07c9f3bf4 100644
--- a/admin/themes_installed.php
+++ b/admin/themes_installed.php
@@ -121,8 +121,8 @@ foreach ($themes->fs_themes as $theme_id => $fs_theme)
{
$tpl_theme['ACTIVABLE'] = false;
- $tpl_theme['ACTIVABLE_TOOLTIP'] = sprintf(
- l10n('Impossible to activate this theme, the parent theme is missing: %s'),
+ $tpl_theme['ACTIVABLE_TOOLTIP'] = l10n(
+ 'Impossible to activate this theme, the parent theme is missing: %s',
$missing_parent
);
}
@@ -136,8 +136,8 @@ foreach ($themes->fs_themes as $theme_id => $fs_theme)
{
$tpl_theme['DELETABLE'] = false;
- $tpl_theme['DELETE_TOOLTIP'] = sprintf(
- l10n('Impossible to delete this theme. Other themes depends on it: %s'),
+ $tpl_theme['DELETE_TOOLTIP'] = l10n(
+ 'Impossible to delete this theme. Other themes depends on it: %s',
implode(', ', $children)
);
}
diff --git a/admin/themes_new.php b/admin/themes_new.php
index 406b24587..13252f629 100644
--- a/admin/themes_new.php
+++ b/admin/themes_new.php
@@ -39,13 +39,7 @@ $themes = new themes();
$themes_dir = PHPWG_ROOT_PATH.'themes';
if (!is_writable($themes_dir))
{
- array_push(
- $page['errors'],
- sprintf(
- l10n('Add write access to the "%s" directory'),
- 'themes'
- )
- );
+ $page['errors'][] = l10n('Add write access to the "%s" directory', 'themes');
}
// +-----------------------------------------------------------------------+
@@ -102,7 +96,7 @@ if (isset($_GET['installstatus']))
default:
array_push(
$page['errors'],
- sprintf(l10n('An error occured during extraction (%s).'), htmlspecialchars($_GET['installstatus']))
+ l10n('An error occured during extraction (%s).', htmlspecialchars($_GET['installstatus']))
);
}
}
diff --git a/admin/user_list.php b/admin/user_list.php
index 900f43756..0dcc1ba95 100644
--- a/admin/user_list.php
+++ b/admin/user_list.php
@@ -214,8 +214,8 @@ if ($conf['double_password_type_in_admin'] == true)
{
array_push(
$page['infos'],
- sprintf(
- l10n('user "%s" added'),
+ l10n(
+ 'user "%s" added',
$_POST['login']
)
);
@@ -234,8 +234,8 @@ else if ($conf['double_password_type_in_admin'] == false)
{
array_push(
$page['infos'],
- sprintf(
- l10n('user "%s" added'),
+ l10n(
+ 'user "%s" added',
stripslashes($_POST['login'])
)
);
diff --git a/admin/user_perm.php b/admin/user_perm.php
index 463c768c0..7082bf34f 100644
--- a/admin/user_perm.php
+++ b/admin/user_perm.php
@@ -85,10 +85,9 @@ $template->set_filenames(
$template->assign(
array(
'TITLE' =>
- sprintf(
- l10n('Manage permissions for user "%s"'),
- get_username($page['user']
- )
+ l10n(
+ 'Manage permissions for user "%s"',
+ get_username($page['user'])
),
'L_CAT_OPTIONS_TRUE'=>l10n('Authorized'),
'L_CAT_OPTIONS_FALSE'=>l10n('Forbidden'),
diff --git a/comments.php b/comments.php
index c0ecc9263..44fcaf936 100644
--- a/comments.php
+++ b/comments.php
@@ -78,9 +78,9 @@ if (!in_array($conf['comments_page_nb_comments'], $items_number))
$since_options = array(
1 => array('label' => l10n('today'),
'clause' => 'date > '.pwg_db_get_recent_period_expression(1)),
- 2 => array('label' => sprintf(l10n('last %d days'), 7),
+ 2 => array('label' => l10n('last %d days', 7),
'clause' => 'date > '.pwg_db_get_recent_period_expression(7)),
- 3 => array('label' => sprintf(l10n('last %d days'), 30),
+ 3 => array('label' => l10n('last %d days', 30),
'clause' => 'date > '.pwg_db_get_recent_period_expression(30)),
4 => array('label' => l10n('the beginning'),
'clause' => '1=1') // stupid but generic
diff --git a/feed.php b/feed.php
index 942ae256f..0e1ba6772 100644
--- a/feed.php
+++ b/feed.php
@@ -122,7 +122,7 @@ if (!$image_only)
if (count($news) > 0)
{
$item = new FeedItem();
- $item->title = sprintf(l10n('New on %s'), format_date($dbnow) );
+ $item->title = l10n('New on %s', format_date($dbnow) );
$item->link = get_gallery_home_url();
// content creation
diff --git a/include/calendar_weekly.class.php b/include/calendar_weekly.class.php
index 548631338..5c2a346b1 100644
--- a/include/calendar_weekly.class.php
+++ b/include/calendar_weekly.class.php
@@ -44,7 +44,7 @@ class Calendar extends CalendarBase
$week_no_labels=array();
for ($i=1; $i<=53; $i++)
{
- $week_no_labels[$i] = sprintf( l10n("Week %d"), $i);
+ $week_no_labels[$i] = l10n('Week %d', $i);
//$week_no_labels[$i] = $i;
}
diff --git a/include/category_cats.inc.php b/include/category_cats.inc.php
index d96903700..8d334f6a0 100644
--- a/include/category_cats.inc.php
+++ b/include/category_cats.inc.php
@@ -352,8 +352,8 @@ if (count($categories) > 0)
}
else
{
- $info = sprintf(
- l10n('from %s to %s'),
+ $info = l10n(
+ 'from %s to %s',
format_date($from),
format_date($to)
);
diff --git a/include/functions.inc.php b/include/functions.inc.php
index 09d104cdc..6f2df2880 100644
--- a/include/functions.inc.php
+++ b/include/functions.inc.php
@@ -606,11 +606,11 @@ function time_since($original, $stop='minute', $format=null, $with_text=true, $w
{
if ($diff->invert)
{
- $print = sprintf(l10n('%s ago'), $print);
+ $print = l10n('%s ago', $print);
}
else
{
- $print = sprintf(l10n('%s in the future'), $print);
+ $print = l10n('%s in the future', $print);
}
}
@@ -1578,8 +1578,8 @@ function get_icon($date, $is_child_date = false)
if (!isset($cache['get_icon']['title']))
{
- $cache['get_icon']['title'] = sprintf(
- l10n('photos posted during the last %d days'),
+ $cache['get_icon']['title'] = l10n(
+ 'photos posted during the last %d days',
$user['recent_period']
);
}
@@ -1705,7 +1705,7 @@ function get_privacy_level_options()
{
$label .= ', ';
}
- $label .= l10n( sprintf('Level %d',$level) );
+ $label .= l10n( sprintf('Level %d', $level) );
}
$options[$level] = $label;
}
diff --git a/include/no_photo_yet.inc.php b/include/no_photo_yet.inc.php
index 17907c51d..e8354debf 100644
--- a/include/no_photo_yet.inc.php
+++ b/include/no_photo_yet.inc.php
@@ -76,8 +76,8 @@ SELECT
$template->assign(
array(
'step' => 2,
- 'intro' => sprintf(
- l10n('Hello %s, your Piwigo photo gallery is empty!'),
+ 'intro' => l10n(
+ 'Hello %s, your Piwigo photo gallery is empty!',
$user['username']
),
'next_step_url' => $url,
diff --git a/include/template.class.php b/include/template.class.php
index 3ac6e78db..ac9b999bb 100644
--- a/include/template.class.php
+++ b/include/template.class.php
@@ -73,8 +73,8 @@ class Template {
{
load_language('admin.lang');
fatal_error(
- sprintf(
- l10n('Give write access (chmod 777) to "%s" directory at the root of your Piwigo installation'),
+ l10n(
+ 'Give write access (chmod 777) to "%s" directory at the root of your Piwigo installation',
$conf['data_location']
),
l10n('an error happened'),
diff --git a/include/ws_functions.inc.php b/include/ws_functions.inc.php
index 53e166873..f5f136279 100644
--- a/include/ws_functions.inc.php
+++ b/include/ws_functions.inc.php
@@ -3357,7 +3357,7 @@ function ws_extensions_update($params, $service)
switch ($upgrade_status)
{
case 'ok':
- return sprintf(l10n('%s has been successfully updated.'), $extension_name);
+ return l10n('%s has been successfully updated.', $extension_name);
case 'temp_path_error':
return new PwgError(null, l10n('Can\'t create temporary file.'));
@@ -3369,7 +3369,7 @@ function ws_extensions_update($params, $service)
return new PwgError(null, l10n('Can\'t read or extract archive.'));
default:
- return new PwgError(null, sprintf(l10n('An error occured during extraction (%s).'), $upgrade_status));
+ return new PwgError(null, l10n('An error occured during extraction (%s).', $upgrade_status));
}
}
diff --git a/install.php b/install.php
index 819d0e82f..d1a6f88ea 100644
--- a/install.php
+++ b/install.php
@@ -439,7 +439,7 @@ $template->assign(
'F_ADMIN_EMAIL' => $admin_mail,
'EMAIL' => '<span class="adminEmail">'.$admin_mail.'</span>',
'F_NEWSLETTER_SUBSCRIBE' => $is_newsletter_subscribe,
- 'L_INSTALL_HELP' => sprintf(l10n('Need help ? Ask your question on <a href="%s">Piwigo message board</a>.'), PHPWG_URL.'/forum'),
+ 'L_INSTALL_HELP' => l10n('Need help ? Ask your question on <a href="%s">Piwigo message board</a>.', PHPWG_URL.'/forum'),
));
//------------------------------------------------------ errors & infos display
diff --git a/password.php b/password.php
index f242d48b5..6b0221fac 100644
--- a/password.php
+++ b/password.php
@@ -84,8 +84,8 @@ function process_password_request()
{
array_push(
$page['errors'],
- sprintf(
- l10n('User "%s" has no email address, password reset is not possible'),
+ l10n(
+ 'User "%s" has no email address, password reset is not possible',
$userdata['username']
)
);
@@ -108,8 +108,8 @@ function process_password_request()
set_make_full_url();
$message = l10n('Someone requested that the password be reset for the following user account:') . "\r\n\r\n";
- $message.= sprintf(
- l10n('Username "%s" on gallery %s'),
+ $message.= l10n(
+ 'Username "%s" on gallery %s',
$userdata['username'],
get_gallery_home_url()
);
diff --git a/picture.php b/picture.php
index d5050abcd..dfe2bf965 100644
--- a/picture.php
+++ b/picture.php
@@ -859,8 +859,7 @@ if ($picture['current']['src_image']->is_original() and isset($picture['current'
// filesize
if (!empty($picture['current']['filesize']))
{
- $infos['INFO_FILESIZE'] =
- sprintf(l10n('%d Kb'), $picture['current']['filesize']);
+ $infos['INFO_FILESIZE'] = l10n('%d Kb', $picture['current']['filesize']);
}
// number of visits
diff --git a/plugins/LocalFilesEditor/admin.php b/plugins/LocalFilesEditor/admin.php
index 35b9a72a4..71d0e220f 100644
--- a/plugins/LocalFilesEditor/admin.php
+++ b/plugins/LocalFilesEditor/admin.php
@@ -92,7 +92,7 @@ if (isset($_POST['submit']))
if (file_exists($edited_file))
{
@copy($edited_file, get_bak_file($edited_file));
- array_push($page['infos'], sprintf(l10n('locfiledit_saved_bak'), substr(get_bak_file($edited_file), 2)));
+ array_push($page['infos'], l10n('locfiledit_saved_bak', substr(get_bak_file($edited_file), 2)));
}
if ($file = @fopen($edited_file , "w"))
diff --git a/search.php b/search.php
index 3e4c0ab3a..6a57128f2 100644
--- a/search.php
+++ b/search.php
@@ -108,10 +108,10 @@ if (isset($_POST['submit']))
{
$search['fields'][$type_date.'-after'] = array(
'date' => sprintf(
- '%d-%02d-%02d',
- $_POST['start_year'],
- $_POST['start_month'] != 0 ? $_POST['start_month'] : '01',
- $_POST['start_day'] != 0 ? $_POST['start_day'] : '01'
+ '%d-%02d-%02d',
+ $_POST['start_year'],
+ $_POST['start_month'] != 0 ? $_POST['start_month'] : '01',
+ $_POST['start_day'] != 0 ? $_POST['start_day'] : '01'
),
'inc' => true,
);
@@ -121,10 +121,10 @@ if (isset($_POST['submit']))
{
$search['fields'][$type_date.'-before'] = array(
'date' => sprintf(
- '%d-%02d-%02d',
- $_POST['end_year'],
- $_POST['end_month'] != 0 ? $_POST['end_month'] : '12',
- $_POST['end_day'] != 0 ? $_POST['end_day'] : '31'
+ '%d-%02d-%02d',
+ $_POST['end_year'],
+ $_POST['end_month'] != 0 ? $_POST['end_month'] : '12',
+ $_POST['end_day'] != 0 ? $_POST['end_day'] : '31'
),
'inc' => true,
);
diff --git a/search_rules.php b/search_rules.php
index 1fe8a628d..4217fe2e9 100644
--- a/search_rules.php
+++ b/search_rules.php
@@ -77,9 +77,10 @@ else
if (isset($search['fields']['allwords']))
{
- $template->append( 'search_words',
- sprintf(
- l10n('searched words : %s'),
+ $template->append(
+ 'search_words',
+ l10n(
+ 'searched words : %s',
join(', ', $search['fields']['allwords']['words'])
)
);
@@ -103,10 +104,10 @@ SELECT name
if (isset($search['fields']['author']))
{
$template->append(
- 'search_words',
- sprintf(
- l10n('author(s) : %s'),
- join(', ', $search['fields']['author']['words'])
+ 'search_words',
+ l10n(
+ 'author(s) : %s',
+ join(', ', $search['fields']['author']['words'])
)
);
}
diff --git a/upgrade.php b/upgrade.php
index f4941164c..446f1ee17 100644
--- a/upgrade.php
+++ b/upgrade.php
@@ -234,7 +234,7 @@ $template = new Template(PHPWG_ROOT_PATH.'admin/themes', 'clear');
$template->set_filenames(array('upgrade'=>'upgrade.tpl'));
$template->assign(array(
'RELEASE' => PHPWG_VERSION,
- 'L_UPGRADE_HELP' => sprintf(l10n('Need help ? Ask your question on <a href="%s">Piwigo message board</a>.'), PHPWG_URL.'/forum'),
+ 'L_UPGRADE_HELP' => l10n('Need help ? Ask your question on <a href="%s">Piwigo message board</a>.', PHPWG_URL.'/forum'),
)
);