mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-20 10:19:32 -06:00
Script for creating LibraryBrowser???.gf for a new language
This commit is contained in:
16
lib/src/api/libraryBrowser/MkLang.hs
Normal file
16
lib/src/api/libraryBrowser/MkLang.hs
Normal file
@@ -0,0 +1,16 @@
|
||||
|
||||
import System.Environment (getArgs)
|
||||
import Data.List.Utils (replace)
|
||||
|
||||
name = "LibraryBrowserEng.gf"
|
||||
|
||||
main = do
|
||||
a <- getArgs
|
||||
case a of
|
||||
lang:_ -> do
|
||||
contents <- readFile name
|
||||
let name' = replace "Eng" lang name
|
||||
let contents' = replace "Eng" lang contents
|
||||
writeFile name' contents'
|
||||
putStrLn $ "Wrote " ++ name'
|
||||
_ -> print "You need to provide a language code"
|
||||
Reference in New Issue
Block a user