Skip to content

Commit

Permalink
change the way of gettext usage
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderZagaynov committed Sep 4, 2019
1 parent 8b95118 commit c212eea
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
7 changes: 2 additions & 5 deletions app/views/layouts/angular-bootstrap/_any_field.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,10 @@
- input_emsg ||= ''
- input_id ||= [prefix, input_name].select(&:present?).join("_")

- input_desc = _(input_desc) if input_desc.present?
- input_emsg = _(input_emsg) if input_emsg.present?

%div
.form-group{"ng-class" => "{'has-error': angularForm.#{input_id}.$invalid}"} |
%label.col-md-2.control-label{"for" => input_id}
= _(input_desc)
= input_desc
.col-md-4
%input.form-control{"type" => input_type,
"id" => input_id,
Expand All @@ -24,4 +21,4 @@
"prefix" => prefix,
"reset-validation-status" => "#{prefix}_auth_status"}
%span.help-block{"ng-show" => "angularForm.#{input_id}.$error.url"}
= _(input_emsg)
= input_emsg
4 changes: 2 additions & 2 deletions app/views/layouts/angular/_multi_auth_credentials.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@
= render :partial => "layouts/angular-bootstrap/any_field",
:locals => {:prefix => "",
:input_name => "service_account",
:input_desc => "Assume role ARN",
:input_emsg => "Invalid ARN",
:input_desc => _("Assume role ARN"),
:input_emsg => _("Invalid ARN"),
:ng_model => "#{ng_model}"}
= render :partial => "layouts/angular-bootstrap/auth_credentials_angular_bootstrap",
:locals => {:ng_show => true,
Expand Down

0 comments on commit c212eea

Please sign in to comment.