From 66202436035f4bf60f30e1ea257c20303a802e38 Mon Sep 17 00:00:00 2001 From: luisramos0 Date: Thu, 30 May 2019 20:22:02 +0100 Subject: [PATCH 1/2] Make the submit button on the add tag rule dialog translatable --- .../javascripts/templates/admin/new_tag_rule_dialog.html.haml | 2 +- config/locales/en.yml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/templates/admin/new_tag_rule_dialog.html.haml b/app/assets/javascripts/templates/admin/new_tag_rule_dialog.html.haml index 4874a6bdb4..50d61d3563 100644 --- a/app/assets/javascripts/templates/admin/new_tag_rule_dialog.html.haml +++ b/app/assets/javascripts/templates/admin/new_tag_rule_dialog.html.haml @@ -7,4 +7,4 @@ %input.ofn-select2.fullwidth{ :id => 'rule_type_selector', ng: { model: "ruleType" }, data: "ruleTypes", 'min-search' => "5" } .text-center - %input.button.red.icon-plus{ type: 'button', value: "Add Rule", ng: { click: 'addRule(tagGroup, ruleType)' } } + %input.button.red.icon-plus{ type: 'button', value: "{{ 'js.admin.new_tag_rule_dialog.add_rule' | t }}", ng: { click: 'addRule(tagGroup, ruleType)' } } diff --git a/config/locales/en.yml b/config/locales/en.yml index 89adb8e0f4..46e0bb1988 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -2486,6 +2486,7 @@ See the %{link} to find out more about %{sitename}'s features and to start using resolve: Resolve new_tag_rule_dialog: select_rule_type: "Select a rule type:" + add_rule: "Add Rule" enterprise_fees: inherit_from_product: "Inherit From Product" orders: From 5024da4123c5ee2a81b9aba0de0d54bd31388be8 Mon Sep 17 00:00:00 2001 From: luisramos0 Date: Thu, 30 May 2019 20:39:58 +0100 Subject: [PATCH 2/2] Make tag rules type descriptions in the management page translatable --- .../directives/tag_rules/tag_rule.js.coffee | 16 ++++++++-------- config/locales/en.yml | 9 +++++++++ 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/app/assets/javascripts/admin/tag_rules/directives/tag_rules/tag_rule.js.coffee b/app/assets/javascripts/admin/tag_rules/directives/tag_rules/tag_rule.js.coffee index 11c7ed014b..22746bbafa 100644 --- a/app/assets/javascripts/admin/tag_rules/directives/tag_rules/tag_rule.js.coffee +++ b/app/assets/javascripts/admin/tag_rules/directives/tag_rules/tag_rule.js.coffee @@ -4,8 +4,8 @@ angular.module("admin.tagRules").directive "tagRule", -> link: (scope, element, attrs) -> scope.opt = "TagRule::FilterShippingMethods": - textTop: "Shipping methods tagged" - textBottom: "are:" + textTop: t('js.admin.tag_rules.shipping_method_tagged_top') + textBottom: t('js.admin.tag_rules.shipping_method_tagged_bottom') taggable: "shipping_method" tagsAttr: "shipping_method_tags" tagListAttr: "preferred_shipping_method_tags" @@ -13,8 +13,8 @@ angular.module("admin.tagRules").directive "tagRule", -> tagListFor: (rule) -> rule.preferred_shipping_method_tags "TagRule::FilterPaymentMethods": - textTop: "Payment methods tagged" - textBottom: "are:" + textTop: t('js.admin.tag_rules.payment_method_tagged_top') + textBottom: t('js.admin.tag_rules.payment_method_tagged_bottom') taggable: "payment_method" tagsAttr: "payment_method_tags" tagListAttr: "preferred_payment_method_tags" @@ -22,8 +22,8 @@ angular.module("admin.tagRules").directive "tagRule", -> tagListFor: (rule) -> rule.preferred_payment_method_tags "TagRule::FilterOrderCycles": - textTop: "Order Cycles tagged" - textBottom: "are:" + textTop: t('js.admin.tag_rules.order_cycle_tagged_top') + textBottom: t('js.admin.tag_rules.order_cycle_tagged_bottom') taggable: "exchange" tagsAttr: "exchange_tags" tagListAttr: "preferred_exchange_tags" @@ -31,8 +31,8 @@ angular.module("admin.tagRules").directive "tagRule", -> tagListFor: (rule) -> rule.preferred_exchange_tags "TagRule::FilterProducts": - textTop: "Inventory variants tagged" - textBottom: "are:" + textTop: t('js.admin.tag_rules.inventory_tagged_top') + textBottom: t('js.admin.tag_rules.inventory_tagged_bottom') taggable: "variant" tagsAttr: "variant_tags" tagListAttr: "preferred_variant_tags" diff --git a/config/locales/en.yml b/config/locales/en.yml index 46e0bb1988..111f031372 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -2484,6 +2484,15 @@ See the %{link} to find out more about %{sitename}'s features and to start using severity: Severity description: Description resolve: Resolve + tag_rules: + shipping_method_tagged_top: "Shipping methods tagged" + shipping_method_tagged_bottom: "are:" + payment_method_tagged_top: "Payment methods tagged" + payment_method_tagged_bottom: "are:" + order_cycle_tagged_top: "Order Cycles tagged" + order_cycle_tagged_bottom: "are:" + inventory_tagged_top: "Inventory variants tagged" + inventory_tagged_bottom: "are:" new_tag_rule_dialog: select_rule_type: "Select a rule type:" add_rule: "Add Rule"