mirror of
https://github.com/internetee/registry.git
synced 2025-08-11 20:19:34 +02:00
Merge pull request #2737 from internetee/improve-verification-translations
Improved verification email translations
This commit is contained in:
commit
8dcc287d60
7 changed files with 25 additions and 9 deletions
|
@ -3,7 +3,7 @@ class RegistrarMailer < ApplicationMailer
|
||||||
|
|
||||||
def contact_verified(email:, contact:, poi:)
|
def contact_verified(email:, contact:, poi:)
|
||||||
@contact = contact
|
@contact = contact
|
||||||
subject = 'Successful Contact Verification'
|
subject = default_i18n_subject(contact_code: contact.code)
|
||||||
attachments['proof_of_identity.pdf'] = poi
|
attachments['proof_of_identity.pdf'] = poi
|
||||||
mail(to: email, subject: subject)
|
mail(to: email, subject: subject)
|
||||||
end
|
end
|
||||||
|
|
|
@ -8,7 +8,7 @@ Teie registripidaja <%= registrar.name %> on palunud Teil kinnitada oma isikut,
|
||||||
<br><br>
|
<br><br>
|
||||||
Palun kinnitage oma isikut, et jätkata.
|
Palun kinnitage oma isikut, et jätkata.
|
||||||
<br><br>
|
<br><br>
|
||||||
<a href="<%= @verification_link %>" style="display: inline-block; padding: 10px 20px; background-color: #007BFF; color: white; text-decoration: none; border-radius: 5px;">Jätka eeID-ga</a>
|
<a href="<%= @verification_link + "?ui_locales=et" %>" style="display: inline-block; padding: 10px 20px; background-color: #007BFF; color: white; text-decoration: none; border-radius: 5px;">Jätka eeID-ga</a>
|
||||||
<br><br>
|
<br><br>
|
||||||
Kontaktandmed:<br>
|
Kontaktandmed:<br>
|
||||||
<%= render 'mailers/shared/registrant/registrant.et.html', registrant: contact, with_phone: true %>
|
<%= render 'mailers/shared/registrant/registrant.et.html', registrant: contact, with_phone: true %>
|
||||||
|
@ -24,7 +24,7 @@ Your registrar <%= registrar.name %> has requested that you verify your identity
|
||||||
<br><br>
|
<br><br>
|
||||||
Please confirm your identity to continue.
|
Please confirm your identity to continue.
|
||||||
<br><br>
|
<br><br>
|
||||||
<a href="<%= @verification_link %>" style="display: inline-block; padding: 10px 20px; background-color: #007BFF; color: white; text-decoration: none; border-radius: 5px;">Continue with eeID</a>
|
<a href="<%= @verification_link + "?ui_locales=en" %>" style="display: inline-block; padding: 10px 20px; background-color: #007BFF; color: white; text-decoration: none; border-radius: 5px;">Continue with eeID</a>
|
||||||
<br><br>
|
<br><br>
|
||||||
Contact information:<br>
|
Contact information:<br>
|
||||||
<%= render 'mailers/shared/registrant/registrant.en.html', registrant: contact, with_phone: true %>
|
<%= render 'mailers/shared/registrant/registrant.en.html', registrant: contact, with_phone: true %>
|
||||||
|
|
|
@ -6,7 +6,7 @@ Tere <%= contact.name %>,
|
||||||
|
|
||||||
Teie registripidaja <%= registrar.name %> on palunud teil kinnitada oma isikut, et jätkata domeeni toimingutega.
|
Teie registripidaja <%= registrar.name %> on palunud teil kinnitada oma isikut, et jätkata domeeni toimingutega.
|
||||||
Palun kinnitage oma isikut, klõpsates alloleval lingil:
|
Palun kinnitage oma isikut, klõpsates alloleval lingil:
|
||||||
<%= @verification_link %>
|
<%= @verification_link + "?ui_locales=et" %>
|
||||||
|
|
||||||
Kontaktandmed:
|
Kontaktandmed:
|
||||||
<%= render 'mailers/shared/registrant/registrant.et.text', registrant: contact, with_phone: true %>
|
<%= render 'mailers/shared/registrant/registrant.et.text', registrant: contact, with_phone: true %>
|
||||||
|
@ -21,7 +21,7 @@ Hi <%= contact.name %>,
|
||||||
|
|
||||||
Your registrar <%= registrar.name %> has requested that you verify your identity in order to proceed with domain actions.
|
Your registrar <%= registrar.name %> has requested that you verify your identity in order to proceed with domain actions.
|
||||||
Please confirm your identity to continue by clicking the link below:
|
Please confirm your identity to continue by clicking the link below:
|
||||||
<%= @verification_link %>
|
<%= @verification_link + "?ui_locales=en" %>
|
||||||
|
|
||||||
Contact information:
|
Contact information:
|
||||||
<%= render 'mailers/shared/registrant/registrant.en.text', registrant: contact, with_phone: true %>
|
<%= render 'mailers/shared/registrant/registrant.en.text', registrant: contact, with_phone: true %>
|
||||||
|
|
|
@ -4,3 +4,7 @@ en:
|
||||||
subject: >-
|
subject: >-
|
||||||
Teie domeenide kontakt epostiaadress on muutunud
|
Teie domeenide kontakt epostiaadress on muutunud
|
||||||
/ Contact e-mail addresses of your domains have changed [%{contact_code}]
|
/ Contact e-mail addresses of your domains have changed [%{contact_code}]
|
||||||
|
identification_requested:
|
||||||
|
subject: >-
|
||||||
|
Palun kinnitage oma isik domeeni toimingute jätkamiseks
|
||||||
|
/ Please verify your identity to proceed with domain operations
|
6
config/locales/mailers/registrar.en.yml
Normal file
6
config/locales/mailers/registrar.en.yml
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
en:
|
||||||
|
registrar_mailer:
|
||||||
|
contact_verified:
|
||||||
|
subject: >-
|
||||||
|
Teade: Kontakti [%{contact_code}] kinnitamine edukalt lõpule viidud
|
||||||
|
/ Notification: Contact [%{contact_code}] verification successfully completed
|
|
@ -32,7 +32,10 @@ class Eeid::IdentificationRequestsWebhookTest < ActionDispatch::IntegrationTest
|
||||||
assert_equal({ 'status' => 'success' }, JSON.parse(response.body))
|
assert_equal({ 'status' => 'success' }, JSON.parse(response.body))
|
||||||
assert_not_nil @contact.reload.verified_at
|
assert_not_nil @contact.reload.verified_at
|
||||||
assert_equal @contact.verification_id, '123'
|
assert_equal @contact.verification_id, '123'
|
||||||
assert_notify_registrar('Successful Contact Verification')
|
assert_notify_registrar(
|
||||||
|
"Teade: Kontakti [#{@contact.code}] kinnitamine edukalt lõpule viidud " \
|
||||||
|
"/ Notification: Contact [#{@contact.code}] verification successfully completed"
|
||||||
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
test 'should return unauthorized for invalid HMAC signature' do
|
test 'should return unauthorized for invalid HMAC signature' do
|
||||||
|
|
|
@ -23,7 +23,7 @@ class ReppV1ContactsVerifyTest < ActionDispatch::IntegrationTest
|
||||||
claims_required: [{ type: 'sub', value: "#{@contact.ident_country_code}#{@contact.ident}" }],
|
claims_required: [{ type: 'sub', value: "#{@contact.ident_country_code}#{@contact.ident}" }],
|
||||||
reference: @contact.code
|
reference: @contact.code
|
||||||
}
|
}
|
||||||
).to_return(status: 200, body: { id: '123' }.to_json, headers: { 'Content-Type' => 'application/json' })
|
).to_return(status: 200, body: { id: '123', link: 'http://link' }.to_json, headers: { 'Content-Type' => 'application/json' })
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_returns_error_when_not_found
|
def test_returns_error_when_not_found
|
||||||
|
@ -47,7 +47,10 @@ class ReppV1ContactsVerifyTest < ActionDispatch::IntegrationTest
|
||||||
assert contact.present?
|
assert contact.present?
|
||||||
assert contact.ident_request_sent_at
|
assert contact.ident_request_sent_at
|
||||||
assert_nil contact.verified_at
|
assert_nil contact.verified_at
|
||||||
assert_notify_contact('Identification requested')
|
assert_notify_contact(
|
||||||
|
'Palun kinnitage oma isik domeeni toimingute jätkamiseks ' \
|
||||||
|
'/ Please verify your identity to proceed with domain operations'
|
||||||
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_handles_non_epp_error
|
def test_handles_non_epp_error
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue