Created
December 25, 2017 06:37
-
-
Save fukata/f37c24649d49ada676516bb48d790711 to your computer and use it in GitHub Desktop.
This file contains 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
#!/usr/bin/env bash | |
cd app | |
# th_th | |
msgfmt -o content/languages/locale/th_th/LC_MESSAGES/messages.mo content/languages/locale/th_th/LC_MESSAGES/messages.po |
This file contains 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
#!/usr/bin/env bash | |
cd app | |
find . -type f |egrep '.*\.(php|tpl|js)$' |grep -v 'templates_compiled' |grep -v 'includes/libs/' > /tmp/gettext_files | |
xgettext --from-code='UTF-8' --keyword='__' --output=/tmp/app.pot --file /tmp/gettext_files | |
# th_th | |
msgmerge -N content/languages/locale/th_th/LC_MESSAGES/messages.po /tmp/app.po > content/languages/locale/th_th/LC_MESSAGES/messages.new.po | |
mv content/languages/locale/th_th/LC_MESSAGES/messages.new.po content/languages/locale/th_th/LC_MESSAGES/messages.po |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment