Skip to content

Instantly share code, notes, and snippets.

@Bjwebb

Bjwebb/its-rules.xml

Last active Mar 20, 2018
Embed
What would you like to do?
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0"
xmlns:svg="http://www.w3.org/2000/svg">
<its:translateRule selector="//svg:*" translate="no"/>
<its:translateRule selector="//svg:text | //svg:tspan | //svg:textArea |
//svg:title | //svg:desc | //svg:metadata |
//svg:flowPara"
translate="yes"/>
</its:rules>
fname=`basename "$1" .svg`
itstool -i its-rules.xml -o "$fname.po" "$1"
podebug --rewrite xxx "$fname.po" > "${fname}_podebug.po"
msgfmt "${fname}_podebug.po" -o "${fname}_podebug.mo"
itstool -m "${fname}_podebug.mo" -o "${fname}_translated.svg" "$fname.svg"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment