Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Translation] Added segment-attributes metadata for Xliff2 files to preserve the `state´ attribute of translations #58205

Merged
merged 1 commit into from
Sep 18, 2024

Conversation

jbtronics
Copy link
Contributor

Q A
Branch? 7.2
Bug fix? no
New feature? yes
Deprecations? no
Issues None
License MIT

The XliffFileLoader and XliffFileDumper create/parse a "target-attributes" metadata array, for additional attributes on the target XML element. This allowed to read/write the translation state of xliff1.2 files.
In xliff2.0 however, the state attribute is not stored at the target element, but on the "segment" element instead (see xliff 2.0 specification). Therefore, currently, the state information (and other information stored there) is lost when loading a xliff2.0 file and writing the catalog back.

This pull requests add a new "segment-attributes" metadata, which contains the attributes of the "segment" element, and allows preserving this information and also allows accessing it inside an application via the metadata.

@carsonbot carsonbot added this to the 7.2 milestone Sep 8, 2024
@jbtronics jbtronics force-pushed the segment-attributes-metadata branch 5 times, most recently from d15bf1a to 3560884 Compare September 8, 2024 20:18
…reserve the "state" attribute of translations
@fabpot fabpot force-pushed the segment-attributes-metadata branch from 9632c19 to 3d12ac4 Compare September 18, 2024 16:01
@fabpot
Copy link
Member

fabpot commented Sep 18, 2024

Thank you @jbtronics.

@fabpot fabpot merged commit 111592b into symfony:7.2 Sep 18, 2024
1 check was pending
@OskarStark OskarStark changed the title [Translation] Added segment-attributes metadata for Xliff2 files to preserve the "state" attribute of translations [Translation] Added segment-attributes metadata for Xliff2 files to preserve the `state´ attribute of translations Sep 19, 2024
@fabpot fabpot mentioned this pull request Oct 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants