Sha256: 6f718699a9425a1b6263c20e10c98cc2e1b35853d69545041c408d8ada059cf7
Contents?: true
Size: 1.04 KB
Versions: 5
Compression:
Stored size: 1.04 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_rails/tools' Locale.module_eval("@@locale_driver_module = nil") 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 end end end
Version data entries
5 entries across 5 versions & 1 rubygems