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
Note: We do not translate `<a>` elements inline. Translating `<a>` elements is
triggering issues in the website editor tool: menu items are screwed up. The
menu items are handled by bootstrap, which expects menu items to be `<a>`
elements inside `<li>` inside `<ul>` elements. The introduction of a `<span>`
in the middle of this hierarchy breaks its functionality. Therefore we decided
to not translate `<a>` elements inline.
When invoking `read()` with `'website_editor`' in the context, missing
translations are automatically created, so that translated terms are always
wrapped as `<span data-oe-translation-id="...">...</span>`.
Also add constraint to prevent using translated attributes in view inheritance.
You may no longer select elements based on attributes 'string', 'help', etc:
<page string="Stuff" position="inside">...</page>
<xpath expr="//page[@string='Stuff']" position="inside">...</xpath>
HTML phrasing elements (like `<a>`, `<b>`, etc.) should be included in
translations. This avoids splitting phrases when translating HTML content.
Note that elements with qweb-related attributes (t-*) are not translated
inline.
Add tests on xml_translate().
Using `field.translate(callback, value)` returns the translation of the given
field value by using the function `callback` to translate simple terms in
`value`. In practice, the function `callback` uses a translation mapping
retrieved from `ir.translation`.
During tests, some creation of user records would unnecessarily trigger
password reset or set a password, both of which would trigger password
hashing which takes some time (for good reasons).
Fix by:
* passing no_reset_password in YAML tests and some Python tests still
missing it (a number of Python tests already used it)
* removing passwords from YAML records as they're never necessary, the
test user records are not expected to ever log in
- Preserved explicit 3rd-party copyright notices
- Explicit boilerplate should not be necessary - copyright law applies
automatically in all countries thanks to Berne Convention + WTO rules,
and a reference to the applicable license is clear enough.
Remove languages that were not translated fro, the list of installable languages.
Installing languages with no translations (en_CA) has no effect and having a too
long list is misleading. Sorry Klingon.
Adding languages that were translated but not installable (fr_CA, en_AU)
The new signature of ormcache() is way more intuitive: simply list the names of
the method arguments that compose the cache key (see documentation and existing
code). A backward-compatible mode is available by using the keyword argument
`skiparg`.
- remove useless cache clear_prefix
- add a route cache attribute when used it will save the rendered page into the
ormcache for the specified time, this is only enabled if the user is public
and reponse code is 200
- enable it on /page controller for 5min
The server parameter `log-db` gives the possibility
to store the logs of a server in a specific database,
in the ir.logging model.
Unfortunately, it wasn't possible to store these logs within
the database from which the logs came from in a multi databases
environment (e.g. the SAAS).
This revision gives the possibility to store the logs
within the database where the logs come from,
using --log-db=%d (inspired from the --db-filter arg)
We also added the possibility to change the level of logs to store in
the database, with the --log-db-level argument, which is set
by default to `warning`.
Commit 81364790b9 added default values for all fields present
in the view to emulate. However some fields present in the view are not stored and should
not be sent to create. This bug appears with function field in new API that are not stored.
Using the Yaml import generated warning, for example for fields like alias_domain that is
a not stored computed field.