Sha256: 7ce9c63246dab2f716a6f45ed35de1d5d55868589050a17cd23661d4837f62f7
Contents?: true
Size: 996 Bytes
Versions: 10
Compression:
Stored size: 996 Bytes
Contents
# ========================================================================== # Generator: Language # Copyright: ©2006-2011 Strobe Inc. and contributors # portions copyright ©2009 Apple Inc. # ========================================================================== namespace :generator do # First argument must be the namespace. Second argument should be the # language we want to add. Generate a filename (foo.lproj) and language # name. task :prepare do long_languages = %w(english french german italian spanish japanese) if language = GENERATOR.arguments[1] if long_languages.include?(language.downcase) GENERATOR.language = language.downcase.capitalize GENERATOR.filename = language.downcase + '.lproj' else GENERATOR.language = language.gsub('_', '-') GENERATOR.filename = language.gsub('-', '_') + '.lproj' end end GENERATOR.requires! :target_project, :target, :language, :filename end end
Version data entries
10 entries across 10 versions & 1 rubygems