Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

like image 876
dav Avatar asked Jan 08 '23 16:01

dav


1 Answers

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.

like image 71
gmponos Avatar answered Jan 14 '23 07:01

gmponos