c2c-oerpscenario team mailing list archive
-
c2c-oerpscenario team
-
Mailing list archive
-
Message #31184
[Bug 836112] Re: Translations synchronization problem with some addons paths
** Patch added: "a patch"
https://bugs.launchpad.net/bugs/836112/+attachment/2326608/+files/translate-6.x.patch
--
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/836112
Title:
Translations synchronization problem with some addons paths
Status in OpenERP Server:
New
Bug description:
Hello,
While trying to synchronize translations for a parametrization module
(by using gtk client "Administration/Translations/Application Terms/Synchronize Translations" menu)
i found sevral potential bugs in the get_module_from_path() function (in bin/tools/translate.py on 6.x branch)
For example, if you have the following paths (maybe not conventional)
in the server's config file:
root_path = /home/openerp/openerp/server/bin
addons_path = /home/openerp/openerp/server/bin/addons,/home/openerp/openerp/addons,/home/openerp/openerp/addons-parametrization
1. With these paths, you'll get an empty string in mod_path
because the length of adp may be inferior or equal to the length of def_path
and the function may return 'home' as module which is incorrect.
2. There is a "off-by-one" error if the path is /home/openerp/openerp/addons-parametrization/my_module/my_file.py
and you have /home/openerp/openerp/addons in the first mod_paths entry
the function returns 'parametrization' as module instead of 'my_module'.
3. I have added a check to avoid duplicated entry in mod_path.
Find attached a patch for the 6.x branch.
Thanks.
OpenERP Server 6.0.1 (bzr revno 3344)
Ubuntu Server 10.04 LTS
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-server/+bug/836112/+subscriptions
References