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.= '
'.sprintf(l10n('Numeric identifier : %d'), $category['id']);
+$intro.= '
'.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'].'×'.$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 %s merged into tag %s'),
+ l10n(
+ 'Tags %s merged into tag %s',
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}
- {'Width'|@translate} {'between %d and %d pixels'|@translate|sprintf:$dimensions.selected.min_width:$dimensions.selected.max_width} + {'Width'|@translate} {'between %d and %d pixels'|@translate:$dimensions.selected.min_width:$dimensions.selected.max_width} | {'Reset'|@translate} - {'Height'|@translate} {'between %d and %d pixels'|@translate|sprintf:$dimensions.selected.min_height:$dimensions.selected.max_height} + {'Height'|@translate} {'between %d and %d pixels'|@translate:$dimensions.selected.min_height:$dimensions.selected.max_height} | {'Reset'|@translate} - {'Ratio'|@translate} ({'Width'|@translate}/{'Height'|@translate}) {'between %.2f and %.2f'|@translate|sprintf:$dimensions.selected.min_ratio:$dimensions.selected.max_ratio} + {'Ratio'|@translate} ({'Width'|@translate}/{'Height'|@translate}) {'between %.2f and %.2f'|@translate:$dimensions.selected.min_ratio:$dimensions.selected.max_ratio} {if isset($dimensions.ratio_portrait)} | {'Portrait'|@translate} {/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)}- {'%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} {'show details'|@translate} 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() {
@@ -624,35 +624,35 @@ jQuery(document).ready(function() { @@ -671,28 +671,28 @@ jQuery(document).ready(function() { 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}
@@ -222,7 +222,7 @@ checkFieldsets(); {'New Version'|@translate} : {$theme.NEW_VERSION} - | {'By %s'|@translate|@sprintf:$theme.AUTHOR} + | {'By %s'|@translate:$theme.AUTHOR}
@@ -264,7 +264,7 @@ checkFieldsets(); {'New Version'|@translate} : {$language.NEW_VERSION} - | {'By %s'|@translate|@sprintf:$language.AUTHOR} + | {'By %s'|@translate:$language.AUTHOR}
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; } -{'Two updates are available'|@translate}:
-
-- {'Update to Piwigo %s'|@translate|@sprintf:$MINOR_VERSION}: {'This is a minor update, with only bug corrections.'|@translate}
-- {'Update to Piwigo %s'|@translate|@sprintf:$MAJOR_VERSION}: {'This is a major update, with new exciting features.'|@translate|@sprintf:$RELEASE_URL} {'Some themes and plugins may be not available yet.'|@translate}
+- {'Update to Piwigo %s'|@translate:$MINOR_VERSION}: {'This is a minor update, with only bug corrections.'|@translate}
+- {'Update to Piwigo %s'|@translate:$MAJOR_VERSION}: {'This is a major update, with new exciting features.'|@translate:$RELEASE_URL} {'Some themes and plugins may be not available yet.'|@translate}
{'You can update to Piwigo %s directly, without upgrading to Piwigo %s (recommended).'|@translate|@sprintf:$MAJOR_VERSION:$MINOR_VERSION}
+{'You can update to Piwigo %s directly, without upgrading to Piwigo %s (recommended).'|@translate:$MAJOR_VERSION:$MINOR_VERSION}
{/if} {if $STEP == 2} @@ -54,7 +54,7 @@ li { margin: 5px; } {'This is a minor update, with only bug corrections.'|@translate} @@ -63,7 +63,7 @@ li { margin: 5px; } {if $STEP == 3}{'A new version of Piwigo is available.'|@translate}
- {'This is a major update, with new exciting features.'|@translate|@sprintf:$RELEASE_URL} {'Some themes and plugins may be not available yet.'|@translate} + {'This is a major update, with new exciting features.'|@translate:$RELEASE_URL} {'Some themes and plugins may be not available yet.'|@translate}{'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 release %s (or equivalent).'|@translate|@sprintf:$introduction.CURRENT_RELEASE}
+{'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 release %s (or equivalent).'|@translate:$introduction.CURRENT_RELEASE}
{if isset($login)}{'Only administrator can run upgrade: please sign in below.'|@translate}
{/if} @@ -180,19 +180,19 @@ input[type="text"]:focus, input[type="password"]:focus, select:focus { {/if}- +
{/if} {if isset($upgrade)} -{'Upgrade from version %s to %s'|@translate|@sprintf:$upgrade.VERSION:$RELEASE}
+{'Upgrade from version %s to %s'|@translate:$upgrade.VERSION:$RELEASE}