Closed tisto closed 6 years ago
There is an update.sh script which uses i18ndude in locales directory : https://github.com/plone/bobtemplates.plone/blob/master/bobtemplates/plone_addon/src/%2Bpackage.namespace%2B/%2Bpackage.name%2B/locales/update.sh.bob
this script is a good start. i'd add a shebang.
also, i'm wondering where $domain comes from.
isn't a domain = {{{ package.dottedname }}}
necessary?
also, for the manual translations for the plone domain, i'd write plone directly instead of re-assigning $domain
#!/bin/bash
# i18ndude should be available in current $PATH (eg by running
# ``export PATH=$PATH:$BUILDOUT_DIR/bin`` when i18ndude is located in your buildout's bin directory)
domain={{{ package.dottedname }}}
i18ndude rebuild-pot --pot $domain.pot --create $domain --merge $domain-manual.pot ../
i18ndude sync --pot $domain.pot */LC_MESSAGES/$domain.po
i18ndude sync --pot plone-manual.pot */LC_MESSAGES/plone.po
we should also document somehow how one can add translations for a language?
is it necessary to create the directroy manually? mkdir de/LC_MESSAGES/
and everything else is done by ./update.sh
?
or does on need to init the po file manually too msginit --locale=en --input=../../$domain.pot
?
See https://github.com/plone/bobtemplates.plone/issues/42