Sha256: a671bdfdb6ced8fe45b045b85cff9b58b7fb093bcea5f8d368c9c5643e09dd8a

Contents?: true

Size: 1022 Bytes

Versions: 4

Compression:

Stored size: 1022 Bytes

Contents

# -*- ruby -*-

desc "Update *.po/*.pot files and create *.mo from *.po files"
task :gettext => ["gettext:po:update", "gettext:mo:create"]

namespace :gettext do
  namespace :environment do
    desc "Setup environment for GetText"
    task :setup => :environment do
      require "gettext/utils"
    end
  end

  namespace :po do
    desc "Update po/pot files (GetText)"
    task :update => "gettext:environment:setup" do
      require 'active_ldap/get_text/parser'
      options = {
        # :extract_schema => true, # use this if you have any extra schema.
      }
      GetText::RGetText.add_parser(ActiveLdap::GetText::Parser.new(options))

      files = Dir.glob("{app,lib,components}/**/*.{rb,erb,rxml}")
      GetText.update_pofiles("al-admin", files,
                             "AL Admin #{ActiveLdap::VERSION}")
    end
  end

  namespace :mo do
    desc "Create *.mo from *.po (GetText)"
    task :create => "gettext:environment:setup" do
      GetText.create_mofiles(false, 'po', 'locale')
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
activeldap-0.10.0 examples/al-admin/lib/tasks/gettext.rake
activeldap-1.0.0 examples/al-admin/lib/tasks/gettext.rake
activeldap-1.0.1 examples/al-admin/lib/tasks/gettext.rake
activeldap-1.0.2 examples/al-admin/lib/tasks/gettext.rake