Daily updates from Odoo
Tuesday, June 4, 2024
1 change
Enhancements to existing features
Translated messages now avoid automatic developer-style quoting and instead use consistent curly quotation marks around inserted text. This makes messages clearer for users and easier to adapt correctly across different languages and regions.
Original PR description
While using %r in translation strings to automatically quote strings without having to deal with escaping/choosing the right string delimiters seems like a good idea, it has a few issues:
- This doesn't work for non-string data types.
- Different languages use various quotation marks (e.g., “guillemets” in French, corner brackets in Chinese).
- Even in English, the common typographical recommendations suggest using curly quotes (“”) over straight quotes ("").
- It is not always clear whether it will produce single or double quotes.
For these reasons, this PR removes all instances of %r in translation strings, and replaces them with %s, surrounding them with curly quotes.
Community: https://github.com/odoo/odoo/pull/166859
Task-3942743