Blame Identity/Manual/repository-xhtml/repository_55.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
c8f7b7
    <title>CentOS Artwork Repository: 2.48 The trunk/Locales Directory</title>
c8f7b7
c8f7b7
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
728c6d
    <meta name="description" content="CentOS Artwork Repository: 2.48 The trunk/Locales Directory" />
728c6d
    <meta name="keywords" content="CentOS Artwork Repository: 2.48 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
c8f7b7
ee1f37
c8f7b7
[ < ]
c8f7b7
[ > ]
ee1f37
   
c8f7b7
[ << ]
c8f7b7
[ Up ]
c8f7b7
[ >> ]
ee1f37
   
ee1f37
   
ee1f37
   
ee1f37
   
c8f7b7
[Top]
c8f7b7
[Contents]
c8f7b7
[Index]
c8f7b7
[ ? ]
ee1f37
1075b9
52772c
52772c

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

632e8b
52772c

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

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

52772c

Translation messages are organized using the directory structure of

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

52772c

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

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

52772c

The basic translation process is as follow: first, translatable

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

52772c

Inside the repository there are two ways to retrive translatable

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

52772c

When translatable strings are retrived from XML files, using the

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

52772c

Another difference between xml2po and xgettext we

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

52772c

Automation of localization tasks is achived through the locale

52772c
functionality of command-line interface.
52772c

52772c
c8f7b7
2.65 The <tt>`trunk/Scripts/Functions/Locale'</tt> Directory  
52772c
52772c
632e8b
ee1f37
728c6d

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

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

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