-
Notifications
You must be signed in to change notification settings - Fork 97
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
xliff #21
Comments
Yes, this should be trivial to implement since it’s an XML format. I will add it to our backlog 😃 |
thanks |
any news here? |
Sorry for the delay, i’ve not had the time to implement the feature yet. It is a bit more complicated that I thought 😕. Since the XLIFF format contains the target language and the master language it is a bit different than the other supported Accent formats. Since you requested the feature I have a few questions:
Thank you! |
Thanks for your evolvement, this project is awesome! My thoughts:
Hope this is helpful! Here is example XLIFF file I've just exported: <?xml version="1.0" encoding="UTF-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 http://docs.oasis-open.org/xliff/v1.2/os/xliff-core-1.2-strict.xsd">
<file original="TestApp/Base.lproj/LaunchScreen.storyboard" source-language="en" datatype="plaintext" target-language="pl-PL">
<header>
<tool tool-id="com.apple.dt.xcode" tool-name="Xcode" tool-version="10.0" build-num="10L201y"/>
</header>
<body>
<trans-unit id="ULL-pi-uCz.text">
<source>TestApp</source>
<target>TestApp</target>
<note>Class = "UILabel"; text = "TestApp"; ObjectID = "ULL-pi-uCz";</note>
</trans-unit>
</body>
</file>
<file original="TestApp/Base.lproj/Main.storyboard" source-language="en" datatype="plaintext" target-language="pl-PL">
<header>
<tool tool-id="com.apple.dt.xcode" tool-name="Xcode" tool-version="10.0" build-num="10L201y"/>
</header>
<body>
<trans-unit id="00f-6P-Xg9.text">
<source>Limit</source>
<note>Class = "UILabel"; text = "Limit"; ObjectID = "00f-6P-Xg9";</note>
</trans-unit>
<trans-unit id="0no-oT-haJ.text">
<source>Label</source>
<note>Class = "UILabel"; text = "Label"; ObjectID = "0no-oT-haJ";</note>
</trans-unit>
<trans-unit id="1l3-3u-PCZ.title">
<source>Item</source>
<note>Class = "UIBarButtonItem"; title = "Item"; ObjectID = "1l3-3u-PCZ";</note>
</trans-unit>
<trans-unit id="3hg-K4-IdN.text">
<source>Net price</source>
<target>Cena netto</target>
<note>Class = "UILabel"; text = "Net price"; ObjectID = "3hg-K4-IdN";</note>
</trans-unit>
<trans-unit id="4WP-Mk-N26.text">
<source>Address</source>
<target>Adres</target>
<note>Class = "UILabel"; text = "Address"; ObjectID = "4WP-Mk-N26";</note>
</trans-unit>
<trans-unit id="xAS-qe-C2y.title">
<source>Invoice</source>
<target>Zamówienie</target>
<note>Class = "UINavigationItem"; title = "Invoice"; ObjectID = "xAS-qe-C2y";</note>
</trans-unit>
<trans-unit id="xXD-Fj-vCm.title">
<source>Customer</source>
<target>Klient</target>
<note>Class = "UITableViewController"; title = "Customer"; ObjectID = "xXD-Fj-vCm";</note>
</trans-unit>
</body>
</file>
<file original="TestApp/en.lproj/InfoPlist.strings" source-language="en" datatype="plaintext" target-language="pl-PL">
<header>
<tool tool-id="com.apple.dt.xcode" tool-name="Xcode" tool-version="10.0" build-num="10L201y"/>
</header>
<body>
<trans-unit id="CFBundleName">
<source>$(PRODUCT_NAME)</source>
<target/>
<note>Bundle name</note>
</trans-unit>
</body>
</file>
<file original="TestApp/en.lproj/Localizable.strings" source-language="en" datatype="plaintext" target-language="pl-PL">
<header>
<tool tool-id="com.apple.dt.xcode" tool-name="Xcode" tool-version="10.0" build-num="10L201y"/>
</header>
<body>
<trans-unit id="All">
<source>All</source>
<target>Wszystkie</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Cash">
<source>Cash</source>
<target>Gotówka</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Yes">
<source>Yes</source>
<target>Tak</target>
<note>No comment provided by engineer.</note>
</trans-unit>
</body>
</file>
<file original="TestAppTests/en.lproj/InfoPlist.strings" source-language="en" datatype="plaintext" target-language="pl-PL">
<header>
<tool tool-id="com.apple.dt.xcode" tool-name="Xcode" tool-version="10.0" build-num="10L201y"/>
</header>
<body>
<trans-unit id="CFBundleName">
<source>$(PRODUCT_NAME)</source>
<target/>
<note>Bundle name</note>
</trans-unit>
</body>
</file>
</xliff> |
hey @simonprev any news here? |
Hey, I didn't have time lately to develop anything on Accent 😢 And since we do not use the xliff format at @mirego it is not a priority right now. But all the building blocks are there for anyone to implement the feature, and I'll be glad to merge it in |
@hauleth can you help us with this? |
@emilwojtaszek I will try to do so. |
@hauleth Any updates? |
@andreymaznyak unfortunately no as I have no time to spend on this, so far. |
I’m working on aonther feature in my spare time, but xliff support is next on my todo list. |
![image](https://user-images.githubusercontent.com/464900/55203015-35c17980-51a0-11e9-8647-d91209c7b6de.png) ## 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`_ 🎉
Basic support for XLIFF has been merged in |
what about xliff files, do you have in plan to support this?
https://en.wikipedia.org/wiki/XLIFF
The text was updated successfully, but these errors were encountered: