Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rake locale:plugin:find fixes #17847

Merged
merged 2 commits into from
Sep 6, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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