3

I want to improve my gettext translation file process, so I only have one .po file for the application, to avoid duplicated translation work when I send my files to translation agencies and reducing onload merging.

The challenges is that the initial parsing will always create two separate files (one parsing from PHP using poedit, one parsing from smarty using tsmarty2c.php). So I looked in to msgcat and came up with this process:

1. parse from PHP files (using poedit)
2. $php tsmarty2c.php templates > templates.c
3. $xgettext templates.c -d templates -p /path/locale/en_GB/LC_MESSAGES -j 
4. $msgcat templates.po controllerClasses.po complete.po -o complete.po 

This works fine with one exception, now deprecated strings that are removed in 1/2 is still kept since I need to include complete.po in the merging process (since that has the latest translations from the agency).

Any tips on how I can create a similar process, but also assure that old strings are removed from complete.po?

stadskle
  • 31
  • 1

0 Answers0