Translation fixes

This commit is contained in:
Martin Lensment 2015-01-05 15:09:38 +02:00
parent 75532e6cc1
commit 0182548a2b
3 changed files with 4 additions and 8 deletions

View file

@ -69,16 +69,13 @@ module Epp::DomainsHelper
handle_errors(@domain) and return unless @domain.authenticate(domain_transfer_params[:pw])
if domain_transfer_params[:action] == 'query'
if @domain.pending_transfer
@domain_transfer = @domain.pending_transfer
else
@domain_transfer = @domain.query_transfer(domain_transfer_params, parsed_frame)
handle_errors(@domain) and return unless @domain_transfer
end
elsif domain_transfer_params[:action] == 'approve'
if @domain.pending_transfer
@domain_transfer = @domain.approve_transfer(domain_transfer_params, parsed_frame)
handle_errors(@domain) and return unless @domain_transfer
@ -86,7 +83,6 @@ module Epp::DomainsHelper
epp_errors << { code: '2303', msg: I18n.t('pending_transfer_was_not_found') }
handle_errors(@domain) and return
end
elsif domain_transfer_params[:action] == 'reject'
if @domain.pending_transfer
@domain_transfer = @domain.reject_transfer(domain_transfer_params, parsed_frame)

View file

@ -329,7 +329,7 @@ class Epp::EppDomain < Domain
return dt
rescue => _e
add_epp_error('2306', nil, nil, I18n.t('action_failed_due_to_internal_error'))
add_epp_error('2306', nil, nil, I18n.t('action_failed_due_to_server_error'))
raise ActiveRecord::Rollback
end
end
@ -357,7 +357,7 @@ class Epp::EppDomain < Domain
attach_legal_document(self.class.parse_legal_document_from_frame(parsed_frame))
save!(validate: false)
rescue => _e
add_epp_error('2306', nil, nil, I18n.t('action_failed_due_to_internal_error'))
add_epp_error('2306', nil, nil, I18n.t('action_failed_due_to_server_error'))
raise ActiveRecord::Rollback
end
end
@ -381,7 +381,7 @@ class Epp::EppDomain < Domain
attach_legal_document(self.class.parse_legal_document_from_frame(parsed_frame))
save!(validate: false)
rescue => _e
add_epp_error('2306', nil, nil, I18n.t('action_failed_due_to_internal_error'))
add_epp_error('2306', nil, nil, I18n.t('action_failed_due_to_server_error'))
raise ActiveRecord::Rollback
end
end

View file

@ -478,6 +478,6 @@ en:
admin_contacts_max_count: 'Admin contacts maximum count'
tech_contacts_min_count: 'Tech contacts minimum count'
tech_contacts_max_count: 'Tech contacts maximum count'
action_failed_due_to_internal_error: 'Action failed due to internal error'
action_failed_due_to_server_error: 'Action failed due to server error'
pending_transfer_was_not_found: 'Pending transfer was not found'
transfer_can_be_rejected_only_by_current_registrar: 'Transfer can be rejected only by current registrar'