|
# to allow in-place run
|
|
$: << File.join(File.dirname(__FILE__), ".", "lib")
|
|
|
|
ENV['LC_ALL'] = "C"
|
|
|
|
require 'rake'
|
|
require 'gettext/tools'
|
|
require 'lib/cyborghood/base/config_setup'
|
|
require 'lib/cyborghood/base/info'
|
|
|
|
namespace :i18n do
|
|
desc "Create mo-files for l10n"
|
|
task :makemo do
|
|
GetText.create_mofiles(true, "po", CyborgHood::Config::L10N_DIR)
|
|
end
|
|
|
|
desc "Update pot/po files to match new version."
|
|
task :updatepo do
|
|
GetText.update_pofiles("cyborghood",
|
|
Dir.glob("lib/**/*.{rb,rhtml}"),
|
|
CyborgHood::PRODUCT + " " + CyborgHood::VERSION)
|
|
# temporary component listing
|
|
["postman"].each do |component|
|
|
GetText.update_pofiles("cyborghood_" + component,
|
|
File.join(CyborgHood::Config::BIN_DIR, component),
|
|
CyborgHood::PRODUCT + " " + CyborgHood::VERSION)
|
|
end
|
|
end
|
|
end
|