From 0d4f661c1fc18501be91d1086671ef30ff996b8f Mon Sep 17 00:00:00 2001 From: Artur Beljajev Date: Thu, 8 Jun 2017 00:09:55 +0300 Subject: [PATCH] Namespace translations --- app/views/admin/domain_versions/show.haml | 8 ++++---- app/views/admin/domains/partials/_admin_contacts.haml | 2 +- app/views/admin/domains/partials/_tech_contacts.haml | 2 +- app/views/admin/domains/versions.haml | 2 +- .../registrant/domains/partials/_admin_contacts.haml | 2 +- .../registrant/domains/partials/_tech_contacts.haml | 2 +- config/locales/admin/domain_versions.en.yml | 6 ++++++ config/locales/admin/domains.en.yml | 9 ++++++++- config/locales/en.yml | 4 ---- config/locales/registrant/domains.en.yml | 9 +++++++++ 10 files changed, 32 insertions(+), 14 deletions(-) create mode 100644 config/locales/registrant/domains.en.yml diff --git a/app/views/admin/domain_versions/show.haml b/app/views/admin/domain_versions/show.haml index 4382b13ab..90b53d846 100644 --- a/app/views/admin/domain_versions/show.haml +++ b/app/views/admin/domain_versions/show.haml @@ -30,11 +30,11 @@ - domain_name = domain.name %dd= link_to(domain_name, admin_domain_path(@version.item_id)) - %dt= t(:created) + %dt= t('.created') %dd = l(domain.created_at, format: :short) - %dt= t(:updated) + %dt= t('.updated') %dd = l(domain.updated_at, format: :short) @@ -57,7 +57,7 @@ = r[:code] %br - %dt= t(:admin_contacts) + %dt= t('.admin_contacts') %dd - admin_contacts.each do |r| - link = r.version_loader ? admin_contact_version_path(r.version_loader.try(:id)) : admin_contact_path(r.id) @@ -68,7 +68,7 @@ = r[:code] %br - %dt= t(:tech_contacts) + %dt= t('.tech_contacts') %dd - tech_contacts.each do |r| - link = r.version_loader ? admin_contact_version_path(r.version_loader.try(:id)) : admin_contact_path(r.id) diff --git a/app/views/admin/domains/partials/_admin_contacts.haml b/app/views/admin/domains/partials/_admin_contacts.haml index 0db8f6e32..bf14bf1bb 100644 --- a/app/views/admin/domains/partials/_admin_contacts.haml +++ b/app/views/admin/domains/partials/_admin_contacts.haml @@ -1,7 +1,7 @@ - panel_class = @domain.errors.messages[:admin_contacts] ? 'panel-danger' : 'panel-default' .panel{class: panel_class} .panel-heading.clearfix - = t(:admin_contacts) + = t('.title') .table-responsive %table.table.table-hover.table-bordered.table-condensed %thead diff --git a/app/views/admin/domains/partials/_tech_contacts.haml b/app/views/admin/domains/partials/_tech_contacts.haml index 20badbea8..c3109bc57 100644 --- a/app/views/admin/domains/partials/_tech_contacts.haml +++ b/app/views/admin/domains/partials/_tech_contacts.haml @@ -1,7 +1,7 @@ - panel_class = @domain.errors.messages[:tech_contacts] ? 'panel-danger' : 'panel-default' #tech_contacts.panel{class: panel_class} .panel-heading.clearfix - = t(:tech_contacts) + = t('.title') .table-responsive %table.table.table-hover.table-bordered.table-condensed %thead diff --git a/app/views/admin/domains/versions.haml b/app/views/admin/domains/versions.haml index 408ef9a67..226ffc81c 100644 --- a/app/views/admin/domains/versions.haml +++ b/app/views/admin/domains/versions.haml @@ -13,7 +13,7 @@ %th{class: 'col-xs-1'}= t(:period) %th{class: 'col-xs-2'}= t(:registrant) %th{class: 'col-xs-2'}= t('.admin_contact') - %th{class: 'col-xs-2'}= t(:tech) + %th{class: 'col-xs-2'}= t('.tech_contact') %th{class: 'col-xs-2'}= t(:nameservers) %th{class: 'col-xs-2'}= t(:dnskeys) %th{class: 'col-xs-2'}= t(:registrar_name) diff --git a/app/views/registrant/domains/partials/_admin_contacts.haml b/app/views/registrant/domains/partials/_admin_contacts.haml index 5e49d3fbc..5ee50c31d 100644 --- a/app/views/registrant/domains/partials/_admin_contacts.haml +++ b/app/views/registrant/domains/partials/_admin_contacts.haml @@ -1,7 +1,7 @@ - panel_class = @domain.errors.messages[:admin_contacts] ? 'panel-danger' : 'panel-default' .panel{class: panel_class} .panel-heading.clearfix - = t(:admin_contacts) + = t('.title') .table-responsive %table.table.table-hover.table-bordered.table-condensed %thead diff --git a/app/views/registrant/domains/partials/_tech_contacts.haml b/app/views/registrant/domains/partials/_tech_contacts.haml index 12844a41e..c1177ae4b 100644 --- a/app/views/registrant/domains/partials/_tech_contacts.haml +++ b/app/views/registrant/domains/partials/_tech_contacts.haml @@ -1,7 +1,7 @@ - panel_class = @domain.errors.messages[:tech_contacts] ? 'panel-danger' : 'panel-default' #tech_contacts.panel{class: panel_class} .panel-heading.clearfix - = t(:tech_contacts) + = t('.title') .table-responsive %table.table.table-hover.table-bordered.table-condensed %thead diff --git a/config/locales/admin/domain_versions.en.yml b/config/locales/admin/domain_versions.en.yml index a1f4f5a46..fd2f7059a 100644 --- a/config/locales/admin/domain_versions.en.yml +++ b/config/locales/admin/domain_versions.en.yml @@ -3,3 +3,9 @@ en: domain_versions: archive: reset_btn: Reset + + show: + created: Created + updated: Updated + admin_contacts: Admin. contacts + tech_contacts: Tech. contacts diff --git a/config/locales/admin/domains.en.yml b/config/locales/admin/domains.en.yml index ae0626ffb..3df0fe2f5 100644 --- a/config/locales/admin/domains.en.yml +++ b/config/locales/admin/domains.en.yml @@ -22,7 +22,8 @@ en: versions: time: Time - admin_contact: Admin contact + admin_contact: Admin. contact + tech_contact: Tech. contact partials: general: @@ -30,6 +31,12 @@ en: delete_time: Delete time force_delete_time: Force delete time + admin_contacts: + title: Admin. contacts + + tech_contacts: + title: Tech. contacts + force_delete_toggle_btn: schedule: Schedule force delete cancel: Cancel force delete diff --git a/config/locales/en.yml b/config/locales/en.yml index b9dffce2e..916a84dad 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -285,8 +285,6 @@ en: valid_from: 'Valid from' general: 'General' contacts: 'Contacts' - tech_contacts: 'Technical contacts' - admin_contacts: 'Admin contacts' identity_code: 'Identity code' nameservers: 'Nameservers' hostname: 'Hostname' @@ -319,7 +317,6 @@ en: failed_to_update_status: 'Failed to update status!' status_deleted: 'Status deleted!' failed_to_delete_status: 'Failed to delete status!' - tech_contact: 'Tech contact' new_domain_contact: 'New contact' domain_status_prohibits_deleting: 'Domain status prohibits deleting' domain_deleted: 'Domain deleted!' @@ -557,7 +554,6 @@ en: created_at: 'Created at' valid_to: 'Valid to' updated_at: 'Updated at' - tech_contacts: 'Tech contacts' name: 'Name' type: 'Type' code: 'Code' diff --git a/config/locales/registrant/domains.en.yml b/config/locales/registrant/domains.en.yml new file mode 100644 index 000000000..5a35aaa7e --- /dev/null +++ b/config/locales/registrant/domains.en.yml @@ -0,0 +1,9 @@ +en: + registrant: + domains: + partials: + admin_contacts: + title: Admin. contacts + + tech_contacts: + title: Tech. contacts