Sha256: c136ffdd5bfbec182b0356511cf896802840dd378c8280ba6171f58c0283afe7
Contents?: true
Size: 692 Bytes
Versions: 22
Compression:
Stored size: 692 Bytes
Contents
module Localeapp module CLI class Add < Command def execute(key, *translations) @output.puts "Localeapp Add" @output.puts "" translations.each do |translation| if translation =~ /([\w\-]+):(.*)/ locale, description = $1, $2 Localeapp.missing_translations.add(locale, key, description) else @output.puts "Ignoring bad translation #{translation}" @output.puts "format should be <locale>:<translation content>" end end @output.puts "Sending key: #{key}" Localeapp.sender.post_missing_translations @output.puts "Success!" end end end end
Version data entries
22 entries across 22 versions & 1 rubygems