Blame Identity/Manual/Directories/trunk/Scripts/Functions/Locale.texi

9c6e0d
@subsection Goals
9c6e0d
9c6e0d
@itemize
9c6e0d
@item ...
9c6e0d
@end itemize
9c6e0d
9c6e0d
@subsection Description
9c6e0d
9c6e0d
This command looks for @samp{.sh} files inside Bash directory and
9c6e0d
extracts translatable strings from files, using @command{xgettext}
9c6e0d
command, in order to create a portable object template
9c6e0d
(@file{centos-art.sh.pot}) file for them.
9c6e0d
9c6e0d
With the @file{centos-art.sh.pot} file up to date, the
9c6e0d
@command{centos-art} command removes the temporal list of files sotred
9c6e0d
inside @file{/tmp} directory and checks the current language of your
9c6e0d
user's session to create a portable object file for it, in the
9c6e0d
location @file{$CLI_LANG/$CLI_LANG.po}. 
9c6e0d
9c6e0d
The @var{CLI_LANG} variable discribes the locale language used to
9c6e0d
output messages inside @command{centos-art} command. The locale
9c6e0d
language used inside @command{centos-art} command is taken from the
9c6e0d
@env{LANG} environment variable.  The @var{CLI_LANG} variable has the
9c6e0d
@samp{LL_CC} format, where @samp{LL} is a language code from the
9c6e0d
ISO-639 standard, and @samp{CC} a country code from the ISO-3166
9c6e0d
standard.
9c6e0d
9c6e0d
The @env{LANG} environment variable is set when you do log in to your
9c6e0d
system. If you are using a graphical session, change language to your
9c6e0d
native language and do login. That would set and exoprt the @env{LANG}
9c6e0d
environment variable to the correct value. On the other side, if you
9c6e0d
are using a text session edit your @file{~/.bash_profile} file to set
9c6e0d
and export the @env{LANG} environment variable to your native locale
9c6e0d
as defines the @command{locale -a} command output; do logout, and do
9c6e0d
login again.
9c6e0d
9c6e0d
At this point, the @env{LANG} environment variable has the appropriate
9c6e0d
value you need, in order to translate @command{centos-art.sh} messages
9c6e0d
to your native language (the one set in @env{LANG} environment
9c6e0d
variable). 
9c6e0d
9c6e0d
With the @file{$CLI_LANG/$CLI_LANG.po} file up to date, the
9c6e0d
@command{centos-art} opens it for you to update translation strings.
9c6e0d
The @command{centos-art} command uses the value of @var{EDITOR}
9c6e0d
environment variable to determine your favorite text editor. If no
9c6e0d
value is defined on @var{EDITOR}, the @file{/usr/bin/vim} text editor
9c6e0d
is used as default.
9c6e0d
9c6e0d
When you finishd PO file edition and quit text editor, the
9c6e0d
@command{centos-art} command creates the related machine object in the
9c6e0d
location @file{$CLI_LANG/LC_MESSAGES/$TEXTDOMAIN.mo}.
9c6e0d
9c6e0d
At this point, all translations you made in the PO file should be
9c6e0d
available to your language when runing @command{centos-art.sh} script. 
9c6e0d
9c6e0d
In order to make the @command{centos-art.sh} internationalization, the
9c6e0d
@command{centos-art.sh} script was modified as described in the
9c6e0d
@command{gettext} info documentation (@command{info gettext}).  You
9c6e0d
can find such modifications in the following files:
9c6e0d
9c6e0d
@itemize
9c6e0d
@item @file{trunk/Scripts/Bash/initFunctions.sh}
9c6e0d
@item @file{trunk/Scripts/Bash/Functions/Help/cli_localeMessages.sh}
9c6e0d
@item @file{trunk/Scripts/Bash/Functions/Help/cli_localeMessagesStatus.sh}
9c6e0d
@end itemize
9c6e0d
9c6e0d
@itemize
9c6e0d
@item ...
9c6e0d
@end itemize
9c6e0d
9c6e0d
@subsection Usage
9c6e0d
9c6e0d
@table @samp
9c6e0d
@item centos-art locale --edit
9c6e0d
Use this command to translate command-line interface output messages
9c6e0d
in the current system locale you are using (as specified in @env{LANG}
9c6e0d
environment variable).
9c6e0d
@item centos-art locale --list
9c6e0d
Use this command to see the command-line interface locale report.
9c6e0d
@end table
9c6e0d
9c6e0d
@subsection See also
9c6e0d
9c6e0d
@menu
9c6e0d
@end menu