From a952921c32a1ff18b5acbab256e11a36d2065b07 Mon Sep 17 00:00:00 2001 From: Adam Waldenberg Date: Wed, 26 Jun 2013 00:37:55 +0200 Subject: [PATCH] Added localization support to the html.header file. As of this commit; the localization of gitinspector is pretty much complete. --- gitinspector/format.py | 14 +++++++++++++- gitinspector/html/html.header | 27 +++++++++++++-------------- 2 files changed, 26 insertions(+), 15 deletions(-) diff --git a/gitinspector/format.py b/gitinspector/format.py index 566c0c5..5ba8389 100644 --- a/gitinspector/format.py +++ b/gitinspector/format.py @@ -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( + "gitinspector"), + 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("") print("\t" + version.__version__ + "") diff --git a/gitinspector/html/html.header b/gitinspector/html/html.header index a8f628f..4b95db2 100644 --- a/gitinspector/html/html.header +++ b/gitinspector/html/html.header @@ -2,11 +2,11 @@ - Generated by gitinspector {0} - - - - + Generated by gitinspector {version} + + + +