Translation system not compatible with Babel 1.3 API

Bug #1226576 reported by Stefan Rijnhart (Opener)
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Aeroo Reports
Fix Committed
Undecided
Unassigned
Odoo Server (MOVED TO GITHUB)
Fix Released
Low
OpenERP's Framework R&D

Bug Description

It seems Babel on Pypi moved from 0.9.6 to 1.3 recently (Pypi mentions 2013-07-29).

The update includes this change:
https://github.com/mitsuhiko/babel/commit/a1bcb84f19b92f075fc46c113b987fcf9e894879

The API change causes the following error:

 openerp.tools.translate: Failed to extract terms from [path]/openobject-addons/hr_timesheet_sheet/hr_timesheet_sheet.py
Traceback (most recent call last):
  File "[path]/openobject-server/openerp/tools/translate.py", line 878, in babel_extract_terms
    keywords=extract_keywords):
ValueError: too many values to unpack

As a result, translatable terms from the code are not exported using Babel 1.3.

-- edit --
I mentioned missing translations in the OpenERP pot files, but this was a false alarm.

description: updated
Revision history for this message
Olivier Dony (Odoo) (odo-openerp) wrote :

Hello,

Thanks for reporting and for providing a patch! I'm not sure we can directly make a direct connection between missing translations in POT files and this babel API change, because at least for the core branches all terms extractions are manually done and never triggered this error. They may be slightly outdated however, in which case you should request a re-export (on stable series in which terms to translate seldom change, we only export new terms every few months)

We should however fix the extraction system to make it compatible with the new babel API, and ideally that should be done in a way that is compatible with both APIs.

Changed in openobject-server:
assignee: nobody → OpenERP's Framework R&D (openerp-dev-framework)
importance: Undecided → Low
milestone: none → 7.0
status: New → Confirmed
summary: - Missing code translations due to Babel API changes
+ Translation system not compatible with Babel 1.3 API
Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) wrote :

Sorry, I just changed the description: missing translations were a false alarm. I also just updated the patch to be backwards compatible.

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

Stefan, your patch was applied in server 7.0 at revision 5079 rev-id: <email address hidden>

Thanks for reporting and fixing!

Changed in openobject-server:
status: Confirmed → Fix Released
Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) wrote :

Olivier, thanks for fast tracking this one!

no longer affects: ocb-server/7.0
no longer affects: ocb-server
Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) wrote :

Also affecting Aeroo Reports as it overwrites the affected method with a modified copy in report_aeroo/translate.py

Changed in aeroo:
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.