Merge lp:~openerp-dev/openobject-addons/7.0-opw-586661-ado into lp:openobject-addons/7.0

Proposed by Amit Dodiya (OpenERP)
Status: Merged
Merged at revision: 9210
Proposed branch: lp:~openerp-dev/openobject-addons/7.0-opw-586661-ado
Merge into: lp:openobject-addons/7.0
Diff against target: 53 lines (+28/-4)
2 files modified
account/account_invoice.py (+4/-4)
account/i18n/account.pot (+24/-0)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/7.0-opw-586661-ado
Reviewer Review Type Date Requested Status
Naresh(OpenERP) (community) Needs Fixing
Xavier ALT Pending
Review via email: mp+153061@code.launchpad.net

Description of the change

Hello,

[FIX] make the breadcrump string translatable

Steps:
1). Install any language other than english
2). Now switch to that installed language and goto supplier invoice and create new one and save it
You will find the breadcrump string is not translated.
I have also attached here a link of video which show the issue : http://www.youtube.com/watch?v=-NuBlSdrWKQ

Regards,
Amit

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

Hi Amit,

The missing terms in .POT's will be filled upon when a complete re-export of the translation terms are done.So there is no need to add them to .pot. Please uncommit the changes realted to .pot's.

Thanks,
Naresh Soni
OpenERP Enterprise Service

review: Needs Fixing
Revision history for this message
Olivier Dony (Odoo) (odo-openerp) wrote :

I will fix it while merging:

- no change to the POTs, will be done when exporting as Naresh explained
- avoid creating translatable terms with trailing spaces - it creates extra terms to translate ("Invoice" is already translated, so why ask translators to translate "Invoice "?!) and there's always a chance translators will not copy the whitespace characters. If the position of the space could change between languages, then the whole sentence needs to be made translatable in a way that translators can understand, for example "Invoice %(invoice_number)s" .

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account/account_invoice.py'
2--- account/account_invoice.py 2013-03-06 15:01:42 +0000
3+++ account/account_invoice.py 2013-03-13 06:42:22 +0000
4@@ -1121,10 +1121,10 @@
5 if not ids:
6 return []
7 types = {
8- 'out_invoice': 'Invoice ',
9- 'in_invoice': 'Sup. Invoice ',
10- 'out_refund': 'Refund ',
11- 'in_refund': 'Supplier Refund ',
12+ 'out_invoice': _('Invoice '),
13+ 'in_invoice': _('Sup. Invoice '),
14+ 'out_refund': _('Refund '),
15+ 'in_refund': _('Supplier Refund '),
16 }
17 return [(r['id'], (r['number']) or types[r['type']] + (r['name'] or '')) for r in self.read(cr, uid, ids, ['type', 'number', 'name'], context, load='_classic_write')]
18
19
20=== modified file 'account/i18n/account.pot'
21--- account/i18n/account.pot 2013-03-07 12:19:34 +0000
22+++ account/i18n/account.pot 2013-03-13 06:42:22 +0000
23@@ -53,6 +53,30 @@
24 msgstr ""
25
26 #. module: account
27+#: code:addons/account/account_invoice.py:1124
28+#, python-format
29+msgid "Invoice "
30+msgstr ""
31+
32+#. module: account
33+#: code:addons/account/account_invoice.py:1125
34+#, python-format
35+msgid "Sup. Invoice "
36+msgstr ""
37+
38+#. module: account
39+#: code:addons/account/account_invoice.py:1126
40+#, python-format
41+msgid "Refund "
42+msgstr ""
43+
44+#. module: account
45+#: code:addons/account/account_invoice.py:1127
46+#, python-format
47+msgid "Supplier Refund "
48+msgstr ""
49+
50+#. module: account
51 #: code:addons/account/account_bank_statement.py:368
52 #, python-format
53 msgid "Journal item \"%s\" is not valid."