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

Commit 42fb9df

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

File tree

6 files changed

+13
-27
lines changed

6 files changed

+13
-27
lines changed

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

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,6 @@
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-
1810
<xs:complexType name="argumentType" abstract="true" mixed="false">
1911
<xs:complexContent>
2012
<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 \Magento\Framework\Data\Argument\Interpreter\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 \Magento\Framework\Data\Argument\Interpreter\TranslatableStringUtils
1313
*/
1414
class TranslatableStringUtilsTest extends \PHPUnit_Framework_TestCase
1515
{

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

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,19 +33,21 @@
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>
4236
<xs:complexContent>
4337
<xs:extension base="argumentType">
4438
<xs:attribute name="translate" use="optional" type="xs:boolean"/>
4539
</xs:extension>
4640
</xs:complexContent>
4741
</xs:complexType>
4842

43+
<xs:complexType name="translatable">
44+
<xs:complexContent>
45+
<xs:extension base="string">
46+
<xs:attribute name="translatable" use="optional" type="xs:boolean"/>
47+
</xs:extension>
48+
</xs:complexContent>
49+
</xs:complexType>
50+
4951
<xs:complexType name="boolean">
5052
<xs:complexContent>
5153
<xs:extension base="argumentType"/>

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
<xs:redefine schemaLocation="urn:magento:framework:Data/etc/argument/types.xsd">
1313
<xs:complexType name="string">
1414
<xs:complexContent>
15-
<xs:extension base="argumentType">
16-
<xs:attribute name="translatable" use="optional" type="xs:boolean"/>
17-
</xs:extension>
15+
<xs:restriction base="translatable">
16+
<xs:attribute name="translate" use="prohibited"/>
17+
</xs:restriction>
1818
</xs:complexContent>
1919
</xs:complexType>
2020

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

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,6 @@
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-
1911
<xs:complexType name="argumentType" abstract="true" mixed="true">
2012
<xs:complexContent>
2113
<xs:extension base="argumentType">

0 commit comments

Comments
 (0)