The translation check of Odoo's test_translation (Odoo 20.0) exports the terms
of every module (tag nightly_export). This exports the terms of the modules of
the repository under test (repo_to_check_quality, see test_viin_pylint) and
checks their translation files against them:
- the translation template (i18n/<module>.pot) has every term of the module,
with what each term translates (the record, or the code)
- every entry of a .po file says what it translates and its module, or it is
never imported
Editions Supported
- Community Edition
- Enterprise Edition
Test Translation Viin
test_translation_viin exports the terms of the modules of the repository
under test, as the nightly_export check of Odoo's test_translation
(Odoo 20.0) does for every module, and checks their translation files against
them. It ships no user interface: it is driven by running its tests, after the
installation of every module (post_install).
What it checks
test_export_wizard - for every module of the repository with an i18n
folder:
- its translation template i18n/<module>.pot exists and has every term
of the module with what the term translates: the record (#: model:...)
or the code (#: code:...). A term the template lacks never reaches the
.po files updated from it: export the template again whenever the
terms change, and update the .po files from it;
- every entry of its .po files says what it translates (#:) and its
module (#. module:): an entry without the first is never imported, an
entry without the second makes the import of the whole file fail.
The records other installed modules define or extend too (a field another
module gives another label...) are not compared: their terms depend on the
modules installed with the module.
The repository under test is the one of test_viin_pylint
(repo_to_check_quality), narrowed to modules_to_check_quality when it is
set.
This software and associated files (the "Software") may only be
used
(executed, modified, executed after modifications) if you have
purchased a
valid license from the authors, typically via Odoo Apps,
or if you
have
received a written agreement from the authors of the
Software (see the
COPYRIGHT file).
You may develop Odoo modules that use the Software as a library
(typically
by depending on it, importing it and using its
resources), but
without
copying any source code or material from the
Software. You may distribute
those modules under the license of your
choice, provided that this
license
is compatible with the terms of
the Odoo Proprietary License (For
example:
LGPL, MIT, or proprietary
licenses similar to this one).
It is forbidden to publish, distribute, sublicense, or sell
copies of the
Software or modified copies of the Software.
The above copyright notice and this permission notice must be
included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT
SHALL THE
AUTHORS OR COPYRIGHT HOLDERS
BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN
ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING
FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE
SOFTWARE.