Blob Blame History Raw
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd">
<html>
<!--This manual describes what the CentOS Artwork Repository is and what
can you do inside it.

Copyright C 2009, 2010 CentOS Artwork SIG. All rights
reserved.

Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.2 or
any later version published by the Free Software Foundation; with no
Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A
copy of the license is included in the section entitled GNU Free
Documentation License.  
-->
<!-- Created on October, 15 2010 by texi2html 1.76 -->
<!--
Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
            Karl Berry  <karl@freefriends.org>
            Olaf Bachmann <obachman@mathematik.uni-kl.de>
            and many others.
Maintained by: Many creative people <dev@texi2html.cvshome.org>
Send bugs and suggestions to <users@texi2html.cvshome.org>

-->
<head>
<title>CentOS Artwork Repository: 3.50 trunk/Scripts/Bash/Locale</title>

<meta name="description" content="CentOS Artwork Repository: 3.50 trunk/Scripts/Bash/Locale">
<meta name="keywords" content="CentOS Artwork Repository: 3.50 trunk/Scripts/Bash/Locale">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="texi2html 1.76">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style type="text/css">
<!--
@import "/home/centos/artwork/trunk/Identity/Models/Css/Texi2html/common.css";

a.summary-letter {text-decoration: none}
pre.display {font-family: serif}
pre.format {font-family: serif}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
pre.smalldisplay {font-family: serif; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: serif; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.sansserif {font-family:sans-serif; font-weight:normal;}
ul.toc {list-style: none}
-->
</style>


</head>

<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">

<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="repository_52.html#SEC262" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC264" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="repository_3.html#SEC3" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="repository_3.html#SEC3" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="repository_67.html#SEC348" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="repository.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="repository_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="repository_67.html#SEC348" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="repository_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="trunk-Scripts-Bash-Locale"></a>
<a name="SEC263"></a>
<h2 class="section"> 3.50 trunk/Scripts/Bash/Locale </h2>


<a name="SEC264"></a>
<h3 class="subsection"> 3.50.1 Goals </h3>

<ul class="toc">
<li> Organize <tt>`centos-art.sh'</tt> locale files.
</li></ul>


<a name="SEC265"></a>
<h3 class="subsection"> 3.50.2 Description </h3>

<p>This command looks for <samp>`.sh'</samp> files inside Bash directory and
extracts translatable strings from files, using <code>xgettext</code>
command, in order to create a portable object template
(<tt>`centos-art.sh.pot'</tt>) file for them.
</p>
<p>With the <tt>`centos-art.sh.pot'</tt> file up to date, the
<code>centos-art</code> command removes the temporal list of files sotred
inside <tt>`/tmp'</tt> directory and checks the current language of your
user's session to create a portable object file for it, in the
location <tt>`$CLI_LANG/$CLI_LANG.po'</tt>. 
</p>
<p>The <var>CLI_LANG</var> variable discribes the locale language used to
output messages inside <code>centos-art</code> command. The locale
language used inside <code>centos-art</code> command is taken from the
<var>LANG</var> environment variable.  The <var>CLI_LANG</var> variable has the
<samp>`LL_CC'</samp> format, where <samp>`LL'</samp> is a language code from the
ISO-639 standard, and <samp>`CC'</samp> a country code from the ISO-3166
standard.
</p>
<p>The <var>LANG</var> environment variable is set when you do log in to your
system. If you are using a graphical session, change language to your
native language and do login. That would set and exoprt the <var>LANG</var>
environment variable to the correct value. On the other side, if you
are using a text session edit your <tt>`~/.bash_profile'</tt> file to set
and export the <var>LANG</var> environment variable to your native locale
as defines the <code>locale -a</code> command output; do logout, and do
login again.
</p>
<p>At this point, the <var>LANG</var> environment variable has the appropriate
value you need, in order to translate <code>centos-art.sh</code> messages
to your native language (the one set in <var>LANG</var> environment
variable). 
</p>
<p>With the <tt>`$CLI_LANG/$CLI_LANG.po'</tt> file up to date, the
<code>centos-art</code> opens it for you to update translation strings.
The <code>centos-art</code> command uses the value of <var>EDITOR</var>
environment variable to determine your favorite text editor. If no
value is defined on <var>EDITOR</var>, the <tt>`/usr/bin/vim'</tt> text editor
is used as default.
</p>
<p>When you finish PO file's edition and quit text editor, the
<code>centos-art</code> command creates the related machine object in the
location <tt>`$CLI_LANG/LC_MESSAGES/$TEXTDOMAIN.mo'</tt>.
</p>
<p>At this point, all translations you made in the PO file should be
available to your language when runing <code>centos-art.sh</code> script. 
</p>

<a name="SEC266"></a>
<h4 class="subsubsection"> 3.50.2.1 Configuration files </h4>

<p>In order to make the <code>centos-art.sh</code> internationalization, the
<code>centos-art.sh</code> script was modified as described in the
<code>gettext</code> info documentation (<code>info gettext</code>).  You
can find such modifications in the following files:
</p>
<ul class="toc">
<li> <tt>`trunk/Scripts/Bash/initFunctions.sh'</tt>
</li><li> <tt>`trunk/Scripts/Bash/Functions/Help/cli_localeMessages.sh'</tt>
</li><li> <tt>`trunk/Scripts/Bash/Functions/Help/cli_localeMessagesStatus.sh'</tt>
</li></ul>


<a name="SEC267"></a>
<h3 class="subsection"> 3.50.3 Usage </h3>


<a name="SEC268"></a>
<h4 class="subsubsection"> 3.50.3.1 The <code>centos-art</code> <samp>`locale-cli'</samp> action </h4>

<dl compact="compact">
<dt> <samp>`centos-art locale-cli --edit'</samp></dt>
<dd><p>Use this command to translate command-line interface output messages
in the current system locale you are using (as specified in <var>LANG</var>
environment variable).
</p></dd>
<dt> <samp>`centos-art locale-cli --list'</samp></dt>
<dd><p>Use this command to see the command-line interface locale report.
</p></dd>
</dl>


<a name="SEC269"></a>
<h3 class="subsection"> 3.50.4 See also </h3>

<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top"><a href="repository_40.html#SEC215">3.37 trunk/Scripts/Bash/Functions</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="repository_36.html#SEC188">3.33 trunk/Scripts</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
</table>


<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC268" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="repository_54.html#SEC270" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="repository_3.html#SEC3" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC263" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="repository_67.html#SEC348" title="Next chapter"> &gt;&gt; </a>]</td>
</tr></table>
<p>
 <font size="-1">
  This document was generated on <i>October, 15 2010</i> using <a href="http://texi2html.cvshome.org/"><i>texi2html 1.76</i></a>.
 </font>
 <br>

</p>
</body>
</html>