Sha256: 5c8de78535d85f647e3a94b2f75c709f022ff256f376bcd8880635232536eb41

Contents?: true

Size: 1018 Bytes

Versions: 17

Compression:

Stored size: 1018 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] || 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

17 entries across 17 versions & 1 rubygems

Version Path
sproutcore-1.11.0 lib/gen/language/Buildfile
sproutcore-1.11.0.rc3 lib/gen/language/Buildfile
sproutcore-1.11.0.rc2 lib/gen/language/Buildfile
sproutcore-1.11.0.rc1 lib/gen/language/Buildfile
sproutcore-1.10.3.1 lib/gen/language/Buildfile
sproutcore-1.10.2 lib/gen/language/Buildfile
sproutcore-1.10.1 lib/gen/language/Buildfile
sproutcore-1.10.0 lib/gen/language/Buildfile
sproutcore-1.10.0.rc.3 lib/gen/language/Buildfile
sproutcore-1.10.0.rc.2 lib/gen/language/Buildfile
sproutcore-1.10.0.rc.1 lib/gen/language/Buildfile
sproutcore-1.9.2 lib/gen/language/Buildfile
sproutcore-1.9.1 lib/gen/language/Buildfile
sproutcore-1.9.0 lib/gen/language/Buildfile
sproutcore-1.8.2.1 lib/gen/language/Buildfile
sproutcore-1.8.1 lib/gen/language/Buildfile
sproutcore-1.8.0 lib/gen/language/Buildfile