From 9845007d73ba6cd97b8e3c10c9dad4733456a018 Mon Sep 17 00:00:00 2001 From: Saivann Date: Wed, 19 Mar 2014 23:41:10 -0400 Subject: [PATCH] Allow updatetx.rb to get language code from command line --- _contrib/updatetx.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/_contrib/updatetx.rb b/_contrib/updatetx.rb index 8f713996..55039c0e 100755 --- a/_contrib/updatetx.rb +++ b/_contrib/updatetx.rb @@ -8,7 +8,12 @@ def prompt(*args) gets end -lang = prompt "Language code: " +if ARGV.empty? + lang = prompt "Language code: " +else + lang = ARGV[0] +end + lang = lang.gsub(/[^a-z]/,'') if !File.exist?('_translations/' + lang + '.yml')