mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-28 09:28:54 -06:00
Add column for language name in languages.csv
This will be used for listing languages in Synopsis
This commit is contained in:
20
Config.hs
20
Config.hs
@@ -15,6 +15,7 @@ configFile = "languages.csv"
|
|||||||
-- | Information about a language
|
-- | Information about a language
|
||||||
data LangInfo = LangInfo
|
data LangInfo = LangInfo
|
||||||
{ langCode :: String -- ^ 3-letter ISO 639-2/B code
|
{ langCode :: String -- ^ 3-letter ISO 639-2/B code
|
||||||
|
, langName :: String -- ^ language name
|
||||||
, langDir :: String -- ^ directory name
|
, langDir :: String -- ^ directory name
|
||||||
, langFunctor :: Maybe String -- ^ functor (not used)
|
, langFunctor :: Maybe String -- ^ functor (not used)
|
||||||
, langUnlexer :: Maybe String -- ^ decoding for postprocessing linearizations
|
, langUnlexer :: Maybe String -- ^ decoding for postprocessing linearizations
|
||||||
@@ -44,15 +45,16 @@ loadLangsFrom configFile = do
|
|||||||
then die $ "Invalid entry in " ++ configFile ++ ": " ++ s
|
then die $ "Invalid entry in " ++ configFile ++ ": " ++ s
|
||||||
else return $ LangInfo
|
else return $ LangInfo
|
||||||
{ langCode = bits !! 0
|
{ langCode = bits !! 0
|
||||||
, langDir = bits !! 1
|
, langName = bits !! 1
|
||||||
, langFunctor = maybeBit bits 2
|
, langDir = bits !! 2
|
||||||
, langUnlexer = maybeBit bits 3
|
, langFunctor = maybeBit bits 3
|
||||||
, langPresent = boolBit bits 4 False
|
, langUnlexer = maybeBit bits 4
|
||||||
, langAll = boolBit bits 5 True
|
, langPresent = boolBit bits 5 False
|
||||||
, langTry = boolBit bits 6 True
|
, langAll = boolBit bits 6 True
|
||||||
, langSymbolic = boolBit bits 7 True
|
, langTry = boolBit bits 7 True
|
||||||
, langCompatibility = boolBit bits 8 False
|
, langSymbolic = boolBit bits 8 True
|
||||||
, langSynopsis = boolBit bits 9 False
|
, langCompatibility = boolBit bits 9 False
|
||||||
|
, langSynopsis = boolBit bits 10 False
|
||||||
}
|
}
|
||||||
|
|
||||||
-- | Separate a string on a character
|
-- | Separate a string on a character
|
||||||
|
|||||||
10
Make.sh
10
Make.sh
@@ -6,11 +6,11 @@
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
# Get languages from config
|
# Get languages from config
|
||||||
langs=$(tail -n +2 languages.csv | awk -F ',' '{ if ($6 != "n") { print $1 } }')
|
langs=$(tail -n +2 languages.csv | awk -F ',' '{ if ($7 != "n") { print $1 } }')
|
||||||
langs_present=$(tail -n +2 languages.csv | awk -F ',' '{ if ($5 == "y") { print $1 } }')
|
langs_present=$(tail -n +2 languages.csv | awk -F ',' '{ if ($6 == "y") { print $1 } }')
|
||||||
langs_try=$(tail -n +2 languages.csv | awk -F ',' '{ if ($7 != "n") { print $1 } }')
|
langs_try=$(tail -n +2 languages.csv | awk -F ',' '{ if ($8 != "n") { print $1 } }')
|
||||||
langs_symbolic=$(tail -n +2 languages.csv | awk -F ',' '{ if ($8 != "n") { print $1 } }')
|
langs_symbolic=$(tail -n +2 languages.csv | awk -F ',' '{ if ($9 != "n") { print $1 } }')
|
||||||
langs_compat=$(tail -n +2 languages.csv | awk -F ',' '{ if ($9 == "y") { print $1 } }')
|
langs_compat=$(tail -n +2 languages.csv | awk -F ',' '{ if ($10 == "y") { print $1 } }')
|
||||||
|
|
||||||
# Modules to compile for each language
|
# Modules to compile for each language
|
||||||
modules_langs="All Symbol Compatibility"
|
modules_langs="All Symbol Compatibility"
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ This file should be kept up-to-date and all build methods should read this confi
|
|||||||
| Column | Description | Default |
|
| Column | Description | Default |
|
||||||
|:--------------|:-----------------------------------------|:-------:|
|
|:--------------|:-----------------------------------------|:-------:|
|
||||||
| Code | e.g. `Eng` | - |
|
| Code | e.g. `Eng` | - |
|
||||||
|
| Name | language name in English, e.g. `English` | - |
|
||||||
| Directory | folder name under `src`, e.g. `english` | - |
|
| Directory | folder name under `src`, e.g. `english` | - |
|
||||||
| Functor | (not used) | - |
|
| Functor | (not used) | - |
|
||||||
| Unlexer | (not used) | - |
|
| Unlexer | (not used) | - |
|
||||||
|
|||||||
@@ -1,45 +1,45 @@
|
|||||||
Code,Directory,Functor,Unlexer,Present,All,Try,Symbolic,Compatibility,Synopsis
|
Code,Name,Directory,Functor,Unlexer,Present,All,Try,Symbolic,Compatibility,Synopsis
|
||||||
Afr,afrikaans,,,,,,n,,y
|
Afr,Afrikaans,afrikaans,,,,,,n,,y
|
||||||
Amh,amharic,,,,,n,n,,n
|
Amh,Amharic,amharic,,,,,n,n,,n
|
||||||
Ara,arabic,,,,,,y,,y
|
Ara,Arabic,arabic,,,,,,y,,y
|
||||||
Bul,bulgarian,,,y,,,,,y
|
Bul,Bulgarian,bulgarian,,,y,,,,,y
|
||||||
Cat,catalan,Romance,,y,,,,y,y
|
Cat,Catalan,catalan,Romance,,y,,,,y,y
|
||||||
Chi,chinese,,,,,,,,y
|
Chi,Chinese (simplified),chinese,,,,,,,,y
|
||||||
Dan,danish,Scand,,y,,,,,y
|
Dan,Danish,danish,Scand,,y,,,,,y
|
||||||
Dut,dutch,,,y,,,,,y
|
Dut,Dutch,dutch,,,y,,,,,y
|
||||||
Eng,english,,,y,,,,y,y
|
Eng,English,english,,,y,,,,y,y
|
||||||
Est,estonian,,,,,,,,y
|
Est,Estonian,estonian,,,,,,,,y
|
||||||
Eus,basque,,,,,,,,y
|
Eus,Basque,basque,,,,,,,,y
|
||||||
Fin,finnish,,,y,,,,y,y
|
Fin,Finnish,finnish,,,y,,,,y,y
|
||||||
Fre,french,Romance,,y,,,,y,y
|
Fre,French,french,Romance,,y,,,,y,y
|
||||||
Ger,german,,,,,,,,y
|
Ger,German,german,,,,,,,,y
|
||||||
Grc,ancient_greek,,,y,,n,n,,n
|
Grc,Ancient Greek,ancient_greek,,,y,,n,n,,n
|
||||||
Gre,greek,,,,,,,,y
|
Gre,Greek,greek,,,,,,,,y
|
||||||
Heb,hebrew,,,,,n,n,,n
|
Heb,Hebrew,hebrew,,,,,n,n,,n
|
||||||
Hin,hindi,Hindustani,to_devanagari,y,,,,,y
|
Hin,Hindi,hindi,Hindustani,to_devanagari,y,,,,,y
|
||||||
Hun,hungarian,,,y,n,n,n,,n
|
Hun,Hungarian,hungarian,,,y,n,n,n,,n
|
||||||
Ice,icelandic,,,,,,n,,y
|
Ice,Icelandic,icelandic,,,,,,n,,y
|
||||||
Ina,interlingua,,,y,,n,n,,n
|
Ina,Interlingua,interlingua,,,y,,n,n,,n
|
||||||
Ita,italian,Romance,,y,,,,y,y
|
Ita,Italian,italian,Romance,,y,,,,y,y
|
||||||
Jpn,japanese,,,,,,,,y
|
Jpn,Japanese,japanese,,,,,,,,y
|
||||||
Lat,latin,,,y,,n,n,,n
|
Lat,Latin,latin,,,y,,n,n,,n
|
||||||
Lav,latvian,,,,,,,y,y
|
Lav,Latvian,latvian,,,,,,,y,y
|
||||||
Mlt,maltese,,,,,,,,y
|
Mlt,Maltese,maltese,,,,,,,,y
|
||||||
Mon,mongolian,,,,,,n,,y
|
Mon,Mongolian,mongolian,,,,,,n,,y
|
||||||
Nep,nepali,,,,,,n,,y
|
Nep,Nepali,nepali,,,,,,n,,y
|
||||||
Nno,nynorsk,,,y,,,,,y
|
Nno,Norwegian (nynorsk),nynorsk,,,y,,,,,y
|
||||||
Nor,norwegian,Scand,,y,,,,,y
|
Nor,Norwegian (bokmål),norwegian,Scand,,y,,,,,y
|
||||||
Pes,persian,,,,,,,,y
|
Pes,Persian,persian,,,,,,,,y
|
||||||
Pnb,punjabi,,,y,,,,,y
|
Pnb,Punjabi,punjabi,,,y,,,,,y
|
||||||
Pol,polish,,,,,,,,y
|
Pol,Polish,polish,,,,,,,,y
|
||||||
Por,portuguese,Romance,,y,,,,y,y
|
Por,Portuguese,portuguese,Romance,,y,,,,y,y
|
||||||
Ron,romanian,,,y,,,,,y
|
Ron,Pomanian,romanian,,,y,,,,,y
|
||||||
Rus,russian,,,y,,,,,y
|
Rus,Russian,russian,,,y,,,,,y
|
||||||
Snd,sindhi,,,,,,,,y
|
Snd,Sindhi,sindhi,,,,,,,,y
|
||||||
Spa,spanish,Romance,,y,,,,y,y
|
Spa,Spanish,spanish,Romance,,y,,,,y,y
|
||||||
Swa,swahili,,,,n,n,n,y,n
|
Swa,Swahili,swahili,,,,n,n,n,y,n
|
||||||
Swe,swedish,Scand,,y,,,,y,y
|
Swe,Swedish,swedish,Scand,,y,,,,y,y
|
||||||
Tel,telugu,,,y,n,n,n,,n
|
Tel,Telugu,telugu,,,y,n,n,n,,n
|
||||||
Tha,thai,,to_thai,,,,,,y
|
Tha,Thai,thai,,to_thai,,,,,,y
|
||||||
Tur,turkish,,,,,n,n,,n
|
Tur,Turkish,turkish,,,,,n,n,,n
|
||||||
Urd,urdu,Hindustani,,,,,,,y
|
Urd,Urdu,urdu,Hindustani,,,,,,,y
|
||||||
|
|||||||
|
Reference in New Issue
Block a user