diff --git a/lib/src/urdu/TextUrd.gf b/lib/src/urdu/TextUrd.gf new file mode 100644 index 000000000..13b1396a1 --- /dev/null +++ b/lib/src/urdu/TextUrd.gf @@ -0,0 +1,11 @@ +concrete TextUrd of Text = CommonX - [Temp,TTAnt,Tense,TPres,TPast,TFut,TCond] ** { + +-- This works for the special punctuation marks of Urdu but still browser does not display them well so left balnk. + + lin + TEmpty = {s = []} ; + TFullStop x xs = {s = x.s ++ "" ++ xs.s} ; + TQuestMark x xs = {s = x.s ++ "" ++ xs.s} ; + TExclMark x xs = {s = x.s ++ "" ++ xs.s} ; + +} diff --git a/lib/src/urdu/src/TextUrd.gf b/lib/src/urdu/src/TextUrd.gf new file mode 100644 index 000000000..6358e93cd --- /dev/null +++ b/lib/src/urdu/src/TextUrd.gf @@ -0,0 +1,11 @@ +concrete TextUrd of Text = CommonX - [Temp,TTAnt,Tense,TPres,TPast,TFut,TCond] ** { + +-- This works for the special punctuation marks of Urdu. + + lin + TEmpty = {s = []} ; + TFullStop x xs = {s = x.s ++ "." ++ xs.s} ; + TQuestMark x xs = {s = x.s ++ "?" ++ xs.s} ; + TExclMark x xs = {s = x.s ++ "" ++ xs.s} ; + +} diff --git a/lib/src/urdu/translit.gfs b/lib/src/urdu/translit.gfs index 65b70e13f..be95fb96f 100644 --- a/lib/src/urdu/translit.gfs +++ b/lib/src/urdu/translit.gfs @@ -9,5 +9,6 @@ rf -file=src/LexiconUrd.gf | ps -env=quotes -to_urdu | wf -file=LexiconUrd.gf rf -file=src/MorphoUrd.gf | ps -env=quotes -to_urdu | wf -file=MorphoUrd.gf rf -file=src/StructuralUrd.gf | ps -env=quotes -to_urdu | wf -file=StructuralUrd.gf rf -file=src/NumeralUrd.gf | ps -env=quotes -to_urdu | wf -file=NumeralUrd.gf +rf -file=src/TextUrd.gf | ps -env=quotes -to_urdu | wf -file=TextUrd.gf diff --git a/src/compiler/GF/Text/Transliterations.hs b/src/compiler/GF/Text/Transliterations.hs index aaefc6f1d..31059265a 100644 --- a/src/compiler/GF/Text/Transliterations.hs +++ b/src/compiler/GF/Text/Transliterations.hs @@ -137,13 +137,13 @@ transUrdu = (mkTransliteration "Urdu" allTrans allCodes) where allCodes = [0x0622 .. 0x062f] ++ [0x0630 .. 0x063a] ++ [0x0641 .. 0x0648] ++ [0x0654,0x0658,0x0679,0x067e,0x0686,0x0688,0x0691,0x0698,0x06af,0x06c1,0x06c3,0x06cc,0x06ba,0x06be,0x06d2] ++ - [0x06f0 .. 0x06f9] + [0x06f0 .. 0x06f9] ++ [0x061f,0x06D4] allTrans = words $ "A - w^ - y^ a b - t C j H K d " ++ -- 0622 - 062f "Z r z s X S Z- t- z- e G " ++ -- 0630 - 063a "f q k l m n - w " ++ -- 0641 - 0648 "$ n- T p c D R x g h t: y N h' E " ++ -- 0654,658,679,67e,686,688,698,6af,6c1,6c3,6cc,6ba,6be,6d2 - "N0 N1 N2 N3 N4 N5 N6 N7 N8 N9 " + "N0 N1 N2 N3 N4 N5 N6 N7 N8 N9 " ++ "? ." transArabic :: Transliteration