Created
September 27, 2011 05:11
-
-
Save mrpollo/1244384 to your computer and use it in GitHub Desktop.
A basic bash script to generate a po file from a project directory, it will recursively find inside it i added some exclusions to remove some framework libraries
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| for FILENAME in `/usr/bin/find $1 -iname "*.php" | /usr/bin/grep -v -w "Zend\|dompdf\|includes/font\|ZendFramework\|json\|phpmailer"` | |
| do | |
| echo $FILENAME | |
| `/usr/local/bin/xgettext -o lib_amce/langs/en_US/LC_MESSAGES/messages.po --join-existing --from-code=utf-8 --keyword=translate --keyword -L Python $FILENAME` | |
| done | |
| exit; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment