Fix missing translation error

This commit is contained in:
Maciej Szlosarczyk 2018-04-11 09:39:24 +03:00
parent f7c2b25a66
commit 18ad5e8e5e
No known key found for this signature in database
GPG key ID: 41D62D42D3B0D765
5 changed files with 22 additions and 4 deletions

View file

@ -37,7 +37,7 @@
= f.email_field :bcc, class: 'form-control'
.form-group
.col-md-12
= f.label :body, t(:html_body)
= f.label :body, t('admin.mail_templates.html_body')
= liquid_help
.col-md-12
= f.text_area(:body, class: 'form-control', size: '15x15')
@ -48,7 +48,7 @@
.col-md-12
= f.text_area(:text_body, class: 'form-control', size: '15x15')
%hr
%hr
.row
.col-md-12.text-right
= button_tag(t(:save), class: 'btn btn-primary')

View file

@ -1,3 +1,3 @@
= render 'shared/title', name: t(:new_mail_template)
= render 'shared/title', name: t('admin.mail_templates.new_mail_template')
= render 'form', mail_template: @mail_template

View file

@ -0,0 +1,5 @@
en:
admin:
mail_templates:
html_body: HTML body
new_mail_template: New mail template

View file

@ -731,7 +731,6 @@ en:
is_registrant: 'Is registrant'
force_delete_set_on_domain: 'Force delete set on domain %{domain_name}'
mail_templates: Mail Templates
new_mail_template: New mail template
failure: "It was not saved"
contact_is_not_valid: 'Contact %{value} is not valid, please fix the invalid contact'
welcome_to_eis_registrar_portal: 'Welcome to EIS Registrar portal'

View file

@ -0,0 +1,14 @@
require 'test_helper'
class AdminAreaNewMailTemplateTest < ActionDispatch::IntegrationTest
def setup
login_as users(:admin)
end
def test_new_mail_template_does_not_throw_template_error
visit admin_mail_templates_url
click_link_or_button 'New'
assert_text "HTML body"
assert_text "New mail template"
end
end