Skip to content
This repository was archived by the owner on Apr 29, 2019. It is now read-only.

Commit c2d9186

Browse files
committed
MAGETWO-67048: Cannot add translate attribute into the di.xml
1 parent 8ad62e4 commit c2d9186

File tree

6 files changed

+25
-4
lines changed

6 files changed

+25
-4
lines changed

app/code/Magento/Ui/etc/ui_definition.map.xsd

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@
77
-->
88
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
99
<xs:redefine schemaLocation="urn:magento:framework:Data/etc/argument/types.xsd">
10+
<xs:complexType name="string">
11+
<xs:complexContent>
12+
<xs:extension base="argumentType">
13+
<xs:attribute name="translate" use="optional" type="xs:boolean"/>
14+
</xs:extension>
15+
</xs:complexContent>
16+
</xs:complexType>
17+
1018
<xs:complexType name="argumentType" abstract="true" mixed="false">
1119
<xs:complexContent>
1220
<xs:extension base="argumentType" />

dev/tests/integration/testsuite/Magento/Framework/Data/Argument/Interpreter/StringUtilsTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
use Magento\Framework\Stdlib\BooleanUtils;
1010

1111
/**
12-
* @covers StringUtils.
12+
* @covers StringUtils
1313
*/
1414
class StringUtilsTest extends \PHPUnit_Framework_TestCase
1515
{

dev/tests/integration/testsuite/Magento/Framework/Data/Argument/Interpreter/TranslatableStringUtilsTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
use Magento\Framework\Stdlib\BooleanUtils;
1010

1111
/**
12-
* @covers TranslatableStringUtils.
12+
* @covers TranslatableStringUtils
1313
*/
1414
class TranslatableStringUtilsTest extends \PHPUnit_Framework_TestCase
1515
{

lib/internal/Magento/Framework/Data/etc/argument/types.xsd

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@
3333
</xs:complexType>
3434

3535
<xs:complexType name="string">
36+
<xs:annotation>
37+
<xs:documentation>
38+
@deprecated
39+
DI processing MUST not make translation by its own. Should be declared in children.
40+
</xs:documentation>
41+
</xs:annotation>
3642
<xs:complexContent>
3743
<xs:extension base="argumentType">
3844
<xs:attribute name="translate" use="optional" type="xs:boolean"/>

lib/internal/Magento/Framework/ObjectManager/etc/config.xsd

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,8 @@
1212
<xs:redefine schemaLocation="urn:magento:framework:Data/etc/argument/types.xsd">
1313
<xs:complexType name="string">
1414
<xs:complexContent>
15-
<xs:extension base="string">
15+
<xs:extension base="argumentType">
1616
<xs:attribute name="translatable" use="optional" type="xs:boolean"/>
17-
<xs:attribute name="translate" use="prohibited"/>
1817
</xs:extension>
1918
</xs:complexContent>
2019
</xs:complexType>

lib/internal/Magento/Framework/View/Layout/etc/elements.xsd

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@
88
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
99
<!-- Redefine section -->
1010
<xs:redefine schemaLocation="urn:magento:framework:Data/etc/argument/types.xsd">
11+
<xs:complexType name="string">
12+
<xs:complexContent>
13+
<xs:extension base="argumentType">
14+
<xs:attribute name="translate" use="optional" type="xs:boolean"/>
15+
</xs:extension>
16+
</xs:complexContent>
17+
</xs:complexType>
18+
1119
<xs:complexType name="argumentType" abstract="true" mixed="true">
1220
<xs:complexContent>
1321
<xs:extension base="argumentType">

0 commit comments

Comments
 (0)