mirror of
https://github.com/seigler/dash-docs
synced 2025-07-27 01:36:13 +00:00
Allow updatetx.rb to get language code from command line
This commit is contained in:
parent
d21d9089f7
commit
9845007d73
1 changed files with 6 additions and 1 deletions
|
@ -8,7 +8,12 @@ def prompt(*args)
|
||||||
gets
|
gets
|
||||||
end
|
end
|
||||||
|
|
||||||
lang = prompt "Language code: "
|
if ARGV.empty?
|
||||||
|
lang = prompt "Language code: "
|
||||||
|
else
|
||||||
|
lang = ARGV[0]
|
||||||
|
end
|
||||||
|
|
||||||
lang = lang.gsub(/[^a-z]/,'')
|
lang = lang.gsub(/[^a-z]/,'')
|
||||||
|
|
||||||
if !File.exist?('_translations/' + lang + '.yml')
|
if !File.exist?('_translations/' + lang + '.yml')
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue