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

Add basic support for XLIFF 1.2 file format #79

Merged
merged 1 commit into from Mar 31, 2019
Merged

Conversation

simonprev
Copy link
Member

image

Issue

📚 #21

Feature

This is a basic implementation of the XLIFF 1.2 format. This format is used heavily in a lot of translations related tool (and in XCode) so I may have missed some of the implementation details. But it’s a good start for someone who want to contribute to Accent 😉

Refactor

This format is a bit trickier than other since it required the master language to export the targets. We needed to refactor some module to use the master language in the serialization process. Also, not needed but cleaner, we wrap the document’s key top_of_the_file_comment and header inside a new struct Language.Document. This will become handy if we ever need to add an attribute to the document OR if we add a different attribute to the serialization input.

Next steps

This format includes 2 new dependencies to handle XML encode and decode. Why not use the same XML library used for the XML Android format? Because… *drum roll* The <source> XML tag when encoded by the mochiweb_html module is a self closing tag (per the HTML spec) 🥇

Since those 2 new deps are required for the XLIFF format and can pretty print XML, we should use them instead of mochiweb 🎉

@simonprev simonprev merged commit ae0df57 into master Mar 31, 2019
@simonprev simonprev deleted the feature/xliff1.2 branch March 31, 2019 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant