Feature #561

Let the user choose the label in FORMAT_GEO_OUT F format

Added by Eduardo about 3 years ago. Updated almost 3 years ago.

Status:ClosedStart date:2014-05-13
Priority:NormalDue date:
Assignee:Remko% Done:

100%

Category:-
Target version:Candidate for next minor release
Platform:

Description

When using F (or G) in FORMAT_GEO_OUT the only alternative is WESN.

Let the user choose the label as in psbasmap rose (-T), or let psbasemap -B +l override that for geographic projections.

By now I edit the PS file

el.d (619 Bytes) George, 2014-05-15 08:43

pt.d (608 Bytes) Joaquim, 2014-05-15 14:04

cardinals.tar.gz (4.97 KB) Eduardo, 2014-05-15 14:20

kr.d (1.31 KB) Seung-Sep, 2014-05-15 22:01

de.d (612 Bytes) Christian, 2014-05-16 12:09

History

#1 Updated by Remko about 3 years ago

Can you be more specific of what you would like to add instead of WESN?
Would you like some localisation?
For example in French use: O, E, S, N. In Dutch: WL, OL, ZB, NB
If you would like to have it change according to language, we could generalise TIME_LANGUAGE to become GMT_LANGUAGE and add these localisations.

Of course, you'll be the first to have to supply the Spanish variants. I guess it is just O, E, S, N.

#2 Updated by Paul about 3 years ago

  • Status changed from New to Feedback

The psrose stuff was always a bit of an outlier (spelling out WEST etc in all caps but changeable via -L). I would prefer this being controlled by TIME_LANGUAGE (yes, GMT_LANGUAGE would be better now) and define what the proper suffixes should be. Hard to argue that psrose requires the full word WEST while all other plots are fine with W (or O, WL, etc).

#3 Updated by Eduardo about 3 years ago

Yes localization. I was drawing a map and I needed to put O instead of W in longitude label.

#4 Updated by Remko about 3 years ago

  • Status changed from Feedback to In Progress
  • Assignee set to Remko

Then I'll implement localisation. Here is a suggestion for the implementation in the localisation tables. Please have a look and comment. Also, if you like, give your translation (no need to translate the comments).

# en.d
# The following lines give the translation of the 4 major compass directions (WESN).
# The third column is the name of the compass direction in full (capitalise if that is common in your language).
# The fourth column is the abbreviation used on the edges of a map for longitude and latitude (in some languages this can be more than one letter).
# The fifth column is the abbreviation used on on a compass rose (in some languages this can be more than one letter).
C       1       West    W       W
C       2       East    E       E
C       3       South   S       S
C       4       North   N       N

# nl.d
# The following lines give the translation of the 4 major compass directions (WESN).
# The third column is the name of the compass direction in full (capitalise if that is common in your language).
# The fourth column is the abbreviation used on the edges of a map for longitude and latitude (in some languages this can be more than one letter).
# The fifth column is the abbreviation used on on a compass rose (in some languages this can be more than one letter).
C       1       west    WL      W
C       2       oost    OL      O
C       3       zuid    ZB      Z
C       4       noord   NB      N

#5 Updated by Eduardo about 3 years ago

Here is the data for spanish:

# es.d
# The following lines give the translation of the 4 major compass directions (WESN).
# The third column is the name of the compass direction in full (capitalise if that is common in your language).
# The fourth column is the abbreviation used on the edges of a map for longitude and latitude (in some languages this can be more than one letter).
# The fifth column is the abbreviation used on on a compass rose (in some languages this can be more than one letter).
C       1       oeste    O      O
C       2       este     E      E
C       3       sur      S      S
C       4       norte    N      N

Please, you must anticipate a possible location for country as en_gb (ie. color and colour).

I don't know but what about japanese, chinese, arabic and the like?

#6 Updated by George about 3 years ago

Here is the data for Greek:

# el.d
# The following lines give the translation of the 4 major compass directions (WESN).
# The third column is the name of the compass direction in full (capitalise if that is common in your language).
# The fourth column is the abbreviation used on the edges of a map for longitude and latitude (in some languages this can be more than one letter).
# The fifth column is the abbreviation used on on a compass rose (in some languages this can be more than one letter).
C       1       Δύση      Δ      Δ
C       2       Ανατολή   Α      Α
C       3       Νότος     Ν      Ν
C       4       Βορράς    Β      Β

I hope the Greek letters show up correctly.

#7 Updated by Andreas about 3 years ago

Norwegian, Bokmål:

# no_bm.d
# The following lines give the translation of the 4 major compass directions (WESN).
# The third column is the name of the compass direction in full (capitalise if that is common in your language).
# The fourth column is the abbreviation used on the edges of a map for longitude and latitude (in some languages this can be more than one letter).
# The fifth column is the abbreviation used on on a compass rose (in some languages this can be more than one letter).
C       1       vest    V       V
C       2       øst     Ø       Ø
C       3       sør     S       S
C       4       nord    N       N

Norwegian, Nynorsk

# no_nn.d
# The following lines give the translation of the 4 major compass directions (WESN).
# The third column is the name of the compass direction in full (capitalise if that is common in your language).
# The fourth column is the abbreviation used on the edges of a map for longitude and latitude (in some languages this can be more than one letter).
# The fifth column is the abbreviation used on on a compass rose (in some languages this can be more than one letter).
C       1       vest    V       V
C       2       aust    A       A
C       3       sør     S       S
C       4       nord    N       N

#8 Updated by Eduardo about 3 years ago

# dk.d
# The following lines give the translation of the 4 major compass directions (WESN).
# The third column is the name of the compass direction in full (capitalise if that is common in your language).
# The fourth column is the abbreviation used on the edges of a map for longitude and latitude (in some languages this can be more than one letter).
# The fifth column is the abbreviation used on on a compass rose (in some languages this can be more than one letter).
C    1    Vest          V    V
C    2    Øst           Ø    Ø
C    3    Syd           S    S
C    4    Norden        N    N

#9 Updated by Eduardo about 3 years ago

# ru.d
# The following lines give the translation of the 4 major compass directions (WESN).
# The third column is the name of the compass direction in full (capitalise if that is common in your language).
# The fourth column is the abbreviation used on the edges of a map for longitude and latitude (in some languages this can be more than one letter).
# The fifth column is the abbreviation used on on a compass rose (in some languages this can be more than one letter).
C    1    Запад     З       З
C    2    Восток    В       В
C    3    Юг        Ю       Ю
C    4    Север     С       С

#10 Updated by Paul about 3 years ago

Eduardo, unless you have strong Danish genes I suspect you are wrong about the Danish "Norden". As a Norwegian I would expect it to be just Nord.

#12 Updated by Joaquim about 3 years ago

The Portuguese pt.d

and, as I raised a couple times in the past, there is no such a thing as a "br.d"
At least no more than a ar.d which would be exactly the same as the es.d

# pt.d
# The following lines give the translation of the 4 major compass directions (WESN).
# The third column is the name of the compass direction in full (capitalise if that is common in your language).
# The fourth column is the abbreviation used on the edges of a map for longitude and latitude (in some languages this can be more than one letter).
# The fifth column is the abbreviation used on on a compass rose (in some languages this can be more than one letter).
C       1       oeste    O      O
C       2       este     E      E
C       3       sul      S      S
C       4       norte    N      N

#13 Updated by Paul about 3 years ago

Eduardo, I wont trust that Swedish one either!
Joaquim: yes, feel free to clean that up.

#14 Updated by Eduardo about 3 years ago

Joaquim, the languages are pt-PT and pt-BR, or es-ES and es-AR. As specified in BCP-47 http://www.rfc-editor.org/rfc/bcp/bcp47.txt

Attached is a tar.gz file with the names of cardinal points as in Wikipedia. Abbreviations missing.

#15 Updated by Joaquim about 3 years ago

Eduardo, I know that but it doesn't apply to names of days, weeks, cardinal points etc...

#16 Updated by Eduardo about 3 years ago

Perhaps BCP-47 is a bad reference. But exists POSIX locales used by unix and other OSs to define a user language and dialect. See http://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap07.html and http://www.gnu.org/software/gettext/manual/html_node/Locale-Names.html

POSIX locales use underscore instead of dash, ie: pt_PT and pt_BR.

#17 Updated by Joaquim about 3 years ago

That is not the point here. I know well that there are differences in graphical constructions between PT_PT and PT_BR and each one is very keen of its own, but regarding the names time, dates, cardinal points they is no difference whatsoever.
Portuguese is the only language in GMT that has a PT and a BR distinction for something that is not distinct. Imagine that we would create 20 variations of ES_XX and ENG_XX and others that would have an exactly equal content

#18 Updated by Paul about 3 years ago

I think this originated when I first added time languages back in, well, 2000 or so, and being confused I had been told there was a difference between PT and BR.
I suggest you remove the BR - we only want this stuff when there are differences.

#19 Updated by Joaquim about 3 years ago

OK, done in 5.2

#20 Updated by Eduardo about 3 years ago

No te enojes Joaquim, no sabía que en GMT los contenidos de PT y BR eran exactamente iguales

#21 Updated by Seung-Sep about 3 years ago

Here is the file for Korean.

#22 Updated by Remko about 3 years ago

Joaquim, since you removed br.d, should be also remove us.d, since it is only a copy of uk.d?

#23 Updated by Remko about 3 years ago

I would prefer only native speakers, or those with strong local knowledge to provide input.

Anybody could google the cardinal points in Dutch, but few would find that the map annotations for longitude and latitude are not W, O, Z, N, but WL, OL, ZB and NB. On the compass rose they are W, O, Z, N though. Also it requires local knowledge to do the capitalisation properly.

Similarly, in the long past I changed all the Dutch names for months and weekdays to lowercase, and reduced the abbreviations for weekdays from 3 to 2 letters, since nobody would ever use 3-letter abbreviations for the weekdays. Not something you would easily find on the internet.

While I have great confidence in Wikipedia, not all that's there is correct.

#24 Updated by Joaquim about 3 years ago

Remko, yes the same logic should apply to uk.d vs us.d, that is to remove us.d. Though, now that you bring it, I would prefer to have just a eng.d that refers only to the language and not to a particular country that speaks it.

#25 Updated by Christian about 3 years ago

Here's ze German translation, also attached as file. Cheers, Christian

# de.d
# The following lines give the translation of the 4 major compass directions (WESN).
# The third column is the name of the compass direction in full (capitalise if that is common in your language).
# The fourth column is the abbreviation used on the edges of a map for longitude and latitude (in some languages this can be more than one letter).
# The fifth column is the abbreviation used on on a compass rose (in some languages this can be more than one letter).
C       1       Westen    W      W
C       2       Osten     O      O
C       3       Süden     S      S
C       4       Norden    N      N

#26 Updated by Remko about 3 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 0 to 100

The GMT setting TIME_LANGUAGE is now changed to GMT_LANGUAGE, but both will be recognised.
The files share/time/*.d have been moved to share/localization/*.d and now include the section for cardinal points discussed above.
Most language files still need to be updated, translating the english localisation (default in all *.d files to each language.
Thanks to all GMT users who contributed above, particularly to Seung-Sep for providing a whole new localization in Korean.
Please feel free to send updates for any of the files share/localization/*.d

Implementation is in revisions r13179, r13180, and r13181.

#27 Updated by Remko about 3 years ago

  • Target version set to Candidate for next minor release

#28 Updated by Remko almost 3 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF