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-4.1.1 lib/tasks/gettext.rake
foreman-tasks-4.0.1 lib/tasks/gettext.rake
foreman-tasks-4.1.0 lib/tasks/gettext.rake
foreman-tasks-3.0.5 lib/tasks/gettext.rake
foreman-tasks-4.0.0 lib/tasks/gettext.rake
foreman-tasks-3.0.4 lib/tasks/gettext.rake
foreman-tasks-2.0.3 lib/tasks/gettext.rake
foreman-tasks-3.0.3 lib/tasks/gettext.rake
foreman-tasks-3.0.2 lib/tasks/gettext.rake
foreman-tasks-3.0.1 lib/tasks/gettext.rake
foreman-tasks-3.0.0 lib/tasks/gettext.rake
foreman-tasks-2.0.2 lib/tasks/gettext.rake
foreman-tasks-1.1.3 lib/tasks/gettext.rake
foreman-tasks-1.1.2 lib/tasks/gettext.rake
foreman-tasks-2.0.1 lib/tasks/gettext.rake
foreman-tasks-2.0.0 lib/tasks/gettext.rake
foreman-tasks-1.2.0 lib/tasks/gettext.rake
foreman-tasks-1.1.1 lib/tasks/gettext.rake
foreman-tasks-1.1.0 lib/tasks/gettext.rake
foreman-tasks-0.17.6 lib/tasks/gettext.rake