Sha256: b78de9cb4929cadc978804cb9a7e8b3ed5ad1ba59c7c0df9e105b4841ba80e13

Contents?: true

Size: 679 Bytes

Versions: 99

Compression:

Stored size: 679 Bytes

Contents

gettext_find_task = begin
                      Rake::Task['gettext:find']
                    rescue
                      nil
                    end

if gettext_find_task
  namespace :gettext do
    task :store_action_names => :environment do
      storage_file = "#{locale_path}/action_names.rb"
      puts "writing action translations to: #{storage_file}"

      File.write storage_file,
                 "# Autogenerated!\n" +
                 Actions::EntryAction
                 .all_action_names
                 .uniq
                 .map { |n| %[_("#{n}")] }
                 .join("\n")
    end
  end

  gettext_find_task.enhance ['gettext:store_action_names']
end

Version data entries

99 entries across 99 versions & 1 rubygems

Version Path
foreman-tasks-0.12.0 lib/tasks/gettext.rake
foreman-tasks-0.11.1 lib/tasks/gettext.rake
foreman-tasks-0.10.9 lib/tasks/gettext.rake
foreman-tasks-0.11.0 lib/tasks/gettext.rake
foreman-tasks-0.10.8 lib/tasks/gettext.rake
foreman-tasks-0.10.7 lib/tasks/gettext.rake
foreman-tasks-0.10.6 lib/tasks/gettext.rake
foreman-tasks-0.10.4 lib/tasks/gettext.rake
foreman-tasks-0.9.6 lib/tasks/gettext.rake
foreman-tasks-0.10.3 lib/tasks/gettext.rake
foreman-tasks-0.10.2 lib/tasks/gettext.rake
foreman-tasks-0.10.1 lib/tasks/gettext.rake
foreman-tasks-0.9.5 lib/tasks/gettext.rake
foreman-tasks-0.10.0 lib/tasks/gettext.rake
foreman-tasks-0.9.4 lib/tasks/gettext.rake
foreman-tasks-0.9.3 lib/tasks/gettext.rake
foreman-tasks-0.9.2 lib/tasks/gettext.rake
foreman-tasks-0.9.1 lib/tasks/gettext.rake
foreman-tasks-0.9.0 lib/tasks/gettext.rake