Merge lp:~therp-nl/ocb-server/7.0-lp1226576-restore_babel_compatibility into lp:ocb-server

Proposed by Stefan Rijnhart (Opener)
Status: Rejected
Rejected by: Stefan Rijnhart (Opener)
Proposed branch: lp:~therp-nl/ocb-server/7.0-lp1226576-restore_babel_compatibility
Merge into: lp:ocb-server
Diff against target: 17 lines (+5/-2)
1 file modified
openerp/tools/translate.py (+5/-2)
To merge this branch: bzr merge lp:~therp-nl/ocb-server/7.0-lp1226576-restore_babel_compatibility
Reviewer Review Type Date Requested Status
OpenERP Community Backports Pending
Review via email: mp+186256@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) wrote :

Unmerged revisions

5096. By Stefan Rijnhart (Opener)

[FIX] Restore compatibility with Babel > 0.9.6 (keeping backwards compatibility)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'openerp/tools/translate.py'
2--- openerp/tools/translate.py 2013-03-07 16:45:58 +0000
3+++ openerp/tools/translate.py 2013-09-18 07:52:53 +0000
4@@ -874,8 +874,11 @@
5 if module:
6 src_file = open(fabsolutepath, 'r')
7 try:
8- for lineno, message, comments in extract.extract(extract_method, src_file,
9- keywords=extract_keywords):
10+ for extracted in extract.extract(extract_method, src_file,
11+ keywords=extract_keywords):
12+ # Babel 0.9.6 yields lineno, message, comments
13+ # Babel 1.3 yields lineno, message, comments, context
14+ lineno, message, comments = extracted[:3]
15 push_translation(module, trans_type, display_path, lineno,
16 encode(message), comments + extra_comments)
17 except Exception:

Subscribers

People subscribed via source and target branches

to status/vote changes: