Skip to content

Commit

Permalink
Merge pull request #17847 from mzazrivec/locale_rake_fixes
Browse files Browse the repository at this point in the history
rake locale:plugin:find fixes
  • Loading branch information
martinpovolny authored Sep 6, 2018
2 parents 26bf79c + 1d31c8b commit a6ff81f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/tasks/locale.rake
Original file line number Diff line number Diff line change
Expand Up @@ -152,12 +152,17 @@ namespace :locale do

desc "Extract plugin strings - execute as: rake locale:plugin:find[plugin_name]"
task "plugin:find", :engine do |_, args|
unless args.key?(:engine)
unless args[:engine]
$stderr.puts "You need to specify a plugin name: rake locale:plugin:find[plugin_name]"
exit 1
end
@domain = args[:engine].gsub('::', '_')
@engine = "#{args[:engine].camelize}::Engine".constantize
begin
@engine = "#{args[:engine].camelize}::Engine".constantize
rescue NameError
warn "The specified plugin #{args[:engine]} does not exist."
exit 1
end
@engine_root = @engine.root

# extract plugin's yaml strings
Expand Down

0 comments on commit a6ff81f

Please sign in to comment.