PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Wednesday, August 31, 2022

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

 August 31, 2022     cakephp, cakephp-2.x, internationalization, po, poedit     No comments   

Issue

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


Solution

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.



Answered By - gmponos
Answer Checked By - Robin (PHPFixing Admin)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing