mirror of
https://github.com/internetee/registry.git
synced 2025-08-03 16:32:04 +02:00
Merge pull request #620 from internetee/revert-551d1799d1782a9dbf5edfb57a0fa4c5fe6bef83
Revert "Revert "Registry 569""
This commit is contained in:
commit
ca13c08ea8
49 changed files with 2462 additions and 315 deletions
|
@ -1,20 +0,0 @@
|
|||
# Log all active model user errors
|
||||
# rubocop: disable Lint/AssignmentInCondition
|
||||
# rubocop: disable Style/SignalException
|
||||
module ActiveModel
|
||||
class Errors
|
||||
def add(attribute, message = :invalid, options = {})
|
||||
message = normalize_message(attribute, message, options)
|
||||
if exception = options[:strict]
|
||||
exception = ActiveModel::StrictValidationFailed if exception == true
|
||||
raise exception, full_message(attribute, message)
|
||||
end
|
||||
|
||||
# CUSTOM logging
|
||||
Rails.logger.info "USER MSG: ACTIVEMODEL: #{@base.try(:class)} [#{attribute}] #{message}" if message.present?
|
||||
# END of CUSTOM logging
|
||||
|
||||
self[attribute] << message
|
||||
end
|
||||
end
|
||||
end
|
|
@ -1,31 +0,0 @@
|
|||
# Log all flash messages
|
||||
# rubocop: disable Metrics/CyclomaticComplexity
|
||||
# rubocop: disable Metrics/LineLength
|
||||
module ActionDispatch
|
||||
class Flash
|
||||
# rubocop: disable Metrics/PerceivedComplexity
|
||||
# rubocop: disable Style/MultilineOperationIndentation
|
||||
def call(env)
|
||||
@app.call(env)
|
||||
ensure
|
||||
session = Request::Session.find(env) || {}
|
||||
flash_hash = env[KEY]
|
||||
|
||||
if flash_hash && (flash_hash.present? || session.key?('flash'))
|
||||
session["flash"] = flash_hash.to_session_value
|
||||
|
||||
# EIS custom logging
|
||||
Rails.logger.info "USER MSG: FLASH: #{session['flash']['flashes'].inspect}" if session['flash']
|
||||
# END OF EIS custom logging
|
||||
|
||||
env[KEY] = flash_hash.dup
|
||||
end
|
||||
|
||||
if (!session.respond_to?(:loaded?) || session.loaded?) && # (reset_session uses {}, which doesn't implement #loaded?)
|
||||
session.key?('flash') && session['flash'].nil?
|
||||
session.delete('flash')
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -9,5 +9,20 @@ en:
|
|||
models:
|
||||
contact:
|
||||
attributes:
|
||||
code:
|
||||
blank: "Required parameter missing - code"
|
||||
too_long_contact_code: "Contact code is too long, max 100 characters"
|
||||
name:
|
||||
blank: "Required parameter missing - name"
|
||||
phone:
|
||||
blank: "Required parameter missing - phone"
|
||||
invalid: "Phone nr is invalid"
|
||||
email:
|
||||
blank: "Required parameter missing - email"
|
||||
invalid: "Email is invalid"
|
||||
domains:
|
||||
exist: 'Object association prohibits operation'
|
||||
statuses:
|
||||
not_uniq: 'not uniq'
|
||||
country_code:
|
||||
invalid: Country code is not valid, should be in ISO_3166-1 alpha 2 format
|
||||
|
|
|
@ -34,33 +34,6 @@ en:
|
|||
activerecord:
|
||||
errors:
|
||||
models:
|
||||
contact:
|
||||
attributes:
|
||||
code:
|
||||
blank: "Required parameter missing - code"
|
||||
too_long_contact_code: "Contact code is too long, max 100 characters"
|
||||
name:
|
||||
blank: "Required parameter missing - name"
|
||||
phone:
|
||||
blank: "Required parameter missing - phone"
|
||||
invalid: "Phone nr is invalid"
|
||||
email:
|
||||
blank: "Required parameter missing - email"
|
||||
invalid: "Email is invalid"
|
||||
ident:
|
||||
blank: "Required parameter missing - ident"
|
||||
invalid_EE_identity_format: "Ident not in valid Estonian identity format."
|
||||
invalid_EE_identity_format_update: "Ident not in valid Estonian identity format. Please create new contact"
|
||||
invalid_birthday_format: "Ident not in valid birthady format, should be YYYY-MM-DD"
|
||||
invalid_country_code: "Ident country code is not valid, should be in ISO_3166-1 alpha 2 format"
|
||||
ident_type:
|
||||
ident_type_invalid: 'Ident type is invalid'
|
||||
epp_ident_type_invalid: 'Object status prohibits operation: ident_type of contact %{code} is invalid'
|
||||
domains:
|
||||
exist: 'Object association prohibits operation'
|
||||
statuses:
|
||||
not_uniq: 'not uniq'
|
||||
|
||||
epp_domain: &epp_domain_ar_attributes
|
||||
attributes:
|
||||
base:
|
||||
|
@ -262,6 +235,8 @@ en:
|
|||
unimplemented_command: 'Unimplemented command'
|
||||
domain_exists_but_belongs_to_other_registrar: 'Domain exists but belongs to other registrar'
|
||||
required_ident_attribute_missing: "Required ident attribute missing: %{key}"
|
||||
invalid_iso31661_alpha2: does not conform to ISO 3166-1 alpha-2 standard
|
||||
invalid_iso8601_date: has invalid date format YYYY-MM-DD (ISO 8601)
|
||||
|
||||
code: 'Code'
|
||||
action: 'Action'
|
||||
|
@ -487,7 +462,6 @@ en:
|
|||
crt_revoked: 'CRT (revoked)'
|
||||
contact_org_error: 'Parameter value policy error. Org must be blank'
|
||||
contact_fax_error: 'Parameter value policy error. Fax must be blank'
|
||||
ident_update_error: 'Parameter value policy error. Update of ident data not allowed [ident]'
|
||||
invoices: 'Invoices'
|
||||
no_such_user: 'No such user'
|
||||
phone_no: 'Phone number'
|
||||
|
|
|
@ -3,3 +3,11 @@ en:
|
|||
contacts:
|
||||
completed: Command completed successfully
|
||||
completed_without_address: Command completed successfully; Postal address data discarded
|
||||
|
||||
errors:
|
||||
valid_ident: >-
|
||||
Ident update is not allowed.
|
||||
Consider creating new contact object
|
||||
ident_update: >-
|
||||
Only ident type and country can be updated in case of invalid ident.
|
||||
Please create new contact object to update ident code
|
||||
|
|
11
config/locales/idents.yml
Normal file
11
config/locales/idents.yml
Normal file
|
@ -0,0 +1,11 @@
|
|||
en:
|
||||
activemodel:
|
||||
errors:
|
||||
models:
|
||||
contact/ident:
|
||||
attributes:
|
||||
base:
|
||||
mismatch: Ident type "%{type}" is invalid for %{country}
|
||||
code:
|
||||
invalid_national_id: does not conform to national identification number format of %{country}
|
||||
invalid_reg_no: does not conform to registration number format of %{country}
|
Loading…
Add table
Add a link
Reference in a new issue