aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/feed.php2
-rw-r--r--phpBB/includes/acp/acp_attachments.php7
-rw-r--r--phpBB/includes/acp/acp_groups.php6
-rw-r--r--phpBB/includes/acp/acp_icons.php20
-rw-r--r--phpBB/includes/acp/acp_search.php4
-rw-r--r--phpBB/includes/acp/acp_users.php6
-rw-r--r--phpBB/includes/functions_profile_fields.php12
-rw-r--r--phpBB/includes/functions_upload.php8
-rw-r--r--phpBB/includes/functions_user.php31
-rw-r--r--phpBB/includes/message_parser.php18
-rw-r--r--phpBB/includes/ucp/ucp_groups.php8
-rw-r--r--phpBB/includes/ucp/ucp_main.php4
-rw-r--r--phpBB/includes/ucp/ucp_pm_compose.php2
-rw-r--r--phpBB/includes/ucp/ucp_pm_options.php2
-rw-r--r--phpBB/includes/ucp/ucp_profile.php4
-rw-r--r--phpBB/index.php2
-rw-r--r--phpBB/language/en/acp/groups.php6
-rw-r--r--phpBB/language/en/acp/posting.php32
-rw-r--r--phpBB/language/en/acp/search.php11
-rw-r--r--phpBB/language/en/common.php12
-rw-r--r--phpBB/language/en/posting.php39
-rw-r--r--phpBB/language/en/search.php2
-rw-r--r--phpBB/language/en/ucp.php20
-rw-r--r--phpBB/memberlist.php4
-rw-r--r--phpBB/posting.php6
-rw-r--r--phpBB/search.php2
26 files changed, 169 insertions, 101 deletions
diff --git a/phpBB/feed.php b/phpBB/feed.php
index 8d33a358a5..e490363594 100644
--- a/phpBB/feed.php
+++ b/phpBB/feed.php
@@ -1107,7 +1107,7 @@ class phpbb_feed_forums extends phpbb_feed_base
global $user;
$item_row['statistics'] = $user->lang('TOTAL_TOPICS', (int) $row['forum_topics'])
- . ' ' . $this->separator_stats . ' ' . sprintf($user->lang['TOTAL_POSTS_OTHER'], $row['forum_posts']);
+ . ' ' . $this->separator_stats . ' ' . $user->lang('TOTAL_POSTS_OTHER', (int) $row['forum_posts']);
}
}
}
diff --git a/phpBB/includes/acp/acp_attachments.php b/phpBB/includes/acp/acp_attachments.php
index c62fefae46..4295aa9d9f 100644
--- a/phpBB/includes/acp/acp_attachments.php
+++ b/phpBB/includes/acp/acp_attachments.php
@@ -1159,7 +1159,7 @@ class acp_attachments
// Issue warning message if files stats are inaccurate
if (($num_files != $num_files_real) || ($total_size != $total_size_real))
{
- $error[] = sprintf($user->lang['FILES_STATS_WRONG'], $num_files_real, get_formatted_filesize($total_size_real));
+ $error[] = $user->lang('FILES_STATS_WRONG', (int) $num_files_real, get_formatted_filesize($total_size_real));
$template->assign_vars(array(
'S_ACTION_OPTIONS' => ($auth->acl_get('a_board')) ? true : false,
@@ -1244,8 +1244,7 @@ class acp_attachments
$row['extension'] = strtolower(trim((string) $row['extension']));
$comment = ($row['attach_comment'] && !$row['in_message']) ? str_replace(array("\n", "\r"), array('<br />', "\n"), $row['attach_comment']) : '';
$display_cat = $extensions[$row['extension']]['display_cat'];
- $l_downloaded_viewed = ($display_cat == ATTACHMENT_CATEGORY_NONE) ? 'DOWNLOAD_COUNT' : 'VIEWED_COUNT';
- $l_download_count = (!isset($row['download_count']) || (int) $row['download_count'] == 0) ? $user->lang[$l_downloaded_viewed . '_NONE'] : (((int) $row['download_count'] == 1) ? sprintf($user->lang[$l_downloaded_viewed], $row['download_count']) : sprintf($user->lang[$l_downloaded_viewed . 'S'], $row['download_count']));
+ $l_downloaded_viewed = ($display_cat == ATTACHMENT_CATEGORY_NONE) ? 'DOWNLOAD_COUNTS' : 'VIEWED_COUNTS';
$template->assign_block_vars('attachments', array(
'ATTACHMENT_POSTER' => get_username_string('full', (int) $row['poster_id'], (string) $row['username'], (string) $row['user_colour'], (string) $row['username']),
@@ -1261,7 +1260,7 @@ class acp_attachments
'TOPIC_ID' => (int) $row['topic_id'],
'POST_IDS' => (!empty($post_ids[$row['attach_id']])) ? (int) $post_ids[$row['attach_id']] : '',
- 'L_DOWNLOAD_COUNT' => $l_download_count,
+ 'L_DOWNLOAD_COUNT' => $user->lang($l_downloaded_viewed, (int) $row['download_count']),
'S_IN_MESSAGE' => (bool) $row['in_message'],
diff --git a/phpBB/includes/acp/acp_groups.php b/phpBB/includes/acp/acp_groups.php
index 9aa54bed89..ea4d5f35cb 100644
--- a/phpBB/includes/acp/acp_groups.php
+++ b/phpBB/includes/acp/acp_groups.php
@@ -371,7 +371,7 @@ class acp_groups
{
if ($data['width'] > $config['avatar_max_width'] || $data['height'] > $config['avatar_max_height'])
{
- $error[] = sprintf($user->lang['AVATAR_WRONG_SIZE'], $config['avatar_min_width'], $config['avatar_min_height'], $config['avatar_max_width'], $config['avatar_max_height'], $data['width'], $data['height']);
+ $error[] = avatar_error_wrong_size($data['width'], $data['height']);
}
}
@@ -381,7 +381,7 @@ class acp_groups
{
if ($data['width'] < $config['avatar_min_width'] || $data['height'] < $config['avatar_min_height'])
{
- $error[] = sprintf($user->lang['AVATAR_WRONG_SIZE'], $config['avatar_min_width'], $config['avatar_min_height'], $config['avatar_max_width'], $config['avatar_max_height'], $data['width'], $data['height']);
+ $error[] = avatar_error_wrong_size($data['width'], $data['height']);
}
}
}
@@ -627,7 +627,7 @@ class acp_groups
'U_BACK' => $u_back,
'U_SWATCH' => append_sid("{$phpbb_admin_path}swatch.$phpEx", 'form=settings&amp;name=group_colour'),
'U_ACTION' => "{$this->u_action}&amp;action=$action&amp;g=$group_id",
- 'L_AVATAR_EXPLAIN' => sprintf($user->lang['AVATAR_EXPLAIN'], $config['avatar_max_width'], $config['avatar_max_height'], round($config['avatar_filesize'] / 1024)),
+ 'L_AVATAR_EXPLAIN' => avatar_explanation_string(),
));
return;
diff --git a/phpBB/includes/acp/acp_icons.php b/phpBB/includes/acp/acp_icons.php
index 98aef45892..e02124fb42 100644
--- a/phpBB/includes/acp/acp_icons.php
+++ b/phpBB/includes/acp/acp_icons.php
@@ -487,21 +487,7 @@ class acp_icons
$cache->destroy('_icons');
$cache->destroy('sql', $table);
- $level = E_USER_NOTICE;
- switch ($icons_updated)
- {
- case 0:
- $suc_lang = "{$lang}_NONE";
- $level = E_USER_WARNING;
- break;
-
- case 1:
- $suc_lang = "{$lang}_ONE";
- break;
-
- default:
- $suc_lang = $lang;
- }
+ $level = ($icons_updated) ? E_USER_NOTICE : E_USER_WARNING;
$errormsgs = '';
foreach ($errors as $img => $error)
{
@@ -509,11 +495,11 @@ class acp_icons
}
if ($action == 'modify')
{
- trigger_error($user->lang[$suc_lang . '_EDITED'] . $errormsgs . adm_back_link($this->u_action), $level);
+ trigger_error($user->lang($lang . '_EDITED', $icons_updated) . $errormsgs . adm_back_link($this->u_action), $level);
}
else
{
- trigger_error($user->lang[$suc_lang . '_ADDED'] . $errormsgs . adm_back_link($this->u_action), $level);
+ trigger_error($user->lang($lang . '_ADDED', $icons_updated) . $errormsgs . adm_back_link($this->u_action), $level);
}
break;
diff --git a/phpBB/includes/acp/acp_search.php b/phpBB/includes/acp/acp_search.php
index ab604cd7cd..2de76187d5 100644
--- a/phpBB/includes/acp/acp_search.php
+++ b/phpBB/includes/acp/acp_search.php
@@ -338,7 +338,7 @@ class acp_search
$totaltime = $mtime[0] + $mtime[1] - $starttime;
$rows_per_second = $row_count / $totaltime;
meta_refresh(1, append_sid($this->u_action . '&amp;action=delete&amp;skip_rows=' . $post_counter));
- trigger_error(sprintf($user->lang['SEARCH_INDEX_DELETE_REDIRECT'], $post_counter, $row_count, $rows_per_second));
+ trigger_error($user->lang('SEARCH_INDEX_DELETE_REDIRECT', (int) $row_count, $post_counter, $rows_per_second));
}
}
@@ -428,7 +428,7 @@ class acp_search
$totaltime = $mtime[0] + $mtime[1] - $starttime;
$rows_per_second = $row_count / $totaltime;
meta_refresh(1, append_sid($this->u_action . '&amp;action=create&amp;skip_rows=' . $post_counter));
- trigger_error(sprintf($user->lang['SEARCH_INDEX_CREATE_REDIRECT'], $post_counter, $row_count, $rows_per_second));
+ trigger_error($user->lang('SEARCH_INDEX_CREATE_REDIRECT', (int) $row_count, $post_counter) . $user->lang('SEARCH_INDEX_CREATE_REDIRECT_RATE', $rows_per_second));
}
}
diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php
index 38bcbf5ee3..3ae1278396 100644
--- a/phpBB/includes/acp/acp_users.php
+++ b/phpBB/includes/acp/acp_users.php
@@ -1748,8 +1748,8 @@ class acp_users
'USER_AVATAR_WIDTH' => $user_row['user_avatar_width'],
'USER_AVATAR_HEIGHT' => $user_row['user_avatar_height'],
- 'L_AVATAR_EXPLAIN' => sprintf($user->lang['AVATAR_EXPLAIN'], $config['avatar_max_width'], $config['avatar_max_height'], round($config['avatar_filesize'] / 1024)))
- );
+ 'L_AVATAR_EXPLAIN' => avatar_explanation_string()
+ ));
break;
@@ -1881,7 +1881,7 @@ class acp_users
'FLASH_STATUS' => ($config['allow_sig_flash']) ? $user->lang['FLASH_IS_ON'] : $user->lang['FLASH_IS_OFF'],
'URL_STATUS' => ($config['allow_sig_links']) ? $user->lang['URL_IS_ON'] : $user->lang['URL_IS_OFF'],
- 'L_SIGNATURE_EXPLAIN' => sprintf($user->lang['SIGNATURE_EXPLAIN'], $config['max_sig_chars']),
+ 'L_SIGNATURE_EXPLAIN' => $user->lang('SIGNATURE_EXPLAIN', (int) $config['max_sig_chars']),
'S_BBCODE_ALLOWED' => $config['allow_sig_bbcode'],
'S_SMILIES_ALLOWED' => $config['allow_sig_smilies'],
diff --git a/phpBB/includes/functions_profile_fields.php b/phpBB/includes/functions_profile_fields.php
index ec29a1732d..130a4dcae8 100644
--- a/phpBB/includes/functions_profile_fields.php
+++ b/phpBB/includes/functions_profile_fields.php
@@ -315,32 +315,32 @@ class custom_profile
case 'FIELD_INVALID_DATE':
case 'FIELD_INVALID_VALUE':
case 'FIELD_REQUIRED':
- $error = sprintf($user->lang[$cp_result], $row['lang_name']);
+ $error = $user->lang($cp_result, $row['lang_name']);
break;
case 'FIELD_TOO_SHORT':
case 'FIELD_TOO_SMALL':
- $error = sprintf($user->lang[$cp_result], $row['lang_name'], $row['field_minlen']);
+ $error = $user->lang($cp_result, (int) $row['field_minlen'], $row['lang_name']);
break;
case 'FIELD_TOO_LONG':
case 'FIELD_TOO_LARGE':
- $error = sprintf($user->lang[$cp_result], $row['lang_name'], $row['field_maxlen']);
+ $error = $user->lang($cp_result, (int) $row['field_maxlen'], $row['lang_name']);
break;
case 'FIELD_INVALID_CHARS':
switch ($row['field_validation'])
{
case '[0-9]+':
- $error = sprintf($user->lang[$cp_result . '_NUMBERS_ONLY'], $row['lang_name']);
+ $error = $user->lang($cp_result . '_NUMBERS_ONLY', $row['lang_name']);
break;
case '[\w]+':
- $error = sprintf($user->lang[$cp_result . '_ALPHA_ONLY'], $row['lang_name']);
+ $error = $user->lang($cp_result . '_ALPHA_ONLY', $row['lang_name']);
break;
case '[\w_\+\. \-\[\]]+':
- $error = sprintf($user->lang[$cp_result . '_SPACERS_ONLY'], $row['lang_name']);
+ $error = $user->lang($cp_result . '_SPACERS_ONLY', $row['lang_name']);
break;
}
break;
diff --git a/phpBB/includes/functions_upload.php b/phpBB/includes/functions_upload.php
index f648c585f6..2322aa77bf 100644
--- a/phpBB/includes/functions_upload.php
+++ b/phpBB/includes/functions_upload.php
@@ -427,7 +427,13 @@ class filespec
if (!$this->upload->valid_dimensions($this))
{
- $this->error[] = sprintf($user->lang[$this->upload->error_prefix . 'WRONG_SIZE'], $this->upload->min_width, $this->upload->min_height, $this->upload->max_width, $this->upload->max_height, $this->width, $this->height);
+ $this->error[] = $user->lang($this->upload->error_prefix . 'WRONG_SIZE',
+ $user->lang('PIXELS', (int) $this->upload->min_width),
+ $user->lang('PIXELS', (int) $this->upload->min_height),
+ $user->lang('PIXELS', (int) $this->upload->max_width),
+ $user->lang('PIXELS', (int) $this->upload->max_height),
+ $user->lang('PIXELS', (int) $this->width),
+ $user->lang('PIXELS', (int) $this->height));
return false;
}
diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php
index 930cd4625f..e3537fe328 100644
--- a/phpBB/includes/functions_user.php
+++ b/phpBB/includes/functions_user.php
@@ -2039,7 +2039,7 @@ function avatar_remote($data, &$error)
{
if ($width > $config['avatar_max_width'] || $height > $config['avatar_max_height'])
{
- $error[] = sprintf($user->lang['AVATAR_WRONG_SIZE'], $config['avatar_min_width'], $config['avatar_min_height'], $config['avatar_max_width'], $config['avatar_max_height'], $width, $height);
+ $error[] = avatar_error_wrong_size($width, $height);
return false;
}
}
@@ -2048,7 +2048,7 @@ function avatar_remote($data, &$error)
{
if ($width < $config['avatar_min_width'] || $height < $config['avatar_min_height'])
{
- $error[] = sprintf($user->lang['AVATAR_WRONG_SIZE'], $config['avatar_min_width'], $config['avatar_min_height'], $config['avatar_max_width'], $config['avatar_max_height'], $width, $height);
+ $error[] = avatar_error_wrong_size($width, $height);
return false;
}
}
@@ -2388,7 +2388,7 @@ function avatar_process_user(&$error, $custom_userdata = false, $can_upload = nu
{
if ($data['width'] > $config['avatar_max_width'] || $data['height'] > $config['avatar_max_height'])
{
- $error[] = sprintf($user->lang['AVATAR_WRONG_SIZE'], $config['avatar_min_width'], $config['avatar_min_height'], $config['avatar_max_width'], $config['avatar_max_height'], $data['width'], $data['height']);
+ $error[] = avatar_error_wrong_size($data['width'], $data['height']);
}
}
@@ -2398,7 +2398,7 @@ function avatar_process_user(&$error, $custom_userdata = false, $can_upload = nu
{
if ($data['width'] < $config['avatar_min_width'] || $data['height'] < $config['avatar_min_height'])
{
- $error[] = sprintf($user->lang['AVATAR_WRONG_SIZE'], $config['avatar_min_width'], $config['avatar_min_height'], $config['avatar_max_width'], $config['avatar_max_height'], $data['width'], $data['height']);
+ $error[] = avatar_error_wrong_size($data['width'], $data['height']);
}
}
}
@@ -2444,6 +2444,29 @@ function avatar_process_user(&$error, $custom_userdata = false, $can_upload = nu
return (sizeof($error)) ? false : true;
}
+function avatar_error_wrong_size($width, $height)
+{
+ global $config, $user;
+
+ return $user->lang('AVATAR_WRONG_SIZE',
+ $user->lang('PIXELS', (int) $config['avatar_min_width']),
+ $user->lang('PIXELS', (int) $config['avatar_min_height']),
+ $user->lang('PIXELS', (int) $config['avatar_max_width']),
+ $user->lang('PIXELS', (int) $config['avatar_max_height']),
+ $user->lang('PIXELS', (int) $width),
+ $user->lang('PIXELS', (int) $height));
+}
+
+function avatar_explanation_string()
+{
+ global $config, $user;
+
+ return $user->lang('AVATAR_EXPLAIN',
+ $user->lang('PIXELS', (int) $config['avatar_max_width']),
+ $user->lang('PIXELS', (int) $config['avatar_max_height']),
+ round($config['avatar_filesize'] / 1024));
+}
+
//
// Usergroup functions
//
diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php
index cb9a9d7d28..5e8732e94d 100644
--- a/phpBB/includes/message_parser.php
+++ b/phpBB/includes/message_parser.php
@@ -210,7 +210,7 @@ class bbcode_firstpass extends bbcode
if ($config['max_' . $this->mode . '_font_size'] && $config['max_' . $this->mode . '_font_size'] < $stx)
{
- $this->warn_msg[] = sprintf($user->lang['MAX_FONT_SIZE_EXCEEDED'], $config['max_' . $this->mode . '_font_size']);
+ $this->warn_msg[] = $user->lang('MAX_FONT_SIZE_EXCEEDED', (int) $config['max_' . $this->mode . '_font_size']);
return '[size=' . $stx . ']' . $in . '[/size]';
}
@@ -319,13 +319,13 @@ class bbcode_firstpass extends bbcode
if ($config['max_' . $this->mode . '_img_height'] && $config['max_' . $this->mode . '_img_height'] < $stats[1])
{
$error = true;
- $this->warn_msg[] = sprintf($user->lang['MAX_IMG_HEIGHT_EXCEEDED'], $config['max_' . $this->mode . '_img_height']);
+ $this->warn_msg[] = $user->lang('MAX_IMG_HEIGHT_EXCEEDED', (int) $config['max_' . $this->mode . '_img_height']);
}
if ($config['max_' . $this->mode . '_img_width'] && $config['max_' . $this->mode . '_img_width'] < $stats[0])
{
$error = true;
- $this->warn_msg[] = sprintf($user->lang['MAX_IMG_WIDTH_EXCEEDED'], $config['max_' . $this->mode . '_img_width']);
+ $this->warn_msg[] = $user->lang('MAX_IMG_WIDTH_EXCEEDED', (int) $config['max_' . $this->mode . '_img_width']);
}
}
}
@@ -374,13 +374,13 @@ class bbcode_firstpass extends bbcode
if ($config['max_' . $this->mode . '_img_height'] && $config['max_' . $this->mode . '_img_height'] < $height)
{
$error = true;
- $this->warn_msg[] = sprintf($user->lang['MAX_FLASH_HEIGHT_EXCEEDED'], $config['max_' . $this->mode . '_img_height']);
+ $this->warn_msg[] = $user->lang('MAX_FLASH_HEIGHT_EXCEEDED', (int) $config['max_' . $this->mode . '_img_height']);
}
if ($config['max_' . $this->mode . '_img_width'] && $config['max_' . $this->mode . '_img_width'] < $width)
{
$error = true;
- $this->warn_msg[] = sprintf($user->lang['MAX_FLASH_WIDTH_EXCEEDED'], $config['max_' . $this->mode . '_img_width']);
+ $this->warn_msg[] = $user->lang('MAX_FLASH_WIDTH_EXCEEDED', (int) $config['max_' . $this->mode . '_img_width']);
}
}
@@ -1117,7 +1117,7 @@ class parse_message extends bbcode_firstpass
// Maximum message length check. 0 disables this check completely.
if ((int) $config['max_' . $mode . '_chars'] > 0 && $message_length > (int) $config['max_' . $mode . '_chars'])
{
- $this->warn_msg[] = sprintf($user->lang['TOO_MANY_CHARS_' . strtoupper($mode)], $message_length, (int) $config['max_' . $mode . '_chars']);
+ $this->warn_msg[] = $user->lang('TOO_MANY_CHARS_' . strtoupper($mode), $message_length, (int) $config['max_' . $mode . '_chars']);
return (!$update_this_message) ? $return_message : $this->warn_msg;
}
@@ -1126,7 +1126,7 @@ class parse_message extends bbcode_firstpass
{
if (!$message_length || $message_length < (int) $config['min_post_chars'])
{
- $this->warn_msg[] = (!$message_length) ? $user->lang['TOO_FEW_CHARS'] : sprintf($user->lang['TOO_FEW_CHARS_LIMIT'], $message_length, (int) $config['min_post_chars']);
+ $this->warn_msg[] = (!$message_length) ? $user->lang['TOO_FEW_CHARS'] : $user->lang('TOO_FEW_CHARS_LIMIT', $message_length, (int) $config['min_post_chars']);
return (!$update_this_message) ? $return_message : $this->warn_msg;
}
}
@@ -1445,7 +1445,7 @@ class parse_message extends bbcode_firstpass
}
else
{
- $error[] = sprintf($user->lang['TOO_MANY_ATTACHMENTS'], $cfg['max_attachments']);
+ $error[] = $user->lang('TOO_MANY_ATTACHMENTS', (int) $cfg['max_attachments']);
}
}
@@ -1536,7 +1536,7 @@ class parse_message extends bbcode_firstpass
}
else
{
- $error[] = sprintf($user->lang['TOO_MANY_ATTACHMENTS'], $cfg['max_attachments']);
+ $error[] = $user->lang('TOO_MANY_ATTACHMENTS', (int) $cfg['max_attachments']);
}
}
}
diff --git a/phpBB/includes/ucp/ucp_groups.php b/phpBB/includes/ucp/ucp_groups.php
index 5ac5cbf431..e3e4e8ce22 100644
--- a/phpBB/includes/ucp/ucp_groups.php
+++ b/phpBB/includes/ucp/ucp_groups.php
@@ -561,7 +561,7 @@ class ucp_groups
{
if ($data['width'] > $config['avatar_max_width'] || $data['height'] > $config['avatar_max_height'])
{
- $error[] = sprintf($user->lang['AVATAR_WRONG_SIZE'], $config['avatar_min_width'], $config['avatar_min_height'], $config['avatar_max_width'], $config['avatar_max_height'], $data['width'], $data['height']);
+ $error[] = avatar_error_wrong_size($data['width'], $data['height']);
}
}
@@ -571,7 +571,7 @@ class ucp_groups
{
if ($data['width'] < $config['avatar_min_width'] || $data['height'] < $config['avatar_min_height'])
{
- $error[] = sprintf($user->lang['AVATAR_WRONG_SIZE'], $config['avatar_min_width'], $config['avatar_min_height'], $config['avatar_max_width'], $config['avatar_max_height'], $data['width'], $data['height']);
+ $error[] = avatar_error_wrong_size($data['width'], $data['height']);
}
}
}
@@ -732,7 +732,7 @@ class ucp_groups
'U_SWATCH' => append_sid("{$phpbb_root_path}adm/swatch.$phpEx", 'form=ucp&amp;name=group_colour'),
'S_UCP_ACTION' => $this->u_action . "&amp;action=$action&amp;g=$group_id",
- 'L_AVATAR_EXPLAIN' => sprintf($user->lang['AVATAR_EXPLAIN'], $config['avatar_max_width'], $config['avatar_max_height'], $config['avatar_filesize'] / 1024),
+ 'L_AVATAR_EXPLAIN' => avatar_explanation_string(),
));
break;
@@ -1068,7 +1068,7 @@ class ucp_groups
'mode' => $mode,
'action' => $action
);
- confirm_box(false, sprintf($user->lang['GROUP_CONFIRM_ADD_USER' . ((sizeof($name_ary) == 1) ? '' : 'S')], implode(', ', $name_ary)), build_hidden_fields($s_hidden_fields));
+ confirm_box(false, $user->lang('GROUP_CONFIRM_ADD_USERS', sizeof($name_ary), implode(', ', $name_ary)), build_hidden_fields($s_hidden_fields));
}
trigger_error($user->lang['NO_USERS_ADDED'] . '<br /><br />' . sprintf($user->lang['RETURN_PAGE'], '<a href="' . $this->u_action . '&amp;action=list&amp;g=' . $group_id . '">', '</a>'));
diff --git a/phpBB/includes/ucp/ucp_main.php b/phpBB/includes/ucp/ucp_main.php
index 3538b641f7..2b8f662bb4 100644
--- a/phpBB/includes/ucp/ucp_main.php
+++ b/phpBB/includes/ucp/ucp_main.php
@@ -194,8 +194,8 @@ class ucp_main
'VISITED' => (empty($last_visit)) ? ' - ' : $user->format_date($last_visit),
'WARNINGS' => ($user->data['user_warnings']) ? $user->data['user_warnings'] : 0,
'POSTS' => ($user->data['user_posts']) ? $user->data['user_posts'] : 0,
- 'POSTS_DAY' => sprintf($user->lang['POST_DAY'], $posts_per_day),
- 'POSTS_PCT' => sprintf($user->lang['POST_PCT'], $percentage),
+ 'POSTS_DAY' => $user->lang('POST_DAY', $posts_per_day),
+ 'POSTS_PCT' => $user->lang('POST_PCT', $percentage),
'OCCUPATION' => (!empty($row['user_occ'])) ? $row['user_occ'] : '',
'INTERESTS' => (!empty($row['user_interests'])) ? $row['user_interests'] : '',
diff --git a/phpBB/includes/ucp/ucp_pm_compose.php b/phpBB/includes/ucp/ucp_pm_compose.php
index 92297c1490..981c95a748 100644
--- a/phpBB/includes/ucp/ucp_pm_compose.php
+++ b/phpBB/includes/ucp/ucp_pm_compose.php
@@ -1053,7 +1053,7 @@ function compose_pm($id, $mode, $action, $user_folders = array())
$template->assign_vars(array(
'L_POST_A' => $page_title,
'L_ICON' => $user->lang['PM_ICON'],
- 'L_MESSAGE_BODY_EXPLAIN' => (intval($config['max_post_chars'])) ? sprintf($user->lang['MESSAGE_BODY_EXPLAIN'], intval($config['max_post_chars'])) : '',
+ 'L_MESSAGE_BODY_EXPLAIN' => $user->lang('MESSAGE_BODY_EXPLAIN', (int) $config['max_post_chars']),
'SUBJECT' => (isset($message_subject)) ? $message_subject : '',
'MESSAGE' => $message_text,
diff --git a/phpBB/includes/ucp/ucp_pm_options.php b/phpBB/includes/ucp/ucp_pm_options.php
index bd55e2c6c5..7f854e422f 100644
--- a/phpBB/includes/ucp/ucp_pm_options.php
+++ b/phpBB/includes/ucp/ucp_pm_options.php
@@ -231,7 +231,7 @@ function message_options($id, $mode, $global_privmsgs_rules, $global_rule_condit
// Something went wrong, only partially moved?
if ($num_moved != $folder_row['pm_count'])
{
- trigger_error(sprintf($user->lang['MOVE_PM_ERROR'], $num_moved, $folder_row['pm_count']));
+ trigger_error($user->lang('MOVE_PM_ERROR', (int) $folder_row['pm_count'], $num_moved));
}
break;
diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php
index d8d64722b3..4822d7a421 100644
--- a/phpBB/includes/ucp/ucp_profile.php
+++ b/phpBB/includes/ucp/ucp_profile.php
@@ -537,7 +537,7 @@ class ucp_profile
'URL_STATUS' => ($config['allow_sig_links']) ? $user->lang['URL_IS_ON'] : $user->lang['URL_IS_OFF'],
'MAX_FONT_SIZE' => (int) $config['max_sig_font_size'],
- 'L_SIGNATURE_EXPLAIN' => sprintf($user->lang['SIGNATURE_EXPLAIN'], $config['max_sig_chars']),
+ 'L_SIGNATURE_EXPLAIN' => $user->lang('SIGNATURE_EXPLAIN', (int) $config['max_sig_chars']),
'S_BBCODE_ALLOWED' => $config['allow_sig_bbcode'],
'S_SMILIES_ALLOWED' => $config['allow_sig_smilies'],
@@ -602,7 +602,7 @@ class ucp_profile
'S_FORM_ENCTYPE' => ($can_upload && ($config['allow_avatar_upload'] || $config['allow_avatar_remote_upload'])) ? ' enctype="multipart/form-data"' : '',
- 'L_AVATAR_EXPLAIN' => sprintf($user->lang['AVATAR_EXPLAIN'], $config['avatar_max_width'], $config['avatar_max_height'], $config['avatar_filesize'] / 1024),
+ 'L_AVATAR_EXPLAIN' => avatar_explanation_string(),
));
if ($config['allow_avatar'] && $display_gallery && $auth->acl_get('u_chgavatar') && $config['allow_avatar_local'])
diff --git a/phpBB/index.php b/phpBB/index.php
index bf59d4d840..b32d90bfd0 100644
--- a/phpBB/index.php
+++ b/phpBB/index.php
@@ -118,7 +118,7 @@ $template->assign_vars(array(
'TOTAL_POSTS' => $user->lang('TOTAL_POSTS', (int) $config['num_posts']),
'TOTAL_TOPICS' => $user->lang('TOTAL_TOPICS', (int) $config['num_topics']),
'TOTAL_USERS' => $user->lang('TOTAL_USERS', (int) $config['num_users']),
- 'NEWEST_USER' => sprintf($user->lang['NEWEST_USER'], get_username_string('full', $config['newest_user_id'], $config['newest_username'], $config['newest_user_colour'])),
+ 'NEWEST_USER' => $user->lang('NEWEST_USER', get_username_string('full', $config['newest_user_id'], $config['newest_username'], $config['newest_user_colour'])),
'LEGEND' => $legend,
'BIRTHDAY_LIST' => (empty($birthday_list)) ? '' : implode(', ', $birthday_list),
diff --git a/phpBB/language/en/acp/groups.php b/phpBB/language/en/acp/groups.php
index 28e6fb80d9..8fc71f217d 100644
--- a/phpBB/language/en/acp/groups.php
+++ b/phpBB/language/en/acp/groups.php
@@ -54,8 +54,10 @@ $lang = array_merge($lang, array(
'GROUP_CLOSED' => 'Closed',
'GROUP_COLOR' => 'Group colour',
'GROUP_COLOR_EXPLAIN' => 'Defines the colour members’ usernames will appear in, leave blank for user default.',
- 'GROUP_CONFIRM_ADD_USER' => 'Are you sure that you want to add the user %1$s to the group?',
- 'GROUP_CONFIRM_ADD_USERS' => 'Are you sure that you want to add the users %1$s to the group?',
+ 'GROUP_CONFIRM_ADD_USERS' => array(
+ 1 => 'Are you sure that you want to add the user %2$s to the group?',
+ 2 => 'Are you sure that you want to add the users %2$s to the group?',
+ ),
'GROUP_CREATED' => 'Group has been created successfully.',
'GROUP_DEFAULT' => 'Make group default for member',
'GROUP_DEFS_UPDATED' => 'Default group set for all selected members.',
diff --git a/phpBB/language/en/acp/posting.php b/phpBB/language/en/acp/posting.php
index 7aa01469b7..3d920b5340 100644
--- a/phpBB/language/en/acp/posting.php
+++ b/phpBB/language/en/acp/posting.php
@@ -121,15 +121,19 @@ $lang = array_merge($lang, array(
'FIRST' => 'First',
'ICONS_ADD' => 'Add a new icon',
- 'ICONS_NONE_ADDED' => 'No icons were added.',
- 'ICONS_ONE_ADDED' => 'The icon has been added successfully.',
- 'ICONS_ADDED' => 'The icons have been added successfully.',
+ 'ICONS_ADDED' => array(
+ 0 => 'No icons were added.',
+ 1 => 'The icon has been added successfully.',
+ 2 => 'The icons have been added successfully.',
+ ),
'ICONS_CONFIG' => 'Icon configuration',
'ICONS_DELETED' => 'The icon has been removed successfully.',
'ICONS_EDIT' => 'Edit icon',
- 'ICONS_ONE_EDITED' => 'The icon has been updated successfully.',
- 'ICONS_NONE_EDITED' => 'No icons were updated.',
- 'ICONS_EDITED' => 'The icons have been updated successfully.',
+ 'ICONS_EDITED' => array(
+ 0 => 'No icons were updated.',
+ 1 => 'The icon has been updated successfully.',
+ 2 => 'The icons have been updated successfully.',
+ ),
'ICONS_HEIGHT' => 'Icon height',
'ICONS_IMAGE' => 'Icon image',
'ICONS_IMPORTED' => 'The icons pack has been installed successfully.',
@@ -161,9 +165,11 @@ $lang = array_merge($lang, array(
'SELECT_PACKAGE' => 'Select a package file',
'SMILIES_ADD' => 'Add a new smiley',
- 'SMILIES_NONE_ADDED' => 'No smilies were added.',
- 'SMILIES_ONE_ADDED' => 'The smiley has been added successfully.',
- 'SMILIES_ADDED' => 'The smilies have been added successfully.',
+ 'SMILIES_ADDED' => array(
+ 0 => 'No smilies were added.',
+ 1 => 'The smiley has been added successfully.',
+ 2 => 'The smilies have been added successfully.',
+ ),
'SMILIES_CODE' => 'Smiley code',
'SMILIES_CONFIG' => 'Smiley configuration',
'SMILIES_DELETED' => 'The smiley has been removed successfully.',
@@ -171,9 +177,11 @@ $lang = array_merge($lang, array(
'SMILIE_NO_CODE' => 'The smiley “%s” was ignored, as there was no code entered.',
'SMILIE_NO_EMOTION' => 'The smiley “%s” was ignored, as there was no emotion entered.',
'SMILIE_NO_FILE' => 'The smiley “%s” was ignored, as the file is missing.',
- 'SMILIES_NONE_EDITED' => 'No smilies were updated.',
- 'SMILIES_ONE_EDITED' => 'The smiley has been updated successfully.',
- 'SMILIES_EDITED' => 'The smilies have been updated successfully.',
+ 'SMILIES_EDITED' => array(
+ 0 => 'No smilies were updated.',
+ 1 => 'The smiley has been updated successfully.',
+ 2 => 'The smilies have been updated successfully.',
+ ),
'SMILIES_EMOTION' => 'Emotion',
'SMILIES_HEIGHT' => 'Smiley height',
'SMILIES_IMAGE' => 'Smiley image',
diff --git a/phpBB/language/en/acp/search.php b/phpBB/language/en/acp/search.php
index 9f0181a7e2..c7db788bb0 100644
--- a/phpBB/language/en/acp/search.php
+++ b/phpBB/language/en/acp/search.php
@@ -85,8 +85,15 @@ $lang = array_merge($lang, array(
'SEARCH_GUEST_INTERVAL' => 'Guest search flood interval',
'SEARCH_GUEST_INTERVAL_EXPLAIN' => 'Number of seconds guests must wait between searches. If one guest searches all others have to wait until the time interval passed.',
- 'SEARCH_INDEX_CREATE_REDIRECT' => 'All posts up to post id %1$d have now been indexed, of which %2$d posts were within this step.<br />The current rate of indexing is approximately %3$.1f posts per second.<br />Indexing in progress…',
- 'SEARCH_INDEX_DELETE_REDIRECT' => 'All posts up to post id %1$d have been removed from the search index.<br />Deleting in progress…',
+ 'SEARCH_INDEX_CREATE_REDIRECT' => array(
+ 2 => 'All posts up to post id %2$d have now been indexed, of which %1$d posts were within this step.<br />',
+ ),
+ 'SEARCH_INDEX_CREATE_REDIRECT_RATE' => array(
+ 2 => 'The current rate of indexing is approximately %1$.1f posts per second.<br />Indexing in progress…',
+ ),
+ 'SEARCH_INDEX_DELETE_REDIRECT' => array(
+ 2 => 'All posts up to post id %2$d have been removed from the search index.<br />Deleting in progress…',
+ ),
'SEARCH_INDEX_CREATED' => 'Successfully indexed all posts in the board database.',
'SEARCH_INDEX_REMOVED' => 'Successfully deleted the search index for this backend.',
'SEARCH_INTERVAL' => 'User search flood interval',
diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php
index 6fcef11852..1cf371a887 100644
--- a/phpBB/language/en/common.php
+++ b/phpBB/language/en/common.php
@@ -96,7 +96,7 @@ $lang = array_merge($lang, array(
'AVATAR_URL_INVALID' => 'The URL you specified is invalid.',
'AVATAR_URL_NOT_FOUND' => 'The file specified could not be found.',
'AVATAR_WRONG_FILESIZE' => 'The avatar’s filesize must be between 0 and %1d %2s.',
- 'AVATAR_WRONG_SIZE' => 'The submitted avatar is %5$d pixels wide and %6$d pixels high. Avatars must be at least %1$d pixels wide and %2$d pixels high, but no larger than %3$d pixels wide and %4$d pixels high.',
+ 'AVATAR_WRONG_SIZE' => 'The submitted avatar is %5$s wide and %6$s high. Avatars must be at least %1$s wide and %2$s high, but no larger than %3$s wide and %4$s high.',
'BACK_TO_TOP' => 'Top',
'BACK_TO_PREV' => 'Back to previous page',
@@ -125,6 +125,11 @@ $lang = array_merge($lang, array(
'CHANGE_FONT_SIZE' => 'Change font size',
'CHANGING_PREFERENCES' => 'Changing board preferences',
'CHANGING_PROFILE' => 'Changing profile settings',
+ 'CHARACTERS' => array(
+ 0 => '%d characters',
+ 1 => '%d character',
+ 2 => '%d characters',
+ ),
'CLICK_VIEW_PRIVMSG' => '%sGo to your inbox%s',
'COLLAPSE_VIEW' => 'Collapse view',
'CLOSE_WINDOW' => 'Close window',
@@ -447,6 +452,11 @@ $lang = array_merge($lang, array(
'PAGE_TITLE_NUMBER' => 'Page %s',
'PASSWORD' => 'Password',
'PIXEL' => 'px',
+ 'PIXELS' => array(
+ 0 => '%d pixels',
+ 1 => '%d pixel',
+ 2 => '%d pixels',
+ ),
'PLAY_QUICKTIME_FILE' => 'Play Quicktime file',
'PM' => 'PM',
'PM_REPORTED' => 'Click to view report',
diff --git a/phpBB/language/en/posting.php b/phpBB/language/en/posting.php
index 01b1b3a9e1..a7dbc1bc80 100644
--- a/phpBB/language/en/posting.php
+++ b/phpBB/language/en/posting.php
@@ -121,13 +121,25 @@ $lang = array_merge($lang, array(
'LOGIN_EXPLAIN_QUOTE' => 'You need to login in order to quote posts within this forum.',
'LOGIN_EXPLAIN_REPLY' => 'You need to login in order to reply to topics within this forum.',
- 'MAX_FONT_SIZE_EXCEEDED' => 'You may only use fonts up to size %1$d.',
- 'MAX_FLASH_HEIGHT_EXCEEDED' => 'Your flash files may only be up to %1$d pixels high.',
- 'MAX_FLASH_WIDTH_EXCEEDED' => 'Your flash files may only be up to %1$d pixels wide.',
- 'MAX_IMG_HEIGHT_EXCEEDED' => 'Your images may only be up to %1$d pixels high.',
- 'MAX_IMG_WIDTH_EXCEEDED' => 'Your images may only be up to %1$d pixels wide.',
+ 'MAX_FONT_SIZE_EXCEEDED' => 'You may only use fonts up to size %d.',
+ 'MAX_FLASH_HEIGHT_EXCEEDED' => array(
+ 2 => 'Your flash files may only be up to %d pixels high.',
+ ),
+ 'MAX_FLASH_WIDTH_EXCEEDED' => array(
+ 2 => 'Your flash files may only be up to %d pixels wide.',
+ ),
+ 'MAX_IMG_HEIGHT_EXCEEDED' => array(
+ 2 => 'Your images may only be up to %1$d pixels high.',
+ ),
+ 'MAX_IMG_WIDTH_EXCEEDED' => array(
+ 2 => 'Your images may only be up to %d pixels wide.',
+ ),
- 'MESSAGE_BODY_EXPLAIN' => 'Enter your message here, it may contain no more than <strong>%d</strong> characters.',
+ 'MESSAGE_BODY_EXPLAIN' => array(
+ 0 => '', // zero means no limit, so we don't view a message here.
+ 1 => 'Enter your message here, it may contain no more than <strong>%d</strong> character.',
+ 2 => 'Enter your message here, it may contain no more than <strong>%d</strong> characters.',
+ ),
'MESSAGE_DELETED' => 'This message has been deleted successfully.',
'MORE_SMILIES' => 'View more smilies',
@@ -202,12 +214,19 @@ $lang = array_merge($lang, array(
'STYLES_TIP' => 'Tip: Styles can be applied quickly to selected text.',
'TOO_FEW_CHARS' => 'Your message contains too few characters.',
- 'TOO_FEW_CHARS_LIMIT' => 'Your message contains %1$d characters. The minimum number of characters you need to enter is %2$d.',
+ 'TOO_FEW_CHARS_LIMIT' => array(
+ 1 => 'Your message contains %1$d character. The minimum number of characters you need to enter is %2$d.',
+ 2 => 'Your message contains %1$d characters. The minimum number of characters you need to enter is %2$d.',
+ ),
'TOO_FEW_POLL_OPTIONS' => 'You must enter at least two poll options.',
'TOO_MANY_ATTACHMENTS' => 'Cannot add another attachment, %d is the maximum.',
'TOO_MANY_CHARS' => 'Your message contains too many characters.',
- 'TOO_MANY_CHARS_POST' => 'Your message contains %1$d characters. The maximum number of allowed characters is %2$d.',
- 'TOO_MANY_CHARS_SIG' => 'Your signature contains %1$d characters. The maximum number of allowed characters is %2$d.',
+ 'TOO_MANY_CHARS_POST' => array(
+ 2 => 'Your message contains %1$d characters. The maximum number of allowed characters is %2$d.',
+ ),
+ 'TOO_MANY_CHARS_SIG' => array(
+ 2 => 'Your signature contains %1$d characters. The maximum number of allowed characters is %2$d.',
+ ),
'TOO_MANY_POLL_OPTIONS' => 'You have tried to enter too many poll options.',
'TOO_MANY_SMILIES' => 'Your message contains too many smilies. The maximum number of smilies allowed is %d.',
'TOO_MANY_URLS' => 'Your message contains too many URLs. The maximum number of URLs allowed is %d.',
@@ -231,5 +250,5 @@ $lang = array_merge($lang, array(
'VIEW_PRIVATE_MESSAGE' => '%sView your submitted private message%s',
'WRONG_FILESIZE' => 'The file is too big, maximum allowed size is %1d %2s.',
- 'WRONG_SIZE' => 'The image must be at least %1$d pixels wide, %2$d pixels high and at most %3$d pixels wide and %4$d pixels high. The submitted image is %5$d pixels wide and %6$d pixels high.',
+ 'WRONG_SIZE' => 'The image must be at least %1$s wide, %2$s high and at most %3$s wide and %4$s high. The submitted image is %5$s wide and %6$s high.',
));
diff --git a/phpBB/language/en/search.php b/phpBB/language/en/search.php
index 734b65e575..c5b37d897e 100644
--- a/phpBB/language/en/search.php
+++ b/phpBB/language/en/search.php
@@ -65,7 +65,7 @@ $lang = array_merge($lang, array(
'MAX_NUM_SEARCH_KEYWORDS_REFINE' => 'You specified too many words to search for. Please do not enter more than %1$d words.',
- 'NO_KEYWORDS' => 'You must specify at least one word to search for. Each word must consist of at least %d characters and must not contain more than %d characters excluding wildcards.',
+ 'NO_KEYWORDS' => 'You must specify at least one word to search for. Each word must consist of at least %s and must not contain more than %s excluding wildcards.',
'NO_RECENT_SEARCHES' => 'No searches have been carried out recently.',
'NO_SEARCH' => 'Sorry but you are not permitted to use the search system.',
'NO_SEARCH_RESULTS' => 'No suitable matches were found.',
diff --git a/phpBB/language/en/ucp.php b/phpBB/language/en/ucp.php
index fb26c2f8e1..0aa97ee81e 100644
--- a/phpBB/language/en/ucp.php
+++ b/phpBB/language/en/ucp.php
@@ -89,7 +89,7 @@ $lang = array_merge($lang, array(
'ATTACHMENTS_DELETED' => 'Attachments successfully deleted.',
'ATTACHMENT_DELETED' => 'Attachment successfully deleted.',
'AVATAR_CATEGORY' => 'Category',
- 'AVATAR_EXPLAIN' => 'Maximum dimensions; width: %1$d pixels, height: %2$d pixels, file size: %3$.2f KiB.',
+ 'AVATAR_EXPLAIN' => 'Maximum dimensions; width: %1$s, height: %2$s, file size: %3$.2f KiB.',
'AVATAR_FEATURES_DISABLED' => 'The avatar functionality is currently disabled.',
'AVATAR_GALLERY' => 'Local gallery',
'AVATAR_GENERAL_UPLOAD_ERROR' => 'Could not upload avatar to %s.',
@@ -188,10 +188,16 @@ $lang = array_merge($lang, array(
'EXPORT_FOLDER' => 'Export this view',
'FIELD_REQUIRED' => 'The field “%s” must be completed.',
- 'FIELD_TOO_SHORT' => 'The field “%1$s” is too short, a minimum of %2$d characters is required.',
- 'FIELD_TOO_LONG' => 'The field “%1$s” is too long, a maximum of %2$d characters is allowed.',
- 'FIELD_TOO_SMALL' => 'The value of “%1$s” is too small, a minimum value of %2$d is required.',
- 'FIELD_TOO_LARGE' => 'The value of “%1$s” is too large, a maximum value of %2$d is allowed.',
+ 'FIELD_TOO_SHORT' => array(
+ 1 => 'The field “%2$s” is too short, a minimum of %1$d character is required.',
+ 2 => 'The field “%2$s” is too short, a minimum of %1$d characters is required.',
+ ),
+ 'FIELD_TOO_LONG' => array(
+ 1 => 'The field “%2$s” is too long, a maximum of %1$d character is allowed.',
+ 2 => 'The field “%2$s” is too long, a maximum of %1$d characters is allowed.',
+ ),
+ 'FIELD_TOO_SMALL' => 'The value of “%2$s” is too small, a minimum value of %1$d is required.',
+ 'FIELD_TOO_LARGE' => 'The value of “%2$s” is too large, a maximum value of %1$d is allowed.',
'FIELD_INVALID_CHARS_NUMBERS_ONLY' => 'The field “%s” has invalid characters, only numbers are allowed.',
'FIELD_INVALID_CHARS_ALPHA_ONLY' => 'The field “%s” has invalid characters, only alphanumeric characters are allowed.',
'FIELD_INVALID_CHARS_SPACERS_ONLY' => 'The field “%s” has invalid characters, only alphanumeric, space or -+_[] characters are allowed.',
@@ -273,7 +279,9 @@ $lang = array_merge($lang, array(
'MOVE_DELETED_MESSAGES_TO' => 'Move messages from removed folder to',
'MOVE_DOWN' => 'Move down',
'MOVE_MARKED_TO_FOLDER' => 'Move marked to %s',
- 'MOVE_PM_ERROR' => 'An error occurred while moving the messages to the new folder, only %1d from %2d messages were moved.',
+ 'MOVE_PM_ERROR' => array(
+ 2 => 'An error occurred while moving the messages to the new folder, only %2d from %1d messages were moved.',
+ ),
'MOVE_TO_FOLDER' => 'Move to folder',
'MOVE_UP' => 'Move up',
diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php
index ff22b860ff..2ff56745ef 100644
--- a/phpBB/memberlist.php
+++ b/phpBB/memberlist.php
@@ -612,8 +612,8 @@ switch ($mode)
$template->assign_vars(array(
'L_POSTS_IN_QUEUE' => $user->lang('NUM_POSTS_IN_QUEUE', $member['posts_in_queue']),
- 'POSTS_DAY' => sprintf($user->lang['POST_DAY'], $posts_per_day),
- 'POSTS_PCT' => sprintf($user->lang['POST_PCT'], $percentage),
+ 'POSTS_DAY' => $user->lang('POST_DAY', $posts_per_day),
+ 'POSTS_PCT' => $user->lang('POST_PCT', $percentage),
'OCCUPATION' => (!empty($member['user_occ'])) ? censor_text($member['user_occ']) : '',
'INTERESTS' => (!empty($member['user_interests'])) ? censor_text($member['user_interests']) : '',
diff --git a/phpBB/posting.php b/phpBB/posting.php
index 4423737b55..eef186c377 100644
--- a/phpBB/posting.php
+++ b/phpBB/posting.php
@@ -322,7 +322,7 @@ if ($mode == 'bump')
$meta_url = phpbb_bump_topic($forum_id, $topic_id, $post_data, $current_time);
meta_refresh(3, $meta_url);
- $message = $user->lang['TOPIC_BUMPED'] . '<br /><br />' . sprintf($user->lang['VIEW_MESSAGE'], '<a href="' . $meta_url . '">', '</a>');
+ $message = $user->lang['TOPIC_BUMPED'] . '<br /><br />' . $user->lang('VIEW_MESSAGE', '<a href="' . $meta_url . '">', '</a>');
$message .= '<br /><br />' . sprintf($user->lang['RETURN_FORUM'], '<a href="' . append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id) . '">', '</a>');
trigger_error($message);
@@ -841,7 +841,7 @@ if ($submit || $preview || $refresh)
if (($result = validate_string($post_data['username'], false, $config['min_name_chars'], $config['max_name_chars'])) !== false)
{
$min_max_amount = ($result == 'TOO_SHORT') ? $config['min_name_chars'] : $config['max_name_chars'];
- $error[] = sprintf($user->lang['FIELD_' . $result], $user->lang['USERNAME'], $min_max_amount);
+ $error[] = $user->lang('FIELD_' . $result, $min_max_amount, $user->lang['USERNAME']);
}
}
@@ -1357,7 +1357,7 @@ add_form_key('posting');
$template->assign_vars(array(
'L_POST_A' => $page_title,
'L_ICON' => ($mode == 'reply' || $mode == 'quote' || ($mode == 'edit' && $post_id != $post_data['topic_first_post_id'])) ? $user->lang['POST_ICON'] : $user->lang['TOPIC_ICON'],
- 'L_MESSAGE_BODY_EXPLAIN' => (intval($config['max_post_chars'])) ? sprintf($user->lang['MESSAGE_BODY_EXPLAIN'], intval($config['max_post_chars'])) : '',
+ 'L_MESSAGE_BODY_EXPLAIN' => $user->lang('MESSAGE_BODY_EXPLAIN', (int) $config['max_post_chars']),
'FORUM_NAME' => $post_data['forum_name'],
'FORUM_DESC' => ($post_data['forum_desc']) ? generate_text_for_display($post_data['forum_desc'], $post_data['forum_desc_uid'], $post_data['forum_desc_bitfield'], $post_data['forum_desc_options']) : '',
diff --git a/phpBB/search.php b/phpBB/search.php
index 6626cd5672..4089397b6e 100644
--- a/phpBB/search.php
+++ b/phpBB/search.php
@@ -295,7 +295,7 @@ if ($keywords || $author || $author_id || $search_id || $submit)
if (!$correct_query || (empty($search->search_query) && !sizeof($author_id_ary) && !$search_id))
{
$ignored = (sizeof($search->common_words)) ? sprintf($user->lang['IGNORED_TERMS_EXPLAIN'], implode(' ', $search->common_words)) . '<br />' : '';
- trigger_error($ignored . sprintf($user->lang['NO_KEYWORDS'], $search->word_length['min'], $search->word_length['max']));
+ trigger_error($ignored . $user->lang('NO_KEYWORDS', $user->lang('CHARACTERS', (int) $search->word_length['min']), $user->lang('CHARACTERS', (int) $search->word_length['max'])));
}
}