Issue 11343

Title
Missing translation after sync for help strings
Priority
bug
Status
need-eg
Nosy list
pokoli, yangoon
Assigned to
Keywords

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

Messages

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-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
2022-03-28 09:38:32yangooncreate

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