mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-06-27 20:06:29 -06:00
comma instead of dot and space separator in Romance decimals
This commit is contained in:
@@ -189,11 +189,12 @@ concrete NumeralPor of Numeral = CatPor [Numeral,Digits,Decimal] **
|
||||
Dig = TDigit ;
|
||||
|
||||
lin
|
||||
IDig d = d ;
|
||||
IDig d = d ** {tail = T1} ;
|
||||
|
||||
IIDig d i = {
|
||||
s = \\o => d.s ! NCard Masc ++ BIND ++ i.s ! o ;
|
||||
n = Pl
|
||||
s = \\o => d.s ! NCard Masc ++ spaceIf i.tail ++ i.s ! o ;
|
||||
n = Pl ;
|
||||
tail = inc i.tail
|
||||
} ;
|
||||
|
||||
D_0 = mkDig "0" Sg ;
|
||||
@@ -215,12 +216,24 @@ concrete NumeralPor of Numeral = CatPor [Numeral,Digits,Decimal] **
|
||||
} ;
|
||||
IFrac d i = {
|
||||
s = \\o => d.s ! NCard Masc ++
|
||||
if_then_Str d.hasDot BIND (BIND++"."++BIND) ++
|
||||
if_then_Str d.hasDot BIND (BIND++","++BIND) ++
|
||||
i.s ! o;
|
||||
n = Pl ;
|
||||
hasDot=True
|
||||
} ;
|
||||
|
||||
oper
|
||||
spaceIf : DTail -> Str = \t -> case t of {
|
||||
T3 => SOFT_SPACE ;
|
||||
_ => BIND
|
||||
} ;
|
||||
|
||||
inc : DTail -> DTail = \t -> case t of {
|
||||
T1 => T2 ;
|
||||
T2 => T3 ;
|
||||
T3 => T1
|
||||
} ;
|
||||
|
||||
oper
|
||||
mk4Dig : Str -> Str -> Str -> Number -> TDigit = \c,o,a,n -> {
|
||||
s = table {
|
||||
|
||||
Reference in New Issue
Block a user