Merge pull request #9711 from dacook/translation-cleanup

Translation cleanup
This commit is contained in:
Maikel
2022-10-06 09:51:28 +11:00
committed by GitHub
13 changed files with 96 additions and 48 deletions

View File

@@ -4,13 +4,12 @@ module Admin
module EnterpriseGroupsHelper
def enterprise_group_side_menu_items
[
{ name: 'primary_details', label: 'primary_details', icon_class: "icon-user",
selected: "selected" },
{ name: 'users', label: 'users', icon_class: "icon-user" },
{ name: 'about', label: 'about', icon_class: "icon-pencil" },
{ name: 'images', label: 'images', icon_class: "icon-picture" },
{ name: 'contact', label: 'admin_enterprise_groups_contact', icon_class: "icon-phone" },
{ name: 'web', label: 'admin_enterprise_groups_web', icon_class: "icon-globe" },
{ name: 'primary_details', icon_class: "icon-user", selected: "selected" },
{ name: 'users', icon_class: "icon-user" },
{ name: 'about', icon_class: "icon-pencil" },
{ name: 'images', icon_class: "icon-picture" },
{ name: 'contact', icon_class: "icon-phone" },
{ name: 'web', icon_class: "icon-globe" },
]
end
end

View File

@@ -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']]"}

View File

@@ -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

View File

@@ -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')

View File

@@ -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/

View File

@@ -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)

View File

@@ -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

View File

@@ -2,20 +2,20 @@
- case item[:name]
- when 'primary_details'
%fieldset.alpha.no-border-bottom{ id: "#{item[:name]}_panel", data: { controller: "primary-details", "primary-details-primary-producer-value": @enterprise.is_primary_producer.to_s, "primary-details-enterprise-sells-value": @enterprise.sells, "tabs-and-panels-target": "panel default" }}
%legend= t("#{ item[:name] }")
%legend= t(".#{ item[:name] }.legend")
= render "admin/enterprises/form/#{ item[:form_name] || item[:name] }", f: f
- when 'address'
= f.fields_for :address do |af|
%fieldset.alpha.no-border-bottom{ id: "#{item[:name]}_panel", data: { "tabs-and-panels-target": "panel" }}
%legend= t("#{ item[:name] }")
%legend= t(".#{ item[:name] }.legend")
= render 'admin/enterprises/form/address', af: af
- when 'enterprise_permissions'
%fieldset.alpha.no-border-bottom{ id: "#{item[:name]}_panel", data: { "tabs-and-panels-target": "panel" }}
%legend= t("#{ item[:name] }")
%legend= t(".#{ item[:name] }.legend")
- else
%fieldset.alpha.no-border-bottom{ id: "#{item[:name]}_panel", data: { "tabs-and-panels-target": "panel" }}
%legend= t("#{ item[:name] }")
%legend= t(".#{ item[:form_name] || item[:name] }.legend")
= render "admin/enterprises/form/#{ item[:form_name] || item[:name] }", f: f

View File

@@ -1,9 +1,9 @@
.row
.three.columns.alpha
= f.label :name, t('admin.enterprises.form.primary_details.name')
= f.label :name, t('primary_details.name', scope: scope)
%span.required *
.nine.columns.omega
= f.text_field :name, { placeholder: t('admin.enterprises.form.primary_details.name_placeholder'), class: "fullwidth" }
= f.text_field :name, { placeholder: t('primary_details.name_placeholder', scope: scope), class: "fullwidth" }
- if spree_current_user.admin?
.row
@@ -17,8 +17,8 @@
= f.hidden_field :owner_id, class: "select2 fullwidth", 'user-select' => 'Enterprise.owner'
.row
.three.columns.alpha
%label= t('admin.enterprises.form.primary_details.primary_producer')
%div{'ofn-with-tip' => t('admin.enterprises.form.primary_details.primary_producer_tip')}
%label= t('primary_details.primary_producer', scope: scope)
%div{'ofn-with-tip' => t('primary_details.primary_producer_tip', scope: scope)}
%a= t('admin.whats_this')
.five.columns.omega
= f.check_box :is_primary_producer, 'ng-model' => 'Enterprise.is_primary_producer'
@@ -28,42 +28,42 @@
.row
.alpha.eleven.columns
.three.columns.alpha
= f.label :sells, t('admin.enterprises.form.primary_details.sells')
%div{'ofn-with-tip' => t('admin.enterprises.form.primary_details.sells_tip')}
= f.label :sells, t('primary_details.sells', scope: scope)
%div{'ofn-with-tip' => t('primary_details.sells_tip', scope: scope)}
%a What's this?
.two.columns
= f.radio_button :sells, "none", 'ng-model' => 'Enterprise.sells'
 
= f.label :sells, t('admin.enterprises.form.primary_details.none'), value: "none"
= f.label :sells, t('primary_details.none', scope: scope), value: "none"
.two.columns
= f.radio_button :sells, "own", 'ng-model' => 'Enterprise.sells'
 
= f.label :sells, t('admin.enterprises.form.primary_details.own'), value: "own"
= f.label :sells, t('primary_details.own', scope: scope), value: "own"
.four.columns.omega
= f.radio_button :sells, "any", 'ng-model' => 'Enterprise.sells'
 
= f.label :sells, t('admin.enterprises.form.primary_details.any'), value: "any"
= f.label :sells, t('primary_details.any', scope: scope), value: "any"
.row
.alpha.three.columns
= f.label :contact_name, t('.contact_name')
.omega.nine.columns
= f.text_field :contact_name, { placeholder: t('admin.enterprises.form.contact.name_placeholder')}
= f.text_field :contact_name, { placeholder: t('contact.name_placeholder', scope: scope)}
.row
.alpha.three.columns
= f.label :email_address, t('admin.enterprises.form.contact.email_address')
= f.label :email_address, t('contact.email_address', scope: scope)
.omega.nine.columns
= f.text_field :email_address, { placeholder: t('admin.enterprises.form.contact.email_address_placeholder'), "ng-model" => "Enterprise.email_address" }
= f.text_field :email_address, { placeholder: t('contact.email_address_placeholder', scope: scope), "ng-model" => "Enterprise.email_address" }
.row
.alpha.three.columns
= f.label :phone, t('admin.enterprises.form.contact.phone')
= f.label :phone, t('contact.phone', scope: scope)
.omega.nine.columns
= f.text_field :phone, { placeholder: t('admin.enterprises.form.contact.phone_placeholder')}
= f.text_field :phone, { placeholder: t('contact.phone_placeholder', scope: scope)}
.row
.alpha.three.columns
= f.label :website, t('admin.enterprises.form.contact.website')
= f.label :website, t('contact.website', scope: scope)
.omega.nine.columns
= f.text_field :website, { placeholder: t('admin.enterprises.form.contact.website_placeholder')}
= f.text_field :website, { placeholder: t('contact.website_placeholder', scope: scope)}
= f.fields_for :address do |af|
.row

View File

@@ -51,7 +51,7 @@
= f.fields_for :business_address, @enterprise.business_address || @enterprise.build_business_address do |bf|
%fieldset.alpha.no-border-bottom
%legend= t('business_address')
%legend= t('.business_address_legend')
= render 'admin/enterprises/form/business_address', bf: bf
.row{"data-controller": "updateinput"}
@@ -60,7 +60,7 @@
.row
%fieldset.alpha.no-border-bottom
%legend= t('.Invoice_item_sorting')
%legend= t('.invoice_item_sorting_legend')
.three.columns.alpha
%label= t('.sort_items_by_supplier?')
%div{'ofn-with-tip' => t('.sort_items_by_supplier_tip')}

View File

@@ -17,4 +17,4 @@
= form_for [main_app, :admin, @enterprise], html: { "nav-check" => '', "nav-callback" => '' } do |f|
.row
.twelve.columns.fullwidth_inputs{ ng: { controller: "NewEnterpriseController" } }
= render 'new_form', f: f
= render 'new_form', f: f, scope: 'admin.enterprises.form'

View File

@@ -4,10 +4,10 @@
- next unless item[:show]
%a.menu_item{ href: item[:href] || "##{item[:name]}_panel", id: item[:name], data: { action: "tabs-and-panels#changeActivePanel tabs-and-panels#changeActiveTab", "tabs-and-panels-target": "tab" }, class: item[:selected] }
%i{ class: item[:icon_class] }
%span= t("#{item[:name] }")
%span= t(".enterprise.#{item[:name] }")
- else
- enterprise_group_side_menu_items.each do |item|
%a.menu_item{ href: "##{item[:name]}_panel", class: item[:selected], id: item[:name], data: { action: "tabs-and-panels#changeActivePanel tabs-and-panels#changeActiveTab", "tabs-and-panels-target": "tab" } }
%i{ class: item[:icon_class] }
%span= t("#{item[:label] }")
%span= t(".enterprise_group.#{item[:name] }")