Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bug #30074 Fix wrong value in file id attribute for Xliff 2.0 (deguif)
This PR was squashed before being merged into the 4.2 branch (closes #30074). Discussion ---------- Fix wrong value in file id attribute for Xliff 2.0 | Q | A | ------------- | --- | Branch? | 4.2 | Bug fix? | yes | New feature? | no | BC breaks? | ? | Deprecations? | no | Tests pass? | ? | Fixed tickets | | License | MIT | Doc PR | Currently using the `XliffFileDumper` for exporting messages from catalogue with domain of the form `xxxx+intl-icu` produces an invalid Xliff version 2.0 file as the file id attribute is of type `xs:NMTOKEN` (cf. https://github.com/symfony/translation/blob/master/Resources/schemas/xliff-core-2.0.xsd#L139) which doesn't accept `+` character (cf. http://www.datypic.com/sc/xsd/t-xsd_NMTOKEN.html). Exception is thrown when loading the content after. Commits ------- 8bf12f8 Fix wrong value in file id attribute for Xliff 2.0
- Loading branch information
Showing
3 changed files
with
31 additions
and
1 deletion.
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
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
11 changes: 11 additions & 0 deletions
11
src/Symfony/Component/Translation/Tests/fixtures/resources-2.0+intl-icu.xlf
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,11 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<xliff xmlns="urn:oasis:names:tc:xliff:document:2.0" version="2.0" srcLang="fr-FR" trgLang="en-US"> | ||
<file id="messages.en_US"> | ||
<unit id="LCa0a2j" name="foo"> | ||
<segment> | ||
<source>foo</source> | ||
<target>bar</target> | ||
</segment> | ||
</unit> | ||
</file> | ||
</xliff> |