Bug 330048

Summary: I18n issues in GUI
Product: [Applications] trojita Reporter: Burkhard Lück <lueck>
Component: Desktop GUIAssignee: Trojita default assignee <trojita-bugs>
Status: RESOLVED UPSTREAM    
Severity: normal CC: yurchor
Priority: NOR    
Version First Reported In: git   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: IMAP Settings page (completely translated)

Description Burkhard Lück 2014-01-16 22:29:31 UTC
Some i18n issues in master compiled from sources:
KDE Development Platform: 4.12.60
Qt: 4.8.2

Untranslated:
Start page trojita/www/welcome.html

Translated but translation not shown in de+uk:
1) "No IMAP account is configured. Trojitá cannot do much without one."
2) "About Trojità..." in Help menu
Translation of these strings are in downloaded po files
Other strings with "Trojità" are properly translated

Why translation of this string?
"The emergency EXAMINE command has unexpectedly succeeded, trying to get out of here..."
All msgs from eg log("foobar", Common::LOG_MAILBOX_SYNC);
wcgrep "Common::LOG_MAILBOX_SYNC);" trojita/|wc
29
Only 1 of 29 log messages has a tr() call, should be either all or none
Are they really user visible?
Comment 1 Jan Kundrát 2014-01-17 14:07:25 UTC
(In reply to comment #0)
> Untranslated:
> Start page trojita/www/welcome.html

Do you have any pointers on how to do this properly? Faking the translation by adding these strings to a random .cpp file is something which would do the job (provided I write a ton of scripts, but I don't think that that would be reasonable.

> Translated but translation not shown in de+uk:
> 1) "No IMAP account is configured. Trojitá cannot do much without one."
> 2) "About Trojità..." in Help menu
> Translation of these strings are in downloaded po files
> Other strings with "Trojità" are properly translated

Are you sure that the other occurrences of the accented "Trojitá" (as opposed to just plain ASCII "Trojita" work? Yuri reported this at https://projects.flaska.net/issues/608, I tried to track it down, but was not successful.

> Why translation of this string?
> "The emergency EXAMINE command has unexpectedly succeeded, trying to get out
> of here..."
> All msgs from eg log("foobar", Common::LOG_MAILBOX_SYNC);
> wcgrep "Common::LOG_MAILBOX_SYNC);" trojita/|wc
> 29
> Only 1 of 29 log messages has a tr() call, should be either all or none
> Are they really user visible?

They should not be translated -- the debug log is for developers, not for users. I'll remove the l10n support from them.
Comment 2 Yuri Chornoivan 2014-01-17 14:11:54 UTC
(In reply to comment #1)
> (In reply to comment #0)
> > Translated but translation not shown in de+uk:
> > 1) "No IMAP account is configured. Trojitá cannot do much without one."
> > 2) "About Trojità..." in Help menu
> > Translation of these strings are in downloaded po files
> > Other strings with "Trojità" are properly translated
> 
> Are you sure that the other occurrences of the accented "Trojitá" (as
> opposed to just plain ASCII "Trojita" work? Yuri reported this at
> https://projects.flaska.net/issues/608, I tried to track it down, but was
> not successful.

Yes, now it works everywhere except for the cases pointed by Burkhard. :)
Comment 3 Burkhard Lück 2014-01-17 15:34:46 UTC
(In reply to comment #1)
> (In reply to comment #0)
> > Untranslated:
> > Start page trojita/www/welcome.html
> 
> Do you have any pointers on how to do this properly? Faking the translation
> by adding these strings to a random .cpp file is something which would do
> the job (provided I write a ton of scripts, but I don't think that that
> would be reasonable.
> 
KMail + Konqueror come to my mind, both have a start/introduction page similar to the one in Trojita.
Please have a look at  KMReaderWin::displayAboutPage() in kdepim/kmail/kmreaderwin.cpp
Comment 4 Jan Kundrát 2014-01-17 20:39:09 UTC
(In reply to comment #2)
> Yes, now it works everywhere except for the cases pointed by Burkhard. :)

I've checked the cs_CZ and de_DE localizations, and I do not get a localized version of many more things, including:

- the "About Trojitá" in the title of the about box
- the very first line of the about dialog
- tooltips for the "show homepage" in Settings -> General and for the "send ID" in Settings -> IMAP

This is with Qt 4.8.5. However, using Qt 5.2.0, I get the proper, localized strings in all these situations. 

(In reply to comment #3)
> KMail + Konqueror come to my mind, both have a start/introduction page
> similar to the one in Trojita.
> Please have a look at  KMReaderWin::displayAboutPage() in
> kdepim/kmail/kmreaderwin.cpp

In case of Trojita, the HTML pages actually live on the remote server. The idea behind this is that Trojita sends out a version within the request, so that the webserver can return different contents for ancient versions. It will also be useful if there's ever a critical bug in Trojita, in which case we could ask our users to upgrade.

I'm OK with pulling a translated HTML page from KDE's l10n system, but I'd prefer someone else to do the scripting work.
Comment 5 Yuri Chornoivan 2014-01-17 20:48:41 UTC
Created attachment 84709 [details]
IMAP Settings page (completely translated)

(In reply to comment #4)
> (In reply to comment #2)
> > Yes, now it works everywhere except for the cases pointed by Burkhard. :)
> 
> I've checked the cs_CZ and de_DE localizations, and I do not get a localized
> version of many more things, including:
> 
> - the "About Trojitá" in the title of the about box

Not translated in uk_UA either.

> - the very first line of the about dialog
> - tooltips for the "show homepage" in Settings -> General and for the "send
> ID" in Settings -> IMAP

Those are shown translated here (Mageia packages of Qt 4.8.5).

May it be that you have some old version in /usr/local ?
Comment 6 Jan Kundrát 2014-01-17 21:47:36 UTC
Git commit d25bb4559f00e54593887e69462752e11b63d6c3 by Jan Kundrát.
Committed on 17/01/2014 at 20:20.
Pushed by jkt into branch 'master'.

Do not translate the debug log

The debug messages are most suitable for Trojita developers. Users do not have
to understand them besides being able to attach them to the bugreport; in fact,
a localized debug log would only make our workflow harder.

M  +1    -1    src/Composer/Submission.cpp
M  +1    -1    src/Imap/Tasks/ImapTask.cpp
M  +1    -1    src/Imap/Tasks/UnSelectTask.cpp

http://commits.kde.org/trojita/d25bb4559f00e54593887e69462752e11b63d6c3
Comment 7 Jan Kundrát 2014-01-18 00:45:37 UTC
Git commit acac46499c97925ea85a0cceaa7fa0a44dd18bcb by Jan Kundrát.
Committed on 17/01/2014 at 22:47.
Pushed by jkt into branch 'master'.

Remove more tr() calls from the debug log

In case you wonder why this wasn't part of the earlier commit, it's because I
forgot to save these files from the IDE. Nope, that usually doesn't happen to me
before midnight :).

M  +2    -2    src/Imap/Model/Model.cpp
M  +1    -1    src/Imap/Model/NetworkWatcher.cpp

http://commits.kde.org/trojita/acac46499c97925ea85a0cceaa7fa0a44dd18bcb
Comment 8 Jan Kundrát 2016-01-25 21:38:08 UTC
We're killing Qt4 support, and this means that the UI strings which contain accented chars in their original now work.