Commit dd800b30 by pupi1985

Minor refactoring of the lang check file

parent 3a5e3401
......@@ -35,10 +35,17 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<title>Question2Answer Language Check</title>
<style>
code {font-size:125%;}
body {
font-family: arial;
font-size: 12px;
}
code {font-size: 125%;}
.severe {color: #b83939;}
.warning {color: #d2930d;}
.includes {color: #999;}
</style>
</head>
<body style="font-family:arial; font-size:12px;">
<body>
<?php
function get_phrase_substitutions($phrase)
......@@ -52,8 +59,8 @@
return $substitutions;
}
echo '<font color="#cc0000"><code>Dark red = important to review.</code></font><br>';
echo '<font color="#cc9999"><code>Light red = probably safe to ignore.</code></font>';
echo '<code class="severe">Red = important to review.</code><br>';
echo '<code class="warning">Orange = probably safe to ignore.</code>';
echo '<h1>Checking US English files in <code>qa-include</code>...</h1>';
......@@ -207,14 +214,14 @@
function output_lang_issue($prefix, $key, $issue, $error=true)
{
echo '<font color="'.($error ? '#cc0000' : '#cc9999').'"><code>';
echo 'qa-lang-<b>'.qa_html($prefix).'</b>.php:';
$colorClass = $error ? 'severe' : 'warning';
if (strlen($key))
echo "'<b>".qa_html($key)."</b>'";
$htmlKey = strlen($key) > 0 ? "'<strong>" . qa_html($key) . "</strong>'" : '';
echo '</code></font> &nbsp; '.qa_html($issue).'<br>';
echo sprintf(
'<code class="%s">qa-lang-<strong>%s</strong>.php:%s</code> &nbsp; %s<br>',
$colorClass, qa_html($prefix), $htmlKey, qa_html($issue)
);
}
......@@ -224,7 +231,7 @@
$oneread=false;
echo '<p style="font-size:80%; color:#999;">Reading: ';
echo '<p class="includes">Reading: ';
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment