Created
January 19, 2019 19:38
-
-
Save rugk/b7886c7332dac68d9b83ed534b5062e0 to your computer and use it in GitHub Desktop.
OSM "level" translation in fluent
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### input data: ground floor = level 0 | |
### for OSM "level" tag, see https://wiki.openstreetmap.org/wiki/Key:level | |
### KNOWN BUGS: | |
### 1. I cannot remove the minus (-) sign from negative levels. See https://github.com/projectfluent/fluent/issues/228 | |
### 2. I cannot properly calculate +1 for the US style. See https://github.com/projectfluent/fluent/issues/227 | |
## Style, where floor = level 0 = input data | |
# German/European style in German | |
# Note: this should sound "FAMILAR" to speakers of German | |
floor_EUROP_in_DE = | |
{ $level -> | |
[-2] im { $level }. Untergeschoss | |
[-1] im 1. Untergeschoss | |
[0] im Erdgeschoss | |
[one] im 1. Obergeschoss | |
*[other] im { $level }. Obergeschoss | |
} | |
# German/European style but translated in English | |
# Note: this should sound "WRONG" to speakers of US-English, but familar to speakers in GB-English. | |
floor_EUROP_in_EN = | |
{ $level -> | |
[-2] on basement floor { $level } | |
[-1] basement floor 1 | |
[0] on ground floor | |
[one] on floor one | |
*[other] on floor { $level } | |
} | |
## Style, where ground floor = level 1 | |
# US style in English | |
# Note: this should sound "FAMILIAR" to speakers of English | |
floor_ENGLI_in_EN = | |
{ $level -> | |
[-2] on basement floor B{ $level } | |
[-1] on basement floor B | |
[0] on ground floor | |
[one] on floor 2 | |
*[other] on floor { $level }+1 | |
} | |
# US style in German | |
# Note: this should sound "WRONG" to speakers of German. | |
floor_ENGLI_in_DE = | |
{ $level -> | |
[-2] im Untergeschoss B{ $level } | |
[-1] Im Untergeschoss B | |
[0] im Erdgeschoss | |
[one] im 2. Obergeschoss | |
*[other] im { $level }+1. Geschoss | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"level": 1 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"locale": "en-US", | |
"dir": "ltr" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment