Bug 7870 - Translations aren't grouped with related strings
Summary: Translations aren't grouped with related strings
Status: CLOSED FIXED
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: Other (show other bugs)
Version: trunk
Hardware: PC Unknown
: P2 Normal
Target Milestone: 4.15.0
Assignee: Pierre Ossman
URL:
Keywords: prosaic, samuel_tester
Depends on:
Blocks:
 
Reported: 2022-03-22 11:13 CET by Pierre Ossman
Modified: 2022-03-30 14:51 CEST (History)
1 user (show)

See Also:
Acceptance Criteria:


Attachments

Description Pierre Ossman cendio 2022-03-22 11:13:51 CET
Since r28237 for bug 4472 we started sorting our translations based on the source strings. Although this is better than a random order it is not terribly helpful for the translators. It is much more useful if related strings can be grouped so the translators get a bit more context.

There is no grouping feature in the format, but fortunately it can sort things based on location in the source code. This isn't perfect but should be better than what we have now.
Comment 1 Pierre Ossman cendio 2022-03-22 11:14:42 CET
I'll try to do this now as we're adding more translation infrastructure for bug 7828.
Comment 7 Pierre Ossman cendio 2022-03-22 14:52:38 CET
Makefiles updated and did a push/pull from Transifex to get re-sorted .po files.

Everything looks nicely ordered now. I also checked that the same order was maintained in Transifex' UI. It also even shows the source file locations under "occurrences".
Comment 8 Samuel Mannehed cendio 2022-03-30 14:51:40 CEST
I can verify that strings in the Transifex translation GUI are ordered by line number and per file, for example:

 ../vnc/vnc-shadow-notify.c:218
 ../vnc/vnc-shadow-notify.c:271
 ../vnc/vnc-shadow-notify.c:272
 ini_langs.py:1
 ini_langs.py:2

Multiple copies of the same string are grouped under the same translation item with a list of occurrences in the source:

 "_Forward"
 Occurances: modules/thinlinc/tlgtk/wizard.py:210, profiles/modules/thinlinc/profiles/chooser.py:261

And actually translating stuff still works, tested as part of bug 7828.

I couldn't find a way to check the history of the translation packages in Transifex. I could however verify the number of translation strings before and after the change using commands like these:

$ svn cat client/tlclient/po/de.po@38093 | msgfilter -s cat > new_client_po
$ svn cat client/tlclient/po/de.po@38088 | msgfilter -s cat > old_client_po
$ diff -I'^#' -u old_client_po new_client_po

There were no notable change in the tlmisc strings, and in tlclients there were two new strings, but those two are expected.

Looks to work as intended.

Note You need to log in before you can comment on or make changes to this bug.