Community: Framework mailing list archives
Re: Translation code questionby
Appreciate your fast reply.
If we said that the case of one word having different meanings is
And the meaning depends on the word position and place ( for example Marketing, Accounting, Email, Fleet, ...etc )
Then the %30 can be reduced to %1 by validating the field which is being translated ( name column in the DB )
which contains the module name, object name, field name and
I think it's enough that the query says select translation value with the
1- same module name ( ex. accounting) , and
2- of the same object (ex. account.invoice) and
3- with same field name (ex. partner_id) and,
4- of the same field type (ex. Field/code/sql/help) and,
5- matches this exact source - which mostly contains more than one word like " customer name", "Sale order line" ...etc.
field names contains module name and object name and field name, for ex.:
object name ,field name
Based on this we can see that the case of different meanings for one word can be less than %1,
and it's good to have only 2-5 percent wrong values instead of losing about -30 of translation effort with every new DB.
On 8 Apr 2015, at 13:43, Mohamed M. Hagag <firstname.lastname@example.org> wrote:
Can we make translation more portable between databases by ignoring res_id while exporting/importing CSV translation files ?
I don't know why we need the res_id which is a data related filed as I understand from the code.
Isn't it enough to query ir_translation by src, name and type only ?
If we ignore res_id it will help solving the below behavioral issues:
- many terms not showing because of wrong res_id
- translation export ignores many terms
- translation import also ignores many terms
- lots of duplicated terms with the same src, name, type and module after multiple imports it can be 10x or 20x
And it will be easily to export the ir_translation table from one DB to another and translation will work.
AFAIK, most if not all multi-language systems do not bind the translation to a dynamic record id like res_id .
Finally, I'm working on testing the translation tools and functions of odoo with various cases.
Post to: mailto:email@example.com