mirror of
https://github.com/ejwa/gitinspector.git
synced 2024-11-16 00:28:25 +01:00
Added localization support to the html.header file.
As of this commit; the localization of gitinspector is pretty much complete.
This commit is contained in:
parent
a498603a50
commit
a952921c32
2 changed files with 26 additions and 15 deletions
|
@ -69,7 +69,19 @@ def output_header():
|
|||
logo_file.close()
|
||||
logo = base64.b64encode(logo)
|
||||
|
||||
print(html_header.format(version.__version__, jquery_js, tablesorter_js, flot_js, pie_js, logo.decode("utf-8", "replace")))
|
||||
print(html_header.format(version = version.__version__,
|
||||
jquery = jquery_js,
|
||||
jquery_tablesorter = tablesorter_js,
|
||||
jquery_flot = flot_js,
|
||||
jquery_flot_pie = pie_js,
|
||||
logo = logo.decode("utf-8", "replace"),
|
||||
logo_text = _("The output has been generated by {0}; the statistical analysis tool " +
|
||||
"for git repositories.").format(
|
||||
"<a href=\"http://gitinspector.googlecode.com\">gitinspector</a>"),
|
||||
show_minor_authors = _("Show minor authors"),
|
||||
hide_minor_authors = _("Hide minor authors"),
|
||||
show_minor_rows = _("Show rows with minor work"),
|
||||
hide_minor_rows = _("Hide rows with minor work")))
|
||||
elif __selected_format__ == "xml":
|
||||
print("<gitinspector>")
|
||||
print("\t<version>" + version.__version__ + "</version>")
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="application/xhtml+xml; charset=utf-8" />
|
||||
<title>Generated by gitinspector {0}</title>
|
||||
<script type="application/javascript">{1}</script>
|
||||
<script type="application/javascript">{2}</script>
|
||||
<script type="application/javascript">{3}</script>
|
||||
<script type="application/javascript">{4}</script>
|
||||
<title>Generated by gitinspector {version}</title>
|
||||
<script type="application/javascript">{jquery}</script>
|
||||
<script type="application/javascript">{jquery_tablesorter}</script>
|
||||
<script type="application/javascript">{jquery_flot}</script>
|
||||
<script type="application/javascript">{jquery_flot_pie}</script>
|
||||
<script type="application/javascript">
|
||||
$(document).ready(function() {{
|
||||
var row = 0;
|
||||
|
@ -67,12 +67,12 @@
|
|||
return $(this).parent().parent().parent().find("tbody tr:hidden").length > 0;
|
||||
}}).each(function() {{
|
||||
$(this).addClass("hoverable");
|
||||
this.innerHTML = "Show minor authors ∨";
|
||||
this.innerHTML = "{show_minor_authors} ∨";
|
||||
}}).toggle(function() {{
|
||||
this.innerHTML = "Hide minor authors ∧";
|
||||
this.innerHTML = "{hide_minor_authors} ∧";
|
||||
$(this).parent().parent().parent().find("tbody tr").show().each(colorRows);
|
||||
}}, function() {{
|
||||
this.innerHTML = "Show minor authors ∨";
|
||||
this.innerHTML = "{show_minor_authors} ∨";
|
||||
$(this).parent().parent().parent().find("tbody tr td:last-child").filter(function() {{
|
||||
return parseFloat(this.innerHTML) < MINOR_AUTHOR_PERCENTAGE;
|
||||
}}).parent().hide();
|
||||
|
@ -83,13 +83,13 @@
|
|||
|
||||
if ($("div#timeline table.git tbody tr:hidden").length > 0) {{
|
||||
$("div#timeline table.git tbody tr:visible").each(colorRows);
|
||||
$("div#timeline").prepend("<div class=\"button\">Show rows with minor work ∨</div>");
|
||||
$("div#timeline").prepend("<div class=\"button\">{show_minor_rows} ∨</div>");
|
||||
|
||||
$("div#timeline div.button").toggle(function() {{
|
||||
this.innerHTML = "Hide rows with minor work ∧"
|
||||
this.innerHTML = "{hide_minor_rows} ∧";
|
||||
$("div#timeline table.git tbody tr").show().each(colorRows);
|
||||
}}, function() {{
|
||||
this.innerHTML = "Show rows with minor work ∨";
|
||||
this.innerHTML = "{show_minor_rows} ∨";
|
||||
filterTimeLine();
|
||||
$("div#timeline table.git tbody tr:visible").each(colorRows);
|
||||
}});
|
||||
|
@ -229,7 +229,6 @@
|
|||
</head>
|
||||
<body>
|
||||
<div><div class="box logo">
|
||||
<img src="data:image/png;base64,{5}" />
|
||||
<p>The output has been generated by <a href="http://gitinspector.googlecode.com">gitinspector</a>;
|
||||
the statistical analysis tool for git repositories.<p>
|
||||
<img src="data:image/png;base64,{logo}" />
|
||||
<p>{logo_text}<p>
|
||||
</div></div>
|
||||
|
|
Loading…
Reference in a new issue