Update translation

#693
This commit is contained in:
Artur Beljajev 2018-02-24 08:07:42 +02:00
parent 1fad07963f
commit 0122c42268
3 changed files with 6 additions and 4 deletions

View file

@ -51,11 +51,13 @@ class Registrar
end end
end end
parsed_response = JSON.parse(response.body, symbolize_names: true)
if response.code == '200' if response.code == '200'
flash[:notice] = t '.transferred' flash[:notice] = t '.transferred', count: parsed_response[:data].size
redirect_to registrar_domains_url redirect_to registrar_domains_url
else else
@api_errors = JSON.parse(response.body, symbolize_names: true)[:errors] @api_errors = parsed_response[:errors]
render :new render :new
end end
else else

View file

@ -8,7 +8,7 @@ en:
create: create:
header: Domain transfer header: Domain transfer
transferred: Domains have been successfully transferred transferred: "%{count} domains have been successfully transferred"
form: form:
single: single:

View file

@ -25,7 +25,7 @@ class RegistrarDomainTransfersTest < ActionDispatch::IntegrationTest
assert_requested request_stub assert_requested request_stub
assert_current_path registrar_domains_path assert_current_path registrar_domains_path
assert_text 'Domains have been successfully transferred' assert_text '1 domains have been successfully transferred'
end end
def test_batch_transfer_fails_gracefully def test_batch_transfer_fails_gracefully