Skip to content

Commit

Permalink
Merge pull request #66 from internetee/1703-i18zed-whois-disclaimer
Browse files Browse the repository at this point in the history
Change disclaimer field to use i18zed from registry
  • Loading branch information
vohmar authored Oct 28, 2020
2 parents ad25d2d + d13ee63 commit a969d50
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
6 changes: 4 additions & 2 deletions app/views/whois_record/inactive.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<%- if json['disclaimer'].present? -%>
<%- if json['disclaimer'].present? && json['disclaimer'].is_a?(String) -%>
<%= json['disclaimer'].scan(/\S.{0,72}\S(?=\s|$)|\S+/).join("\n") %>

<%- elsif json['disclaimer'].present? && json['disclaimer'].is_a?(Hash) -%>
<%= json.dig('disclaimer', I18n.locale.to_s).scan(/\S.{0,72}\S(?=\s|$)|\S+/).join("\n") %>
<%- end -%>

Estonia .ee Top Level Domain WHOIS server

Domain:
Expand Down
6 changes: 4 additions & 2 deletions app/views/whois_record/legal_person.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<%- if json['disclaimer'].present? -%>
<%- if json['disclaimer'].present? && json['disclaimer'].is_a?(String) -%>
<%= json['disclaimer'].scan(/\S.{0,72}\S(?=\s|$)|\S+/).join("\n") %>

<%- elsif json['disclaimer'].present? && json['disclaimer'].is_a?(Hash) -%>
<%= json.dig('disclaimer', I18n.locale.to_s).scan(/\S.{0,72}\S(?=\s|$)|\S+/).join("\n") %>
<%- end -%>

Estonia .ee Top Level Domain WHOIS server

Domain:
Expand Down
6 changes: 4 additions & 2 deletions app/views/whois_record/private_person.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<%- if json['disclaimer'].present? -%>
<%- if json['disclaimer'].present? && json['disclaimer'].is_a?(String) -%>
<%= json['disclaimer'].scan(/\S.{0,72}\S(?=\s|$)|\S+/).join("\n") %>

<%- elsif json['disclaimer'].present? && json['disclaimer'].is_a?(Hash) -%>
<%= json.dig('disclaimer', I18n.locale.to_s).scan(/\S.{0,72}\S(?=\s|$)|\S+/).join("\n") %>
<%- end -%>

Estonia .ee Top Level Domain WHOIS server

Domain:
Expand Down
2 changes: 1 addition & 1 deletion test/models/private_person_record_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def create_private_person_record
],
changed: "2018-04-25T14:10:41+03:00",
delete: nil,
disclaimer: "The information obtained through .ee WHOIS is subject to database protection according to the Estonian Copyright Act and international conventions. All rights are reserved to Estonian Internet Foundation. Search results may not be used for commercial,advertising, recompilation, repackaging, redistribution, reuse, obscuring or other similar activities. Downloading of information about domain names for the creation of your own database is not permitted. If any of the information from .ee WHOIS is transferred to a third party, it must be done in its entirety. This server must not be used as a backend for a search engine.",
disclaimer: { en: "The information obtained through .ee WHOIS is subject to database protection according to the Estonian Copyright Act and international conventions. All rights are reserved to Estonian Internet Foundation. Search results may not be used for commercial,advertising, recompilation, repackaging, redistribution, reuse, obscuring or other similar activities. Downloading of information about domain names for the creation of your own database is not permitted. If any of the information from .ee WHOIS is transferred to a third party, it must be done in its entirety. This server must not be used as a backend for a search engine." },
dnssec_changed: nil,
dnssec_keys: [

Expand Down

0 comments on commit a969d50

Please sign in to comment.