Code review comment for lp:~openerp-dev/openobject-server/6.0-opw-18482-atp

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

On 11/28/2011 01:38 PM, Rifakat (OpenERP) wrote:
> The problem I am facing is,
>
> While calling the method _get_source() we pass name as None from translate_call(),
> but always get name(mako path) in _get_source() rather than None.

Yes, and that's fine. We don't pass name=None because we expect to have
name=None in the ir.translation table, we pass name=None because we
don't know the name and don't care about matching it.
ir.translation._get_source will not try to match the name if we pass
None. This is just the same as what happens with strings that come from
Python code like _('foo').

> Yes I have tested the case with our patch,
>> - what entries do you have in ir.translation after importing a PO
>> containing webkit translations
> Lang: Italiano
> name: addons/report_webkit_sample/report/report_webkit_html.mako
> source: Supplier Invoice
> value: Fattura Fornitore

Looks correct.

>> - are the strings translated when you generate the report in the PO
>> language?
> Yes, strings are translated.

Then that patch is working fine from the beginning.
As I explained, all we care about is to be able to get translated
strings in final webkit reports, the rest of the bug report can be
ignored. So if it works, use it, we're done, no need to waste more time
on this.

« Back to merge proposal