From c212eea15dd31e961a8a17755f5cc89d7be8a7b1 Mon Sep 17 00:00:00 2001 From: Alexander Zagaynov Date: Wed, 7 Aug 2019 16:07:31 +0200 Subject: [PATCH] change the way of gettext usage --- app/views/layouts/angular-bootstrap/_any_field.html.haml | 7 ++----- .../layouts/angular/_multi_auth_credentials.html.haml | 4 ++-- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/app/views/layouts/angular-bootstrap/_any_field.html.haml b/app/views/layouts/angular-bootstrap/_any_field.html.haml index f66771d3ba99..ed8bf3e9e6ee 100644 --- a/app/views/layouts/angular-bootstrap/_any_field.html.haml +++ b/app/views/layouts/angular-bootstrap/_any_field.html.haml @@ -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, @@ -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 diff --git a/app/views/layouts/angular/_multi_auth_credentials.html.haml b/app/views/layouts/angular/_multi_auth_credentials.html.haml index 87a592e7529b..ead69516cfd1 100644 --- a/app/views/layouts/angular/_multi_auth_credentials.html.haml +++ b/app/views/layouts/angular/_multi_auth_credentials.html.haml @@ -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,