Commit 616f2afa authored by Michal Čihař's avatar Michal Čihař

Show strings with failed checks in progress bar (issue #168)

parent 636f8e44
...@@ -12,10 +12,10 @@ ...@@ -12,10 +12,10 @@
</tr> </tr>
<tbody> <tbody>
{% for trans in translations %} {% for trans in translations %}
{% with trans.get_translated_percent as percent and trans.get_fuzzy_percent as fuzzy and trans.get_failing_checks as checks and trans.get_non_translated as count %} {% with trans.get_translated_percent as percent and trans.get_fuzzy_percent as fuzzy and trans.get_failing_checks as checks and trans.get_non_translated as count and trans.get_failing_checks_percent as check_percent %}
<tr> <tr>
<th><a href="{{ trans.get_absolute_url }}">{% if show_language == 1 %}{{ trans.language }}{% else %}{{ trans.subproject }}{% if show_language == 2 %} ({{ trans.language }}){% endif %}{% endif %}</a></th> <th><a href="{{ trans.get_absolute_url }}">{% if show_language == 1 %}{{ trans.language }}{% else %}{{ trans.subproject }}{% if show_language == 2 %} ({{ trans.language }}){% endif %}{% endif %}</a></th>
<td class="progress"><div class="progress" value="{{ percent|floatformat:0 }}" fuzzy="{{ fuzzy|floatformat:0 }}" ></div></td> <td class="progress"><div class="progress" value="{{ percent|floatformat:0 }}" fuzzy="{{ fuzzy|floatformat:0 }}" checks="{{ check_percent|floatformat:0 }}"></div></td>
<td class="percent">{{ percent }}%</td> <td class="percent">{{ percent }}%</td>
<td class="percent">{{ fuzzy }}%</td> <td class="percent">{{ fuzzy }}%</td>
<td class="number">{{ checks }}</td> <td class="number">{{ checks }}</td>
......
...@@ -152,6 +152,9 @@ div.progress .fuzzy { ...@@ -152,6 +152,9 @@ div.progress .fuzzy {
/* background: #004276; */ /* background: #004276; */
background: #764200; background: #764200;
} }
div.progress .checks {
background: url("../progress-diagonals.png") repeat scroll 50% 50% #004276;
}
span.plural { span.plural {
font-size: smaller; font-size: smaller;
} }
......
...@@ -197,9 +197,20 @@ function load_table_sorting() { ...@@ -197,9 +197,20 @@ function load_table_sorting() {
function load_progress() { function load_progress() {
$('div.progress').each(function f(i, e) { $('div.progress').each(function f(i, e) {
var $e = $(e); var $e = $(e);
var good = parseFloat($e.attr('value'));
if ($e.attr('checks')) {
var checks = parseFloat($e.attr('checks'));
good = good - checks;
}
var parts = [ var parts = [
{value: parseFloat($e.attr('value'))} {value: good}
]; ];
if ($e.attr('checks')) {
parts.push({
value: checks,
barClass: 'checks'
});
}
if ($e.attr('fuzzy')) { if ($e.attr('fuzzy')) {
parts.push({ parts.push({
value: parseFloat($e.attr('fuzzy')), value: parseFloat($e.attr('fuzzy')),
......
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