Updating catkeys files

I have made a german translation for an application that I wrote. I generated the en.catkeys, copied it to de.catkeys and translated it with CatkeysEditor.
So far, so good.

Now I’ve developed the app a bit further and have new strings with B_TRANSLATE(). I made a new en.catkeys with “make catkeys”.
Can I somehow update the de.catkeys file? Didn’t find anything in CatkeysEditor. (tried the import function but that overwrites the complete translation)

I also tried editing the de.catkeys file by hand. I copied the new lines from en.catkeys an translated them. But that didn’t work. When I do a “make bindcatalogs” I get an error that says “bad data”.

After changing/adding strings in your app, you’ll have to do the same as you did initially. So:

  1. make catkeys to generate the new en.catkeys
  2. rename the old de.catkeys to e.g. old.de.catkeys
  3. duplicate these en.catkeys and rename to de.catkeys
  4. open de.catkeys in CatKeysEditorand use Import… to merge the old.de.catkeys

Now you can continue to translate the new/changed strings.

Using Polyglot simplifies this, because it removes steps 2 to 4. Especially when the number of languages increases, it’s a massive time and error saver.

1 Like

Ah, I knew there had to be a way :slight_smile:

Thanks Humdinger, that worked great.