|
|
c8f7b7 |
|
|
|
728c6d |
|
|
|
728c6d |
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
|
|
728c6d |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
|
728c6d |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
|
728c6d |
<head>
|
|
|
632e8b |
|
|
|
a6f1b3 |
<title>CentOS Artwork Repository: 2.67 The trunk/Scripts/Functions/Locale Directory</title>
|
|
|
c8f7b7 |
|
|
|
c8f7b7 |
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
|
|
|
a6f1b3 |
<meta name="description" content="CentOS Artwork Repository: 2.67 The trunk/Scripts/Functions/Locale Directory" />
|
|
|
a6f1b3 |
<meta name="keywords" content="CentOS Artwork Repository: 2.67 The trunk/Scripts/Functions/Locale Directory" />
|
|
|
728c6d |
<meta name="resource-type" content="document" />
|
|
|
728c6d |
<meta name="distribution" content="global" />
|
|
|
728c6d |
<meta name="generator" content="texi2html 1.76" />
|
|
|
728c6d |
<meta name="copyright" content="2009-2011 Alain Reguera Delgado" />
|
|
|
632e8b |
|
|
|
c8f7b7 |
<link href="/home/centos/artwork/trunk/Identity/Manual/repository.css" rel="stylesheet" type="text/css" media="screen projection" />
|
|
|
632e8b |
|
|
|
728c6d |
</head>
|
|
|
632e8b |
|
|
|
728c6d |
<body>
|
|
|
632e8b |
|
|
|
728c6d |
|
|
|
632e8b |
|
|
|
728c6d |
|
|
|
632e8b |
|
|
|
728c6d |
|
|
|
632e8b |
|
|
|
728c6d |
|
|
|
c8f7b7 |
|
|
|
a6f1b3 |
|
|
|
632e8b |
|
|
|
a6f1b3 |
[ < ]
|
|
|
a6f1b3 |
[ > ]
|
|
|
632e8b |
|
|
|
c8f7b7 |
[ << ]
|
|
|
c8f7b7 |
[ Up ]
|
|
|
a6f1b3 |
[ >> ]
|
|
|
632e8b |
|
|
|
632e8b |
|
|
|
632e8b |
|
|
|
632e8b |
|
|
|
c8f7b7 |
[Top]
|
|
|
c8f7b7 |
[Contents]
|
|
|
a6f1b3 |
[Index]
|
|
|
c8f7b7 |
[ ? ]
|
|
|
632e8b |
|
|
|
a6f1b3 |
|
|
|
ed9de5 |
|
|
|
a6f1b3 |
2.67 The <tt>`trunk/Scripts/Functions/Locale'</tt> Directory
|
|
|
9bfd15 |
|
|
|
728c6d |
|
|
|
ed9de5 |
|
|
|
a6f1b3 |
2.67.1 Goals
|
|
|
a6f1b3 |
|
|
|
a6f1b3 |
|
|
|
a6f1b3 |
...
|
|
|
a6f1b3 |
|
|
|
ed9de5 |
|
|
|
728c6d |
|
|
|
ed9de5 |
|
|
|
a6f1b3 |
2.67.2 Description
|
|
|
ed9de5 |
|
|
|
a6f1b3 |
This command looks for <samp>`.sh'</samp> files inside Bash directory and
|
|
|
a6f1b3 |
extracts translatable strings from files, using xgettext
|
|
|
a6f1b3 |
command, in order to create a portable object template
|
|
|
a6f1b3 |
(<tt>`centos-art.sh.pot'</tt>) file for them.
|
|
|
a6f1b3 |
|
|
|
a6f1b3 |
With the <tt>`centos-art.sh.pot'</tt> file up to date, the
|
|
|
a6f1b3 |
centos-art command removes the temporal list of files sotred
|
|
|
a6f1b3 |
inside <tt>`/tmp'</tt> directory and checks the current language of your
|
|
|
a6f1b3 |
user's session to create a portable object file for it, in the
|
|
|
a6f1b3 |
location <tt>`$CLI_LANG/$CLI_LANG.po'</tt>.
|
|
|
a6f1b3 |
|
|
|
a6f1b3 |
The CLI_LANG variable discribes the locale language used to
|
|
|
a6f1b3 |
output messages inside centos-art command. The locale
|
|
|
a6f1b3 |
language used inside centos-art command is taken from the
|
|
|
a6f1b3 |
LANG environment variable. The CLI_LANG variable has the
|
|
|
a6f1b3 |
<samp>`LL_CC'</samp> format, where <samp>`LL'</samp> is a language code from the
|
|
|
a6f1b3 |
ISO-639 standard, and <samp>`CC'</samp> a country code from the ISO-3166
|
|
|
a6f1b3 |
standard.
|
|
|
a6f1b3 |
|
|
|
a6f1b3 |
The LANG environment variable is set when you do log in to your
|
|
|
a6f1b3 |
system. If you are using a graphical session, change language to your
|
|
|
a6f1b3 |
native language and do login. That would set and exoprt the LANG
|
|
|
a6f1b3 |
environment variable to the correct value. On the other side, if you
|
|
|
a6f1b3 |
are using a text session edit your <tt>`~/.bash_profile'</tt> file to set
|
|
|
a6f1b3 |
and export the LANG environment variable to your native locale
|
|
|
a6f1b3 |
as defines the locale -a command output; do logout, and do
|
|
|
a6f1b3 |
login again.
|
|
|
a6f1b3 |
|
|
|
a6f1b3 |
At this point, the LANG environment variable has the appropriate
|
|
|
a6f1b3 |
value you need, in order to translate centos-art.sh messages
|
|
|
a6f1b3 |
to your native language (the one set in LANG environment
|
|
|
a6f1b3 |
variable).
|
|
|
a6f1b3 |
|
|
|
a6f1b3 |
With the <tt>`$CLI_LANG/$CLI_LANG.po'</tt> file up to date, the
|
|
|
a6f1b3 |
centos-art opens it for you to update translation strings.
|
|
|
a6f1b3 |
The centos-art command uses the value of EDITOR
|
|
|
a6f1b3 |
environment variable to determine your favorite text editor. If no
|
|
|
a6f1b3 |
value is defined on EDITOR, the <tt>`/usr/bin/vim'</tt> text editor
|
|
|
a6f1b3 |
is used as default.
|
|
|
a6f1b3 |
|
|
|
a6f1b3 |
When you finishd PO file edition and quit text editor, the
|
|
|
a6f1b3 |
centos-art command creates the related machine object in the
|
|
|
a6f1b3 |
location <tt>`$CLI_LANG/LC_MESSAGES/$TEXTDOMAIN.mo'</tt>.
|
|
|
a6f1b3 |
|
|
|
a6f1b3 |
At this point, all translations you made in the PO file should be
|
|
|
a6f1b3 |
available to your language when runing centos-art.sh script.
|
|
|
a6f1b3 |
|
|
|
a6f1b3 |
In order to make the centos-art.sh internationalization, the
|
|
|
a6f1b3 |
centos-art.sh script was modified as described in the
|
|
|
a6f1b3 |
gettext info documentation (info gettext ). You
|
|
|
a6f1b3 |
can find such modifications in the following files:
|
|
|
a6f1b3 |
|
|
|
a6f1b3 |
|
|
|
a6f1b3 |
<tt>`trunk/Scripts/Bash/initFunctions.sh'</tt>
|
|
|
a6f1b3 |
<tt>`trunk/Scripts/Bash/Functions/Help/cli_localeMessages.sh'</tt>
|
|
|
a6f1b3 |
<tt>`trunk/Scripts/Bash/Functions/Help/cli_localeMessagesStatus.sh'</tt>
|
|
|
a6f1b3 |
|
|
|
a6f1b3 |
|
|
|
a6f1b3 |
|
|
|
a6f1b3 |
...
|
|
|
a6f1b3 |
|
|
|
ed9de5 |
|
|
|
728c6d |
|
|
|
ed9de5 |
|
|
|
52772c |
2.67.3 Usage
|
|
|
9bfd15 |
|
|
|
ed9de5 |
|
|
|
a6f1b3 |
<samp>`centos-art locale --edit'</samp>
|
|
|
a6f1b3 |
Use this command to translate command-line interface output messages
|
|
|
a6f1b3 |
in the current system locale you are using (as specified in LANG
|
|
|
a6f1b3 |
environment variable).
|
|
|
a6f1b3 |
|
|
|
a6f1b3 |
<samp>`centos-art locale --list'</samp>
|
|
|
a6f1b3 |
Use this command to see the command-line interface locale report.
|
|
|
a6f1b3 |
|
|
|
ed9de5 |
|
|
|
632e8b |
|
|
|
728c6d |
|
|
|
a6f1b3 |
|
|
|
52772c |
2.67.4 See also
|
|
|
632e8b |
|
|
|
632e8b |
|
|
|
728c6d |
|
|
|
632e8b |
|
|
|
a6f1b3 |
[ < ]
|
|
|
a6f1b3 |
[ > ]
|
|
|
632e8b |
|
|
|
c8f7b7 |
[ << ]
|
|
|
a6f1b3 |
[ Up ]
|
|
|
a6f1b3 |
[ >> ]
|
|
|
632e8b |
|
|
|
632e8b |
|
|
|
728c6d |
|
|
|
728c6d |
|
|
|
728c6d |
|
|
|
728c6d |
|
|
|
728c6d |
|
|
|
728c6d |
|
|
|
728c6d |
|
|
|
728c6d |
|
|
|
728c6d |
|
|
|
728c6d |
|
|
|
632e8b |
</body>
|
|
|
728c6d |
|
|
|
632e8b |
</html>
|