Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature #23890 [Translation] Adding the ability do dump <notes> in xl…
…iff2.0 (Nyholm) This PR was squashed before being merged into the 3.4 branch (closes #23890). Discussion ---------- [Translation] Adding the ability do dump <notes> in xliff2.0 | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | n/a The Xliff2.0 dumper do not dump notes. The note section is the only place (as far as I can see) you can add arbitrary data. See [specification](http://docs.oasis-open.org/xliff/xliff-core/v2.0/os/xliff-core-v2.0-os.html). This will be useful when you want to add data like "approved", "status" etc. I can see from the test code that a previous author intends to use attributes to the <target> for such data. That is [not allowed](http://docs.oasis-open.org/xliff/xliff-core/v2.0/os/xliff-core-v2.0-os.html#target), not even with a custom namespace. If you want to validate my test fixture, here is the validator: http://okapi-lynx.appspot.com/validation Commits ------- c4dd11c [Translation] Adding the ability do dump <notes> in xliff2.0
- Loading branch information
Showing
4 changed files
with
54 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
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
16 changes: 16 additions & 0 deletions
16
src/Symfony/Component/Translation/Tests/fixtures/resources-notes-meta.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,16 @@ | ||
<?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"> | ||
<notes> | ||
<note category="state">new</note> | ||
<note category="approved">true</note> | ||
<note category="section" priority="1">user login</note> | ||
</notes> | ||
<segment> | ||
<source>foo</source> | ||
<target>bar</target> | ||
</segment> | ||
</unit> | ||
</file> | ||
</xliff> |