Blame Identity/Manual/repository-xhtml/repository_57.xhtml

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">
ee1f37
<head>
ee1f37
a6f1b3
    <title>CentOS Artwork Repository: 2.50 The trunk/Locales Directory</title>
c8f7b7
c8f7b7
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
a6f1b3
    <meta name="description" content="CentOS Artwork Repository: 2.50 The trunk/Locales Directory" />
a6f1b3
    <meta name="keywords" content="CentOS Artwork Repository: 2.50 The trunk/Locales 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" />
ee1f37
c8f7b7
    <link href="/home/centos/artwork/trunk/Identity/Manual/repository.css" rel="stylesheet" type="text/css" media="screen projection" />
ee1f37
ee1f37
</head>
ee1f37
728c6d
<body>
ee1f37
728c6d
728c6d
728c6d
728c6d
728c6d
    
728c6d
728c6d
        
c8f7b7
a6f1b3
ee1f37
a6f1b3
[ < ]
a6f1b3
[ > ]
ee1f37
   
c8f7b7
[ << ]
c8f7b7
[ Up ]
a6f1b3
[ >> ]
ee1f37
   
ee1f37
   
ee1f37
   
ee1f37
   
c8f7b7
[Top]
c8f7b7
[Contents]
a6f1b3
[Index]
c8f7b7
[ ? ]
ee1f37
a6f1b3
a6f1b3
a6f1b3

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

52772c
a6f1b3

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

a6f1b3
messages used to produce content in different languages.
52772c

a6f1b3

Translation messages are organized using the directory structure of

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

a6f1b3

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

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

a6f1b3

The basic translation process is as follow: first, translatable

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

a6f1b3

Inside the repository there are two ways to retrive translatable

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

a6f1b3

When translatable strings are retrived from XML files, using the

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

a6f1b3

Another difference between xml2po and xgettext we

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

a6f1b3

Automation of localization tasks is achived through the locale

a6f1b3
functionality of command-line interface.
52772c

52772c
a6f1b3
2.67 The <tt>`trunk/Scripts/Functions/Locale'</tt> Directory  
52772c
52772c
ee1f37
a6f1b3
728c6d

ee1f37
a6f1b3
[ < ]
c8f7b7
[ > ]
ee1f37
   
c8f7b7
[ << ]
a6f1b3
[ Up ]
a6f1b3
[ >> ]
ee1f37
ee1f37
728c6d
            

728c6d
728c6d
        
728c6d
728c6d
    
728c6d
728c6d
    

728c6d
728c6d
728c6d
ee1f37
</body>
728c6d
ee1f37
</html>