Gettext: How to dump string variables?

Project:Smoking is cool!
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Project wiki:Smoking is cool! (multi-language open animation project)
Related pages:#1233: Translation tools
Description

If I do:
bash --dump-po-strings generate_images.sh > translations/overshoot_smoking.pot
it does not dump strings like:

text="`eval_gettext "Teenage smoking prevention video"`"

but it does if there is an echo statement before:

echo $"Teenage smoking prevention video"

So now, my script includes both, one for gettext to dump the proper string, and one for my actual use of the string:

echo $"Teenage smoking prevention video"
text="`eval_gettext "Teenage smoking prevention video"`"
echo $text;
file="$folder"title.png
convert $FONT -background white -fill black -size 640x400 -gravity center caption:"$text" $file

How to code the script so as to prevent the duplication of the strings?

Comments

#1

See:
4.7 Special Cases of Translatable Strings
http://www.gnu.org/software/gettext/manual/html_node/Special-cases.html#...
although I am not sure it's related...

#2

Related pages:+1233: Translation tools

#3

Apparently, bash --dump-po-strings is deprecated.
xgettext -o - do.generate_images.sh > translations/overshoot_smoking.pot
seems to work.

See:
http://www.linuxtopia.org/online_books/advanced_bash_scripting_guide/loc...

#4

Status:active» fixed

#5

Tags:+Version 1

#6

Status:fixed» closed
Related pages:-1233: Translation tools

Automatically closed -- issue fixed for 2 weeks with no activity.