check_language.rb: Added basepath (script is now callable from everywhere)
This commit is contained in:
parent
14a76d2c95
commit
5df472fe11
|
@ -19,8 +19,6 @@
|
||||||
# along with Yaaic. If not, see <http://www.gnu.org/licenses/>.
|
# along with Yaaic. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
# TODO: Maybe check all existing languages instead of using a paremter
|
# TODO: Maybe check all existing languages instead of using a paremter
|
||||||
# TODO: Add a basepath to the files (this script should be callable from
|
|
||||||
# everyhwere
|
|
||||||
# TODO: Use a XML parser instead of reading lines
|
# TODO: Use a XML parser instead of reading lines
|
||||||
|
|
||||||
if ARGV.length != 1 then
|
if ARGV.length != 1 then
|
||||||
|
@ -28,10 +26,11 @@ if ARGV.length != 1 then
|
||||||
exit
|
exit
|
||||||
end
|
end
|
||||||
|
|
||||||
language = ARGV[0]
|
base_path = File.dirname(__FILE__)
|
||||||
|
language = ARGV[0]
|
||||||
|
|
||||||
original_file = "../res/values/strings.xml"
|
original_file = "#{base_path}/../res/values/strings.xml"
|
||||||
language_file = "../res/values-#{language}/strings.xml"
|
language_file = "#{base_path}/../res/values-#{language}/strings.xml"
|
||||||
|
|
||||||
if !File.exists? language_file then
|
if !File.exists? language_file then
|
||||||
puts "File does not exists: #{language_file}"
|
puts "File does not exists: #{language_file}"
|
||||||
|
|
Loading…
Reference in New Issue