! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
xfce4-dict redirects web searches to the english wikipedia even when I have a...
Status:
RESOLVED: INVALID
Product:
Xfce4-dict
Component:
General

Comments

Description Willem Hobers 2018-05-18 20:46:08 CEST
Testing Xubuntu 18.10,
Description: Ubuntu Cosmic Cuttlefish (development branch)
Release: 18.10
Linux willem-Lenovo-ideapad-110-15ISK 4.15.0-15-generic #16-Ubuntu SMP Wed Apr 4 13:58:14 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

xfce4-dict 0.8.0 (Xfce 4.12)

On a PC with Dutch local: When entering the word "mug" in the search field of xfce-dict and I choose "check spelling" the word is checked against the Dutch spelling; as expected. If I then do a Web-search I am directed to the English wikipedia; I would expect to be directed to the Dutch wikipedia.
In settings I tried to change http://en.wikipedia.org/wiki/{word} to http://nl.wikipedia.org/wiki/{word}, but that change did not persist.
Comment 1 Andre Miranda editbugs 2018-05-23 03:38:48 CEST
Works for me, at Preferences -> Web Service -> URL I set it to http://nl.wikipedia.org/wiki/{word} and it correctly opens the URL https://nl.wikipedia.org/wiki/Mug and I'm query for "mug" (The radio button group "Search with:" is set to "Web Service").
When you set the ULR at preferences, is it lost? I mean, when you reopen preferences, is it reset to http://en.wikipedia.org/wiki/{word}?
Try to launch xfce4-dict from terminal and watch out for any error message.
Comment 2 Willem Hobers 2018-05-23 19:59:24 CEST
I had tried to change the wiki to NL; and indeed the setting is lost, not even accepted I think. If I change the URL and press enter nothing happens. 

Starting form cli gives:
** (xfce4-dict:26074): WARNING **: 19:58:40.502: failed to connecting to org.xfce.Dict, reason was: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.xfce.Dict was not provided by any .service files

Any more information I can provide to help?
Comment 3 Andre Miranda editbugs 2018-05-24 05:05:02 CEST
Still can't reproduce and reviewing the code, couldn't find anything suspicious.
That warning message is expected, when there is no running instance of xfce4-dict.
Can you check the contents of $HOME/.config/xfce4-dict/xfce4-dict.rc? More specifically the value of web_url.
You can also try to set it to web_url=http://nl.wikipedia.org/wiki/{word}, just make sure xfce4-dict is not running.
Comment 4 Willem Hobers 2018-05-24 09:00:08 CEST
$HOME/.config/xfce4-dict/xfce4-dict.rc:

mode_in_use=1
mode_default=3
web_url=http://en.wiktionary.org/wiki/{word}
show_panel_entry=false
panel_entry_size=150
port=2628
server=dict.org
dict=* (allemaal gebruiken)
spell_bin=/usr/bin/enchant
spell_dictionary=nl_NL
link_color=rgb(0,0,255)
phonetic_color=rgb(0,99,0)
error_color=rgb(128,0,0)
success_color=rgb(16,112,0)
geometry=695;227;580;360;0;
speedreader_font=Sans 32
speedreader_wpm=400
speedreader_grouping=1
speedreader_mark_paragraphs=false

Changing web_url=http://en.wiktionary.org/wiki/{word} to web_url=http://nl.wiktionary.org/wiki/{word} in mousepad and then showing the settings in xfce4-dict gives this: https://i.imgur.com/fPiyqTF.png. The Web-address is now NL; the wiki-button are still EN. Searching results in going to the nl-wiki. Clicking the wiki-button changes the web-address to the en-version again. Closing dict and re-opening it shows the en-wiki-weburl setting remains and dict.rc has the en-webaddress again.
Comment 5 Andre Miranda editbugs 2018-05-25 05:14:39 CEST
The buttons are just URL templates, their values are hard-coded, what really matters is the value in the URL entry.

One more try: If you press the "Wikipedia, the free encyclopedia (EN)" button, change the URL to "http://nl.wikipedia...", will xfce4-dict keep the correct (dutch) URL after you close the preferences? If not, it's really odd, I have just installed Xubuntu 18.10 in a VM and everything works are expected.
Comment 6 Willem Hobers 2018-05-25 09:36:48 CEST
First pressing the "Wikipedia, the free encyclopedia (EN)" button, then changing the URL does indeed change the url permanently.
So that resolves the issue, but I'm not certain the end-user will naturally assume pressing that button first is needed to change the url.

Anything else I can do to help?
Comment 7 Andre Miranda editbugs 2018-05-25 18:31:01 CEST
Actually, I don't need to press any of the buttons to change the URL, just open preferences, change and close.
Any suggestion to improve usability or discoverability?
Comment 8 Willem Hobers 2018-05-25 21:22:18 CEST
Would it be possible to have the URL and the buttons adapt to the locale of the install at the initial set up of dict? 
Or that at the first start up of the program the user is asked for the URL?
I expect most users would want to go their "local" wiki. But I may be wrong of course.

I think I basically misunderstood the function of the "Wikipedia, the free encyclopedia (EN)" button.

But it should at least work as you describe it: when I change the URL the change should persist, and first pressing the buttons should not be necessary I think.

Is this helpful at all?
Comment 9 Andre Miranda editbugs 2018-05-26 22:50:25 CEST
The current template buttons are clearly biased to a german user :)

Using the locale might be a good idea or not, it really depends on the type of user we are talking about.
You see, there are users that want to search things about their language only, some will mostly search things about another language and some will search about lots of languages or things.

What this web service search feature really needs is a redesign from ground up, because getting into preferences just to select another web service is tiresome. But honestly, searching from a standalone desktop app is not that common nowadays, people usually just open a browser tab and search what they need. Modern browsers even allow custom searches with a prefix/keyword.

Unfortunately I lack the time to devise how this feature could be improved, there are other higher profile Xfce components that need my attention.
If you're indeed interested in getting this sorted out, please open a new bug and let's discuss this enhancement there.
Comment 10 Willem Hobers 2018-05-27 09:37:30 CEST
Frankly I never really used xfce4-dict; I only came across it trying to help the xubuntu community update their test cases, as requested by Kev Bowring/flocculant. 
When I did come across xfce4-dict it did occur to me that the functionality of xfce4-dict seemed a tad outdated to me. So, no, I have no problem with you turning your attention to more important matters.

Perhaps it's time to remove xfce4-dict from the xfce-libraries altogether?

Thanks for your patience, and your answers.
Comment 11 Andre Miranda editbugs 2018-05-28 01:26:50 CEST
Well, it's up to ubuntu (and any other distro) folks to ship xfce4-dict or not.
I'll try to maintain it as long as I have the time, I like to think there is a guy or two that still find it useful ;)

Bug #14406

Reported by:
Willem Hobers
Reported on: 2018-05-18
Last modified on: 2018-05-28

People

Assignee:
Harald Judt
CC List:
2 users

Version

Attachments

Additional information