Sha256: 7d3e33507f46e09936dfc2cf9d36e74707a537d783a136c1b1d00a94eb7153cd
Contents?: true
Size: 757 Bytes
Versions: 11
Compression:
Stored size: 757 Bytes
Contents
module Localeapp module CLI class Add def initialize(output = $stdout) @output = output end 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
11 entries across 11 versions & 1 rubygems