Difference between revisions of "Projects/Marble/GeoDataCoordinatesTranslation"

Jump to: navigation, search
(First dump of guide)
 
(completed sentence about what to do if default okay)
Line 3: Line 3:
 
Starting with version 1.3 Marble has improved support for parsing coordinates from text strings of all kind of (non-western) languages. This is done by using 7 entries in the translation catalog for marble-qt which all are from the context "GeoDataCoordinates", have a "*" as text and as disambiguation a description what they are about (+ a link here).
 
Starting with version 1.3 Marble has improved support for parsing coordinates from text strings of all kind of (non-western) languages. This is done by using 7 entries in the translation catalog for marble-qt which all are from the context "GeoDataCoordinates", have a "*" as text and as disambiguation a description what they are about (+ a link here).
  
You can use the entries to '''extend''' the items which are used for parsing strings. The default items are based on the English language, so coordinates in English can be always parsed, whatever you add here. If you do not need to  
+
You can use the entries to '''extend''' the items which are used for parsing strings. The default items are based on the English language, so coordinates in English can be always parsed, whatever you add here. If you do not need to add anything, just leave the entry without a translation or translate with a "*" again.
  
 
If there are multiple items for a entry, you list them by separating the items with the "|" char (U+007C, VERTICAL LINE) without any spaces added, e.g. "A|B|C".
 
If there are multiple items for a entry, you list them by separating the items with the "|" char (U+007C, VERTICAL LINE) without any spaces added, e.g. "A|B|C".

Revision as of 23:00, 10 November 2011

Contents

Translating GeoDataCoordinates

Starting with version 1.3 Marble has improved support for parsing coordinates from text strings of all kind of (non-western) languages. This is done by using 7 entries in the translation catalog for marble-qt which all are from the context "GeoDataCoordinates", have a "*" as text and as disambiguation a description what they are about (+ a link here).

You can use the entries to extend the items which are used for parsing strings. The default items are based on the English language, so coordinates in English can be always parsed, whatever you add here. If you do not need to add anything, just leave the entry without a translation or translate with a "*" again.

If there are multiple items for a entry, you list them by separating the items with the "|" char (U+007C, VERTICAL LINE) without any spaces added, e.g. "A|B|C".

Direction terms

There are 4 entries for the directions:

  • North direction terms, ...
  • South direction terms, ...
  • East direction terms, ...
  • West direction terms, ...

Here give the shortform(s) of each direction which is used in coordinates, which is e.g. "N" for North in English. If there are variants with and without a dot, list both, e.g. "Pn.|Pn" for North in Polish. If there is a space, make sure it is just one space, e.g. with "с. ш." for North in Bulgarian.

Coordinate symbols

There are 3 entries for the symbols:

  • Degree symbol terms, ...
  • Minutes symbol terms, ...
  • Seconds symbol terms, ...

Per default the parser accepts also quite a range of characters which only look similar to the actual symbol. Cmp. this listing in the code:

   // x00B0: ° DEGREE SIGN
   // x00BA: º MASCULINE ORDINAL INDICATOR (found used as degree sign)
   // x2032: ′ PRIME (minutes)
   // x00B4: ´ ACUTE ACCENT (found as minutes sign)
   // x02CA: ˊ MODIFIER LETTER ACUTE ACCENT
   // x2019: ’ RIGHT SINGLE QUOTATION MARK
   // x2033: ″ DOUBLE PRIME (seconds)
   // x201D: ” RIGHT DOUBLE QUOTATION MARK

Additionally all single ticks listed here are accepted as Seconds symbol if doubled, e.g. "´´". So hopefully no need to add the typical workaround due to the keyboard's layout in your language.

Typically Asian languages might need to set the symbols here, like "도" for Degree in Korean.

Examples

Take a look at the examples used for testing, in the method "TestGeoDataCoordinates::testFromLocaleString_data()" in the file https://projects.kde.org/projects/kde/kdeedu/marble/repository/revisions/master/entry/tests/unittest_geodatacoordinates.cpp

Or see the the blog post and the examples given here: http://frinring.wordpress.com/2011/11/08/help-needed-how-to-write-geographic-coordinates-in-your-language/#comments

Be aware that some missed what was asked for with the directions: not the full, normal term was asked, but the short form like it is used in a coordinate, cmp. the section about Direction terms above.

Feedback

If you need help or have other suggestions, please contact kossebau@kde.org or the Marble mailinglist.


KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V.Legal