Merge lp:~openerp-dev/openobject-addons/6.1-opw-573595-ado into lp:openobject-addons/6.1

Proposed by Amit Dodiya (OpenERP)
Status: Approved
Approved by: Naresh(OpenERP)
Approved revision: 6861
Proposed branch: lp:~openerp-dev/openobject-addons/6.1-opw-573595-ado
Merge into: lp:openobject-addons/6.1
Diff against target: 111 lines (+54/-5)
3 files modified
project_scrum/i18n/nl.po (+24/-0)
project_scrum/i18n/project_scrum.pot (+24/-0)
project_scrum/report/sprint_burndown.py (+6/-5)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/6.1-opw-573595-ado
Reviewer Review Type Date Requested Status
Amit Dodiya (OpenERP) (community) Needs Resubmitting
Naresh(OpenERP) (community) Needs Fixing
Review via email: mp+101230@code.launchpad.net

Description of the change

Hello,

"[FIX] Translation problem in burndown chart"

Steps:
1). Install Dutch language
1). Goto: Project/Scrum/Sprints
2). Open a Sprint form and print the Burndown Chart
Translation is not working.

Regards,
Amit

To post a comment you must log in.
Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote :

use OpenERP traditional _() instead of this hack to get translation done

review: Needs Fixing
Revision history for this message
Amit Dodiya (OpenERP) (ado-openerp) wrote :

Hello,

The code is changed as per your suggestion.

Thanks,
Amit

review: Needs Resubmitting
Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote :

Hello,

This bug was qualified as Not Relevant on Trunk (means that architecture on trunk has changed and so this bug has no meaning anymore). If this Merge Proposal could not be merged in v6.1 at the release of v7.0, it will be closed.

Thanks,
Naresh Soni

Unmerged revisions

6861. By Amit Dodiya<email address hidden>

[FIX] Translation problem in burndown chart

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'project_scrum/i18n/nl.po'
2--- project_scrum/i18n/nl.po 2012-06-12 05:38:14 +0000
3+++ project_scrum/i18n/nl.po 2012-06-25 13:06:21 +0000
4@@ -505,6 +505,30 @@
5 msgstr "De sprint '%s' is gesloten."
6
7 #. module: project_scrum
8+#: code:addons/project_scrum/report/sprint_burndown.py:49
9+#, python-format
10+msgid "Burndown Chart"
11+msgstr "Burndown grafiek"
12+
13+#. module: project_scrum
14+#: code:addons/project_scrum/report/sprint_burndown.py:69
15+#, python-format
16+msgid "Burndown Chart - Planned Hours"
17+msgstr "Burndown grafiek - Geplande uren"
18+
19+#. module: project_scrum
20+#: code:addons/project_scrum/report/sprint_burndown.py:78
21+#, python-format
22+msgid "guideline"
23+msgstr "richtlijn"
24+
25+#. module: project_scrum
26+#: code:addons/project_scrum/report/sprint_burndown.py:79
27+#, python-format
28+msgid "burndownchart"
29+msgstr "burndown grafiek"
30+
31+#. module: project_scrum
32 #: view:board.board:0
33 #: model:ir.actions.act_window,name:project_scrum.action_view_task_progress_graph
34 #: view:project.task:0
35
36=== modified file 'project_scrum/i18n/project_scrum.pot'
37--- project_scrum/i18n/project_scrum.pot 2012-02-08 01:08:30 +0000
38+++ project_scrum/i18n/project_scrum.pot 2012-06-25 13:06:21 +0000
39@@ -88,6 +88,30 @@
40 msgstr ""
41
42 #. module: project_scrum
43+#: code:addons/project_scrum/report/sprint_burndown.py:49
44+#, python-format
45+msgid "Burndown Chart"
46+msgstr ""
47+
48+#. module: project_scrum
49+#: code:addons/project_scrum/report/sprint_burndown.py:69
50+#, python-format
51+msgid "Burndown Chart - Planned Hours"
52+msgstr ""
53+
54+#. module: project_scrum
55+#: code:addons/project_scrum/report/sprint_burndown.py:78
56+#, python-format
57+msgid "guideline"
58+msgstr ""
59+
60+#. module: project_scrum
61+#: code:addons/project_scrum/report/sprint_burndown.py:79
62+#, python-format
63+msgid "burndownchart"
64+msgstr ""
65+
66+#. module: project_scrum
67 #: constraint:project.project:0
68 msgid "Error! project start-date must be lower then project end-date."
69 msgstr ""
70
71=== modified file 'project_scrum/report/sprint_burndown.py'
72--- project_scrum/report/sprint_burndown.py 2011-03-15 09:43:58 +0000
73+++ project_scrum/report/sprint_burndown.py 2012-06-25 13:06:21 +0000
74@@ -30,6 +30,7 @@
75
76 from pychart import *
77 import pychart.legend
78+from tools.translate import _
79
80 import _burndown
81 class report_tasks(report_int):
82@@ -45,7 +46,7 @@
83 sprint_pool = pool.get('project.scrum.sprint')
84 task_pool = pool.get('project.task')
85 # For add the report header on the top of the report.
86- tb = text_box.T(loc=(320, 500), text="/hL/15/bBurndown Chart", line_style=None)
87+ tb = text_box.T(loc=(320, 500), text="/hL/15/b"+_("Burndown Chart"), line_style=None)
88 tb.draw()
89 int_to_date = lambda x: '/a60{}' + datetime(time.localtime(x).tm_year, time.localtime(x).tm_mon, time.localtime(x).tm_mday).strftime('%d %m %Y')
90 for sprint in sprint_pool.browse(cr, uid, ids, context=context):
91@@ -64,8 +65,8 @@
92 guideline__data=[(datas[0][0],max_hour), (datas[-1][0],0)]
93
94 ar = area.T(x_grid_style=line_style.gray50_dash1,
95- x_axis=axis.X(label="Date", format=int_to_date),
96- y_axis=axis.Y(label="Burndown Chart - Planned Hours"),
97+ x_axis=axis.X(label=_("Date"), format=int_to_date),
98+ y_axis=axis.Y(label=_("Burndown Chart - Planned Hours")),
99 x_grid_interval=_interval_get,
100 x_range = (datas[0][0],datas[-1][0]),
101 y_range = (0,max_hour),
102@@ -74,8 +75,8 @@
103 ar.add_plot(line_plot.T(data=guideline__data, line_style=line_style.red))
104 ar.add_plot(line_plot.T(data=datas, line_style=line_style.green))
105
106- entr1 = pychart.legend.Entry(label="guideline", line_style=line_style.red)
107- entr2 = pychart.legend.Entry(label="burndownchart",line_style=line_style.green)
108+ entr1 = pychart.legend.Entry(label=_("guideline"), line_style=line_style.red)
109+ entr2 = pychart.legend.Entry(label=_("burndownchart"),line_style=line_style.green)
110 legend = pychart.legend.T(nr_rows=2, inter_row_sep=5)
111 legend.draw(ar,[entr1,entr2],canv)
112