When the addons_path config contained the
default path, the system was working with
an empty addons_path in the middle of the
other paths. This empty one matched for all
files, making all files appear to belong to
the root path component, e.g. `home` if the
root path is in /home.
Refactored a bit to avoid duplicates and
redundant path calculations.
On Launchpad, as commented on bug 933496, PO entries (and their comments) are
shared between series. This mean that e.g. the 7.0 series can have the wrong
`reference` comments (those beginning with #:) as they would be copied from say
the trunk series. Those `reference` comments are used to import translations
and look them up.
This patch adds a few lines of code to tools.translate so that targets
defined in the POT `reference` comments are used in addition to those from the
PO file.
Also adds a test module to validate the new behavior.
This patch stems from:
- the 6.1 branch by Vo Minh Thu:
https://code.launchpad.net/+branch/~openerp-dev/openobject-server/6.1-fix-po-targets-933496-vmt
- the 7.0 port by Numerigraphe:
https://code.launchpad.net/~numerigraphe-team/openobject-server/7.0-fix-po-targets-933496-vmt
When re-loading a translation (with 'Overwrite Existing Terms') we need to
empty the translation cache to ensure overwritten terms get their new values.
bzr revid: xal@openerp.com-20131217145738-9oy2fjhbc46yzonq
Previously all _*constraints leaked upstream and
downstream, and were duplicated in all the exported
terms for all modules inheriting from a given model.
bzr revid: odo@openerp.com-20121204082947-tdpiu71ryxzuredb
This patch comes with a related patch on addons which
fixes a lot of cases of terms that were not properly
translated in reports, due to improper use of the
translation system. The addons patch also adds a
lot of missing entries in the POT files.
bzr revid: odo@openerp.com-20121008110946-21984tjvhoy8zkx9
- qweb and Javascript terms extraction now builtin
- all qweb/JS terms are flagged with an extra PO comment:
`openerp-web`, which the web client will use when
loading translations
- the homemade Python/Mako extractor has been removed
and replaced by the default babel Python extractor.
Net result is that we extract less spurious terms, but
keep valid ones, so everything looks great under
the sun.
bzr revid: odo@openerp.com-20121003132659-h5obyl1j7hjo1y2b
The GetText spec says that PO auto-comments indicating
the source location have this form:
#: /path/to/file:lineno
However OpenERP's POT export system defaults to a modified
version of this format with an extra 'type' field:
#: type:/path/to/file:lineno
The babel extractors we use for openerp-web's translations
have the GetText format hardcoded, so it's a good idea
to be more lenient and allow the standards annotations too.
We can use a default 'code' type for such cases.
For openerp-web translations the type does not matter,
as the translations will be directly loaded by the
web engine from the PO files and served in Javascript
to the browser, with no typing needed.
This patch simply avoids failing to parse updated PO files
that will contain standard GetText annotations for the
openerp-web related terms.
bzr revid: odo@openerp.com-20120202143210-05p1w24t6u77cyv8