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


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.

| improve this answer | |
  • Thank you man. I appreciate it. I found a solution though this helped me merge them together. Hoping this will help aswell: poedit.net – marouane91 Aug 26 '19 at 14:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.