Blame Manual/repository-html/repository_39.html

ee1f37
ee1f37
<html>
ee1f37
ee1f37
ee1f37
Permission is granted to copy, distribute and/or modify this document
ee1f37
under the terms of the GNU Free Documentation License, Version 1.2 or
ee1f37
any later version published by the Free Software Foundation; with no
ee1f37
Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A
ee1f37
copy of the license is included in the section entitled GNU Free
ee1f37
Documentation License.  
ee1f37
-->
406f69
ee1f37
ee1f37
Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
ee1f37
            Karl Berry  <karl@freefriends.org>
ee1f37
            Olaf Bachmann <obachman@mathematik.uni-kl.de>
ee1f37
            and many others.
ee1f37
Maintained by: Many creative people <dev@texi2html.cvshome.org>
ee1f37
Send bugs and suggestions to <users@texi2html.cvshome.org>
ee1f37
ee1f37
-->
ee1f37
<head>
b9dbd3
<title>CentOS Artwork Repository: 2.37 The trunk/Locales Directory</title>
ee1f37
b9dbd3
<meta name="description" content="CentOS Artwork Repository: 2.37 The trunk/Locales Directory">
b9dbd3
<meta name="keywords" content="CentOS Artwork Repository: 2.37 The trunk/Locales Directory">
ee1f37
<meta name="resource-type" content="document">
ee1f37
<meta name="distribution" content="global">
ee1f37
<meta name="Generator" content="texi2html 1.76">
ee1f37
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
ee1f37
<style type="text/css">
ee1f37
ee1f37
@import "/home/centos/artwork/trunk/Identity/Models/Css/Texi2html/common.css";
ee1f37
ee1f37
a.summary-letter {text-decoration: none}
ee1f37
pre.display {font-family: serif}
ee1f37
pre.format {font-family: serif}
ee1f37
pre.menu-comment {font-family: serif}
ee1f37
pre.menu-preformatted {font-family: serif}
ee1f37
pre.smalldisplay {font-family: serif; font-size: smaller}
ee1f37
pre.smallexample {font-size: smaller}
ee1f37
pre.smallformat {font-family: serif; font-size: smaller}
ee1f37
pre.smalllisp {font-size: smaller}
ee1f37
span.sansserif {font-family:sans-serif; font-weight:normal;}
ee1f37
ul.toc {list-style: none}
ee1f37
-->
ee1f37
</style>
ee1f37
ee1f37
ee1f37
</head>
ee1f37
ee1f37
<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
ee1f37
ee1f37
aaf678
[ < ]
b9dbd3
[ > ]
ee1f37
   
b9dbd3
[ << ]
b9dbd3
[ Up ]
b9dbd3
[ >> ]
ee1f37
   
ee1f37
   
ee1f37
   
ee1f37
   
56a476
[Top]
56a476
[Contents]
b130a0
[Index]
56a476
[ ? ]
ee1f37
b9dbd3
aaf678
b9dbd3

2.37 The <tt>`trunk/Locales'</tt> Directory

ee1f37
b9dbd3

The <tt>`trunk/Locales'</tt> directory exists to store the translation

b9dbd3
messages used to produce content in different languages.
b9dbd3

b9dbd3

Translation messages are organized using the directory structure of

b9dbd3
the component being translated. For example, if we want to provide
b9dbd3
translation messages for <tt>`trunk/Manuals/Filesystem'</tt>, then the
b9dbd3
<tt>`trunk/Locales/Manuals/Filesystem'</tt> directory needs to be created.
b9dbd3

b9dbd3

Once the locale directory exists for the component we want to provide

b9dbd3
translation messages for, it is necessary to create the translation
b9dbd3
files where translation messages are. The translation files follows
b9dbd3
the concepts of xml2po and GNU gettext tools.
b9dbd3

b9dbd3

The basic translation process is as follow: first, translatable

b9dbd3
strings are extracted from files and a portable object template (.pot)
b9dbd3
is created or updated with the information. Using the portable object
b9dbd3
template, a portable object (.po) is created or updated for translator
b9dbd3
to locale the messages retrived.  Finally, a machine object (.mo) is
b9dbd3
created from portable object to sotore the translated messages.
b9dbd3

b9dbd3

Inside the repository there are two ways to retrive translatable

b9dbd3
strings from files. The first one is through xml2po command
b9dbd3
and the second through xgettext command. The xml2po
b9dbd3
is used to retrive translatable strings from XML files (e.g., Scalable
b9dbd3
Vector Graphics, DocBook, etc.) and the xgettext command is
b9dbd3
used to retrive translatable strings from shell scripts files (e.g.,
b9dbd3
the files that make the centos-art.sh command-line
b9dbd3
interface).
b9dbd3

b9dbd3

When translatable strings are retrived from XML files, using the

b9dbd3
xml2po command, there is no need to create the machine
b9dbd3
object as we do when translatable strings ar retrived from shell
b9dbd3
files, using the xgettext command. The xml2po
b9dbd3
produces a temporal machine object in order to create a translated XML
b9dbd3
file. Once the translated XML file has been created the machine object
b9dbd3
is no longer needed. On the other hand, the machine object produced by
b9dbd3
the xgettext command is required by the system in order for
b9dbd3
the show shell script localized messages.
b9dbd3

b9dbd3

Another difference between xml2po and xgettext we

b9dbd3
need to be aware of is the directory structure used to store machine
b9dbd3
objects. In xml2po, the machine object is created in the
b9dbd3
current working directory as <tt>`.xml2po.mo'</tt> and can be safetly
b9dbd3
removed once the translated XML file has been created. In the case of
b9dbd3
xgettext, the machine object needs to be stored in the
b9dbd3
<tt>`$TEXTDOMAIN/$LOCALE/LL_MESSAGES/$TEXTDOMAIN.mo'</tt> file in order
b9dbd3
for the system to interpret it and should not be removed since it is
b9dbd3
the file that contain the translation messages themselves.
b9dbd3

b9dbd3

Automation of localization tasks is achived through the locale

b9dbd3
functionality of command-line interface.
b9dbd3

ee1f37
b9dbd3
2.55 The <tt>`trunk/Scripts/Bash/Cli/Functions/Locale'</tt> Directory  
ee1f37
ee1f37
ee1f37
ee1f37
b9dbd3
ee1f37
b9dbd3
[ < ]
b9dbd3
[ > ]
ee1f37
   
b9dbd3
[ << ]
b9dbd3
[ Up ]
b9dbd3
[ >> ]
ee1f37
ee1f37

ee1f37
 <font size="-1">
406f69
  This document was generated on March, 1 2011 using texi2html 1.76.
ee1f37
 </font>
ee1f37
 
ee1f37
ee1f37

ee1f37
</body>
ee1f37
</html>