= Creating translations for init scripts Marcus Habermehl == Preparing the source To make a script translatable you must first add these 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." -------------------------------------- == Creating the pot file After this you must create the pot file. ------------------------------------------------------------------------------ $ bash --dump-po-strings rc.my_service | xgettext -L PO -o rc.my_service.pot - ------------------------------------------------------------------------------ == Creating a po file In the next step you create the po file. ------------------ $ msginit -l hu_HU ------------------ Now you can edit the po file with any editor. == Creating the mo files To create and install the mo files, you must add the po files to the source() array and use the `Frcd2` macro in build().