Tryton - Issues

 

Issue8560

Title Add lazy_gettext
Priority feature Status resolved
Superseder Nosy List ced, reviewbot, roundup-bot
Type performance Components trytond
Assigned To ced Keywords review
Reviews 283901002
View: 283901002

Created on 2019-08-07.17:30:52 by ced, last changed by roundup-bot.

Messages
New changeset afa6e7774d86 by Cédric Krier in branch 'default':
Add lazy_gettext
https://hg.tryton.org/tryton-env/rev/afa6e7774d86
New changeset 3a8421698075 by Cédric Krier in branch 'default':
Add lazy_gettext
https://hg.tryton.org/trytond/rev/3a8421698075
review283901002 updated at https://codereview.tryton.org/283901002/#ps273871002
review283901002 updated at https://codereview.tryton.org/283901002/#ps285821002
review283901002 updated at https://codereview.tryton.org/283901002/#ps265761003
msg51077 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2019-08-07.17:30:52
We have some fields that are defined in Mixin or in base Model. The result is that the label and help text are duplicated for each module that inherit from those classes.
This has some negatives impacts like the translations are duplicated in many modules (and there is not check for coherence), the translations table is loaded of many times the same strings. But also it creates a lot of work for the translators when those shared strings are modified like in r e5fdb866f509.

So I would like to introduce a lazy_gettext which is in charge of translating the label/help when used instead of when called.
History
Date User Action Args
2019-08-25 13:00:49roundup-botsetmessages: + msg51477
2019-08-25 13:00:46roundup-botsetstatus: testing -> resolved
nosy: + roundup-bot
messages: + msg51476
2019-08-21 16:04:15reviewbotsetmessages: + msg51381
2019-08-19 22:32:51reviewbotsetmessages: + msg51362
2019-08-07 17:43:16reviewbotsetnosy: + reviewbot
messages: + msg51078
2019-08-07 17:31:57cedsetstatus: in-progress -> testing
reviews: 283901002
keyword: + review
2019-08-07 17:30:52cedcreate

Showing 10 items. Show all history (warning: this could be VERY long)