Sha256: e0b2383bc5c861e62acff94230c0f7d925de1b1e973333614b0fe4568ec88553

Contents?: true

Size: 1 KB

Versions: 2

Compression:

Stored size: 1 KB

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,rhtml,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

2 entries across 2 versions & 2 rubygems

Version Path
activeldap-0.9.0 examples/al-admin/lib/tasks/gettext.rake
ruby-activeldap-0.8.3.1 examples/al-admin/lib/tasks/gettext.rake