[hamster-applet] Make TSV header localizable. Fixes bug 585224
- From: Toms Baugis <tbaugis src gnome org>
- To: svn-commits-list gnome org
- Subject: [hamster-applet] Make TSV header localizable. Fixes bug 585224
- Date: Tue, 9 Jun 2009 05:52:01 -0400 (EDT)
commit 8d67e6924e87a3b068ddbb66d3173fa2bff24ec2
Author: Claude Paroz <claude 2xlibre net>
Date: Tue Jun 9 10:50:48 2009 +0100
Make TSV header localizable. Fixes bug 585224
---
hamster/reports.py | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/hamster/reports.py b/hamster/reports.py
index 09610da..cdfaef5 100644
--- a/hamster/reports.py
+++ b/hamster/reports.py
@@ -106,9 +106,11 @@ class TSVWriter(ReportWriter):
def __init__(self, path):
ReportWriter.__init__(self, path)
self.csv_writer = csv.writer(self.file, dialect='excel-tab')
- self.csv_writer.writerow(["activity", "start time", "end time",
- "duration minutes", "category", "description"])
-
+
+ headers = [_("activity"), _("start time"), _("end time"),
+ _("duration minutes"), _("category"), _("description")]
+ self.csv_writer.writerow([h.encode('utf-8') for h in headers])
+
def _write_fact(self, file, fact):
self.csv_writer.writerow([fact[key] for key in ["name", "start_time",
"end_time", "delta", "category", "description"]])
@@ -287,4 +289,4 @@ class HTMLWriter(ReportWriter):
report.write("</table>\n")
report.write("</body>\n</html>")
-
\ No newline at end of file
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]