[Marble-devel] Troubles in Junior Job: Article language choice in the Wikipedia plugin for Marble

tackat at t-online.de tackat at t-online.de
Tue Oct 8 10:26:18 UTC 2013


Dear Pablo,

I haven't looked into the current implementation of the Wikipedia plugin but this task is indeed not simple to solve (and while this task might be a nice one as an introduction if you are patient, I would not exactly consider this to be the typical "junior job").

For querying other existing languages and their url the most hackish way would of course be to parse the webpage itself for the language entries. A problem with that approach is of course the fact that the pages might change their styling and layout in ways that might break this approach any time.

Thanks for looking into this issue though. It's definetely a task that would provide a lot of benefit to our users!

Best Regards,
Torsten



-----Original-Nachricht-----
Von: Pablo <pablos.sr85 at gmail.com>
An: marble-devel at kde.org
Betreff: [Marble-devel] Troubles in Junior Job: Article language choice in the Wikipedia plugin for Marble
Datum: Mon, 30 Sep 2013 19:53:28 +0200

Hello,

I am Pablo and I am working on this bug [1].  

The idea is modify Wikipedia plug-in to show Wikipedia items, not
only in the locale language, but also in additional configured
languages.

In the bug, someone told:

A possible approach might be this: 

- extend the existing configuration dialog of the Wikipedia plug-in
to have an configurable list of additional languages (besides current
locale) 

- change WikipediaModel::getAdditionalItems() to query not only the
current locale, but also all configured additional languages 

- try whether it is needed to remove duplicate entries (when articles
are available in several of the configured languages) in the plug-in
(might not be needed: when items overlap on the map, Marble shows a
context menu to select them. So if they're named correctly, this could
be a nice way for the user to switch languages before even opening the
pop-up browser) 

How ever I found some problems that I could not solve:

In one hand, WikipediaItems do not overlap and only the last item
downloaded from a location is showed in the map. As long as I could
see, only plug-ins of differents types can overlap.  Although I can
change WikipediaModel::getAdditionalItems() to query for additional
languages, AbstractDataPluginModel::downloadDescriptionFile will not
download the same Wikipedia article twice. 

On the other hand, I can not decide the order in which the plug-in
will download the information, so I can not prioritize languages. 

Also I found another problem that would do not allow prioritize a
language over another one: there are Wikipedia articles with different
names in each language, so it is no possible to know which
WikipediaItems are the same article in different languages.

I do not know how to really solve these problems.

Thanks,
Pablo

Links:
------
[1] https://bugs.kde.org/show_bug.cgi?id=267394





More information about the Marble-devel mailing list