I am using a command line tool (ng-xi18n
) to extract the i18n strings from an angular 2 app I wrote. The output of this command is a messages.xlf
file. Coming from a .po
background, and being not familiar with .xlf
, I assumed that this file is the equivalent to the .pot
file (correct me if I am wrong).
I then assumed that if I want to translate my app, I had to cp messages.xlf messages.de.xlf
to have a copy (messages.de.xlf
) of the template file (messages.xlf
) where I can translate each message into German (hence the .de.xlf
).
After translating some dummy texts and running the app, I saw that it worked as expected, so I quit translating and continued developing the app. After some time, I added more i18n strings, and eventually thought that I had to update my template. And this is where things got hardly maintainable. I updated the template messages.xlf
file, and quickly was wondering how I could update the new strings to my already translated messages.de.xlf
file without loosing my progress.
When I was developing using .po
files, this was no problem thanks to good tools like poEdit, but I didn't find anything comparable for .xlf
. After trying some tools, I thought that the best choice would be Lokalize, but I didn't find a possibility to merge the template file to already translated (but outdated) files either.
Up to now, this was rather an essay than a question, so here's a quick summary:
- Is the workflow of dealing with
.xlf
files really comparable to.po
as I initially thought (described above), or is it completely different? - How am I suppose to update my already translated files?
- What are the best practices dealing with
.xlf
files? - What are proof of concept tools to work with
.xlf
?
Sidenotes:
- The Lokalize handbook was not helpful at all. I see a lot of functions that sound promising, like:
- "File" > "Update file from template". I did not find anything in the handbook to explain this function. If I click on this, nothing happens.
- "Sync" > "Open file for sync/merge". This seems to be a function to merge two similar files (by multiple translators) rather than a tool to update the translation file from a template. Even though there is a tooltip in Lokalize's primary sync tab, notifying me about "x unmatched entries", I just couldn't find anything to append those unmatched entries to my
.de.xlf
file. - [Update] Turns out, I had similar issues as in this question. After downgrading my version of Lokalize to the suggested one, many issues (including the ones mentioned in the question) disappeared. However, now the "Update file from template" option is greyed out, and I don't know why.
- I also tried OmegaT, which does not work at all on my platform (Ubuntu 16.04).
- [Update] Virtaal works great for merging new strings from a template, but the UI in general is very poorly designed...
- Googling did not help, as every hit seems to be related to XCode or something.
Thanks for any help in advance, I really appreciate it