Sha256: a2c73dd728e8bf01a57ec3dd21f2eb315f9725e3015f742355cfbceebbc40b21

Contents?: true

Size: 996 Bytes

Versions: 20

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[2]
      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

20 entries across 20 versions & 1 rubygems

Version Path
sproutcore-1.6.0.rc.1-x86-mingw32 lib/gen/language/Buildfile
sproutcore-1.6.0.rc.1 lib/gen/language/Buildfile
sproutcore-1.6.0.rc.1-java lib/gen/language/Buildfile
sproutcore-1.6.0.beta.3-x86-mingw32 lib/gen/language/Buildfile
sproutcore-1.6.0.beta.3-java lib/gen/language/Buildfile
sproutcore-1.6.0.beta.3 lib/gen/language/Buildfile
sproutcore-1.6.0.beta.2-x86-mingw32 lib/gen/language/Buildfile
sproutcore-1.6.0.beta.2-java lib/gen/language/Buildfile
sproutcore-1.6.0.beta.2 lib/gen/language/Buildfile
sproutcore-1.6.0.beta.1 lib/gen/language/Buildfile
sproutcore-1.5.0-java lib/gen/language/Buildfile
sproutcore-1.5.0 lib/gen/language/Buildfile
sproutcore-1.5.0.rc.2 lib/gen/language/Buildfile
sproutcore-1.5.0.rc.1 lib/gen/language/Buildfile
sproutcore-1.5.0.pre.5 lib/gen/language/Buildfile
sproutcore-1.5.0.pre.4.1 lib/gen/language/Buildfile
sproutcore-1.5.0.pre.4 lib/gen/language/Buildfile
sproutcore-1.5.0.pre.3 lib/gen/language/Buildfile
sproutcore-1.4.5 lib/gen/language/Buildfile
sproutcore-1.4.5-java lib/gen/language/Buildfile