diff options
author | Romain d'Alverny <rda@mageia.org> | 2012-05-24 16:06:13 +0000 |
---|---|---|
committer | Romain d'Alverny <rda@mageia.org> | 2012-05-24 16:06:13 +0000 |
commit | 0e1855c9b12ed63cef75651a4ab4b0e3e40fe626 (patch) | |
tree | 18e9ddcdfc5bda2b87ad51ec03a2b9f5775f1716 /langs/diff.php | |
parent | 24b9ddaef1d1c48899d6ead413e2a7387eabf09b (diff) | |
download | www-0e1855c9b12ed63cef75651a4ab4b0e3e40fe626.tar www-0e1855c9b12ed63cef75651a4ab4b0e3e40fe626.tar.gz www-0e1855c9b12ed63cef75651a4ab4b0e3e40fe626.tar.bz2 www-0e1855c9b12ed63cef75651a4ab4b0e3e40fe626.tar.xz www-0e1855c9b12ed63cef75651a4ab4b0e3e40fe626.zip |
output can be better c/pasted into editor
Diffstat (limited to 'langs/diff.php')
-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> |