Skip to content

Commit

Permalink
Option to bypass i18n question prefix.
Browse files Browse the repository at this point in the history
Extend options to include a text variable to override the i18n question
prefix.
  • Loading branch information
simon-soak committed Aug 9, 2016
1 parent 4e68031 commit 2f55d46
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lib/capistrano/configuration/question.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,20 @@ def gets
end

def question
I18n.t(:question, key: key, default_value: default, scope: :capistrano)
if !text?
I18n.t(:question, key: key, default_value: default, scope: :capistrano)
else
text?
end
end

def echo?
(options || {}).fetch(:echo, true)
end

def text?
(options || {}).fetch(:text, false)
end
end
end
end

0 comments on commit 2f55d46

Please sign in to comment.