openerp-india team mailing list archive
-
openerp-india team
-
Mailing list archive
-
Message #20900
[Bug 1096138] [NEW] Generated PO(T) file does not contain correct terms for mako files
Public bug reported:
We found that using the babel.message.extract method with a
parser_method of 'python' seems to skip certain terms in a mako file.
Specifying the parser_method='mako' seems to correct this.
I was unable to discover how this "magic" worked or why from the
following piece of html code the "Document" tag was not recognized for
translation (when using the 'python' method)
----- SNIPPET -----
<table class="basic_table" width="90%">
<tr>
<td>${_("Document")}</td>
<td>${_("Invoice Date")}</td>
<td>${_("Due Date")}</td>
</tr>
<tr>
<td>${inv.name or ''}</td>
<td>${formatLang(inv.date_invoice, date=True)|entity}</td>
<td>${formatLang(inv.date_due, date=True)|entity}</td>
</tr>
</table>
----- END OF SNIPPET -----
When I parse this via 'mako' all terms are correctly recognized.
** Affects: openobject-server
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Server.
https://bugs.launchpad.net/bugs/1096138
Title:
Generated PO(T) file does not contain correct terms for mako files
Status in OpenERP Server:
New
Bug description:
We found that using the babel.message.extract method with a
parser_method of 'python' seems to skip certain terms in a mako file.
Specifying the parser_method='mako' seems to correct this.
I was unable to discover how this "magic" worked or why from the
following piece of html code the "Document" tag was not recognized for
translation (when using the 'python' method)
----- SNIPPET -----
<table class="basic_table" width="90%">
<tr>
<td>${_("Document")}</td>
<td>${_("Invoice Date")}</td>
<td>${_("Due Date")}</td>
</tr>
<tr>
<td>${inv.name or ''}</td>
<td>${formatLang(inv.date_invoice, date=True)|entity}</td>
<td>${formatLang(inv.date_due, date=True)|entity}</td>
</tr>
</table>
----- END OF SNIPPET -----
When I parse this via 'mako' all terms are correctly recognized.
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-server/+bug/1096138/+subscriptions
Follow ups
References