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