TEXTDOMAIN=my_service TEXTDOMAINDIR=/lib/initscripts/messages
The first things to make a script translatable you must add this two lines to the rc script.
TEXTDOMAIN=my_service TEXTDOMAINDIR=/lib/initscripts/messages
To mark a string as translatable in bash you must prefix the string with $.
echo $"This is a translatable string."
After this you must create the pot file.
$ bash --dump-po-strings rc.my_service | xgettext -L PO -o rc.my_service.pot -
In the next step you create the po file.
$ msginit -l hu_HU
Now you can edit the po file with any editor.
To create and install the mo files, you must add the po files to the source() array and use the Frcd2 macro in build().