Skip to content

Commit c201c9e

Browse files
author
Oleksii Korshenko
committed
MAGETWO-70543: Fixed: Product attributes labels are not translated on product edit page #10184
- Merge Pull Request #10184 from fernandofauth/magento2:attribute - Merged commits: 1. 14cc781 2. a79cff0 3. ffadb4e 4. d1a7198 5. 5aadc6c
2 parents 160b9db + 5aadc6c commit c201c9e

File tree

5 files changed

+31
-21
lines changed

5 files changed

+31
-21
lines changed

app/code/Magento/Backend/view/adminhtml/ui_component/design_config_form.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
<item name="componentType" xsi:type="string">dynamicRows</item>
4444
<item name="recordTemplate" xsi:type="string">record</item>
4545
<item name="deleteButtonLabel" xsi:type="string">Remove</item>
46-
<item name="addButtonLabel" xsi:type="string">Add New User Agent Rule</item>
46+
<item name="addButtonLabel" xsi:type="string" translate="true">Add New User Agent Rule</item>
4747
<item name="deleteProperty" xsi:type="boolean">false</item>
4848
<item name="dndConfig" xsi:type="array">
4949
<item name="enabled" xsi:type="boolean">false</item>
@@ -67,7 +67,7 @@
6767
<item name="dataType" xsi:type="string">text</item>
6868
<item name="dataScope" xsi:type="string">search</item>
6969
<item name="fit" xsi:type="boolean">false</item>
70-
<item name="label" xsi:type="string">Search String</item>
70+
<item name="label" xsi:type="string" translate="true">Search String</item>
7171
<item name="showFallbackReset" xsi:type="boolean">false</item>
7272
</item>
7373
</argument>
@@ -80,7 +80,7 @@
8080
<item name="dataType" xsi:type="string">text</item>
8181
<item name="dataScope" xsi:type="string">value</item>
8282
<item name="fit" xsi:type="boolean">false</item>
83-
<item name="label" xsi:type="string">Theme Name</item>
83+
<item name="label" xsi:type="string" translate="true">Theme Name</item>
8484
<item name="showFallbackReset" xsi:type="boolean">false</item>
8585
</item>
8686
</argument>
@@ -91,7 +91,7 @@
9191
<item name="componentType" xsi:type="string">actionDelete</item>
9292
<item name="dataType" xsi:type="string">text</item>
9393
<item name="fit" xsi:type="boolean">false</item>
94-
<item name="label" xsi:type="string">Actions</item>
94+
<item name="label" xsi:type="string" translate="true">Actions</item>
9595
<item name="sortOrder" xsi:type="string">50</item>
9696
<item name="additionalClasses" xsi:type="string">data-grid-actions-cell</item>
9797
<item name="template" xsi:type="string">Magento_Backend/dynamic-rows/cells/action-delete</item>

app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/Eav.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ public function modifyMeta(array $meta)
244244
if ($attributes) {
245245
$meta[$groupCode]['children'] = $this->getAttributesMeta($attributes, $groupCode);
246246
$meta[$groupCode]['arguments']['data']['config']['componentType'] = Fieldset::NAME;
247-
$meta[$groupCode]['arguments']['data']['config']['label'] = __('%1', $group->getAttributeGroupName());
247+
$meta[$groupCode]['arguments']['data']['config']['label'] = __('%1', __($group->getAttributeGroupName()));
248248
$meta[$groupCode]['arguments']['data']['config']['collapsible'] = true;
249249
$meta[$groupCode]['arguments']['data']['config']['dataScope'] = self::DATA_SCOPE_PRODUCT;
250250
$meta[$groupCode]['arguments']['data']['config']['sortOrder'] =
@@ -546,7 +546,7 @@ public function setupAttributeMeta(ProductAttributeInterface $attribute, $groupC
546546
'required' => $attribute->getIsRequired(),
547547
'notice' => $attribute->getNote(),
548548
'default' => $attribute->getDefaultValue(),
549-
'label' => $attribute->getDefaultFrontendLabel(),
549+
'label' => __($attribute->getDefaultFrontendLabel()),
550550
'code' => $attribute->getAttributeCode(),
551551
'source' => $groupCode,
552552
'scopeLabel' => $this->getScopeLabel($attribute),
@@ -650,7 +650,7 @@ public function setupAttributeContainerMeta(ProductAttributeInterface $attribute
650650
'formElement' => 'container',
651651
'componentType' => 'container',
652652
'breakLine' => false,
653-
'label' => $attribute->getDefaultFrontendLabel(),
653+
'label' => __($attribute->getDefaultFrontendLabel()),
654654
'required' => $attribute->getIsRequired(),
655655
]
656656
);

app/code/Magento/Catalog/view/adminhtml/ui_component/product_listing.xml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,17 @@
3434
<item name="sticky" xsi:type="boolean">true</item>
3535
</item>
3636
</argument>
37-
<bookmark name="bookmarks"/>
37+
<container name="bookmarks">
38+
<argument name="data" xsi:type="array">
39+
<item name="config" xsi:type="array">
40+
<item name="component" xsi:type="string">Magento_Ui/js/grid/controls/bookmarks/bookmarks</item>
41+
<item name="displayArea" xsi:type="string">dataGridActions</item>
42+
<item name="storageConfig" xsi:type="array">
43+
<item name="provider" xsi:type="string">localStorage</item>
44+
</item>
45+
</item>
46+
</argument>
47+
</container>
3848
<columnsControls name="columns_controls"/>
3949
<filters name="listing_filters">
4050
<filterSelect name="store_id">

app/code/Magento/CatalogRule/view/adminhtml/ui_component/catalog_rule_form.xml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
<field name="name">
7373
<argument name="data" xsi:type="array">
7474
<item name="config" xsi:type="array">
75-
<item name="label" xsi:type="string">Rule Name</item>
75+
<item name="label" xsi:type="string" translate="true">Rule Name</item>
7676
<item name="visible" xsi:type="boolean">true</item>
7777
<item name="dataType" xsi:type="string">text</item>
7878
<item name="formElement" xsi:type="string">input</item>
@@ -87,7 +87,7 @@
8787
<field name="description">
8888
<argument name="data" xsi:type="array">
8989
<item name="config" xsi:type="array">
90-
<item name="label" xsi:type="string">Description</item>
90+
<item name="label" xsi:type="string" translate="true">Description</item>
9191
<item name="visible" xsi:type="boolean">true</item>
9292
<item name="dataType" xsi:type="string">text</item>
9393
<item name="formElement" xsi:type="string">textarea</item>
@@ -99,7 +99,7 @@
9999
<field name="is_active">
100100
<argument name="data" xsi:type="array">
101101
<item name="config" xsi:type="array">
102-
<item name="label" xsi:type="string">Status</item>
102+
<item name="label" xsi:type="string" translate="true">Status</item>
103103
<item name="visible" xsi:type="boolean">true</item>
104104
<item name="dataType" xsi:type="string">number</item>
105105
<item name="formElement" xsi:type="string">select</item>
@@ -121,7 +121,7 @@
121121
<field name="website_ids">
122122
<argument name="data" xsi:type="array">
123123
<item name="config" xsi:type="array">
124-
<item name="label" xsi:type="string">Websites</item>
124+
<item name="label" xsi:type="string" translate="true">Websites</item>
125125
<item name="dataType" xsi:type="string">number</item>
126126
<item name="formElement" xsi:type="string">multiselect</item>
127127
<item name="validation" xsi:type="array">
@@ -140,7 +140,7 @@
140140
<field name="customer_group_ids">
141141
<argument name="data" xsi:type="array">
142142
<item name="config" xsi:type="array">
143-
<item name="label" xsi:type="string">Customer Groups</item>
143+
<item name="label" xsi:type="string" translate="true">Customer Groups</item>
144144
<item name="dataType" xsi:type="string">number</item>
145145
<item name="formElement" xsi:type="string">multiselect</item>
146146
<item name="validation" xsi:type="array">
@@ -155,7 +155,7 @@
155155
<field name="from_date">
156156
<argument name="data" xsi:type="array">
157157
<item name="config" xsi:type="array">
158-
<item name="label" xsi:type="string">From</item>
158+
<item name="label" xsi:type="string" translate="true">From</item>
159159
<item name="visible" xsi:type="boolean">true</item>
160160
<item name="dataType" xsi:type="string">text</item>
161161
<item name="formElement" xsi:type="string">date</item>
@@ -170,7 +170,7 @@
170170
<field name="to_date">
171171
<argument name="data" xsi:type="array">
172172
<item name="config" xsi:type="array">
173-
<item name="label" xsi:type="string">To</item>
173+
<item name="label" xsi:type="string" translate="true">To</item>
174174
<item name="visible" xsi:type="boolean">true</item>
175175
<item name="dataType" xsi:type="string">text</item>
176176
<item name="formElement" xsi:type="string">date</item>
@@ -185,7 +185,7 @@
185185
<field name="sort_order">
186186
<argument name="data" xsi:type="array">
187187
<item name="config" xsi:type="array">
188-
<item name="label" xsi:type="string">Priority</item>
188+
<item name="label" xsi:type="string" translate="true">Priority</item>
189189
<item name="dataType" xsi:type="string">text</item>
190190
<item name="formElement" xsi:type="string">input</item>
191191
<item name="source" xsi:type="string">catalog_rule</item>
@@ -205,7 +205,7 @@
205205
<field name="simple_action">
206206
<argument name="data" xsi:type="array">
207207
<item name="config" xsi:type="array">
208-
<item name="label" xsi:type="string">Apply</item>
208+
<item name="label" xsi:type="string" translate="true">Apply</item>
209209
<item name="dataType" xsi:type="string">number</item>
210210
<item name="formElement" xsi:type="string">select</item>
211211
<item name="source" xsi:type="string">catalog_rule</item>
@@ -274,7 +274,7 @@
274274
<field name="discount_amount">
275275
<argument name="data" xsi:type="array">
276276
<item name="config" xsi:type="array">
277-
<item name="label" xsi:type="string">Discount Amount</item>
277+
<item name="label" xsi:type="string" translate="true">Discount Amount</item>
278278
<item name="dataType" xsi:type="string">text</item>
279279
<item name="formElement" xsi:type="string">input</item>
280280
<item name="source" xsi:type="string">catalog_rule</item>
@@ -288,7 +288,7 @@
288288
<field name="stop_rules_processing">
289289
<argument name="data" xsi:type="array">
290290
<item name="config" xsi:type="array">
291-
<item name="label" xsi:type="string">Discard subsequent rules</item>
291+
<item name="label" xsi:type="string" translate="true">Discard subsequent rules</item>
292292
<item name="fieldGroup" xsi:type="string">bool</item>
293293
<item name="dataType" xsi:type="string">number</item>
294294
<item name="formElement" xsi:type="string">select</item>
@@ -309,4 +309,4 @@
309309
</argument>
310310
</field>
311311
</fieldset>
312-
</form>
312+
</form>

app/code/Magento/Theme/view/adminhtml/templates/title.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ $title = $block->escapeHtml($block->getPageTitle());
1515
?>
1616

1717
<div class="page-title-wrapper<?php /* @escapeNotVerified */ echo $titleClass; ?>">
18-
<h1 class="page-title"<?php /* @escapeNotVerified */ echo $titleId?>><?php /* @escapeNotVerified */ echo $title ?></h1>
18+
<h1 class="page-title"<?php /* @escapeNotVerified */ echo $titleId?>><?php /* @escapeNotVerified */ echo __($title) ?></h1>
1919
<?php echo $block->getChildHtml(); ?>
2020
</div>

0 commit comments

Comments
 (0)