#Problems with Angular Internationalisation

7 messages · Page 1 of 1 (latest)

honest creek
#

Commit the original and translated xlf files in your git (or whatever source control you're using) repo. Make a diff betwen the two versions of the original xlf file before and after your word additions. Report the changes in the translated xlf files and add the missing translations. (or use a dedicated translation application supporting xlf, but I know nothing of such tools).

astral forum
honest creek
#

Hence why you should store the various versions of the file under source control, just like your own source code.

astral forum
#

and how do I "merge" them?

honest creek
#

You shouldn't need to "merge" them. Let's say you extract the i18n units a first time. You obtain a file with something like

<trans-unit id="a"></trans-unit>
<trans-unit id="b"></trans-unit>
<trans-unit id="c"></trans-unit>

You commit this file under source control. Then you translate it and also store the additional (translated) xlf files under source control.
Now you make changes to the app and re-extract the i18n units. You obtain a new version of the file:

<trans-unit id="a"></trans-unit>
<trans-unit id="c"></trans-unit>
<trans-unit id="d"></trans-unit>

Using your preferred diff tool, you can compare it to the previous version, stored in version control. So you can detect that a and c are still there, that b has disappeared, and that d is new. So you report those changes to the translated file: you delete b and addd(with its translation) in the translated files. And then you commit all the new versions.

astral forum
#

I see. So I do have to add the changes manually

west orbit
#

There are third party online services, and even some desktop software for managing merge of translated files.