Restricted User Shell
You need to write a localization file for your configuration script if it implements exit rules (see Exit) and changes user locale (see locale).
Preparing localization consists of three stages: extracting exit messages and forming a PO file, editing this file, compiling and installing it. The discussion below describes these stages in detail.
A PO (Portable Object) file is a plain text file, containing original messages and their translations for a particular language. See The Format of PO Files in GNU gettext utilities, for a description of its format.
rush-po.awk serves for extracting messages from
the configuration file and forming a PO file. This script
is installed in the prefix/share/rush
directory7, where prefix stands for your
Supposing the package is installed in the default prefix, the following command will create a PO file from your configuration file:
awk -f /usr/local/share/rush/rush-po.awk \ /usr/local/etc/rush.rc > myconf.po
Please note, that
rush-po.awk does not handle
include directives (see Include). If your configuration
file uses these directives, you need to specify each include file in
rush-po.awk command line, e.g.:
awk -f /usr/local/share/rush/rush-po.awk \ /usr/local/etc/rush.rc /home/*/.rush > myconf.po
Open the created PO file with your favorite editor and supply
message translations after
msgstr keywords. Although you can
use any editor, capable of handling plain text files, we recommend to
use GNU Emacs, which provides a special po-mode. See PO Files and PO Mode Basics in GNU gettext utilities, for guidelines
on editing PO files and using the po-mode.
When ready, the PO file needs be compiled into a
MO (Message Object) file, which is directly readable
rush. This is done using
msgfmt utility from
msgfmt -o myconf.mo myconf.po
See msgfmt Invocation in GNU gettext utilities, for a
detailed description of the
After creating the MO file, copy it into appropriate directory. It is important that the installed MO file uses the naming scheme described in localization file naming.
To be precise, it is installed in
dataroot/rush, where dataroot is a directory for
read-only architecture-independent data, which is set by the
--datarootdir option to
configure. Unless that
option is used, this directory defaults to
This document was generated on October 1, 2016 using makeinfo.Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.