summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2009-08-12 01:28:11 +0000
committersmatz <smatz@openttd.org>2009-08-12 01:28:11 +0000
commita29bbb1e1f8d6525746dd31cd5e47159d896cc84 (patch)
tree4c454595c0694c5585b691600bd4aedef69d9983
parentd58d053438557ec5c4d0f30a2c92713236962376 (diff)
downloadopenttd-a29bbb1e1f8d6525746dd31cd5e47159d896cc84.tar.xz
(svn r17157) -Add: localised decimal separator
-rw-r--r--src/lang/afrikaans.txt1
-rw-r--r--src/lang/arabic_egypt.txt1
-rw-r--r--src/lang/brazilian_portuguese.txt1
-rw-r--r--src/lang/bulgarian.txt1
-rw-r--r--src/lang/catalan.txt1
-rw-r--r--src/lang/croatian.txt1
-rw-r--r--src/lang/czech.txt1
-rw-r--r--src/lang/danish.txt1
-rw-r--r--src/lang/dutch.txt1
-rw-r--r--src/lang/english.txt1
-rw-r--r--src/lang/english_US.txt1
-rw-r--r--src/lang/esperanto.txt1
-rw-r--r--src/lang/estonian.txt1
-rw-r--r--src/lang/finnish.txt1
-rw-r--r--src/lang/french.txt1
-rw-r--r--src/lang/galician.txt1
-rw-r--r--src/lang/german.txt1
-rw-r--r--src/lang/hebrew.txt1
-rw-r--r--src/lang/hungarian.txt1
-rw-r--r--src/lang/icelandic.txt1
-rw-r--r--src/lang/indonesian.txt1
-rw-r--r--src/lang/italian.txt1
-rw-r--r--src/lang/japanese.txt1
-rw-r--r--src/lang/korean.txt1
-rw-r--r--src/lang/latvian.txt1
-rw-r--r--src/lang/lithuanian.txt1
-rw-r--r--src/lang/luxembourgish.txt1
-rw-r--r--src/lang/norwegian_bokmal.txt1
-rw-r--r--src/lang/norwegian_nynorsk.txt1
-rw-r--r--src/lang/polish.txt1
-rw-r--r--src/lang/portuguese.txt1
-rw-r--r--src/lang/romanian.txt1
-rw-r--r--src/lang/russian.txt1
-rw-r--r--src/lang/serbian.txt1
-rw-r--r--src/lang/simplified_chinese.txt1
-rw-r--r--src/lang/slovak.txt1
-rw-r--r--src/lang/slovenian.txt1
-rw-r--r--src/lang/spanish.txt1
-rw-r--r--src/lang/swedish.txt1
-rw-r--r--src/lang/traditional_chinese.txt1
-rw-r--r--src/lang/turkish.txt1
-rw-r--r--src/lang/ukrainian.txt1
-rw-r--r--src/lang/unfinished/frisian.txt1
-rw-r--r--src/lang/unfinished/greek.txt1
-rw-r--r--src/lang/unfinished/ido.txt1
-rw-r--r--src/lang/unfinished/macedonian.txt1
-rw-r--r--src/lang/unfinished/malay.txt1
-rw-r--r--src/lang/unfinished/persian.txt1
-rw-r--r--src/lang/unfinished/thai.txt1
-rw-r--r--src/lang/unfinished/urdu.txt1
-rw-r--r--src/lang/unfinished/vietnamese.txt1
-rw-r--r--src/lang/welsh.txt1
-rw-r--r--src/settings_type.h1
-rw-r--r--src/strgen/strgen.cpp6
-rw-r--r--src/strgen/strgen.h2
-rw-r--r--src/strings.cpp7
-rw-r--r--src/table/settings.h1
-rw-r--r--src/table/strgen_tables.h1
58 files changed, 68 insertions, 2 deletions
diff --git a/src/lang/afrikaans.txt b/src/lang/afrikaans.txt
index aef44911f..75f31c78d 100644
--- a/src/lang/afrikaans.txt
+++ b/src/lang/afrikaans.txt
@@ -5,6 +5,7 @@
##textdir ltr
##digitsep .
##digitsepcur .
+##decimalsep ,
##winlangid 0x0436
##grflangid 0x1b
##gender male
diff --git a/src/lang/arabic_egypt.txt b/src/lang/arabic_egypt.txt
index a817f78ef..70e252ce7 100644
--- a/src/lang/arabic_egypt.txt
+++ b/src/lang/arabic_egypt.txt
@@ -5,6 +5,7 @@
##textdir rtl
##digitsep ٬
##digitsepcur ٬
+##decimalsep ٫
##winlangid 0x0c01
##grflangid 0x14
diff --git a/src/lang/brazilian_portuguese.txt b/src/lang/brazilian_portuguese.txt
index d4dd82ef9..a8ecd760c 100644
--- a/src/lang/brazilian_portuguese.txt
+++ b/src/lang/brazilian_portuguese.txt
@@ -5,6 +5,7 @@
##textdir ltr
##digitsep .
##digitsepcur .
+##decimalsep ,
##winlangid 0x0416
##grflangid 0x37
##gender m f
diff --git a/src/lang/bulgarian.txt b/src/lang/bulgarian.txt
index f1d06cb1f..327da1874 100644
--- a/src/lang/bulgarian.txt
+++ b/src/lang/bulgarian.txt
@@ -5,6 +5,7 @@
##textdir ltr
##digitsep .
##digitsepcur .
+##decimalsep ,
##winlangid 0x0402
##grflangid 0x18
##gender m f n p
diff --git a/src/lang/catalan.txt b/src/lang/catalan.txt
index 65f946781..57e145ff3 100644
--- a/src/lang/catalan.txt
+++ b/src/lang/catalan.txt
@@ -5,6 +5,7 @@
##textdir ltr
##digitsep .
##digitsepcur .
+##decimalsep ,
##winlangid 0x0403
##grflangid 0x22
diff --git a/src/lang/croatian.txt b/src/lang/croatian.txt
index 19043913c..9d2249057 100644
--- a/src/lang/croatian.txt
+++ b/src/lang/croatian.txt
@@ -5,6 +5,7 @@
##textdir ltr
##digitsep .
##digitsepcur .
+##decimalsep ,
##winlangid 0x041a
##grflangid 0x38
##gender male female middle
diff --git a/src/lang/czech.txt b/src/lang/czech.txt
index 88304e247..32208fc3c 100644
--- a/src/lang/czech.txt
+++ b/src/lang/czech.txt
@@ -5,6 +5,7 @@
##textdir ltr
##digitsep {NBSP}
##digitsepcur {NBSP}
+##decimalsep ,
##winlangid 0x0405
##grflangid 0x15
##gender m f n
diff --git a/src/lang/danish.txt b/src/lang/danish.txt
index ea39cf50d..17cdb2a1c 100644
--- a/src/lang/danish.txt
+++ b/src/lang/danish.txt
@@ -5,6 +5,7 @@
##textdir ltr
##digitsep .
##digitsepcur .
+##decimalsep ,
##winlangid 0x0406
##grflangid 0x2d
diff --git a/src/lang/dutch.txt b/src/lang/dutch.txt
index 8627881cb..27c9474cc 100644
--- a/src/lang/dutch.txt
+++ b/src/lang/dutch.txt
@@ -5,6 +5,7 @@
##textdir ltr
##digitsep .
##digitsepcur .
+##decimalsep ,
##winlangid 0x0413
##grflangid 0x1f
diff --git a/src/lang/english.txt b/src/lang/english.txt
index 4eb065988..9d3ddb5b3 100644
--- a/src/lang/english.txt
+++ b/src/lang/english.txt
@@ -5,6 +5,7 @@
##textdir ltr
##digitsep ,
##digitsepcur ,
+##decimalsep .
##winlangid 0x0809
##grflangid 0x01
diff --git a/src/lang/english_US.txt b/src/lang/english_US.txt
index 63c37ce7c..f0b7ac5b7 100644
--- a/src/lang/english_US.txt
+++ b/src/lang/english_US.txt
@@ -5,6 +5,7 @@
##textdir ltr
##digitsep ,
##digitsepcur ,
+##decimalsep .
##winlangid 0x0409
##grflangid 0x00
diff --git a/src/lang/esperanto.txt b/src/lang/esperanto.txt
index 498c25ad6..101fbd616 100644
--- a/src/lang/esperanto.txt
+++ b/src/lang/esperanto.txt
@@ -5,6 +5,7 @@
##textdir ltr
##digitsep .
##digitsepcur .
+##decimalsep ,
##winlangid 0x0000
##grflangid 0x05
##case n
diff --git a/src/lang/estonian.txt b/src/lang/estonian.txt
index c1f4b424e..7a822871d 100644
--- a/src/lang/estonian.txt
+++ b/src/lang/estonian.txt
@@ -5,6 +5,7 @@
##textdir ltr
##digitsep .
##digitsepcur .
+##decimalsep ,
##winlangid 0x0425
##grflangid 0x34
##case g in sü
diff --git a/src/lang/finnish.txt b/src/lang/finnish.txt
index 78c471e8f..edb0ea651 100644
--- a/src/lang/finnish.txt
+++ b/src/lang/finnish.txt
@@ -5,6 +5,7 @@
##textdir ltr
##digitsep .
##digitsepcur .
+##decimalsep ,
##winlangid 0x040b
##grflangid 0x35
diff --git a/src/lang/french.txt b/src/lang/french.txt
index 2baeae79d..e60e85169 100644
--- a/src/lang/french.txt
+++ b/src/lang/french.txt
@@ -5,6 +5,7 @@
##textdir ltr
##digitsep .
##digitsepcur .
+##decimalsep ,
##winlangid 0x040c
##grflangid 0x03
##gender m m2 f
diff --git a/src/lang/galician.txt b/src/lang/galician.txt
index 3aa6c0ad5..841816bfb 100644
--- a/src/lang/galician.txt
+++ b/src/lang/galician.txt
@@ -5,6 +5,7 @@
##textdir ltr
##digitsep .
##digitsepcur .
+##decimalsep ,
##winlangid 0x0456
##grflangid 0x31
##gender m f n
diff --git a/src/lang/german.txt b/src/lang/german.txt
index 77eb13df7..9481e4bef 100644
--- a/src/lang/german.txt
+++ b/src/lang/german.txt
@@ -5,6 +5,7 @@
##textdir ltr
##digitsep .
##digitsepcur .
+##decimalsep ,
##winlangid 0x0407
##grflangid 0x02
##gender m w n p
diff --git a/src/lang/hebrew.txt b/src/lang/hebrew.txt
index 53230d5b2..2438f3141 100644
--- a/src/lang/hebrew.txt
+++ b/src/lang/hebrew.txt
@@ -5,6 +5,7 @@
##textdir rtl
##digitsep ,
##digitsepcur ,
+##decimalsep .
##winlangid 0x040d
##grflangid 0x61
##gender m f
diff --git a/src/lang/hungarian.txt b/src/lang/hungarian.txt
index 51b77e6df..c8685b730 100644
--- a/src/lang/hungarian.txt
+++ b/src/lang/hungarian.txt
@@ -5,6 +5,7 @@
##textdir ltr
##digitsep .
##digitsepcur .
+##decimalsep ,
##winlangid 0x040e
##grflangid 0x24
##case t ba
diff --git a/src/lang/icelandic.txt b/src/lang/icelandic.txt
index b5455ed40..611800b6d 100644
--- a/src/lang/icelandic.txt
+++ b/src/lang/icelandic.txt
@@ -5,6 +5,7 @@
##textdir ltr
##digitsep .
##digitsepcur .
+##decimalsep ,
##winlangid 0x040f
##grflangid 0x29
##gender karlkyn kvenkyn hvorugkyn
diff --git a/src/lang/indonesian.txt b/src/lang/indonesian.txt
index 3589ec997..3afe88e7e 100644
--- a/src/lang/indonesian.txt
+++ b/src/lang/indonesian.txt
@@ -5,6 +5,7 @@
##textdir ltr
##digitsep .
##digitsepcur .
+##decimalsep ,
##winlangid 0x0421
##grflangid 0x5a
diff --git a/src/lang/italian.txt b/src/lang/italian.txt
index 2fb810afa..b479fa4cd 100644
--- a/src/lang/italian.txt
+++ b/src/lang/italian.txt
@@ -5,6 +5,7 @@
##textdir ltr
##digitsep .
##digitsepcur .
+##decimalsep ,
##winlangid 0x0410
##grflangid 0x27
##gender m f
diff --git a/src/lang/japanese.txt b/src/lang/japanese.txt
index e87bcbd69..c357b723c 100644
--- a/src/lang/japanese.txt
+++ b/src/lang/japanese.txt
@@ -5,6 +5,7 @@
##textdir ltr
##digitsep ,
##digitsepcur ,
+##decimalsep .
##winlangid 0x0411
##grflangid 0x39
diff --git a/src/lang/korean.txt b/src/lang/korean.txt
index 73039faa5..5521af8c4 100644
--- a/src/lang/korean.txt
+++ b/src/lang/korean.txt
@@ -5,6 +5,7 @@
##textdir ltr
##digitsep .
##digitsepcur .
+##decimalsep ,
##winlangid 0x0412
##grflangid 0x3a
##gender m f
diff --git a/src/lang/latvian.txt b/src/lang/latvian.txt
index d1a759474..3fc6c2eb7 100644
--- a/src/lang/latvian.txt
+++ b/src/lang/latvian.txt
@@ -5,6 +5,7 @@
##textdir ltr
##digitsep .
##digitsepcur .
+##decimalsep ,
##winlangid 0x0426
##grflangid 0x2a
##gender m f
diff --git a/src/lang/lithuanian.txt b/src/lang/lithuanian.txt
index abe3373c1..c5662ed08 100644
--- a/src/lang/lithuanian.txt
+++ b/src/lang/lithuanian.txt
@@ -5,6 +5,7 @@
##textdir ltr
##digitsep .
##digitsepcur .
+##decimalsep ,
##winlangid 0x0427
##grflangid 0x2b
##gender vyr mot
diff --git a/src/lang/luxembourgish.txt b/src/lang/luxembourgish.txt
index 95d37aa6e..19bca9d38 100644
--- a/src/lang/luxembourgish.txt
+++ b/src/lang/luxembourgish.txt
@@ -5,6 +5,7 @@
##textdir ltr
##digitsep .
##digitsepcur .
+##decimalsep ,
##winlangid 0x046e
##grflangid 0x23
diff --git a/src/lang/norwegian_bokmal.txt b/src/lang/norwegian_bokmal.txt
index 97859dc37..b7f3eb5e6 100644
--- a/src/lang/norwegian_bokmal.txt
+++ b/src/lang/norwegian_bokmal.txt
@@ -5,6 +5,7 @@
##textdir ltr
##digitsep .
##digitsepcur .
+##decimalsep ,
##winlangid 0x0414
##grflangid 0x2f
diff --git a/src/lang/norwegian_nynorsk.txt b/src/lang/norwegian_nynorsk.txt
index 9738d6a97..d05699c4c 100644
--- a/src/lang/norwegian_nynorsk.txt
+++ b/src/lang/norwegian_nynorsk.txt
@@ -5,6 +5,7 @@
##textdir ltr
##digitsep .
##digitsepcur .
+##decimalsep ,
##winlangid 0x0814
##grflangid 0x0e
##gender masculine feminine neuter
diff --git a/src/lang/polish.txt b/src/lang/polish.txt
index 8de66df03..9805997e9 100644
--- a/src/lang/polish.txt
+++ b/src/lang/polish.txt
@@ -5,6 +5,7 @@
##textdir ltr
##digitsep .
##digitsepcur .
+##decimalsep ,
##winlangid 0x0415
##grflangid 0x30
##gender m f n
diff --git a/src/lang/portuguese.txt b/src/lang/portuguese.txt
index ed7a53daf..c21838cff 100644
--- a/src/lang/portuguese.txt
+++ b/src/lang/portuguese.txt
@@ -5,6 +5,7 @@
##textdir ltr
##digitsep .
##digitsepcur .
+##decimalsep ,
##winlangid 0x0816
##grflangid 0x36
diff --git a/src/lang/romanian.txt b/src/lang/romanian.txt
index 001e16704..35db2af18 100644
--- a/src/lang/romanian.txt
+++ b/src/lang/romanian.txt
@@ -5,6 +5,7 @@
##textdir ltr
##digitsep .
##digitsepcur .
+##decimalsep ,
##winlangid 0x0418
##grflangid 0x28
diff --git a/src/lang/russian.txt b/src/lang/russian.txt
index e7fcf8407..5e49f279f 100644
--- a/src/lang/russian.txt
+++ b/src/lang/russian.txt
@@ -5,6 +5,7 @@
##textdir ltr
##digitsep .
##digitsepcur .
+##decimalsep ,
##winlangid 0x0419
##grflangid 0x07
##gender m f n p
diff --git a/src/lang/serbian.txt b/src/lang/serbian.txt
index 9b6a47855..1afa1890d 100644
--- a/src/lang/serbian.txt
+++ b/src/lang/serbian.txt
@@ -5,6 +5,7 @@
##textdir ltr
##digitsep .
##digitsepcur .
+##decimalsep ,
##winlangid 0x7c1a
##grflangid 0x0d
##gender muški ženski srednji
diff --git a/src/lang/simplified_chinese.txt b/src/lang/simplified_chinese.txt
index dce8642ed..3e893d83e 100644
--- a/src/lang/simplified_chinese.txt
+++ b/src/lang/simplified_chinese.txt
@@ -5,6 +5,7 @@
##textdir ltr
##digitsep ,
##digitsepcur ,
+##decimalsep .
##winlangid 0x0804
##grflangid 0x56
diff --git a/src/lang/slovak.txt b/src/lang/slovak.txt
index 7449e3bde..d4b79f239 100644
--- a/src/lang/slovak.txt
+++ b/src/lang/slovak.txt
@@ -5,6 +5,7 @@
##textdir ltr
##digitsep .
##digitsepcur .
+##decimalsep ,
##winlangid 0x041b
##grflangid 0x16
##gender m z s
diff --git a/src/lang/slovenian.txt b/src/lang/slovenian.txt
index 8b4974465..bae42c6f8 100644
--- a/src/lang/slovenian.txt
+++ b/src/lang/slovenian.txt
@@ -5,6 +5,7 @@
##textdir ltr
##digitsep .
##digitsepcur .
+##decimalsep ,
##winlangid 0x0424
##grflangid 0x2c
##case r d t
diff --git a/src/lang/spanish.txt b/src/lang/spanish.txt
index 853453c75..80c81b9a4 100644
--- a/src/lang/spanish.txt
+++ b/src/lang/spanish.txt
@@ -5,6 +5,7 @@
##textdir ltr
##digitsep .
##digitsepcur .
+##decimalsep ,
##winlangid 0x0c0a
##grflangid 0x04
##gender masculino femenino
diff --git a/src/lang/swedish.txt b/src/lang/swedish.txt
index 53e7c9889..e18d12faa 100644
--- a/src/lang/swedish.txt
+++ b/src/lang/swedish.txt
@@ -5,6 +5,7 @@
##textdir ltr
##digitsep .
##digitsepcur .
+##decimalsep ,
##winlangid 0x081d
##grflangid 0x2e
diff --git a/src/lang/traditional_chinese.txt b/src/lang/traditional_chinese.txt
index 748919b85..2b2bb6dda 100644
--- a/src/lang/traditional_chinese.txt
+++ b/src/lang/traditional_chinese.txt
@@ -5,6 +5,7 @@
##textdir ltr
##digitsep ,
##digitsepcur ,
+##decimalsep .
##winlangid 0x0404
##grflangid 0x0c
diff --git a/src/lang/turkish.txt b/src/lang/turkish.txt
index ba93033d3..bd10a4b21 100644
--- a/src/lang/turkish.txt
+++ b/src/lang/turkish.txt
@@ -5,6 +5,7 @@
##textdir ltr
##digitsep .
##digitsepcur .
+##decimalsep ,
##winlangid 0x041f
##grflangid 0x3e
##case tamlanan
diff --git a/src/lang/ukrainian.txt b/src/lang/ukrainian.txt
index 03e62c31f..684ce5295 100644
--- a/src/lang/ukrainian.txt
+++ b/src/lang/ukrainian.txt
@@ -5,6 +5,7 @@
##textdir ltr
##digitsep .
##digitsepcur .
+##decimalsep ,
##winlangid 0x0422
##grflangid 0x33
##gender m f s mn
diff --git a/src/lang/unfinished/frisian.txt b/src/lang/unfinished/frisian.txt
index 4bb332ee6..2183ceb58 100644
--- a/src/lang/unfinished/frisian.txt
+++ b/src/lang/unfinished/frisian.txt
@@ -5,6 +5,7 @@
##textdir ltr
##digitsep .
##digitsepcur .
+##decimalsep ,
##winlangid 0x0462
##grflangid 0x32
diff --git a/src/lang/unfinished/greek.txt b/src/lang/unfinished/greek.txt
index 1b335a8be..2e076e635 100644
--- a/src/lang/unfinished/greek.txt
+++ b/src/lang/unfinished/greek.txt
@@ -5,6 +5,7 @@
##textdir ltr
##digitsep .
##digitsepcur .
+##decimalsep ,
##winlangid 0x0408
##grflangid 0x1e
##gender m f n
diff --git a/src/lang/unfinished/ido.txt b/src/lang/unfinished/ido.txt
index 47fc97338..afd3a8752 100644
--- a/src/lang/unfinished/ido.txt
+++ b/src/lang/unfinished/ido.txt
@@ -5,6 +5,7 @@
##textdir ltr
##digitsep .
##digitsepcur .
+##decimalsep ,
##winlangid 0x0000
##grflangid 0x06
diff --git a/src/lang/unfinished/macedonian.txt b/src/lang/unfinished/macedonian.txt
index 153c2fd3d..d085b365f 100644
--- a/src/lang/unfinished/macedonian.txt
+++ b/src/lang/unfinished/macedonian.txt
@@ -5,6 +5,7 @@
##textdir ltr
##digitsep .
##digitsepcur .
+##decimalsep ,
##winlangid 0x042f
##grflangid 0x26
diff --git a/src/lang/unfinished/malay.txt b/src/lang/unfinished/malay.txt
index 6faaf3fbe..d1e1ca61b 100644
--- a/src/lang/unfinished/malay.txt
+++ b/src/lang/unfinished/malay.txt
@@ -5,6 +5,7 @@
##textdir ltr
##digitsep ,
##digitsepcur ,
+##decimalsep .
##winlangid 0x043a
##grflangid 0x3c
diff --git a/src/lang/unfinished/persian.txt b/src/lang/unfinished/persian.txt
index a8baf1d27..775a67ed0 100644
--- a/src/lang/unfinished/persian.txt
+++ b/src/lang/unfinished/persian.txt
@@ -5,6 +5,7 @@
##textdir rtl
##digitsep ٬
##digitsepcur ٬
+##decimalsep ٫
##winlangid 0x0429
##grflangid 0x62
diff --git a/src/lang/unfinished/thai.txt b/src/lang/unfinished/thai.txt
index 7e0b585ea..ccfcb6b15 100644
--- a/src/lang/unfinished/thai.txt
+++ b/src/lang/unfinished/thai.txt
@@ -5,6 +5,7 @@
##textdir ltr
##digitsep ,
##digitsepcur ,
+##decimalsep .
##winlangid 0x041e
##grflangid 0x42
diff --git a/src/lang/unfinished/urdu.txt b/src/lang/unfinished/urdu.txt
index 8114489bd..ddf6c5d8d 100644
--- a/src/lang/unfinished/urdu.txt
+++ b/src/lang/unfinished/urdu.txt
@@ -5,6 +5,7 @@
##textdir rtl
##digitsep ٬
##digitsepcur ٬
+##decimalsep ٫
##winlangid 0x0420
##grflangid 0x5c
##gender m f
diff --git a/src/lang/unfinished/vietnamese.txt b/src/lang/unfinished/vietnamese.txt
index 8dc13ed3a..5a36e80ee 100644
--- a/src/lang/unfinished/vietnamese.txt
+++ b/src/lang/unfinished/vietnamese.txt
@@ -5,6 +5,7 @@
##textdir ltr
##digitsep ,
##digitsepcur ,
+##decimalsep .
##winlangid 0x042a
##grflangid 0x54
diff --git a/src/lang/welsh.txt b/src/lang/welsh.txt
index 82573f5ab..66da450d7 100644
--- a/src/lang/welsh.txt
+++ b/src/lang/welsh.txt
@@ -5,6 +5,7 @@
##textdir ltr
##digitsep .
##digitsepcur .
+##decimalsep ,
##winlangid 0x0452
##grflangid 0x0f
diff --git a/src/settings_type.h b/src/settings_type.h
index 2a0274a8f..900a6a90e 100644
--- a/src/settings_type.h
+++ b/src/settings_type.h
@@ -103,6 +103,7 @@ struct LocaleSettings {
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
+ char *digit_decimal_separator; ///< decimal separator
};
/** All settings related to the network. */
diff --git a/src/strgen/strgen.cpp b/src/strgen/strgen.cpp
index e8f8de50b..d5213107f 100644
--- a/src/strgen/strgen.cpp
+++ b/src/strgen/strgen.cpp
@@ -74,6 +74,7 @@ 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 char _lang_digit_decimal_separator[8];
static byte _lang_pluralform;
static byte _lang_textdir;
static uint16 _lang_winlangid;
@@ -533,6 +534,9 @@ static void HandlePragma(char *str)
} 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, "decimalsep ", 11)) {
+ str += 11;
+ strecpy(_lang_digit_decimal_separator, strcmp(str, "{NBSP}") == 0 ? "\xC2\xA0" : str, lastof(_lang_digit_decimal_separator));
} else if (!memcmp(str, "winlangid ", 10)) {
const char *buf = str + 10;
long langid = strtol(buf, NULL, 16);
@@ -817,6 +821,7 @@ static void ParseFile(const char *file, bool english)
_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));
+ strecpy(_lang_digit_decimal_separator, ".", lastof(_lang_digit_decimal_separator));
_lang_textdir = TD_LTR;
_lang_winlangid = 0x0000; // neutral language code
_lang_newgrflangid = 0; // standard english
@@ -1069,6 +1074,7 @@ static void WriteLangfile(const char *filename)
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));
+ strecpy(hdr.digit_decimal_separator, _lang_digit_decimal_separator, lastof(hdr.digit_decimal_separator));
fwrite(&hdr, sizeof(hdr), 1, f);
diff --git a/src/strgen/strgen.h b/src/strgen/strgen.h
index 290ee1232..4014f227c 100644
--- a/src/strgen/strgen.h
+++ b/src/strgen/strgen.h
@@ -18,6 +18,8 @@ struct LanguagePackHeader {
char digit_group_separator[8];
/** Thousand separator used for currencies */
char digit_group_separator_currency[8];
+ /** Decimal separator */
+ char digit_decimal_separator[8];
byte plural_form; ///< plural form index
byte text_dir; ///< default direction of the text
/**
diff --git a/src/strings.cpp b/src/strings.cpp
index e05229f1b..bd1b6abaa 100644
--- a/src/strings.cpp
+++ b/src/strings.cpp
@@ -252,13 +252,16 @@ static char *FormatBytes(char *buff, int64 number, const char *last)
id++;
}
+ const char *decimal_separator = _settings_game.locale.digit_decimal_separator;
+ if (decimal_separator == NULL) decimal_separator = _langpack->digit_decimal_separator;
+
if (number < 1024) {
id = 0;
buff += seprintf(buff, last, "%i", (int)number);
} else if (number < 1024 * 10) {
- buff += seprintf(buff, last, "%i.%02i", (int)number / 1024, (int)(number % 1024) * 100 / 1024);
+ buff += seprintf(buff, last, "%i%s%02i", (int)number / 1024, decimal_separator, (int)(number % 1024) * 100 / 1024);
} else if (number < 1024 * 100) {
- buff += seprintf(buff, last, "%i.%01i", (int)number / 1024, (int)(number % 1024) * 10 / 1024);
+ buff += seprintf(buff, last, "%i%s%01i", (int)number / 1024, decimal_separator, (int)(number % 1024) * 10 / 1024);
} else {
assert(number < 1024 * 1024);
buff += seprintf(buff, last, "%i", (int)number / 1024);
diff --git a/src/table/settings.h b/src/table/settings.h
index c3380cca5..5357db9e8 100644
--- a/src/table/settings.h
+++ b/src/table/settings.h
@@ -512,6 +512,7 @@ const SettingDesc _settings[] = {
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, 0, NULL, STR_NULL, NULL),
SDT_CONDSTR(GameSettings, locale.digit_group_separator_currency, SLE_STRQ,118, SL_MAX_VERSION, N, 0, NULL, STR_NULL, NULL),
+ SDT_CONDSTR(GameSettings, locale.digit_decimal_separator, SLE_STRQ,126, SL_MAX_VERSION, N, 0, NULL, STR_NULL, NULL),
/***************************************************************************/
/* Unsaved setting variables. */
diff --git a/src/table/strgen_tables.h b/src/table/strgen_tables.h
index 2af9e6a3b..49f3fad22 100644
--- a/src/table/strgen_tables.h
+++ b/src/table/strgen_tables.h
@@ -186,6 +186,7 @@ static const char *_pragmas[][4] = {
{ "textdir", "tl", "ltr", "Text direction. Either ltr (left-to-right) or rtl (right-to-left)" },
{ "digitsep", "td", ",", "Digit grouping separator for non-currency numbers" },
{ "digitsepcur", "td", ",", "Digit grouping seprarator for currency numbers" },
+ { "decimalsep", "td", ".", "Decimal separator" },
{ "winlangid", "x2", "0x0000", "Language ID for Windows" },
{ "grflangid", "x1", "0x00", "Language ID for NewGRFs" },
{ "gender", "tag", "", "List of genders" },