lib/tasks/gettext.rake in foreman-tasks-0.8.6 vs lib/tasks/gettext.rake in foreman-tasks-0.9.0
- old
+ new
@@ -1,21 +1,24 @@
-gettext_find_task = Rake::Task['gettext:find'] rescue nil
+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")
+ Actions::EntryAction
+ .all_action_names
+ .uniq
+ .map { |n| %[_("#{n}")] }
+ .join("\n")
end
end
gettext_find_task.enhance ['gettext:store_action_names']
end
-