diff --git a/phpBB/includes/acp/acp_logs.php b/phpBB/includes/acp/acp_logs.php
index f13979ec0f..567606cfc7 100644
--- a/phpBB/includes/acp/acp_logs.php
+++ b/phpBB/includes/acp/acp_logs.php
@@ -156,14 +156,32 @@ class acp_logs
" . (($limit_days) ? "AND log_time >= $sql_where " : ' ') .
$sql_forum;
$result = $db->sql_query($sql);
+
while ($row = $db->sql_fetchrow($result))
{
if (empty($row['log_operation']))
{
continue;
}
+
$selected = ($log_operation == $row['log_operation']) ? ' selected="selected"' : '';
- $s_lang_keys .= '';
+
+ if (isset($user->lang[$row['log_operation']]))
+ {
+ $text = htmlspecialchars(strip_tags(str_replace('
', ' ', $user->lang[$row['log_operation']])), ENT_COMPAT, 'UTF-8');
+
+ // Fill in sprintf placeholders with translated placeholder text
+ if (substr_count($text, '%'))
+ {
+ $text = vsprintf($text, array_fill(0, substr_count($text, '%'), $user->lang['LOGS_PLACEHOLDER']));
+ }
+ }
+ else
+ {
+ $text = ucfirst(str_replace('_', ' ', strtolower($row['log_operation'])));
+ }
+
+ $s_lang_keys .= '';
}
$db->sql_freeresult($result);
diff --git a/phpBB/includes/mcp/mcp_logs.php b/phpBB/includes/mcp/mcp_logs.php
index b83e364811..db22259ec4 100644
--- a/phpBB/includes/mcp/mcp_logs.php
+++ b/phpBB/includes/mcp/mcp_logs.php
@@ -186,14 +186,32 @@ class mcp_logs
' . (($limit_days) ? "AND log_time >= $sql_where " : ' ') .
$sql_forum;
$result = $db->sql_query($sql);
+
while ($row = $db->sql_fetchrow($result))
{
if (empty($row['log_operation']))
{
continue;
}
+
$selected = ($log_operation == $row['log_operation']) ? ' selected="selected"' : '';
- $s_lang_keys .= '';
+
+ if (isset($user->lang[$row['log_operation']]))
+ {
+ $text = htmlspecialchars(strip_tags(str_replace('
', ' ', $user->lang[$row['log_operation']])), ENT_COMPAT, 'UTF-8');
+
+ // Fill in sprintf placeholders with translated placeholder text
+ if (substr_count($text, '%'))
+ {
+ $text = vsprintf($text, array_fill(0, substr_count($text, '%'), $user->lang['LOGS_PLACEHOLDER']));
+ }
+ }
+ else
+ {
+ $text = ucfirst(str_replace('_', ' ', strtolower($row['log_operation'])));
+ }
+
+ $s_lang_keys .= '';
}
$db->sql_freeresult($result);
diff --git a/phpBB/language/en/acp/common.php b/phpBB/language/en/acp/common.php
index ca31dc90f8..af0a61fd32 100644
--- a/phpBB/language/en/acp/common.php
+++ b/phpBB/language/en/acp/common.php
@@ -307,6 +307,8 @@ $lang = array_merge($lang, array(
'DISPLAY_LOG' => 'Display entries from previous',
+ 'LOGS_PLACEHOLDER' => '<value>',
+
'NO_ENTRIES' => 'No log entries for this period.',
'SORT_IP' => 'IP address',