mirror of
https://github.com/internetee/registry.git
synced 2025-05-19 10:49:39 +02:00
Moved contact epp errors to i18n
This commit is contained in:
parent
c78e40a65a
commit
9117908bb0
2 changed files with 6 additions and 4 deletions
|
@ -33,10 +33,10 @@ module Epp::ContactsHelper
|
||||||
@contact.destroy
|
@contact.destroy
|
||||||
render '/epp/contacts/delete'
|
render '/epp/contacts/delete'
|
||||||
rescue NoMethodError => e
|
rescue NoMethodError => e
|
||||||
epp_errors << {code: '2303', msg: "Object does not exist"}
|
epp_errors << { code: '2303', msg: t('errors.messages.epp_obj_does_not_exist') }
|
||||||
render '/epp/error'
|
render '/epp/error'
|
||||||
rescue
|
rescue
|
||||||
epp_errors << {code: '2400', msg: "Command failed"}
|
epp_errors << {code: '2400', msg: t('errors.messages.epp_command_failed')}
|
||||||
render '/epp/error'
|
render '/epp/error'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -48,7 +48,7 @@ module Epp::ContactsHelper
|
||||||
if @contacts.any?
|
if @contacts.any?
|
||||||
render '/epp/contacts/check'
|
render '/epp/contacts/check'
|
||||||
else
|
else
|
||||||
epp_errors << {code: '2303', msg: "Object does not exist"}
|
epp_errors << { code: '2303', msg: t('errors.messages.epp_obj_does_not_exist') }
|
||||||
render 'epp/error'
|
render 'epp/error'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -62,7 +62,7 @@ module Epp::ContactsHelper
|
||||||
if @contact
|
if @contact
|
||||||
render '/epp/contacts/info'
|
render '/epp/contacts/info'
|
||||||
else
|
else
|
||||||
epp_errors << { code: '2303', msg: 'Object does not exist' }
|
epp_errors << { code: '2303', msg: t('errors.messages.epp_obj_does_not_exist') }
|
||||||
render 'epp/error'
|
render 'epp/error'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -47,3 +47,5 @@ en:
|
||||||
messages:
|
messages:
|
||||||
epp_domain_reserved: 'Domain name is reserved or restricted'
|
epp_domain_reserved: 'Domain name is reserved or restricted'
|
||||||
epp_domain_taken: 'Domain name already exists'
|
epp_domain_taken: 'Domain name already exists'
|
||||||
|
epp_obj_does_not_exist: 'Object does not exist'
|
||||||
|
epp_command_failed: 'Command failed'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue