From 7803e5d4ffd4d2b13f8938314f54c150321359ee Mon Sep 17 00:00:00 2001 From: David Cook Date: Wed, 28 Sep 2022 16:12:38 +1000 Subject: [PATCH] Scope Enterprise Group form legend translations Using lazy-lookup builtin scopes, instead of sharing the global translations, as per our guidelines. --- .../admin/enterprise_groups/_form_about.html.haml | 2 +- .../admin/enterprise_groups/_form_address.html.haml | 2 +- .../admin/enterprise_groups/_form_images.html.haml | 2 +- .../_form_primary_details.html.haml | 2 +- .../admin/enterprise_groups/_form_users.html.haml | 2 +- .../admin/enterprise_groups/_form_web.html.haml | 2 +- config/locales/en.yml | 12 ++++++++++++ 7 files changed, 18 insertions(+), 6 deletions(-) diff --git a/app/views/admin/enterprise_groups/_form_about.html.haml b/app/views/admin/enterprise_groups/_form_about.html.haml index b2a28c49b1..ce8d03fc37 100644 --- a/app/views/admin/enterprise_groups/_form_about.html.haml +++ b/app/views/admin/enterprise_groups/_form_about.html.haml @@ -1,5 +1,5 @@ %fieldset.alpha.no-border-bottom#about_panel{ data: { "tabs-and-panels-target": "panel" } } - %legend= t('about') + %legend= t('.about') = f.field_container :long_description do %text-angular{'id' => 'enterprise_group_long_description', 'name' => 'enterprise_group[long_description]', 'class' => 'text-angular', "textangular-links-target-blank" => true, 'ta-toolbar' => "[['h1','h2','h3','h4','p'],['bold','italics','underline','clear'],['insertLink']]"} diff --git a/app/views/admin/enterprise_groups/_form_address.html.haml b/app/views/admin/enterprise_groups/_form_address.html.haml index cf1876f908..b495151686 100644 --- a/app/views/admin/enterprise_groups/_form_address.html.haml +++ b/app/views/admin/enterprise_groups/_form_address.html.haml @@ -1,6 +1,6 @@ = f.fields_for :address do |af| %fieldset.alpha.no-border-bottom#contact_panel{ data: { "tabs-and-panels-target": "panel" } } - %legend= t('admin_enterprise_groups_contact') + %legend= t('.contact') .row .alpha.three.columns = af.label :phone diff --git a/app/views/admin/enterprise_groups/_form_images.html.haml b/app/views/admin/enterprise_groups/_form_images.html.haml index b2edd68b47..14f9a371d2 100644 --- a/app/views/admin/enterprise_groups/_form_images.html.haml +++ b/app/views/admin/enterprise_groups/_form_images.html.haml @@ -1,5 +1,5 @@ %fieldset.alpha.no-border-bottom#images_panel{ data: { "tabs-and-panels-target": "panel" } } - %legend= t('images') + %legend= t('.images') .row .alpha.three.columns = f.label :logo, 'ofn-with-tip' => t('admin_enterprise_groups_data_powertip_logo') diff --git a/app/views/admin/enterprise_groups/_form_primary_details.html.haml b/app/views/admin/enterprise_groups/_form_primary_details.html.haml index 5455039306..4ab3aae1b5 100644 --- a/app/views/admin/enterprise_groups/_form_primary_details.html.haml +++ b/app/views/admin/enterprise_groups/_form_primary_details.html.haml @@ -1,5 +1,5 @@ %fieldset.alpha.no-border-bottom#primary_details_panel{ data: { "tabs-and-panels-target": "panel default" } } - %legend= t('primary_details') + %legend= t('.primary_details') = f.field_container :name do = f.label :name %br/ diff --git a/app/views/admin/enterprise_groups/_form_users.html.haml b/app/views/admin/enterprise_groups/_form_users.html.haml index 75e51e0e3c..27ac13f5c1 100644 --- a/app/views/admin/enterprise_groups/_form_users.html.haml +++ b/app/views/admin/enterprise_groups/_form_users.html.haml @@ -1,5 +1,5 @@ %fieldset.alpha.no-border-bottom#users_panel{ data: { "tabs-and-panels-target": "panel" } } - %legend= t('users') + %legend= t('.users') .row .three.columns.alpha =f.label :owner_id, t(:admin_enterprise_groups_owner) diff --git a/app/views/admin/enterprise_groups/_form_web.html.haml b/app/views/admin/enterprise_groups/_form_web.html.haml index 186165a060..200c708669 100644 --- a/app/views/admin/enterprise_groups/_form_web.html.haml +++ b/app/views/admin/enterprise_groups/_form_web.html.haml @@ -1,5 +1,5 @@ %fieldset.alpha.no-border-bottom#web_panel{ data: { "tabs-and-panels-target": "panel" } } - %legend= t('admin_enterprise_groups_web') + %legend= t('.web') .row .alpha.three.columns = f.label :website diff --git a/config/locales/en.yml b/config/locales/en.yml index 823bceec43..950f052d81 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -637,6 +637,18 @@ en: enterprise_groups: index: new_button: New Enterprise Group + form_primary_details: + primary_details: "Primary Details" + form_users: + users: "Users" + form_about: + about: "About" + form_images: + images: "Images" + form_address: + contact: "Contact" + form_web: + web: "Web Resources" enterprise_roles: form: