    # File lib/gettext/tools.rb, line 121
      def update_pofiles(textdomain, files, app_version, options = {})
        puts options.inspect if options[:verbose]

        #write found messages to tmp.pot
        temp_pot = "tmp.pot"
        rgettext(files, temp_pot)

        #merge tmp.pot and existing pot
        po_root = options.delete(:po_root) || "po"
        FileUtils.mkdir_p(po_root)
        msgmerge("#{po_root}/#{textdomain}.pot", temp_pot, app_version, options.dup)

        #update local po-files
        only_one_language = options.delete(:lang)
        if only_one_language
          msgmerge("#{po_root}/#{only_one_language}/#{textdomain}.po", temp_pot, app_version, options.dup)
        else
          Dir.glob("#{po_root}/*/#{textdomain}.po") do |po_file|
            msgmerge(po_file, temp_pot, app_version, options.dup)
          end
        end

        File.delete(temp_pot)
      end