Sha256: 770f6eb493a01c43e422b9e9f1ad69e6e9111f6fa1221d4fb1f08eec50875912
Contents?: true
Size: 693 Bytes
Versions: 19
Compression:
Stored size: 693 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\-]+):(.*)/m 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
19 entries across 19 versions & 1 rubygems