[FIX] tools: separator in po comments

Comments in .po(t) files for translations of type "code" (e.g. field labels)
specify the path to the file containing the translation. This path should be
OS-independent to get the same result whatever the plateform the instance is
running on.
Closes #7561
This commit is contained in:
Olivier LAURENT 2015-02-26 15:06:01 +01:00 committed by Martin Trigaux
parent 312b85ee2a
commit e12cecea9d
1 changed files with 2 additions and 0 deletions

View File

@ -874,6 +874,8 @@ def trans_generate(lang, modules, cr):
display_path = "addons%s" % frelativepath
module = get_module_from_path(fabsolutepath, mod_paths=mod_paths)
if ('all' in modules or module in modules) and module in installed_modules:
if os.path.sep != '/':
display_path = display_path.replace(os.path.sep, '/')
return module, fabsolutepath, frelativepath, display_path
return None, None, None, None