]> pere.pagekite.me Git - text-madewithcc.git/commitdiff
Avoid hardcoding po file name.
authorPetter Reinholdtsen <pere@hungry.com>
Fri, 16 Feb 2018 07:07:13 +0000 (07:07 +0000)
committerPetter Reinholdtsen <pere@hungry.com>
Thu, 22 Feb 2018 18:12:09 +0000 (18:12 +0000)
fixup-migrate-gettext.rb [changed mode: 0644->0755]

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