create_mofiles (GetText)

    # File lib/gettext/utils.rb, line 75
      def create_mofiles(verbose = false,
                         podir = "./po", targetdir = "./data/locale",
                         targetpath_rule = "%s/LC_MESSAGES")

        modir = File.join(targetdir, targetpath_rule)
        Dir.glob(File.join(podir, "*/*.po")) do |file|
          lang, basename = /\/([^\/]+?)\/(.*)\.po/.match(file[podir.size..-1]).to_a[1,2]
          outdir = modir % lang
          FileUtils.mkdir_p(outdir) unless File.directory?(outdir)
          rmsgfmt(file, File.join(outdir, "#{basename}.mo"))
          if verbose
            $stderr.puts %Q[#{file} -> #{File.join(outdir, "#{basename}.mo")}]
          end
        end
      end