forked from theforeman/hammer-cli-foreman-tasks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
26 lines (22 loc) · 730 Bytes
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
require 'bundler/gem_tasks'
namespace :gettext do
desc "Update pot file"
task :setup do
require "hammer_cli_foreman_tasks/version"
require "hammer_cli_foreman_tasks/i18n"
require 'gettext/tools/task'
domain = HammerCLIForemanTasks::I18n::LocaleDomain.new
GetText::Tools::Task.define do |task|
task.package_name = domain.domain_name
task.package_version = HammerCLIForemanTasks.version.to_s
task.domain = domain.domain_name
task.mo_base_directory = domain.locale_dir
task.po_base_directory = domain.locale_dir
task.files = domain.translated_files
end
end
desc "Update pot file"
task :find => [:setup] do
Rake::Task["gettext:po:update"].invoke
end
end