plugins - How to merge two .PO language files?

I have a .po file that works with the theme and it contains 1259 characters, and i translated many words in it.That been

I have a .po file that works with the theme and it contains 1259 characters, and i translated many words in it.

That been said, after the theme was updated i found out that the new .po files contains 1898 (460 more characters).

So i would like to know if there is a safe and efficient way to merge these two files, that means keeping the integrity of manual translations i did + the new terms that were added by new version of the theme file.

Can anyone tell me if there is a way to achieve this ? I'd appreciate it

Thank you in advance

I have a .po file that works with the theme and it contains 1259 characters, and i translated many words in it.

That been said, after the theme was updated i found out that the new .po files contains 1898 (460 more characters).

So i would like to know if there is a safe and efficient way to merge these two files, that means keeping the integrity of manual translations i did + the new terms that were added by new version of the theme file.

Can anyone tell me if there is a way to achieve this ? I'd appreciate it

Thank you in advance

Share Improve this question edited Aug 22, 2019 at 10:16 fuxia 107k39 gold badges255 silver badges459 bronze badges asked Aug 22, 2019 at 8:20 marouane91marouane91 176 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

Since .po files are full text, you could first compare the files to see if the differences between the files occur at a specific place (is the addition only located at the end?), are the same keys used for different values?, ... to ensure that no data is being lost.

To that purpose you could use: - CLI tools such as diff or a program like Meld (which is based on diff) to get a visual aid when comparing the files. - an IDE which provides file comparison possibilities (For example Atom with the add-on compare-files)

You could try to merge the files together automatically by using the following CLI tool msgmerge.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745224125a4617382.html

相关推荐

  • plugins - How to merge two .PO language files?

    I have a .po file that works with the theme and it contains 1259 characters, and i translated many words in it.That been

    5小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信