Issue 11343

Title
Missing translation after sync for help strings
Priority
bug
Status
resolved
Nosy list
ced, pokoli, reviewbot, roundup-bot, yangoon
Assigned to
ced
Keywords
review

Created on 2022-03-28.09:38:32 by yangoon, last changed 2 months ago by roundup-bot.

Messages

New changeset a6dd8f998847 by Cédric Krier in branch 'default':
Prevent to create more than one resource type translation per module
https://hg.tryton.org/tryton-env/rev/a6dd8f998847
New changeset f9f50619c89c by Cédric Krier in branch 'default':
Prevent to create more than one resource type translation per module
https://hg.tryton.org/trytond/rev/f9f50619c89c
New changeset de15822a9f1e by Cédric Krier in branch 'default':
Prevent to create more than one resource type translation per module
https://hg.tryton.org/modules/company/rev/de15822a9f1e
Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2022-09-11.20:24:01

Indeed we should forbid to have more than one partitioned string per module for a resource type of translation.
I see no case where we can not just append at once all the content.
I think it is the best solution because converting the field and help type into a source type will force a new translation to be created if the source change instead of marking it fuzzy.

Author: [hidden] (yangoon) Tryton translator
Date: 2022-03-28.11:55:03

Moving 'help' from _ressource_types to _source_types indeed seems to resolve the issue.

Author: [hidden] (yangoon) Tryton translator
Date: 2022-03-28.11:03:00

Test results from a fresh database with module company installed and German language activated:

  • After installation
  • all expected items for field name 'ir.rule,domain' are present in English
  • one translated item for "<Return>- "employee" from the current user" is present in German

  • Now doing 'Synchronize Translations' results in

  • all expected items for field name 'ir.rule,domain' are present in English
  • still only one translated item, but with switched Source to "<Return>- "companies" from the current user" in German

  • Each repeated 'Synchronize Translations' switches the Source of the single German translation string.

Author: [hidden] (yangoon) Tryton translator
Date: 2022-03-28.10:34:24

Ok, if it is intended to have two separate translations the issue is indeed different and is the one I wanted to file separately.

As far as I have tracked it down the translation sync does not seem to work correctly. The extraction seems to work, but I am still checking. At least it can also be verified by checking on https://translate.tryton.org/translate/tryton/company/de/?q=current+user&sort_by=-priority%2Cposition&offset=3, that there is no entry for '"companies" from the current user'.

I will expand on how I came across the issue:

in one of our tests there is a regression on version 6.0: the number of the foreign translation items does not correlate to the number of the original translation strings.
I tracked that down to be caused by
""companies"" from the current user" "" "False" "ir.rule,domain" "Englisch" "Hilfe" "-1" "company"
resp.
""employee"" from the current user" "" "False" "ir.rule,domain" "Englisch" "Hilfe" "-1" "company"

When doing a translation sync from the Tryton client the according items to translate are switched between the two sources. Further investigation showed that help strings are declared as ressource types. The related query
to create translations selects only on column translation.name.as_('name'), which is the same for both entries (ir.rule, domain).

So much for the moment, I will have to repeat/do further tests on a fresh database.

Author: [hidden] (pokoli) Tryton committer Tryton translator
Date: 2022-03-28.09:42:51

Do not understand. Which is the current issue? Could you please clarify?

For me this is correct as there are two different translations which are then joined on the help message.

Author: [hidden] (yangoon) Tryton translator
Date: 2022-03-28.09:38:30

https://github.com/tryton/company/commit/34fabe65fe05274c45b554a9206406ea238fa54a

introduced
cls.domain.help += '\n- "companies" from the current user'
instead of replacing
cls.domain.help += '\n- "employee" from the current user'

Double checking this obviously also led to wrong translations
https://translate.tryton.org/translate/tryton/company/de/?q=current+user&sort_by=-priority%2Cposition&offset=3

History
Date User Action Args
2022-09-25 20:20:06roundup-botsetmessages: + msg78296
2022-09-25 20:20:02roundup-botsetmessages: + msg78295
2022-09-25 20:19:57roundup-botsetmessages: + msg78294
nosy: + roundup-bot
status: testing -> resolved
2022-09-11 23:46:09reviewbotsetmessages: + msg78028
nosy: + reviewbot
2022-09-11 23:38:55cedsetkeyword: + review
reviews: 415551004
status: in-progress -> testing
2022-09-11 20:24:02cedsetassignedto: ced
messages: + msg78027
nosy: + ced
status: need-eg -> in-progress
2022-03-28 11:55:03yangoonsetmessages: + msg74827
2022-03-28 11:03:00yangoonsetmessages: + msg74820
title: Missing translation extraction/sync for help strings -> Missing translation after sync for help strings
2022-03-28 10:34:25yangoonsetcomponent: + trytond, - company
messages: + msg74818
title: Duplicate override for cls.domain.help -> Missing translation extraction/sync for help strings
2022-03-28 09:42:51pokolisetmessages: + msg74817
nosy: + pokoli
status: unread -> need-eg

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