]> pere.pagekite.me Git - text-madewithcc.git/blobdiff - fixup-migrate-gettext.rb
Avoid hardcoding po file name.
[text-madewithcc.git] / fixup-migrate-gettext.rb
old mode 100644 (file)
new mode 100755 (executable)
index 9bb7ec8..eb255da
@@ -58,5 +58,7 @@ class PoStr
   end
 end
 
-file = 'po/es/mwcc.po'
+raise ArgumentError, 'Source file not specified' if ARGV.size != 1
+file = ARGV[0]
 strings = File.open(file,'r').read.split(/\n\n/)[1..-1].map {|str| PoStr.new(str)}
+print strings