diff options
-rw-r--r-- | langs/diff.php | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/langs/diff.php b/langs/diff.php index e9a3c44f8..89ec341a1 100644 --- a/langs/diff.php +++ b/langs/diff.php @@ -37,24 +37,29 @@ if (false === strstr($source_file, '/langs/') || $diff = _lang_diff($source_file, $target_file); $s = '<a href="report.php">« back to langs report</a>'; -$s .= "<h1>Diff {$source_file} ({$diff['a']}) against {$target_file} ({$diff['b']})</h1>"; +$s .= sprintf('<h1>Differences between %s source and %s target</h1>', + substr($source_file, strpos($source_file, '/langs/')+7), $target_lang); foreach (array('missing', 'notrans', 'extra') as $type) { if (count($diff[$type]) > 0) { $s .= sprintf('<h2>%d %s:</h2>', count($diff[$type]), $type); + $s .= '<pre>'; foreach ($diff[$type] as $l) - $s .= sprintf('<blockquote><p><pre>%s</pre></p></blockquote>', htmlentities($l)); + $s .= sprintf(";%s\n\n", htmlspecialchars($l)); + $s .= '</pre>'; } } +header('Content-Type: text/html;charset=utf-8'); + ?><!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="robot" content="noindex,nofollow,nosnippet"> <style> - blockquote { background: #eee; padding: 0.1em 1em; } + pre { background: #eee; padding: 0.6em; } </style> </head> <body> |