How to update an existing .po file with a newly generated .pot file?
Asked Answered
H

1

7

Cake version is 2.x. I have extracted all the texts inside __ function with ./Console/cake i18n extract command, moved the default.pot file into app/Locale/[iso3]/LC_MESSAGES/default.po and translated it to corresponding language. Everything is working fine.

After some time I have added some new functionality into the site and I need to add those messages into the po file. However if I use the same command it will create a new pot and I have to either manually merge them or replace with new po file and copy/paste the translations - both are too much manual work, because I have a few thousand lines of text.

Is there any way to tell cake update my po file adding only messages that does not exist in there ?

Thanks

Hone answered 31/8, 2015 at 14:33 Comment(0)
T
15

Download PoEdit. It has an option to update your PO file from an existing pot file. From the menu go to Catalog -> Update from POT file.

So you will create your a new POT file and then update your PO file. PoEdit will update the PO file with the new values and I think it also removes any unnecessary ones.

PS: It would be wise before making any move to keep a backup.

Tanika answered 31/8, 2015 at 17:18 Comment(1)
Because of your words using a backup ;) I would go a bit further and suggest using Git.Drumhead

© 2022 - 2024 — McMap. All rights reserved.