Bug 267394

Summary: Article language choice in the Wikipedia plugin for Marble
Product: [Applications] marble Reporter: Milko Krachounov <exabyte>
Component: generalAssignee: marble-bugs
Status: CONFIRMED ---    
Severity: wishlist CC: nienhueser, pablos.sr85
Priority: NOR Keywords: junior-jobs
Version: unspecified   
Target Milestone: 1.7 (KDE 4.12)   
Platform: Unlisted Binaries   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Milko Krachounov 2011-03-01 17:08:33 UTC
Version:           unspecified
OS:                Linux

Marble currently displays only the Wikipedia articles that are in the locale language, and I can't seem to find a way to change it. It would be great if there was a way to configure it to display English articles as well in addition (or if that's too complicated to implement, at least an option to easily switch the language when needed). Local Wikipedia sites often have too few articles, so they often lack an article on many international sites, or the articles are too short on details. On the other hand, local Wikipedia sites often have more articles or details about local sites.

I propose to get the articles in several configurable languages, for example:
1. Primary language: Configurable, defaulting to the language of the locale.
2. Secondary language: Configurable, defaulting to either English or none.
3. Geographic locale language: The language official or most common at the geographic site 

(I realize the third one would be hard to implement and not too useful without either integration with a translation service or ability to send the article to a browser, but I decided to drop the suggestion for consideration.)

If the same article is available in several languages, Marble would take you to the first one (e.g. the primary) that's available, and then let you switch to one of the other languages.



I think it would be great if there is an option to override the primary language for articles and at the same time 

Reproducible: Didn't try
Comment 1 Pablo Sánchez 2013-07-19 08:49:34 UTC
Hello,

I am interested in working on this bug.
I saw this bug has an UNCONFIRMED status. Could someone tell me what does it mean?

Pablo
Comment 2 Dennis Nienhüser 2013-07-24 18:02:11 UTC
Let me add some random thoughts:
- the current Marble version uses the mobile Wikipedia interface which provides a button at the bottom of the page to switch languages.
- wikipedia articles are currently located using http://www.geonames.org/export/wikipedia-webservice.html#wikipediaBoundingBox which claims a rather restricted number of language codes. Would be nice to check that for the ones we actually allow to put in (MarbleLocale::languageCode(), see WikipediaModel.cpp)

A possible approach might be this:
- extend the existing configuration dialog of the wikipedia plugin 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 plugin (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 popup browser)

To get started, I'd play with the current plugin while changing locales to see how the wikipedia coverage is for articles in various languages.
Comment 3 Dennis Nienhüser 2013-07-24 18:03:23 UTC
Re UNCONFIRMED status: That means that a bug was filed, but its status was not reviewed by someone else yet.
Comment 4 Pablo Sánchez 2013-08-05 10:03:43 UTC
I have been playing a few days with the plugin and reading the source code.

The idea is to prioritize a language over another one, but it is not enough to know the language of an item. There are Wikipedia articles from the same site with different names in each language. It is not possible to know which WikipediaItems are the same article in different languages.

In addition, WikipediaItems do not overlap and only the last downloaded item is showed in the map. Even when items have the same name, Marble do not show a contextual menu. Marble only shows a contextual menu when plugin of differents types overlaps.