Sha256: 2241f00855a8e60aa5933890715c6d3587ea35bf7c8fa10f83dfb477559d5be9
Contents?: true
Size: 1.04 KB
Versions: 1
Compression:
Stored size: 1.04 KB
Contents
require 'colorize' require "icapps/translations/http" require "icapps/translations/import/base" module Icapps module Translations module Import class Xcode < Base class << self def fetch_language_file(language) short_name = language['short_name'] puts "[VERBOSE] Fetching #{short_name} translations.".colorize(:white) if options[:verbose] string_files = Dir.glob("**/#{short_name}.lproj/#{config.filename}") if string_files.count == 0 puts "[WARNING] No 'Localizable.string' file found for the #{short_name} language.".colorize(:yellow) elsif string_files.count > 1 puts "[WARNING] Multiple 'Localizable.string' files found for the #{short_name} language.".colorize(:yellow) else strings = ::Icapps::Translations::Http.authenticated_response("translations/#{language['id']}.strings") write_to_file strings, string_files, language end end end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
icapps-translations-0.2.0 | lib/icapps/translations/import/xcode.rb |