[Marble-bugs] [marble] [Bug 351325] New: Placemark localization for (OSM) vector rendering

Dennis Nienhüser nienhueser at kde.org
Sat Aug 15 12:41:10 UTC 2015


https://bugs.kde.org/show_bug.cgi?id=351325

            Bug ID: 351325
           Summary: Placemark localization for (OSM) vector rendering
           Product: marble
           Version: unspecified
          Platform: Other
               URL: https://wiki.openstreetmap.org/wiki/Multilingual_names
                OS: Linux
            Status: UNCONFIRMED
          Keywords: google-code-in, junior-jobs
          Severity: task
          Priority: NOR
         Component: general
          Assignee: marble-bugs at kde.org
          Reporter: nienhueser at kde.org

In OpenStreetMap names of places are usually denoted in the local language.
Variants of a name translated into other languages can be added. In most
situations it is desirable to display the name in the local language of the
viewer of the map, not the local language of the placemark.

For example, the following placemark exists in Budapest:
name => Magyar Nemzeti Bank
name:de => Ungarische Nationalbank
name:en => Hungarian National Bank
name:es => Banco Nacional de Hungría
name:fr => Banque nationale hongroise

On a device with a hungarian locale (QLocale::system::uiLanguages() reports
some 'hu' variant), the placemark should be displayed as "Magyar Nemzeti Bank".
A German system should display "Ungarische Nationalbank". For an italian system
a proper translation is missing, but it might be preferrable to display the
english variant "Hungarian National Bank" instead of the local one.

To implement this, we need to
- determine the language code of the placemark: Which country do the
placemark's coordinates belong to, what is its locale?
- come up with a list of acceptable display locales. This can likely be
extracted from QLocale::system::uiLanguages(), which already includes a
preference order.
- Choose the best (in order of preference) translation alternative and display
that

Re-using the example above and an italian device, this might result in
- language code of the placemark: 'hu'
- acceptable display locales: ('it', 'en', 'es')
- mapping: ('it' => N/A, 'en' => 'Hungarian National Bank', 'es' => 'Banco
Nacional de Hungría')
- the displayed name would become 'Hungarian National Bank' as the most
preferred variant

If no mapping is found (e.g. for a chinese device that only reports ('zh') as
acceptable locales), the original name should be chosen.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Marble-bugs mailing list