-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from damianz5/content_separation_for_translation
Fixed tags separation (ezembed) for Encoder
- Loading branch information
Showing
9 changed files
with
374 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
tests/fixtures/testEncodeTwoRichTextWithTwoEzembed_expectedEncodeResult.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<?xml version="1.0"?> | ||
<response><field_1_richtext type="eZ\Publish\Core\FieldType\RichText\Value"><fakecdata>XXXEOLXXX<section xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ezxhtml="http://ez.no/xmlns/ezpublish/docbook/xhtml" xmlns:ezcustom="http://ez.no/xmlns/ezpublish/docbook/custom" version="5.0-variant ezpublish-1.0">XXXEOLXXX <para>Mexican cuisine is primarily a fusion of indigenous Mesoamerican cooking with European, especially Spanish.</para>XXXEOLXXX</section>XXXEOLXXX</fakecdata></field_1_richtext><field_2_richtext type="eZ\Publish\Core\FieldType\RichText\Value"><fakecdata>XXXEOLXXX<section xmlns="http://ez.no/namespaces/ezpublish5/xhtml5/edit">XXXEOLXXX <p>Mexican cuisine is primarily a fusion of indigenous Mesoamerican cooking with European, especially Spanish. TheXXXEOLXXX basic staples are native foods such as corn, beans and chili peppers.</p>XXXEOLXXX <h2>Main Features</h2>XXXEOLXXX <div data-ezelement="ezembed" data-href="ezcontent://192" data-ezview="embed" class="ez-embed-type-image" data-ezalign="right"><span data-ezelement="ezconfig"><span data-ezelement="ezvalue" data-ezvalue-key="size">large</span> </span></div>XXXEOLXXX <p>The ability to cook well, called "sazón" (lit. seasoning) is considered to be a gift generally gained fromXXXEOLXXX experience and a sense of commitment to the diners.</p>XXXEOLXXX <div data-ezelement="ezembed" data-href="ezcontent://191" data-ezview="embed" class="ez-embed-type-image" data-ezalign="left"><span data-ezelement="ezconfig"><span data-ezelement="ezvalue" data-ezvalue-key="size">large</span> </span></div>XXXEOLXXX <p>Mexican regional home cooking is completely different from the food served in most Mexican restaurants outsideXXXEOLXXX Mexico, which is usually some variety of Tex-Mex.</p>XXXEOLXXX</section>XXXEOLXXX</fakecdata></field_2_richtext></response> |
5 changes: 5 additions & 0 deletions
5
tests/fixtures/testEncodeTwoRichTextWithTwoEzembed_field1_richtext.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<section xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" | ||
xmlns:ezxhtml="http://ez.no/xmlns/ezpublish/docbook/xhtml" | ||
xmlns:ezcustom="http://ez.no/xmlns/ezpublish/docbook/custom" version="5.0-variant ezpublish-1.0"> | ||
<para>Mexican cuisine is primarily a fusion of indigenous Mesoamerican cooking with European, especially Spanish.</para> | ||
</section> |
15 changes: 15 additions & 0 deletions
15
tests/fixtures/testEncodeTwoRichTextWithTwoEzembed_field2_richtext.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<section xmlns="http://ez.no/namespaces/ezpublish5/xhtml5/edit"> | ||
<p>Mexican cuisine is primarily a fusion of indigenous Mesoamerican cooking with European, especially Spanish. The | ||
basic staples are native foods such as corn, beans and chili peppers.</p> | ||
<h2>Main Features</h2> | ||
<div data-ezelement="ezembed" data-href="ezcontent://192" data-ezview="embed" class="ez-embed-type-image" | ||
data-ezalign="right"><span data-ezelement="ezconfig"><span data-ezelement="ezvalue" | ||
data-ezvalue-key="size">large</span> </span></div> | ||
<p>The ability to cook well, called "sazón" (lit. seasoning) is considered to be a gift generally gained from | ||
experience and a sense of commitment to the diners.</p> | ||
<div data-ezelement="ezembed" data-href="ezcontent://191" data-ezview="embed" class="ez-embed-type-image" | ||
data-ezalign="left"><span data-ezelement="ezconfig"><span data-ezelement="ezvalue" | ||
data-ezvalue-key="size">large</span> </span></div> | ||
<p>Mexican regional home cooking is completely different from the food served in most Mexican restaurants outside | ||
Mexico, which is usually some variety of Tex-Mex.</p> | ||
</section> |
2 changes: 2 additions & 0 deletions
2
tests/fixtures/testEncodeTwoRichText_expectedEncodeResult.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<?xml version="1.0"?> | ||
<response><field_1_richtext type="eZ\Publish\Core\FieldType\RichText\Value"><fakecdata>XXXEOLXXX<section xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ezxhtml="http://ez.no/xmlns/ezpublish/docbook/xhtml" xmlns:ezcustom="http://ez.no/xmlns/ezpublish/docbook/custom" version="5.0-variant ezpublish-1.0">XXXEOLXXX <para>XXXEOLXXX Mexican cuisine is primarily a fusion of indigenous Mesoamerican cooking with European, especially Spanish.XXXEOLXXX </para>XXXEOLXXX</section>XXXEOLXXX</fakecdata></field_1_richtext><field_2_richtext type="eZ\Publish\Core\FieldType\RichText\Value"><fakecdata>XXXEOLXXX<section xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ezxhtml="http://ez.no/xmlns/ezpublish/docbook/xhtml" xmlns:ezcustom="http://ez.no/xmlns/ezpublish/docbook/custom" version="5.0-variant ezpublish-1.0">XXXEOLXXX <para>XXXEOLXXX Mexican cuisine is primarily a fusion of indigenous Mesoamerican cooking with European, especially Spanish.XXXEOLXXX </para>XXXEOLXXX <para>File 2</para>XXXEOLXXX</section>XXXEOLXXX</fakecdata></field_2_richtext></response> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<section xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" | ||
xmlns:ezxhtml="http://ez.no/xmlns/ezpublish/docbook/xhtml" | ||
xmlns:ezcustom="http://ez.no/xmlns/ezpublish/docbook/custom" version="5.0-variant ezpublish-1.0"> | ||
<para> | ||
Mexican cuisine is primarily a fusion of indigenous Mesoamerican cooking with European, especially Spanish. | ||
</para> | ||
</section> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<section xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" | ||
xmlns:ezxhtml="http://ez.no/xmlns/ezpublish/docbook/xhtml" | ||
xmlns:ezcustom="http://ez.no/xmlns/ezpublish/docbook/custom" version="5.0-variant ezpublish-1.0"> | ||
<para> | ||
Mexican cuisine is primarily a fusion of indigenous Mesoamerican cooking with European, especially Spanish. | ||
</para> | ||
<para>File 2</para> | ||
</section> |
2 changes: 2 additions & 0 deletions
2
tests/fixtures/testEncodeTwoTextline_expectedEncodeResult.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<?xml version="1.0"?> | ||
<response><field_1_textline type="eZ\Publish\Core\FieldType\TextLine\Value">Some text 1</field_1_textline><field_2_textline type="eZ\Publish\Core\FieldType\TextLine\Value">Some text 2</field_2_textline></response> |
Oops, something went wrong.