From 466c8a5fcbf42aec365062ff869a3350346013ff Mon Sep 17 00:00:00 2001 From: Roman Schmid Date: Thu, 17 Mar 2016 16:30:43 +0100 Subject: [PATCH] Add newly added translation-keys to en.yml. Only substitute fields that actually have placeholders in Product and ProductVariation, otherwise PHP will raise a notice. --- code/product/Product.php | 7 ++++--- code/product/variations/ProductVariation.php | 7 ++++--- lang/en.yml | 7 +++++++ 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/code/product/Product.php b/code/product/Product.php index f6a51355c..1c39f1291 100644 --- a/code/product/Product.php +++ b/code/product/Product.php @@ -144,15 +144,16 @@ public function getCMSFields() ); //physical measurements $fieldSubstitutes = array( - 'LengthUnit' => self::config()->length_unit, - 'WeightUnit' => self::config()->weight_unit, + 'LengthUnit' => self::config()->length_unit ); $fields->addFieldsToTab( 'Root.Shipping', array( TextField::create( 'Weight', - _t('Product.WeightWithUnit', 'Weight ({WeightUnit})', '', $fieldSubstitutes), + _t('Product.WeightWithUnit', 'Weight ({WeightUnit})', '', array( + 'WeightUnit' => self::config()->weight_unit + )), '', 12 ), diff --git a/code/product/variations/ProductVariation.php b/code/product/variations/ProductVariation.php index 859b1f075..ca5519f9f 100755 --- a/code/product/variations/ProductVariation.php +++ b/code/product/variations/ProductVariation.php @@ -127,15 +127,16 @@ public function getCMSFields() //physical measurement units $fieldSubstitutes = array( - 'LengthUnit' => Product::config()->length_unit, - 'WeightUnit' => Product::config()->weight_unit, + 'LengthUnit' => Product::config()->length_unit ); //physical measurements $fields->push( TextField::create( 'Weight', - _t('Product.WeightWithUnit', 'Weight ({WeightUnit})', '', $fieldSubstitutes), + _t('Product.WeightWithUnit', 'Weight ({WeightUnit})', '', array( + 'WeightUnit' => Product::config()->weight_unit + )), '', 12 ) diff --git a/lang/en.yml b/lang/en.yml index 5a0e30b33..8942e6c3b 100644 --- a/lang/en.yml +++ b/lang/en.yml @@ -31,6 +31,13 @@ en: CreateNewTitle: 'Create new address' NoAddress: 'No addresses found.' Title: 'Default addresses' + DefaultShippingAddress: 'Default Shipping Address' + DefaultBillingAddress: 'Default Billing Address' + MakeDefaultShipping: 'Make Default Shipping' + MakeDefaultShippingTitle: 'Make this my default shipping address' + MakeDefaultBilling: 'Make Default Billing' + MakeDefaultBillingTitle: 'Make this my default billing address' + DeleteAddress: 'Delete this address' AccountPage_EditProfile: Title: 'Edit Profile' Address: