Sha256: d3b341b57a4eb26be17e8b586f5d24c0594d50827046adb839cf31d1c5c28fb0

Contents?: true

Size: 714 Bytes

Versions: 1

Compression:

Stored size: 714 Bytes

Contents

#!/usr/bin/env ruby
require 'babel_diff'

help = <<-HELP
usages: 

babel_import <import_dir> <phrase_dir> [defaults to 'config/locales/']

Imports all phrase files in the <import_dir> and merges them with the phrase files in <phrase_dir>.
Existing keys will be overwritten.

babel_diff <phrase_file_path> [defaults to 'config/locales/phrase.en.yml']

Produces two files containing all updates and all additions to the given phrase file located at <phrase_file_path> since babel_diff last ran.

HELP


case ARGV.first
when nil
  puts help
  exit 1
when "--help"
  puts help
  exit 0
else
  if ARGV[1]
    BabelDiff.import_translations(ARGV[0], ARGV[1])
  else
    BabelDiff.import_translations(ARGV[0])
  end
end


Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
babel_diff-1.1.0 bin/babel_import