summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/currency.cpp58
-rw-r--r--src/lang/afrikaans.txt2
-rw-r--r--src/lang/arabic_egypt.txt2
-rw-r--r--src/lang/brazilian_portuguese.txt2
-rw-r--r--src/lang/bulgarian.txt2
-rw-r--r--src/lang/catalan.txt2
-rw-r--r--src/lang/croatian.txt2
-rw-r--r--src/lang/czech.txt2
-rw-r--r--src/lang/danish.txt2
-rw-r--r--src/lang/dutch.txt2
-rw-r--r--src/lang/english.txt2
-rw-r--r--src/lang/english_US.txt2
-rw-r--r--src/lang/esperanto.txt2
-rw-r--r--src/lang/estonian.txt2
-rw-r--r--src/lang/finnish.txt2
-rw-r--r--src/lang/french.txt2
-rw-r--r--src/lang/galician.txt2
-rw-r--r--src/lang/german.txt2
-rw-r--r--src/lang/hebrew.txt2
-rw-r--r--src/lang/hungarian.txt2
-rw-r--r--src/lang/icelandic.txt2
-rw-r--r--src/lang/indonesian.txt2
-rw-r--r--src/lang/italian.txt2
-rw-r--r--src/lang/japanese.txt2
-rw-r--r--src/lang/korean.txt2
-rw-r--r--src/lang/latvian.txt2
-rw-r--r--src/lang/lithuanian.txt2
-rw-r--r--src/lang/luxembourgish.txt2
-rw-r--r--src/lang/norwegian_bokmal.txt2
-rw-r--r--src/lang/norwegian_nynorsk.txt2
-rw-r--r--src/lang/piglatin.txt2
-rw-r--r--src/lang/polish.txt2
-rw-r--r--src/lang/portuguese.txt2
-rw-r--r--src/lang/romanian.txt2
-rw-r--r--src/lang/russian.txt2
-rw-r--r--src/lang/simplified_chinese.txt2
-rw-r--r--src/lang/slovak.txt2
-rw-r--r--src/lang/slovenian.txt2
-rw-r--r--src/lang/spanish.txt2
-rw-r--r--src/lang/swedish.txt2
-rw-r--r--src/lang/traditional_chinese.txt2
-rw-r--r--src/lang/turkish.txt2
-rw-r--r--src/lang/ukrainian.txt2
-rw-r--r--src/lang/unfinished/frisian.txt2
-rw-r--r--src/lang/unfinished/greek.txt2
-rw-r--r--src/lang/unfinished/ido.txt2
-rw-r--r--src/lang/unfinished/macedonian.txt2
-rw-r--r--src/lang/unfinished/malay.txt2
-rw-r--r--src/lang/unfinished/persian.txt2
-rw-r--r--src/lang/unfinished/serbian.txt2
-rw-r--r--src/lang/unfinished/thai.txt2
-rw-r--r--src/lang/unfinished/urdu.txt2
-rw-r--r--src/lang/welsh.txt2
-rw-r--r--src/saveload/saveload.cpp2
-rw-r--r--src/settings_type.h2
-rw-r--r--src/strgen/strgen.cpp12
-rw-r--r--src/strgen/strgen.h28
-rw-r--r--src/strings.cpp13
-rw-r--r--src/table/settings.h2
59 files changed, 177 insertions, 44 deletions
diff --git a/src/currency.cpp b/src/currency.cpp
index 25f261472..131c9d65f 100644
--- a/src/currency.cpp
+++ b/src/currency.cpp
@@ -15,35 +15,35 @@
* | | Euro year | | | name
* | | | | | | | */
static const CurrencySpec origin_currency_specs[NUM_CURRENCY] = {
- { 1, ',', CF_NOEURO, "\xC2\xA3", "", 0, STR_CURR_GBP }, ///< british pounds
- { 2, ',', CF_NOEURO, "$", "", 0, STR_CURR_USD }, ///< us dollars
- { 2, ',', CF_ISEURO, "\xE2\x82\xAC", "", 0, STR_CURR_EUR }, ///< Euro
- { 220, ',', CF_NOEURO, "\xC2\xA5", "", 0, STR_CURR_YEN }, ///< yen
- { 20, ',', 2002, "", " S.", 1, STR_CURR_ATS }, ///< austrian schilling
- { 59, ',', 2002, "BEF ", "", 0, STR_CURR_BEF }, ///< belgian franc
- { 2, ',', CF_NOEURO, "CHF ", "", 0, STR_CURR_CHF }, ///< swiss franc
- { 41, ',', CF_NOEURO, "", " K\xC4\x8D", 1, STR_CURR_CZK }, ///< czech koruna
- { 3, '.', 2002, "DM ", "", 0, STR_CURR_DEM }, ///< deutsche mark
- { 11, '.', CF_NOEURO, "", " kr", 1, STR_CURR_DKK }, ///< danish krone
- { 245, '.', 2002, "Pts ", "", 0, STR_CURR_ESP }, ///< spanish pesetas
- { 9, ',', 2002, "", " mk", 1, STR_CURR_FIM }, ///< finnish markka
- { 10, '.', 2002, "FF ", "", 0, STR_CURR_FRF }, ///< french francs
- { 500, ',', 2002, "", "Dr.", 1, STR_CURR_GRD }, ///< greek drachma
- { 378, ',', CF_NOEURO, "", " Ft", 1, STR_CURR_HUF }, ///< hungarian forint
- { 130, '.', CF_NOEURO, "", " Kr", 1, STR_CURR_ISK }, ///< icelandic krona
- { 2850, ',', 2002, "", " L.", 1, STR_CURR_ITL }, ///< italian lira
- { 3, ',', 2002, "NLG ", "", 0, STR_CURR_NLG }, ///< dutch gulden
- { 12, '.', CF_NOEURO, "", " Kr", 1, STR_CURR_NOK }, ///< norwegian krone
- { 6, ' ', CF_NOEURO, "", " zl", 1, STR_CURR_PLN }, ///< polish zloty
- { 5, '.', CF_NOEURO, "", " Lei", 1, STR_CURR_RON }, ///< romanian Lei
- { 50, ' ', CF_NOEURO, "", " p", 1, STR_CURR_RUR }, ///< russian rouble
- { 352, '.', 2007, "", " SIT", 1, STR_CURR_SIT }, ///< slovenian tolar
- { 13, '.', CF_NOEURO, "", " Kr", 1, STR_CURR_SEK }, ///< swedish krona
- { 3, '.', CF_NOEURO, "", " TL", 1, STR_CURR_TRY }, ///< turkish lira
- { 52, ',', 2009, "", " Sk", 1, STR_CURR_SKK }, ///< slovak koruna
- { 4, ',', CF_NOEURO, "R$ ", "", 0, STR_CURR_BRL }, ///< brazil real
- { 20, '.', CF_NOEURO, "", " EEK", 1, STR_CURR_EEK }, ///< estonian krooni
- { 1, ' ', CF_NOEURO, "", "", 2, STR_CURR_CUSTOM }, ///< custom currency
+ { 1, '\0', CF_NOEURO, "\xC2\xA3", "", 0, STR_CURR_GBP }, ///< british pounds
+ { 2, '\0', CF_NOEURO, "$", "", 0, STR_CURR_USD }, ///< us dollars
+ { 2, '\0', CF_ISEURO, "\xE2\x82\xAC", "", 0, STR_CURR_EUR }, ///< Euro
+ { 220, '\0', CF_NOEURO, "\xC2\xA5", "", 0, STR_CURR_YEN }, ///< yen
+ { 20, '\0', 2002, "", " S.", 1, STR_CURR_ATS }, ///< austrian schilling
+ { 59, '\0', 2002, "BEF ", "", 0, STR_CURR_BEF }, ///< belgian franc
+ { 2, '\0', CF_NOEURO, "CHF ", "", 0, STR_CURR_CHF }, ///< swiss franc
+ { 41, '\0', CF_NOEURO, "", " K\xC4\x8D", 1, STR_CURR_CZK }, ///< czech koruna
+ { 3, '\0', 2002, "DM ", "", 0, STR_CURR_DEM }, ///< deutsche mark
+ { 11, '\0', CF_NOEURO, "", " kr", 1, STR_CURR_DKK }, ///< danish krone
+ { 245, '\0', 2002, "Pts ", "", 0, STR_CURR_ESP }, ///< spanish pesetas
+ { 9, '\0', 2002, "", " mk", 1, STR_CURR_FIM }, ///< finnish markka
+ { 10, '\0', 2002, "FF ", "", 0, STR_CURR_FRF }, ///< french francs
+ { 500, '\0', 2002, "", "Dr.", 1, STR_CURR_GRD }, ///< greek drachma
+ { 378, '\0', CF_NOEURO, "", " Ft", 1, STR_CURR_HUF }, ///< hungarian forint
+ { 130, '\0', CF_NOEURO, "", " Kr", 1, STR_CURR_ISK }, ///< icelandic krona
+ { 2850, '\0', 2002, "", " L.", 1, STR_CURR_ITL }, ///< italian lira
+ { 3, '\0', 2002, "NLG ", "", 0, STR_CURR_NLG }, ///< dutch gulden
+ { 12, '\0', CF_NOEURO, "", " Kr", 1, STR_CURR_NOK }, ///< norwegian krone
+ { 6, '\0', CF_NOEURO, "", " zl", 1, STR_CURR_PLN }, ///< polish zloty
+ { 5, '\0', CF_NOEURO, "", " Lei", 1, STR_CURR_RON }, ///< romanian Lei
+ { 50, '\0', CF_NOEURO, "", " p", 1, STR_CURR_RUR }, ///< russian rouble
+ { 352, '\0', 2007, "", " SIT", 1, STR_CURR_SIT }, ///< slovenian tolar
+ { 13, '\0', CF_NOEURO, "", " Kr", 1, STR_CURR_SEK }, ///< swedish krona
+ { 3, '\0', CF_NOEURO, "", " TL", 1, STR_CURR_TRY }, ///< turkish lira
+ { 52, '\0', 2009, "", " Sk", 1, STR_CURR_SKK }, ///< slovak koruna
+ { 4, '\0', CF_NOEURO, "R$ ", "", 0, STR_CURR_BRL }, ///< brazil real
+ { 20, '\0', CF_NOEURO, "", " EEK", 1, STR_CURR_EEK }, ///< estonian krooni
+ { 1, '\0', CF_NOEURO, "", "", 2, STR_CURR_CUSTOM }, ///< custom currency
};
/* Array of currencies used by the system */
diff --git a/src/lang/afrikaans.txt b/src/lang/afrikaans.txt
index 5cdb98a6f..5533a1fbe 100644
--- a/src/lang/afrikaans.txt
+++ b/src/lang/afrikaans.txt
@@ -6,6 +6,8 @@
##plural 0
##textdir ltr
##gender male
+##digitsep .
+##digitsepcur .
#
diff --git a/src/lang/arabic_egypt.txt b/src/lang/arabic_egypt.txt
index 9d5185770..2161ff9e7 100644
--- a/src/lang/arabic_egypt.txt
+++ b/src/lang/arabic_egypt.txt
@@ -5,6 +5,8 @@
##grflangid 0x14
##plural 1
##textdir rtl
+##digitsep ٬
+##digitsepcur ٬
#
diff --git a/src/lang/brazilian_portuguese.txt b/src/lang/brazilian_portuguese.txt
index 8e490ad34..56652d097 100644
--- a/src/lang/brazilian_portuguese.txt
+++ b/src/lang/brazilian_portuguese.txt
@@ -6,6 +6,8 @@
##plural 2
##textdir ltr
##gender m f
+##digitsep .
+##digitsepcur .
#
diff --git a/src/lang/bulgarian.txt b/src/lang/bulgarian.txt
index 237d7a579..23cb2a607 100644
--- a/src/lang/bulgarian.txt
+++ b/src/lang/bulgarian.txt
@@ -7,6 +7,8 @@
##textdir ltr
##case m f n p
##gender m f n p
+##digitsep .
+##digitsepcur .
#
diff --git a/src/lang/catalan.txt b/src/lang/catalan.txt
index 7271a394f..9b71f180f 100644
--- a/src/lang/catalan.txt
+++ b/src/lang/catalan.txt
@@ -5,6 +5,8 @@
##grflangid 0x22
##plural 0
##textdir ltr
+##digitsep .
+##digitsepcur .
#
diff --git a/src/lang/croatian.txt b/src/lang/croatian.txt
index 45f09a284..fb35bf729 100644
--- a/src/lang/croatian.txt
+++ b/src/lang/croatian.txt
@@ -7,6 +7,8 @@
##textdir ltr
##case nom gen dat aku vok lok ins
##gender male female middle
+##digitsep .
+##digitsepcur .
#
diff --git a/src/lang/czech.txt b/src/lang/czech.txt
index f474c099e..09aeef119 100644
--- a/src/lang/czech.txt
+++ b/src/lang/czech.txt
@@ -7,6 +7,8 @@
##textdir ltr
##case nom gen dat acc voc loc ins big small
##gender m f n
+##digitsep {NBSP}
+##digitsepcur {NBSP}
#
diff --git a/src/lang/danish.txt b/src/lang/danish.txt
index dedcbdd92..dfe82d884 100644
--- a/src/lang/danish.txt
+++ b/src/lang/danish.txt
@@ -5,6 +5,8 @@
##grflangid 0x2d
##plural 0
##textdir ltr
+##digitsep .
+##digitsepcur .
#
diff --git a/src/lang/dutch.txt b/src/lang/dutch.txt
index 8d7aae107..103b43c3d 100644
--- a/src/lang/dutch.txt
+++ b/src/lang/dutch.txt
@@ -5,6 +5,8 @@
##grflangid 0x1f
##plural 0
##textdir ltr
+##digitsep .
+##digitsepcur .
#
diff --git a/src/lang/english.txt b/src/lang/english.txt
index 429915fce..d8ee89073 100644
--- a/src/lang/english.txt
+++ b/src/lang/english.txt
@@ -5,6 +5,8 @@
##grflangid 0x01
##plural 0
##textdir ltr
+##digitsep ,
+##digitsepcur ,
#
diff --git a/src/lang/english_US.txt b/src/lang/english_US.txt
index 83940726d..915ca6307 100644
--- a/src/lang/english_US.txt
+++ b/src/lang/english_US.txt
@@ -5,6 +5,8 @@
##grflangid 0x00
##plural 0
##textdir ltr
+##digitsep ,
+##digitsepcur ,
#
diff --git a/src/lang/esperanto.txt b/src/lang/esperanto.txt
index 5743e1d2c..6ff6edf2d 100644
--- a/src/lang/esperanto.txt
+++ b/src/lang/esperanto.txt
@@ -6,6 +6,8 @@
##plural 0
##textdir ltr
##case n
+##digitsep .
+##digitsepcur .
#
diff --git a/src/lang/estonian.txt b/src/lang/estonian.txt
index 1a53cf6f2..a40c142a9 100644
--- a/src/lang/estonian.txt
+++ b/src/lang/estonian.txt
@@ -6,6 +6,8 @@
##plural 0
##textdir ltr
##case g in
+##digitsep .
+##digitsepcur .
#
diff --git a/src/lang/finnish.txt b/src/lang/finnish.txt
index 42f395c56..6bc163eba 100644
--- a/src/lang/finnish.txt
+++ b/src/lang/finnish.txt
@@ -5,6 +5,8 @@
##grflangid 0x35
##plural 0
##textdir ltr
+##digitsep .
+##digitsepcur .
#
diff --git a/src/lang/french.txt b/src/lang/french.txt
index 6c4d14721..9e63c976d 100644
--- a/src/lang/french.txt
+++ b/src/lang/french.txt
@@ -6,6 +6,8 @@
##plural 2
##textdir ltr
##gender m m2 f
+##digitsep .
+##digitsepcur .
#
diff --git a/src/lang/galician.txt b/src/lang/galician.txt
index 21d865888..cb8b4fe1e 100644
--- a/src/lang/galician.txt
+++ b/src/lang/galician.txt
@@ -6,6 +6,8 @@
##plural 0
##textdir ltr
##gender m f n
+##digitsep .
+##digitsepcur .
#
diff --git a/src/lang/german.txt b/src/lang/german.txt
index db283a311..4dfa5a061 100644
--- a/src/lang/german.txt
+++ b/src/lang/german.txt
@@ -6,6 +6,8 @@
##plural 0
##textdir ltr
##gender m w n p
+##digitsep .
+##digitsepcur .
#
diff --git a/src/lang/hebrew.txt b/src/lang/hebrew.txt
index a6566c57a..14c81d103 100644
--- a/src/lang/hebrew.txt
+++ b/src/lang/hebrew.txt
@@ -6,6 +6,8 @@
##plural 2
##textdir rtl
##gender m f
+##digitsep ,
+##digitsepcur ,
#
diff --git a/src/lang/hungarian.txt b/src/lang/hungarian.txt
index 06e2b3536..a7467508a 100644
--- a/src/lang/hungarian.txt
+++ b/src/lang/hungarian.txt
@@ -6,6 +6,8 @@
##plural 2
##textdir ltr
##case t ba
+##digitsep .
+##digitsepcur .
#
diff --git a/src/lang/icelandic.txt b/src/lang/icelandic.txt
index 8a6403f2e..d0e50e593 100644
--- a/src/lang/icelandic.txt
+++ b/src/lang/icelandic.txt
@@ -6,6 +6,8 @@
##plural 0
##textdir ltr
##gender karlkyn kvenkyn hvorugkyn
+##digitsep .
+##digitsepcur .
#
diff --git a/src/lang/indonesian.txt b/src/lang/indonesian.txt
index ae910483e..13bfae69e 100644
--- a/src/lang/indonesian.txt
+++ b/src/lang/indonesian.txt
@@ -5,6 +5,8 @@
##grflangid 0x5a
##plural 1
##textdir ltr
+##digitsep .
+##digitsepcur .
#
diff --git a/src/lang/italian.txt b/src/lang/italian.txt
index fd2e56efe..3697159da 100644
--- a/src/lang/italian.txt
+++ b/src/lang/italian.txt
@@ -7,6 +7,8 @@
##textdir ltr
##case ms mp fs fp
##gender m f
+##digitsep .
+##digitsepcur .
#
diff --git a/src/lang/japanese.txt b/src/lang/japanese.txt
index 728d1c65a..c525143e4 100644
--- a/src/lang/japanese.txt
+++ b/src/lang/japanese.txt
@@ -5,6 +5,8 @@
##grflangid 0x39
##plural 1
##textdir ltr
+##digitsep ,
+##digitsepcur ,
#
diff --git a/src/lang/korean.txt b/src/lang/korean.txt
index d5f3921c8..ac292f266 100644
--- a/src/lang/korean.txt
+++ b/src/lang/korean.txt
@@ -6,6 +6,8 @@
##plural 1
##textdir ltr
##gender m f
+##digitsep .
+##digitsepcur .
#
diff --git a/src/lang/latvian.txt b/src/lang/latvian.txt
index 733ef2aee..4f7a148ab 100644
--- a/src/lang/latvian.txt
+++ b/src/lang/latvian.txt
@@ -7,6 +7,8 @@
##textdir ltr
##case kas
##gender m f
+##digitsep .
+##digitsepcur .
#
diff --git a/src/lang/lithuanian.txt b/src/lang/lithuanian.txt
index 1d0fdf6fe..4c82452b1 100644
--- a/src/lang/lithuanian.txt
+++ b/src/lang/lithuanian.txt
@@ -7,6 +7,8 @@
##textdir ltr
##case kas ko kam ka kuo kur kreip
##gender vyr mot
+##digitsep .
+##digitsepcur .
#
diff --git a/src/lang/luxembourgish.txt b/src/lang/luxembourgish.txt
index 95ce38f5f..637610fb8 100644
--- a/src/lang/luxembourgish.txt
+++ b/src/lang/luxembourgish.txt
@@ -5,6 +5,8 @@
##grflangid 0x23
##plural 0
##textdir ltr
+##digitsep .
+##digitsepcur .
#
diff --git a/src/lang/norwegian_bokmal.txt b/src/lang/norwegian_bokmal.txt
index 0b3535c1d..dff80e901 100644
--- a/src/lang/norwegian_bokmal.txt
+++ b/src/lang/norwegian_bokmal.txt
@@ -5,6 +5,8 @@
##grflangid 0x2f
##plural 0
##textdir ltr
+##digitsep .
+##digitsepcur .
#
diff --git a/src/lang/norwegian_nynorsk.txt b/src/lang/norwegian_nynorsk.txt
index 6b26f9840..0110abeaa 100644
--- a/src/lang/norwegian_nynorsk.txt
+++ b/src/lang/norwegian_nynorsk.txt
@@ -6,6 +6,8 @@
##plural 0
##textdir ltr
##gender masculine feminine neuter
+##digitsep .
+##digitsepcur .
#
diff --git a/src/lang/piglatin.txt b/src/lang/piglatin.txt
index beb13bfd4..40bb356ae 100644
--- a/src/lang/piglatin.txt
+++ b/src/lang/piglatin.txt
@@ -5,6 +5,8 @@
##grflangid 0x01
##plural 0
##textdir ltr
+##digitsep ,
+##digitsepcur ,
#
diff --git a/src/lang/polish.txt b/src/lang/polish.txt
index 2e92c9467..87a689180 100644
--- a/src/lang/polish.txt
+++ b/src/lang/polish.txt
@@ -7,6 +7,8 @@
##textdir ltr
##case d c b n m w
##gender m f n
+##digitsep .
+##digitsepcur .
#
diff --git a/src/lang/portuguese.txt b/src/lang/portuguese.txt
index 9a469e058..4e70c9b96 100644
--- a/src/lang/portuguese.txt
+++ b/src/lang/portuguese.txt
@@ -5,6 +5,8 @@
##grflangid 0x36
##plural 0
##textdir ltr
+##digitsep .
+##digitsepcur .
#
diff --git a/src/lang/romanian.txt b/src/lang/romanian.txt
index 3a0e81874..65d137cbb 100644
--- a/src/lang/romanian.txt
+++ b/src/lang/romanian.txt
@@ -5,6 +5,8 @@
##grflangid 0x28
##plural 0
##textdir ltr
+##digitsep .
+##digitsepcur .
#
diff --git a/src/lang/russian.txt b/src/lang/russian.txt
index 11152988f..635961268 100644
--- a/src/lang/russian.txt
+++ b/src/lang/russian.txt
@@ -7,6 +7,8 @@
##textdir ltr
##case m f n p
##gender m f n p
+##digitsep .
+##digitsepcur .
#
diff --git a/src/lang/simplified_chinese.txt b/src/lang/simplified_chinese.txt
index 8f63ea9a8..6f9af93e4 100644
--- a/src/lang/simplified_chinese.txt
+++ b/src/lang/simplified_chinese.txt
@@ -5,6 +5,8 @@
##grflangid 0x56
##plural 1
##textdir ltr
+##digitsep ,
+##digitsepcur ,
#
diff --git a/src/lang/slovak.txt b/src/lang/slovak.txt
index 624d47799..741c677ea 100644
--- a/src/lang/slovak.txt
+++ b/src/lang/slovak.txt
@@ -7,6 +7,8 @@
##textdir ltr
##case g
##gender m z s
+##digitsep .
+##digitsepcur .
#
diff --git a/src/lang/slovenian.txt b/src/lang/slovenian.txt
index 7ccd20e17..72f5624e2 100644
--- a/src/lang/slovenian.txt
+++ b/src/lang/slovenian.txt
@@ -6,6 +6,8 @@
##plural 8
##textdir ltr
##case r d t
+##digitsep .
+##digitsepcur .
#
diff --git a/src/lang/spanish.txt b/src/lang/spanish.txt
index ab0916c09..d1003b043 100644
--- a/src/lang/spanish.txt
+++ b/src/lang/spanish.txt
@@ -6,6 +6,8 @@
##plural 0
##textdir ltr
##gender masculino femenino
+##digitsep .
+##digitsepcur .
#
diff --git a/src/lang/swedish.txt b/src/lang/swedish.txt
index c5809ccb9..263be00ec 100644
--- a/src/lang/swedish.txt
+++ b/src/lang/swedish.txt
@@ -5,6 +5,8 @@
##grflangid 0x2e
##plural 0
##textdir ltr
+##digitsep .
+##digitsepcur .
#
diff --git a/src/lang/traditional_chinese.txt b/src/lang/traditional_chinese.txt
index cfd5e8722..38ebb8601 100644
--- a/src/lang/traditional_chinese.txt
+++ b/src/lang/traditional_chinese.txt
@@ -5,6 +5,8 @@
##grflangid 0x0c
##plural 1
##textdir ltr
+##digitsep ,
+##digitsepcur ,
#
diff --git a/src/lang/turkish.txt b/src/lang/turkish.txt
index e5e67d985..a8a463228 100644
--- a/src/lang/turkish.txt
+++ b/src/lang/turkish.txt
@@ -5,6 +5,8 @@
##grflangid 0x3e
##plural 1
##textdir ltr
+##digitsep .
+##digitsepcur .
#
diff --git a/src/lang/ukrainian.txt b/src/lang/ukrainian.txt
index 1002ca837..96a681bb9 100644
--- a/src/lang/ukrainian.txt
+++ b/src/lang/ukrainian.txt
@@ -7,6 +7,8 @@
##textdir ltr
##case r d z
##gender m f s mn
+##digitsep .
+##digitsepcur .
#
diff --git a/src/lang/unfinished/frisian.txt b/src/lang/unfinished/frisian.txt
index 9f5768f3a..d23c5a124 100644
--- a/src/lang/unfinished/frisian.txt
+++ b/src/lang/unfinished/frisian.txt
@@ -5,6 +5,8 @@
##grflangid 0x32
##plural 0
##textdir ltr
+##digitsep .
+##digitsepcur .
#
diff --git a/src/lang/unfinished/greek.txt b/src/lang/unfinished/greek.txt
index e8d0428d5..425149616 100644
--- a/src/lang/unfinished/greek.txt
+++ b/src/lang/unfinished/greek.txt
@@ -6,6 +6,8 @@
##plural 0
##textdir ltr
##gender m f n
+##digitsep .
+##digitsepcur .
#
diff --git a/src/lang/unfinished/ido.txt b/src/lang/unfinished/ido.txt
index c0209714a..02144b522 100644
--- a/src/lang/unfinished/ido.txt
+++ b/src/lang/unfinished/ido.txt
@@ -5,6 +5,8 @@
##grflangid 0x06
##plural 0
##textdir ltr
+##digitsep .
+##digitsepcur .
#
diff --git a/src/lang/unfinished/macedonian.txt b/src/lang/unfinished/macedonian.txt
index 279c73e3a..6b11fb895 100644
--- a/src/lang/unfinished/macedonian.txt
+++ b/src/lang/unfinished/macedonian.txt
@@ -5,6 +5,8 @@
##grflangid 0x26
##plural 0
##textdir ltr
+##digitsep .
+##digitsepcur .
#
diff --git a/src/lang/unfinished/malay.txt b/src/lang/unfinished/malay.txt
index 5b4037f8d..139c58ff3 100644
--- a/src/lang/unfinished/malay.txt
+++ b/src/lang/unfinished/malay.txt
@@ -5,6 +5,8 @@
##grflangid 0x3c
##plural 0
##textdir ltr
+##digitsep ,
+##digitsepcur ,
#
diff --git a/src/lang/unfinished/persian.txt b/src/lang/unfinished/persian.txt
index 84e591cd1..976dec450 100644
--- a/src/lang/unfinished/persian.txt
+++ b/src/lang/unfinished/persian.txt
@@ -5,6 +5,8 @@
##grflangid 0x62
##plural 0
##textdir rtl
+##digitsep ٬
+##digitsepcur ٬
#
diff --git a/src/lang/unfinished/serbian.txt b/src/lang/unfinished/serbian.txt
index 043ddc518..52d2db05f 100644
--- a/src/lang/unfinished/serbian.txt
+++ b/src/lang/unfinished/serbian.txt
@@ -7,6 +7,8 @@
##textdir ltr
##case nom big gen dat aku vok lok ins
##gender muški ženski srednji
+##digitsep .
+##digitsepcur .
#
diff --git a/src/lang/unfinished/thai.txt b/src/lang/unfinished/thai.txt
index 4d94b2ada..e01d78dcb 100644
--- a/src/lang/unfinished/thai.txt
+++ b/src/lang/unfinished/thai.txt
@@ -5,6 +5,8 @@
##grflangid 0x42
##plural 1
##textdir ltr
+##digitsep ,
+##digitsepcur ,
#
diff --git a/src/lang/unfinished/urdu.txt b/src/lang/unfinished/urdu.txt
index 87e37f784..11cb46161 100644
--- a/src/lang/unfinished/urdu.txt
+++ b/src/lang/unfinished/urdu.txt
@@ -6,6 +6,8 @@
##plural 0
##textdir rtl
##gender m f
+##digitsep ٬
+##digitsepcur ٬
#
diff --git a/src/lang/welsh.txt b/src/lang/welsh.txt
index 92eae0424..09a0d22b5 100644
--- a/src/lang/welsh.txt
+++ b/src/lang/welsh.txt
@@ -5,6 +5,8 @@
##grflangid 0x0f
##plural 0
##textdir ltr
+##digitsep .
+##digitsepcur .
#
diff --git a/src/saveload/saveload.cpp b/src/saveload/saveload.cpp
index 900b81fc0..43b904e34 100644
--- a/src/saveload/saveload.cpp
+++ b/src/saveload/saveload.cpp
@@ -40,7 +40,7 @@
#include "saveload_internal.h"
-extern const uint16 SAVEGAME_VERSION = 117;
+extern const uint16 SAVEGAME_VERSION = 118;
SavegameType _savegame_type; ///< type of savegame we are loading
diff --git a/src/settings_type.h b/src/settings_type.h
index 35a531ef5..e02ca606f 100644
--- a/src/settings_type.h
+++ b/src/settings_type.h
@@ -104,6 +104,8 @@ struct GUISettings {
struct LocaleSettings {
byte currency; ///< currency we currently use
byte units; ///< unit system we show everything
+ char *digit_group_separator; ///< thousand separator for non-currencies
+ char *digit_group_separator_currency; ///< thousand separator for currencies
};
/** All settings related to the network. */
diff --git a/src/strgen/strgen.cpp b/src/strgen/strgen.cpp
index 316b98ce0..8aeab932e 100644
--- a/src/strgen/strgen.cpp
+++ b/src/strgen/strgen.cpp
@@ -71,6 +71,8 @@ static int _next_string_id;
static uint32 _hash;
static char _lang_name[32], _lang_ownname[32], _lang_isocode[16];
+static char _lang_digit_group_separator[8];
+static char _lang_digit_group_separator_currency[8];
static byte _lang_pluralform;
static byte _lang_textdir;
static uint16 _lang_winlangid;
@@ -526,6 +528,12 @@ static void HandlePragma(char *str)
} else {
error("Invalid textdir %s", str + 8);
}
+ } else if (!memcmp(str, "digitsep ", 9)) {
+ str += 9;
+ strecpy(_lang_digit_group_separator, strcmp(str, "{NBSP}") == 0 ? "\xC2\xA0" : str, lastof(_lang_digit_group_separator));
+ } else if (!memcmp(str, "digitsepcur ", 12)) {
+ str += 12;
+ strecpy(_lang_digit_group_separator_currency, strcmp(str, "{NBSP}") == 0 ? "\xC2\xA0" : str, lastof(_lang_digit_group_separator_currency));
} else if (!memcmp(str, "winlangid ", 10)) {
const char *buf = str + 10;
long langid = strtol(buf, NULL, 16);
@@ -802,6 +810,8 @@ static void ParseFile(const char *file, bool english)
/* For each new file we parse, reset the genders, and language codes */
_numgenders = 0;
_lang_name[0] = _lang_ownname[0] = _lang_isocode[0] = '\0';
+ strecpy(_lang_digit_group_separator, ",", lastof(_lang_digit_group_separator));
+ strecpy(_lang_digit_group_separator_currency, ",", lastof(_lang_digit_group_separator_currency));
_lang_textdir = TD_LTR;
_lang_winlangid = 0x0000; // neutral language code
_lang_newgrflangid = 0; // standard english
@@ -1059,6 +1069,8 @@ static void WriteLangfile(const char *filename)
strecpy(hdr.name, _lang_name, lastof(hdr.name));
strecpy(hdr.own_name, _lang_ownname, lastof(hdr.own_name));
strecpy(hdr.isocode, _lang_isocode, lastof(hdr.isocode));
+ strecpy(hdr.digit_group_separator, _lang_digit_group_separator, lastof(hdr.digit_group_separator));
+ strecpy(hdr.digit_group_separator_currency, _lang_digit_group_separator_currency, lastof(hdr.digit_group_separator_currency));
fwrite(&hdr, sizeof(hdr), 1, f);
diff --git a/src/strgen/strgen.h b/src/strgen/strgen.h
index 3bf104f8b..290ee1232 100644
--- a/src/strgen/strgen.h
+++ b/src/strgen/strgen.h
@@ -5,15 +5,21 @@
#ifndef STRGEN_H
#define STRGEN_H
+/** Header of a language file. */
struct LanguagePackHeader {
- uint32 ident; // 32-bits identifier
- uint32 version; // 32-bits of auto generated version info which is basically a hash of strings.h
- char name[32]; // the international name of this language
- char own_name[32]; // the localized name of this language
- char isocode[16]; // the ISO code for the language (not country code)
- uint16 offsets[32]; // the offsets
- byte plural_form; // plural form index
- byte text_dir; // default direction of the text
+ uint32 ident; ///< 32-bits identifier
+ uint32 version; ///< 32-bits of auto generated version info which is basically a hash of strings.h
+ char name[32]; ///< the international name of this language
+ char own_name[32]; ///< the localized name of this language
+ char isocode[16]; ///< the ISO code for the language (not country code)
+ uint16 offsets[32]; ///< the offsets
+
+ /** Thousand separator used for anything not currencies */
+ char digit_group_separator[8];
+ /** Thousand separator used for currencies */
+ char digit_group_separator_currency[8];
+ byte plural_form; ///< plural form index
+ byte text_dir; ///< default direction of the text
/**
* Windows language ID:
* Windows cannot and will not convert isocodes to something it can use to
@@ -22,9 +28,9 @@ struct LanguagePackHeader {
* what language it is in "Windows". The ID is the 'locale identifier' on:
* http://msdn.microsoft.com/en-us/library/ms776294.aspx
*/
- uint16 winlangid; // windows language id
- uint8 newgrflangid; // newgrf language id
- byte pad[3]; // pad header to be a multiple of 4
+ uint16 winlangid; ///< windows language id
+ uint8 newgrflangid; ///< newgrf language id
+ byte pad[3]; ///< pad header to be a multiple of 4
};
assert_compile(sizeof(LanguagePackHeader) % 4 == 0);
diff --git a/src/strings.cpp b/src/strings.cpp
index b2e31116c..9ba0a6e7c 100644
--- a/src/strings.cpp
+++ b/src/strings.cpp
@@ -217,7 +217,9 @@ static char *FormatNumber(char *buff, int64 number, const char *last, const char
static char *FormatCommaNumber(char *buff, int64 number, const char *last)
{
- return FormatNumber(buff, number, last, ",");
+ const char *separator = _settings_game.locale.digit_group_separator;
+ if (separator == NULL) separator = _langpack->digit_group_separator;
+ return FormatNumber(buff, number, last, separator);
}
static char *FormatNoCommaNumber(char *buff, int64 number, const char *last)
@@ -333,8 +335,13 @@ static char *FormatGenericCurrency(char *buff, const CurrencySpec *spec, Money n
}
}
- char sep[2] = { spec->separator, '\0' };
- buff = FormatNumber(buff, number, last, sep);
+ const char *separator = _settings_game.locale.digit_group_separator_currency;
+ if (separator == NULL && _currency->separator != '\0') {
+ static char sep[] = { _currency->separator, '\0' };
+ separator = sep;
+ }
+ if (separator == NULL) separator = _langpack->digit_group_separator_currency;
+ buff = FormatNumber(buff, number, last, separator);
buff = strecpy(buff, multiplier, last);
/* Add suffix part, folowing symbol_pos specification.
diff --git a/src/table/settings.h b/src/table/settings.h
index d9154b557..a6a41d409 100644
--- a/src/table/settings.h
+++ b/src/table/settings.h
@@ -510,6 +510,8 @@ const SettingDesc _settings[] = {
SDT_CONDOMANY(GameSettings, locale.currency, SLE_UINT8, 97, SL_MAX_VERSION, N, 0, 0, CUSTOM_CURRENCY_ID, _locale_currencies, STR_NULL, NULL, NULL),
SDT_CONDOMANY(GameSettings, locale.units, SLE_UINT8, 97, SL_MAX_VERSION, N, 0, 1, 2, _locale_units, STR_NULL, NULL, NULL),
+ SDT_CONDSTR(GameSettings, locale.digit_group_separator, SLE_STRQ,118, SL_MAX_VERSION, N, NULL, STR_NULL, NULL, NULL),
+ SDT_CONDSTR(GameSettings, locale.digit_group_separator_currency, SLE_STRQ,118, SL_MAX_VERSION, N, NULL, STR_NULL, NULL, NULL),
/***************************************************************************/
/* Unsaved setting variables. */