Is it possible to combine two .po translation files together?

后端 未结 3 652
春和景丽
春和景丽 2021-02-03 23:04

We have two .po files, each from different branches of a piece of software.

We need to combine these into a single .po file.

There are duplicates between the two

相关标签:
3条回答
  • 2021-02-03 23:33

    I use msgmerge:

    msgmerge [old_file.po] [new_file.po] > output.po
    

    It works for me, but be aware that it does a silly merge, it is, it discards the entries in the old_file (new file overwrites old one).

    0 讨论(0)
  • 2021-02-03 23:38

    What you are looking for is the msgcat util, it concatenates and merges the specified PO dictionaries.

    This is part of gettext utils, for more information please consult gettext manual page on msgcat.

    0 讨论(0)
  • 2021-02-03 23:43

    you can use poedit. To merge your current po-file, you must to open it and click:

    • Catalog > Update from POT-file.
    • Set the filter to all files and select your second.po file

    Poedit will show you new & obsolete strings

    0 讨论(0)
提交回复
热议问题