lib/gettext/tools.rb
# Merge 2 po files, using msgmerge
Merge 2 po files, using msgmerge
Merge 2 po files using msgmerge
def merge_po_files(po_a,po_b,msgmerge_options=[],verbose=false)
    return File.read(po_b) unless FileTest.exist? po_a
    cmd = ENV["MSGMERGE_PATH"] || "msgmerge"
    ensure_command_exists(cmd)
    remove_bom(po_a)
    cmd_params = array_to_cli_options(msgmerge_options)
    to_run = "#{cmd} #{cmd_params} #{po_a} #{po_b}"
    puts "\nrunning #{to_run}" if verbose
    `#{to_run}`
  end
def merge_po_files ( po_a , po_b , msgmerge_options = [ ] , verbose = false ) return File . read ( po_b ) unless FileTest . exist? po_a cmd = ENV [ "MSGMERGE_PATH" ] || "msgmerge" ensure_command_exists ( cmd ) remove_bom ( po_a ) cmd_params = array_to_cli_options ( msgmerge_options ) to_run = "#{cmd} #{cmd_params} #{po_a} #{po_b}" puts "\nrunning #{to_run}" if verbose ` #{ to_run } ` end
Merge 2 po files, using msgmerge
Merge 2 po files using msgmerge
po_a
<not_specific>
po_b
<not_specific>
msgmerge_options
<not_specific>
verbose
<not_specific>