MantisBT - Doomseeker
View Issue Details
0003493Doomseeker[All Projects] Bugpublic2018-09-15 22:092018-10-27 22:53
Pol M 
Pol M 
normalmajoralways
closedfixed 
LinuxArchx86-64
1.2 
1.21.2 
0003493: texts like "Server filter" and "Buddies" aren't being translated.
While doing tests, I've encountered some strings that are not being translated.
There are two places where I originally noticed they are not being translated:
  • the text that appears when you put your mouse over the "Server filter" button located over the server list
  • the button in the menu "View"


Previous to the commits related to language translations, the text did translate to Polish.
  1. Compile the latest commit (1b09978)
  2. Open Doomseeker, change the language to Spanish/Polish
  3. Restart Doomseeker, check the two strings
The following images show:
# 1: previous to the changes
# 2: after the changes
No tags attached.
png Doomseeker - translation #1.png (667,462) 2018-09-15 22:09
https://zandronum.com/tracker/file_download.php?file_id=2390&type=bug
png Doomseeker - translation #2.png (668,057) 2018-09-15 22:09
https://zandronum.com/tracker/file_download.php?file_id=2391&type=bug
Issue History
2018-09-15 22:09Pol MNew Issue
2018-09-15 22:09Pol MFile Added: Doomseeker - translation #1.png
2018-09-15 22:09Pol MFile Added: Doomseeker - translation #2.png
2018-09-15 22:11Pol MNote Added: 0019528
2018-09-15 22:13Pol MSummary"Server filter" text not being translated. => "Server filter", "Buddies" texts not being translated.
2018-09-15 22:13Pol MDescription Updatedbug_revision_view_page.php?rev_id=11793#r11793
2018-09-15 22:13Pol MAdditional Information Updatedbug_revision_view_page.php?rev_id=11795#r11795
2018-09-15 22:15Pol MNote Added: 0019529
2018-09-15 22:32Pol MAssigned To => Pol M
2018-09-15 22:32Pol MStatusnew => assigned
2018-09-15 22:36Pol MStatusassigned => new
2018-09-16 09:36Pol MNote Added: 0019531
2018-09-16 09:37Pol MNote Edited: 0019531bug_revision_view_page.php?bugnote_id=19531#r11797
2018-09-16 09:56Pol MStatusnew => assigned
2018-09-16 09:56Pol MSummary"Server filter", "Buddies" texts not being translated. => texts like "Server filter" and "Buddies" aren't being translated.
2018-09-16 09:56Pol MDescription Updatedbug_revision_view_page.php?rev_id=11798#r11798
2018-09-16 09:56Pol MSeverityminor => major
2018-09-16 09:56Pol MAssigned ToPol M =>
2018-09-16 09:57Pol MAssigned To => Pol M
2018-09-16 09:57Pol MStatusassigned => new
2018-09-16 09:57Pol MAssigned ToPol M =>
2018-09-16 11:38ZalewaNote Added: 0019532
2018-09-16 12:22Pol MNote Added: 0019533
2018-09-16 12:24Pol MNote Edited: 0019533bug_revision_view_page.php?bugnote_id=19533#r11800
2018-09-16 14:14ZalewaNote Added: 0019534
2018-09-16 14:14ZalewaNote Edited: 0019534bug_revision_view_page.php?bugnote_id=19534#r11802
2018-09-18 11:45WubTheCaptainStatusnew => confirmed
2018-09-22 11:06ZalewaNote Added: 0019629
2018-10-11 16:37Pol MNote Added: 0020075
2018-10-11 16:37Pol MAssigned To => Pol M
2018-10-11 16:37Pol MStatusconfirmed => assigned
2018-10-11 16:58Pol MNote Added: 0020076
2018-10-11 16:59Pol MStatusassigned => needs review
2018-10-11 18:09WubTheCaptainTarget Version => 1.2
2018-10-11 18:10WubTheCaptainDescription Updatedbug_revision_view_page.php?rev_id=12237#r12237
2018-10-11 18:10WubTheCaptainSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=12239#r12239
2018-10-11 18:10WubTheCaptainSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=12240#r12240
2018-10-11 18:16ZalewaNote Added: 0020079
2018-10-11 18:40Pol MNote Added: 0020080
2018-10-11 18:40Pol MNote Edited: 0020080bug_revision_view_page.php?bugnote_id=20080#r12242
2018-10-11 19:15Pol MNote Added: 0020082
2018-10-11 19:22ZalewaNote Added: 0020083
2018-10-11 19:26Pol MNote Added: 0020084
2018-10-11 19:28ZalewaNote Added: 0020085
2018-10-11 19:28Pol MNote Edited: 0020084bug_revision_view_page.php?bugnote_id=20084#r12246
2018-10-12 13:15Pol MNote Added: 0020086
2018-10-12 13:15Pol MStatusneeds review => resolved
2018-10-12 13:15Pol MFixed in Version => 1.2
2018-10-12 13:15Pol MResolutionopen => fixed
2018-10-27 22:53WubTheCaptainStatusresolved => closed

Notes
(0019528)
Pol M   
2018-09-15 22:11   
Ok, It seems like this affects more texts. Gonna rewrite the title.
(0019529)
Pol M   
2018-09-15 22:15   
Version of Qt: 5.11.1
(0019531)
Pol M   
2018-09-16 09:36   
(edited on: 2018-09-16 09:37)
Ok, It turns out that there is, in fact, lots of texts not being translated, based on the output of cmake .. -DUPDATE_TRANSLATIONS=ON; make:'https://pastebin.com/ErAzzE6P [^]'

I think I'm gonna make this issue "major"

(0019532)
Zalewa   
2018-09-16 11:38   
One thing to keep in mind here is that Wadseeker lib doesn't have translations and any strings that come out of it will be untranslated. This is something that we haven't dealt with so far, but should be considered as a "missing feature" rather than as a bug.
(0019533)
Pol M   
2018-09-16 12:22   
(edited on: 2018-09-16 12:24)
the errors mentioned come from the "core", but I'll take a quick look at the Wadseeker lib.

EDIT: For what I've had time to read, this seems like an error of the tool that generates the translation files, and it seems that there are workarounds to solve those.

(0019534)
Zalewa   
2018-09-16 14:14   
Another 2 things:

1. tr() will only actually work in a subclass that inherits from QObject
2. Q_OBJECT macro must be present in that class declaration.

Lack of any of those, or using a compilation workaround such as "QObject::tr()" will result in a non-functional translation.

(0019629)
Zalewa   
2018-09-22 11:06   
Missing tr() call found in createserverdialog.cpp here:'https://bitbucket.org/Doomseeker/doomseeker/src/365d5abf3b5a3c10c1dd01114b6d21572c6cb5aa/src/core/gui/createserverdialog.cpp#lines-93 [^]'
(0020075)
Pol M   
2018-10-11 16:37   
Okay, I've narrowed down the issue. the files that give an "tr() cannot be called without context" are:
/home/pol/Documents/doomseeker/src/core/gui/serverfilterdock.cpp:61
/home/pol/Documents/doomseeker/src/core/gui/serverfilterdock.cpp:62
/home/pol/Documents/doomseeker/src/core/gui/remoteconsole.cpp:68
/home/pol/Documents/doomseeker/src/core/gui/remoteconsole.cpp:68
/home/pol/Documents/doomseeker/src/core/gui/remoteconsole.cpp:83
/home/pol/Documents/doomseeker/src/core/gui/remoteconsole.cpp:83
/home/pol/Documents/doomseeker/src/core/gui/mainwindow.cpp:236
/home/pol/Documents/doomseeker/src/core/gui/mainwindow.cpp:238
/home/pol/Documents/doomseeker/src/core/gui/mainwindow.cpp:246
/home/pol/Documents/doomseeker/src/core/gui/mainwindow.cpp:247
/home/pol/Documents/doomseeker/src/core/gui/dockBuddiesList.cpp:84
/home/pol/Documents/doomseeker/src/core/gui/dockBuddiesList.cpp:85
/home/pol/Documents/doomseeker/src/core/gui/dockBuddiesList.cpp:86
/home/pol/Documents/doomseeker/src/core/gui/createserver/maplistpanel.cpp:52
/home/pol/Documents/doomseeker/src/core/gui/configuration/cfgwadalias.cpp:67
/home/pol/Documents/doomseeker/src/core/gui/configuration/cfgwadalias.cpp:70
/home/pol/Documents/doomseeker/src/core/gui/configuration/cfgfilepaths.cpp:48
/home/pol/Documents/doomseeker/src/core/gui/configuration/cfgfilepaths.cpp:48
Most (if not all) of these errors can be resolved specifing the class: for instance, in mainwindow.cpp: tr becomes MainWindow::tr
This happens only in constructors.
there are also warnings saying "Qualifying with unknown namespace/class" but they do get translated and I can't seem to find what is wrong with them.
I'd assume that this is simply lupdate getting a little bit confused.
(0020076)
Pol M   
2018-10-11 16:58   
pr
(0020079)
Zalewa   
2018-10-11 18:16   
Pol, did you happen to find any explanation on why this occurs? The closest I could find was a bug report for C++11 initialization lists which shouldn't affect us:'https://bugreports.qt.io/browse/QTBUG-34128 [^]'
(0020080)
Pol M   
2018-10-11 18:40   
I also did encounter that same bug report. No clue, I do not understand why it affects us.
I have not tried to update translations with an older Qt5, so the possibility of this being a recent change to lupdate is not yet discarded. I wish I knew more.

I'm gonna look into it for the moment

(0020082)
Pol M   
2018-10-11 19:15   
My hypothesis was correct. I've run a Pipeline (since it uses Ubuntu 14.04, we can assume it uses an older version of qt):
'https://bitbucket.org/Pol_M/doomseeker/addon/pipelines/home#!/results/27 [^]'

This did not used to happen (as we can see that it only gives "Qualifying with unknown namespace/class" warnings), but since 5.11 (or before), it fails.
(0020083)
Zalewa   
2018-10-11 19:22   
I use 5.7.0 and it happens for me too.

Well, this framework was never free of bugs. I suppose all we can do is deal with it. For now I can confirm that your patch fixes at least the "View" menu and the main toolstrip buttons.
(0020084)
Pol M   
2018-10-11 19:26   
(edited on: 2018-10-11 19:28)
Quote from Zalewa

I suppose all we can do is deal with it.

Pretty much.
Should this be reported upstream?

Quote from Zalewa

For now I can confirm that your patch fixes at least the "View" menu and the main toolstrip buttons.

And it successfuly generates the missing lines in my machine

(0020085)
Zalewa   
2018-10-11 19:28   
If you wish to do so then, please, be my guest.
(0020086)
Pol M   
2018-10-12 13:15   
commit:'https://bitbucket.org/Doomseeker/doomseeker/commits/ecbd3c8cf4de45a97b68f35fc776e5e5fe95de74 [^]'