|
|
4c79b5 |
|
|
|
4c79b5 |
<html>
|
|
|
6414c4 |
|
|
|
09d4f2 |
|
|
|
6414c4 |
Copyright C 2009, 2010, 2011 Alain Reguera Delgado
|
|
|
4c79b5 |
|
|
|
4c79b5 |
Permission is granted to copy, distribute and/or modify this document
|
|
|
4c79b5 |
under the terms of the GNU Free Documentation License, Version 1.2 or
|
|
|
4c79b5 |
any later version published by the Free Software Foundation; with no
|
|
|
4c79b5 |
Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A
|
|
|
4c79b5 |
copy of the license is included in the section entitled GNU Free
|
|
|
4c79b5 |
Documentation License.
|
|
|
4c79b5 |
-->
|
|
|
139290 |
|
|
|
4c79b5 |
|
|
|
4c79b5 |
Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
|
|
|
4c79b5 |
Karl Berry <karl@freefriends.org>
|
|
|
4c79b5 |
Olaf Bachmann <obachman@mathematik.uni-kl.de>
|
|
|
4c79b5 |
and many others.
|
|
|
4c79b5 |
Maintained by: Many creative people <dev@texi2html.cvshome.org>
|
|
|
4c79b5 |
Send bugs and suggestions to <users@texi2html.cvshome.org>
|
|
|
4c79b5 |
|
|
|
4c79b5 |
-->
|
|
|
4c79b5 |
<head>
|
|
|
ec5f63 |
<title>The CentOS Artwork Repository: 3.50 trunk/Translations</title>
|
|
|
4c79b5 |
|
|
|
ec5f63 |
<meta name="description" content="The CentOS Artwork Repository: 3.50 trunk/Translations">
|
|
|
ec5f63 |
<meta name="keywords" content="The CentOS Artwork Repository: 3.50 trunk/Translations">
|
|
|
4c79b5 |
<meta name="resource-type" content="document">
|
|
|
4c79b5 |
<meta name="distribution" content="global">
|
|
|
4c79b5 |
<meta name="Generator" content="texi2html 1.76">
|
|
|
4c79b5 |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
|
4c79b5 |
<style type="text/css">
|
|
|
4c79b5 |
|
|
|
1e9202 |
@import "/home/centos/artwork/trunk/Identity/Models/Css/Texi2html/common.css";
|
|
|
4c79b5 |
|
|
|
4c79b5 |
a.summary-letter {text-decoration: none}
|
|
|
4c79b5 |
pre.display {font-family: serif}
|
|
|
4c79b5 |
pre.format {font-family: serif}
|
|
|
4c79b5 |
pre.menu-comment {font-family: serif}
|
|
|
4c79b5 |
pre.menu-preformatted {font-family: serif}
|
|
|
4c79b5 |
pre.smalldisplay {font-family: serif; font-size: smaller}
|
|
|
4c79b5 |
pre.smallexample {font-size: smaller}
|
|
|
4c79b5 |
pre.smallformat {font-family: serif; font-size: smaller}
|
|
|
4c79b5 |
pre.smalllisp {font-size: smaller}
|
|
|
4c79b5 |
span.sansserif {font-family:sans-serif; font-weight:normal;}
|
|
|
4c79b5 |
ul.toc {list-style: none}
|
|
|
4c79b5 |
-->
|
|
|
4c79b5 |
</style>
|
|
|
4c79b5 |
|
|
|
4c79b5 |
|
|
|
4c79b5 |
</head>
|
|
|
4c79b5 |
|
|
|
4c79b5 |
<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
|
|
|
4c79b5 |
|
|
|
4c79b5 |
|
|
|
13b177 |
[ < ]
|
|
|
13b177 |
[ > ]
|
|
|
4c79b5 |
|
|
|
4c79b5 |
[ << ]
|
|
|
4c79b5 |
[ Up ]
|
|
|
13b177 |
[ >> ]
|
|
|
4c79b5 |
|
|
|
4c79b5 |
|
|
|
4c79b5 |
|
|
|
4c79b5 |
|
|
|
4c79b5 |
[Top]
|
|
|
4c79b5 |
[Contents]
|
|
|
13b177 |
[Index]
|
|
|
4c79b5 |
[ ? ]
|
|
|
4c79b5 |
|
|
|
ec5f63 |
|
|
|
13b177 |
|
|
|
ec5f63 |
3.50 trunk/Translations
|
|
|
cb2a5d |
|
|
|
cb2a5d |
|
|
|
13b177 |
|
|
|
6aec21 |
3.50.1 Goals
|
|
|
c9b54d |
|
|
|
ec5f63 |
The <tt>`trunk/Translations'</tt> directory exists to:
|
|
|
ec5f63 |
|
|
|
54b5a5 |
|
|
|
ec5f63 |
Organize translation files.
|
|
|
ec5f63 |
Organize translation templates used to produce translation files.
|
|
|
54b5a5 |
|
|
|
54b5a5 |
|
|
|
55c2ff |
|
|
|
13b177 |
|
|
|
008ee0 |
3.50.2 Description
|
|
|
55c2ff |
|
|
|
ec5f63 |
When you create artwork for CentOS distribution you find that some
|
|
|
ec5f63 |
artworks need to be created for different major releases of CentOS
|
|
|
5cee2c |
distribution and inside each major release that needs to be created for
|
|
|
ec5f63 |
different locales. To get an approximate idea of how many files we are
|
|
|
ec5f63 |
talking about, consider the followig approximate statistic:
|
|
|
ec5f63 |
|
|
|
63f275 |
|
|
|
ec5f63 |
Inside CentOS distribution, there are around 30 images to
|
|
|
ec5f63 |
rebrand.(2)
|
|
|
ec5f63 |
|
|
|
ec5f63 |
There are near to four major releases of CentOS distribution to
|
|
|
ec5f63 |
rebrand in parallel development.(3)
|
|
|
ec5f63 |
|
|
|
ec5f63 |
Each CentOS distribution in parallel development supports more
|
|
|
ec5f63 |
than two hundreds locales.(4)
|
|
|
63f275 |
|
|
|
63f275 |
|
|
|
ec5f63 |
In order to aliviate maintainance of artwork production for such
|
|
|
ec5f63 |
environment, we divided artwork production in three production lines:
|
|
|
ec5f63 |
|
|
|
ec5f63 |
|
|
|
5cee2c |
See section trunk/Identity/Themes/Models, to define artworks
|
|
|
ec5f63 |
characteristics (e.g., dimensions, position on the screen, etc.).
|
|
|
5cee2c |
See section trunk/Identity/Themes/Motifs, to define artworks visual
|
|
|
ec5f63 |
styles (e.g., the look and feel).
|
|
|
ec5f63 |
Translations, to define which major releases and locales
|
|
|
ec5f63 |
artworks are produced for.
|
|
|
ec5f63 |
|
|
|
ec5f63 |
|
|
|
ec5f63 |
Inside CentOS Artwork Repository, the artworks' translation production
|
|
|
ec5f63 |
line is stored under <tt>`trunk/Translations'</tt> directory.
|
|
|
ec5f63 |
|
|
|
ec5f63 |
Inside <tt>`trunk/Translations'</tt> directory, we use "translation
|
|
|
ec5f63 |
entries" to organize artworks' "translation files" and artworks'
|
|
|
ec5f63 |
"translation templates".
|
|
|
ec5f63 |
|
|
|
035049 |
|
|
|
13b177 |
|
|
|
ec5f63 |
3.50.2.1 Translation Entries
|
|
|
1d1bf4 |
|
|
|
ec5f63 |
Translation entries exists for each artwork you want to produce.
|
|
|
ec5f63 |
Translation entries can be empty directories, or directories
|
|
|
ec5f63 |
containing translation files and translation templates.
|
|
|
ec5f63 |
|
|
|
ec5f63 |
When translation entries are empty directories, the identity entry is
|
|
|
ec5f63 |
used as reference to create file names and directories layout for
|
|
|
ec5f63 |
rendered files. In this case, the centos-art script takes
|
|
|
ec5f63 |
one design template and outputs one non-translated file for each
|
|
|
ec5f63 |
design template available. This configuration is mainly used to
|
|
|
ec5f63 |
produce non-translatable artworks like themes' backgrounds.
|
|
|
ec5f63 |
|
|
|
ec5f63 |
When translation entries contain translation files, the translation
|
|
|
ec5f63 |
entry implements the CentOS release schema and is used as reference to
|
|
|
ec5f63 |
create file names and directories layout for translated artworks. In
|
|
|
ec5f63 |
this case, the centos-art script applies one translation
|
|
|
ec5f63 |
file to one design template to create one translated instance which is
|
|
|
ec5f63 |
used to output one translated file. When the translated file is
|
|
|
ec5f63 |
rendered, the centos-art script remove the previous instance
|
|
|
ec5f63 |
and takes the next file in the list of translation files to repate the
|
|
|
ec5f63 |
whole process once again, and so on for all files in the list. This
|
|
|
ec5f63 |
configuration is mainly used to produce translatable artworks like
|
|
|
8e85aa |
Anaconda progress slide images.
|
|
|
ec5f63 |
|
|
|
ec5f63 |
To find out correspondence between translation entries and identity
|
|
|
ec5f63 |
entries, you need to look the path of both translation entries and
|
|
|
8e85aa |
identity entries. For example, if you are using the Modern
|
|
|
8e85aa |
artisitic motif, the identity entry for Anaconda progress artwork is:
|
|
|
ec5f63 |
|
|
|
ec5f63 |
trunk/Identity/Themes/Motifs/Modern/Distro/Anaconda/Progress
|
|
|
ec5f63 |
|
|
|
ec5f63 |
and its translation entry is:
|
|
|
ec5f63 |
|
|
|
ec5f63 |
trunk/Translations/Identity/Themes/Distro/Anaconda/Progress
|
|
|
ec5f63 |
|
|
|
ec5f63 |
Note how the <tt>`Translations/'</tt> directory prefixes <tt>`Identity/'</tt>
|
|
|
ec5f63 |
directory, also how static values (e.g., Identity, Themes, Distro,
|
|
|
8e85aa |
etc.) in the identity entry path remain in translation entry path, and
|
|
|
8e85aa |
how variable values like theme names (e.g., Modern) are stript
|
|
|
8e85aa |
out from translation entry path. The same convenction can be applied
|
|
|
8e85aa |
to other identity entries in order to determine their translation
|
|
|
ec5f63 |
entries, or to other translation entries to determine their identity
|
|
|
ec5f63 |
entries.
|
|
|
ec5f63 |
|
|
|
ec5f63 |
Note Translation entries related to identity entries under
|
|
|
ec5f63 |
<tt>`trunk/Identity/Themes/Motifs'</tt> do not use <tt>`Motifs/'</tt> in the
|
|
|
ec5f63 |
path. We've done this because <tt>`trunk/Identity/Themes/Models'</tt>
|
|
|
ec5f63 |
structure, the other structure under <tt>`trunk/Identity/Themes'</tt>,
|
|
|
ec5f63 |
doesn't require translation paths so far. So in the sake of saving
|
|
|
ec5f63 |
characters space when building translation entries for
|
|
|
ec5f63 |
<tt>`trunk/Identity/Themes/Motifs'</tt> structure, we organize Motifs
|
|
|
ec5f63 |
translation entries under <tt>`trunk/Translations/Identity/Themes/'</tt>
|
|
|
ec5f63 |
directly.
|
|
|
ec5f63 |
|
|
|
ec5f63 |
If for some reason <tt>`trunk/Identity/Themes/Models'</tt> structure
|
|
|
ec5f63 |
requires translation entries, we need to re-oraganize the current
|
|
|
ec5f63 |
directory structure accordingly.
|
|
|
ec5f63 |
|
|
|
1d1bf4 |
|
|
|
ec5f63 |
Translation entries, as described above, can be re-used by similar
|
|
|
ec5f63 |
identity entries. For example the following identity entries:
|
|
|
ec5f63 |
|
|
|
ec5f63 |
trunk/Identity/Themes/Motifs/Modern/Distro/Anaconda/Progress/
|
|
|
ec5f63 |
trunk/Identity/Themes/Motifs/TreeFlower/Distro/Anaconda/Progress/
|
|
|
ec5f63 |
trunk/Identity/Themes/Motifs/Mettle/Distro/Anaconda/Progress/
|
|
|
ec5f63 |
|
|
|
ec5f63 |
are all valid identity entries able to re-use translation files inside
|
|
|
ec5f63 |
Anaconda progress translation entry (the one shown in our example
|
|
|
ec5f63 |
above). This way, you can create several identity entries and maintain
|
|
|
ec5f63 |
just one translation entry for all of them. Once you change the
|
|
|
ec5f63 |
translation files inside the common translation entry, changes inside
|
|
|
ec5f63 |
identity entries will take effect inside the next you render them.
|
|
|
ec5f63 |
|
|
|
ec5f63 |
Trying to make things plain and simple: inside CentOS Artwork
|
|
|
ec5f63 |
Repository, graphic designers can concentrate their efforts in
|
|
|
ec5f63 |
artworks look and feel (the identity entries), and translators in
|
|
|
ec5f63 |
artworks translations (the translation entries).
|
|
|
ec5f63 |
|
|
|
1d1bf4 |
|
|
|
13b177 |
|
|
|
ec5f63 |
3.50.2.2 Translation Markers
|
|
|
ec5f63 |
|
|
|
ec5f63 |
|
|
|
ec5f63 |
|
|
|
ec5f63 |
Translation markers are used in "Theme Model Designs" and
|
|
|
ec5f63 |
"Translation Files" as replacement patterns to commit content
|
|
|
ec5f63 |
translation. When you are rendering content using
|
|
|
ec5f63 |
centos-art script inisde <tt>`trunk/Identity'</tt> structure,
|
|
|
ec5f63 |
artistic motifs and translation files are applied to model designs to
|
|
|
ec5f63 |
produce translated content as result. In order to have the appropriate
|
|
|
ec5f63 |
translation in content rendered, markers defintion in translation
|
|
|
ec5f63 |
files should match markers in model designs exactly.
|
|
|
ec5f63 |
|
|
|
ec5f63 |
|
|
|
ec5f63 |
|
|
|
ec5f63 |
|
|
|
5cee2c |
Figure 3.22: The image rendering flow.
|
|
|
ec5f63 |
|
|
|
ec5f63 |
|
|
|
ec5f63 |
Translation markers can be whatever text you want, but as convenction
|
|
|
ec5f63 |
we use the following to represent releases of CentOS distribution:
|
|
|
ec5f63 |
|
|
|
ec5f63 |
|
|
|
ec5f63 |
<samp>`=MINOR_RELEASE='</samp>
|
|
|
ec5f63 |
Replace with minor release of CentOS distribution. In the schema M.N, the minor
|
|
|
ec5f63 |
release is represented by the N letter.
|
|
|
ec5f63 |
|
|
|
ec5f63 |
<samp>`=MAJOR_RELEASE='</samp>
|
|
|
ec5f63 |
Replace with major release of CentOS distribution. In the schema M.N,
|
|
|
ec5f63 |
the major release is represented by the M letter.
|
|
|
ec5f63 |
|
|
|
ec5f63 |
<samp>`=RELEASE='</samp>
|
|
|
ec5f63 |
Replace the full release of CentOS distribution. It is
|
|
|
ec5f63 |
<samp>`=MAJOR_RELEASE=.=MINOR_RELEASE='</samp> basically.
|
|
|
ec5f63 |
|
|
|
ec5f63 |
|
|
|
ec5f63 |
|
|
|
ec5f63 |
Specific translation markers convenctions are described inside
|
|
|
ec5f63 |
specific translation entries. Read translation entries documentation
|
|
|
ec5f63 |
to know more about supported translation markers.
|
|
|
ec5f63 |
|
|
|
ec5f63 |
Translation markers standardization creates a common point of
|
|
|
ec5f63 |
reference for translators and graphic designers. To have translation
|
|
|
ec5f63 |
markers well defined makes possible that translators and graphic
|
|
|
ec5f63 |
designers can work together but independently one another.
|
|
|
ec5f63 |
|
|
|
ec5f63 |
|
|
|
13b177 |
|
|
|
ec5f63 |
3.50.2.3 Translation Files
|
|
|
ec5f63 |
|
|
|
8e85aa |
Translation files are text files with sed commands inside,
|
|
|
ec5f63 |
replacement commands mainly. As convenction, translation file names
|
|
|
ec5f63 |
end in <samp>`.sed'</samp>. Translation files are used by centos-art
|
|
|
ec5f63 |
script to produce translated artworks for specific major releases of
|
|
|
ec5f63 |
CentOS Distribution. There are common translation files, specific
|
|
|
ec5f63 |
translation, and template translation files.
|
|
|
ec5f63 |
|
|
|
ec5f63 |
For example, the Firstboot artwork of CentOS distribution uses the
|
|
|
ec5f63 |
images <tt>`splash-small.png'</tt> and <tt>`firstboot-left.png'</tt> as based
|
|
|
ec5f63 |
to control its visual style. The <tt>`splash-small.png'</tt> image
|
|
|
ec5f63 |
contains, in its graphic design, the release number information of
|
|
|
ec5f63 |
CentOS distribution. So the <tt>`splash-small.png'</tt> is
|
|
|
ec5f63 |
release-specific. In the other hand, the <tt>`firstboot-left.png'</tt>
|
|
|
ec5f63 |
doesn't contain release number information. So the
|
|
|
ec5f63 |
<tt>`firstboot-left.png'</tt> is not release-specific.
|
|
|
ec5f63 |
|
|
|
ec5f63 |
If we want to produce Firstboot artwork for different major releases
|
|
|
ec5f63 |
of CentOS distribution, using a monolithic visual identity, all
|
|
|
ec5f63 |
Firstboot images should have the same visual style and, at the same
|
|
|
ec5f63 |
time, the release-specific information in the release-specific images.
|
|
|
ec5f63 |
|
|
|
ec5f63 |
Note The monolithic visual identity is implemented using
|
|
|
5cee2c |
theme models (see section trunk/Identity/Themes/Models) and artistic
|
|
|
5cee2c |
motifs (see section trunk/Identity/Themes/Motifs).
|
|
|
ec5f63 |
|
|
|
ec5f63 |
|
|
|
ec5f63 |
Assuming that both theme models and theme motifs are ready for using,
|
|
|
ec5f63 |
the initial translation entry to produce Firstboot artworks would look
|
|
|
ec5f63 |
like the following:
|
|
|
ec5f63 |
|
|
|
ec5f63 |
trunk/Translations/Identity/Themes/Distro/BootUp/Firstboot/
|
|
|
ec5f63 |
|-- Tpl
|
|
|
ec5f63 |
| `-- splash-small.sed
|
|
|
ec5f63 |
`-- firstboot-left.sed
|
|
|
ec5f63 |
|
|
|
ec5f63 |
With the translation entry above, centos-art command is able
|
|
|
ec5f63 |
to produce the image <tt>`firstboot-left.png'</tt> only. To produce
|
|
|
ec5f63 |
<tt>`splash-small.png'</tt> images for major releases (e.g., 3, 4, 5, and
|
|
|
ec5f63 |
6) of CentOS distribution we need to produce the release-specific
|
|
|
ec5f63 |
translation files using the centos-art script as following:
|
|
|
ec5f63 |
|
|
|
ec5f63 |
centos-art render --entry=/home/centos/artwork/trunk/Translations/Identity/Themes/BootUp/Firstboot --filter='3,4,5,6'
|
|
|
ec5f63 |
|
|
|
ec5f63 |
The above command produces the following translation entiry:
|
|
|
ec5f63 |
|
|
|
ec5f63 |
trunk/Translations/Identity/Themes/Distro/BootUp/Firstboot/
|
|
|
ec5f63 |
|-- 3
|
|
|
ec5f63 |
| `-- splash-small.sed
|
|
|
ec5f63 |
|-- 4
|
|
|
ec5f63 |
| `-- splash-small.sed
|
|
|
ec5f63 |
|-- 5
|
|
|
ec5f63 |
| `-- splash-small.sed
|
|
|
ec5f63 |
|-- 6
|
|
|
ec5f63 |
| `-- splash-small.sed
|
|
|
ec5f63 |
|-- Tpl
|
|
|
ec5f63 |
| `-- splash-small.sed
|
|
|
ec5f63 |
`-- firstboot-left.sed
|
|
|
ec5f63 |
|
|
|
ec5f63 |
At this point centos-art is able to produce the Firstboot
|
|
|
ec5f63 |
artwork images for major releases of CentOS distribution. To add new
|
|
|
ec5f63 |
release-specific translation files, run the translation rendering
|
|
|
ec5f63 |
command with the release number you want to produce translation files
|
|
|
ec5f63 |
for in the <samp>`--filter='release-number''</samp> argument.
|
|
|
ec5f63 |
|
|
|
ec5f63 |
|
|
|
13b177 |
|
|
|
ec5f63 |
3.50.2.4 Template Translation Files
|
|
|
ec5f63 |
|
|
|
ec5f63 |
Template translation files are translation files stored inside
|
|
|
ec5f63 |
translation template directory. Template translation files are used by
|
|
|
ec5f63 |
centos-art script to produce specific translation files
|
|
|
8e85aa |
only. Template translation files may be empty or contain sed
|
|
|
8e85aa |
replacement commands. If template translation files are empty files,
|
|
|
8e85aa |
the final specifc translation file built from it contains
|
|
|
8e85aa |
release-specific replacement commands only. For example, see the
|
|
|
8e85aa |
following translation entry:
|
|
|
ec5f63 |
|
|
|
ec5f63 |
trunk/Translations/Identity/Themes/Distro/BootUp/Firstboot/
|
|
|
ec5f63 |
|-- 3
|
|
|
ec5f63 |
| `-- splash-small.sed
|
|
|
ec5f63 |
|-- 4
|
|
|
ec5f63 |
| `-- splash-small.sed
|
|
|
ec5f63 |
|-- 5
|
|
|
ec5f63 |
| `-- splash-small.sed
|
|
|
ec5f63 |
|-- 6
|
|
|
ec5f63 |
| `-- splash-small.sed
|
|
|
ec5f63 |
|-- Tpl
|
|
|
ec5f63 |
| `-- splash-small.sed <-- template translation file.
|
|
|
ec5f63 |
`-- firstboot-left.sed
|
|
|
ec5f63 |
|
|
|
ec5f63 |
In the above exmaple, the <tt>`splash-small.sed'</tt> file is a template
|
|
|
ec5f63 |
translation file and looks like:
|
|
|
ec5f63 |
|
|
|
ec5f63 |
# -------------------------------------
|
|
|
ec5f63 |
# $Id: splash-small.sed 94 2010-09-18 10:59:42Z al $
|
|
|
ec5f63 |
# -------------------------------------
|
|
|
ec5f63 |
|
|
|
ec5f63 |
In the above template translation file there are three comments lines,
|
|
|
ec5f63 |
but when you render it, the centos-art adds the
|
|
|
ec5f63 |
release-specific replacement commands. In our Firstboot example, after
|
|
|
ec5f63 |
rendering Firstboot translation entry, the <tt>`splash-small.sed'</tt>
|
|
|
ec5f63 |
translation file specific to CentOS 5, looks like the following:
|
|
|
ec5f63 |
|
|
|
ec5f63 |
# Warning: Do not modify this file directly. This file is created
|
|
|
ec5f63 |
# automatically using 'centos-art' command line interface. Any change
|
|
|
ec5f63 |
# you do in this file will be lost the next time you update
|
|
|
ec5f63 |
# translation files using 'centos-art' command line interface. If you
|
|
|
ec5f63 |
# want to improve the content of this translation file, improve its
|
|
|
ec5f63 |
# template file instead and run the 'centos-art' command line
|
|
|
ec5f63 |
# interface later to propagate your changes.
|
|
|
ec5f63 |
# -------------------------------------
|
|
|
ec5f63 |
# $Id: splash-small.sed 94 2010-09-18 10:59:42Z al $
|
|
|
ec5f63 |
# -------------------------------------
|
|
|
ec5f63 |
|
|
|
ec5f63 |
# Release number information.
|
|
|
ec5f63 |
s!=RELEASE=!=MAJOR_RELEASE=.=MINOR_RELEASE=!g
|
|
|
ec5f63 |
s!=MINOR_RELEASE=!0!g
|
|
|
ec5f63 |
s!=MAJOR_RELEASE=!5!g
|
|
|
ec5f63 |
|
|
|
ec5f63 |
If template translation files are not empty, replacement commands
|
|
|
ec5f63 |
inside template translation files are preserved inside
|
|
|
ec5f63 |
release-specific translation files. For example, consider the English
|
|
|
ec5f63 |
template translation file of Anaconda progress welcome slide. The
|
|
|
ec5f63 |
translation template directory structure looks like the following:
|
|
|
ec5f63 |
|
|
|
ec5f63 |
trunk/Translations/Identity/Themes/Distro/Anaconda/Progress/
|
|
|
ec5f63 |
`-- Tpl
|
|
|
ec5f63 |
`-- en
|
|
|
ec5f63 |
`-- 01-welcome.sed
|
|
|
ec5f63 |
|
|
|
ec5f63 |
and if we render translation files for CentOS 4 and CentOS 5 major
|
|
|
ec5f63 |
releases, the translation entry would look like the following:
|
|
|
ec5f63 |
|
|
|
ec5f63 |
trunk/Translations/Identity/Themes/Distro/Anaconda/Progress/
|
|
|
ec5f63 |
|-- 4
|
|
|
ec5f63 |
| `-- en
|
|
|
ec5f63 |
| `-- 01-welcome.sed
|
|
|
ec5f63 |
|-- 5
|
|
|
ec5f63 |
| `-- en
|
|
|
ec5f63 |
| `-- 01-welcome.sed
|
|
|
ec5f63 |
`-- Tpl
|
|
|
ec5f63 |
`-- en
|
|
|
ec5f63 |
`-- 01-welcome.sed
|
|
|
ec5f63 |
|
|
|
ec5f63 |
Note Release-specific translation directories preserve
|
|
|
ec5f63 |
template translation directory structure and file names.
|
|
|
ec5f63 |
|
|
|
ec5f63 |
|
|
|
ec5f63 |
In the example above, the template translation file looks like the
|
|
|
ec5f63 |
following:
|
|
|
ec5f63 |
|
|
|
ec5f63 |
# ------------------------------------------------------------
|
|
|
ec5f63 |
# $Id: 01-welcome.sed 94 2010-09-18 10:59:42Z al $
|
|
|
ec5f63 |
# ------------------------------------------------------------
|
|
|
ec5f63 |
s/=TITLE=/Welcome to CentOS =MAJOR_RELEASE= !/
|
|
|
ec5f63 |
s/=TEXT1=/Thank you for installing CentOS =MAJOR_RELEASE=./
|
|
|
ec5f63 |
s/=TEXT2=/CentOS is an enterprise-class Linux Distribution derived from sources freely provided to the public by a prominent North American Enterprise Linux vendor./
|
|
|
ec5f63 |
s/=TEXT3=/CentOS conforms fully with the upstream vendors redistribution policy and aims to be 100% binary compatible. CentOS mainly changes packages to remove upstream vendor branding and artwork./
|
|
|
ec5f63 |
s/=TEXT4=//
|
|
|
ec5f63 |
s/=TEXT5=//
|
|
|
ec5f63 |
s/=TEXT6=//
|
|
|
ec5f63 |
s!=URL=!http://www.centos.org/!
|
|
|
ec5f63 |
|
|
|
ec5f63 |
and, after render the translation entry, specific translation files
|
|
|
ec5f63 |
look like the following:
|
|
|
ec5f63 |
|
|
|
ec5f63 |
# Warning: Do not modify this file directly. This file is created
|
|
|
ec5f63 |
# automatically using 'centos-art' command line interface. Any change
|
|
|
ec5f63 |
# you do in this file will be lost the next time you update
|
|
|
ec5f63 |
# translation files using 'centos-art' command line interface. If you
|
|
|
ec5f63 |
# want to improve the content of this translation file, improve its
|
|
|
ec5f63 |
# template file instead and run the 'centos-art' command line
|
|
|
ec5f63 |
# interface later to propagate your changes.
|
|
|
ec5f63 |
# ------------------------------------------------------------
|
|
|
ec5f63 |
# $Id: 01-welcome.sed 94 2010-09-18 10:59:42Z al $
|
|
|
ec5f63 |
# ------------------------------------------------------------
|
|
|
ec5f63 |
|
|
|
ec5f63 |
s/=TITLE=/Welcome to CentOS =MAJOR_RELEASE= !/
|
|
|
ec5f63 |
s/=TEXT1=/Thank you for installing CentOS =MAJOR_RELEASE=./
|
|
|
ec5f63 |
s/=TEXT2=/CentOS is an enterprise-class Linux Distribution derived from sources freely provided to the public by a prominen t North American Enterprise Linux vendor./
|
|
|
ec5f63 |
s/=TEXT3=/CentOS conforms fully with the upstream vendors redistribution policy and aims to be 100% binary compatible. Cent OS mainly changes packages to remove upstream vendor branding and artwork./
|
|
|
ec5f63 |
s/=TEXT4=//
|
|
|
ec5f63 |
s/=TEXT5=//
|
|
|
ec5f63 |
s/=TEXT6=//
|
|
|
ec5f63 |
s!=URL=!http://www.centos.org/!
|
|
|
ec5f63 |
|
|
|
ec5f63 |
# Release number information.
|
|
|
ec5f63 |
s!=RELEASE=!=MAJOR_RELEASE=.=MINOR_RELEASE=!g
|
|
|
ec5f63 |
s!=MINOR_RELEASE=!0!g
|
|
|
ec5f63 |
s!=MAJOR_RELEASE=!5!g
|
|
|
ec5f63 |
|
|
|
ec5f63 |
In the example above, relevant lines begin with the <samp>`s'</samp> word
|
|
|
ec5f63 |
followed by a separation character (e.g., <samp>`/'</samp>, <samp>`!'</samp>, etc.).
|
|
|
ec5f63 |
These lines have the following format:
|
|
|
ec5f63 |
|
|
|
ec5f63 |
s/REGEXP/REPLACEMENT/FLAGS
|
|
|
ec5f63 |
|
|
|
ec5f63 |
The <samp>`/'</samp> characters may be uniformly replaced by any other single
|
|
|
ec5f63 |
character within any given s command. The <samp>`/'</samp>
|
|
|
ec5f63 |
character (or whatever other character is used in its stead) can
|
|
|
ec5f63 |
appear in the REGEXP or REPLACEMENT only if it is preceded by a
|
|
|
ec5f63 |
<samp>`\'</samp> character.
|
|
|
ec5f63 |
|
|
|
ec5f63 |
The s command is probably the most important in
|
|
|
ec5f63 |
sed and has a lot of different options. Its basic concept
|
|
|
ec5f63 |
is simple: the s command attempts to match the pattern space
|
|
|
ec5f63 |
against the supplied REGEXP; if the match is successful, then that
|
|
|
ec5f63 |
portion of the pattern space which was matched is replaced with
|
|
|
ec5f63 |
REPLACEMENT.
|
|
|
ec5f63 |
|
|
|
ec5f63 |
In the context of our translation files, the REGEXP is where you
|
|
|
ec5f63 |
define translation markers and REPLACEMENT where you define the
|
|
|
ec5f63 |
translation text you want to have after artworks rendering. Sometimes
|
|
|
ec5f63 |
we use the FLAG component with the <samp>`g'</samp> command to apply the
|
|
|
ec5f63 |
replacements globally.
|
|
|
ec5f63 |
|
|
|
8e85aa |
Tip More information about how to use sed
|
|
|
8e85aa |
replacement commands and flags is available in sed
|
|
|
8e85aa |
documentation manual. To read sed documentation manual type
|
|
|
8e85aa |
the following command:
|
|
|
ec5f63 |
info sed
|
|
|
ec5f63 |
|
|
|
ec5f63 |
|
|
|
ec5f63 |
Inside translation files, you can use translation markers not only
|
|
|
ec5f63 |
inside the REGEXP but in the REPLACEMENT too. In order for this
|
|
|
ec5f63 |
configuration to work, the REPLACEMENT of translation markers needs to
|
|
|
ec5f63 |
be define after its definition. For example, see in the
|
|
|
ec5f63 |
release-specific translation file above, how the
|
|
|
ec5f63 |
<samp>`s!=MAJOR_RELASE=!5!g'</samp> replacement command is defined
|
|
|
ec5f63 |
after <samp>`=MAJOR_RELASE='</samp> translation marker definition in
|
|
|
ec5f63 |
the REPLACEMENT of <samp>`=TITLE='</samp> translation marker replacement
|
|
|
ec5f63 |
command.
|
|
|
ec5f63 |
|
|
|
ec5f63 |
|
|
|
13b177 |
|
|
|
ec5f63 |
3.50.2.5 Common Translation Files
|
|
|
ec5f63 |
|
|
|
ec5f63 |
Common translation files contain common translations or no
|
|
|
ec5f63 |
translation at all for their related artworks. They are in the root
|
|
|
ec5f63 |
directory of the translation entry. Common translation files create
|
|
|
ec5f63 |
common artworks for all major releases of CentOS Distribution.
|
|
|
ec5f63 |
|
|
|
ec5f63 |
Translation entries, with common translation files inside, look like
|
|
|
ec5f63 |
the following:
|
|
|
ec5f63 |
|
|
|
ec5f63 |
trunk/Translations/Identity/Themes/Distro/BootUp/Firstboot/
|
|
|
ec5f63 |
|-- 3
|
|
|
ec5f63 |
| `-- splash-small.sed
|
|
|
ec5f63 |
|-- 4
|
|
|
ec5f63 |
| `-- splash-small.sed
|
|
|
ec5f63 |
|-- 5
|
|
|
ec5f63 |
| `-- splash-small.sed
|
|
|
ec5f63 |
|-- 6
|
|
|
ec5f63 |
| `-- splash-small.sed
|
|
|
ec5f63 |
|-- Tpl
|
|
|
ec5f63 |
| `-- splash-small.sed
|
|
|
ec5f63 |
`-- firstboot-left.sed <-- common translation file.
|
|
|
ec5f63 |
|
|
|
ec5f63 |
|
|
|
13b177 |
|
|
|
ec5f63 |
3.50.2.6 Specific Translation Files
|
|
|
ec5f63 |
|
|
|
ec5f63 |
Specific translation files contain specific translations for their
|
|
|
ec5f63 |
related artworks. Specific translation files are not in the root
|
|
|
ec5f63 |
directory of the translation entry, but inside directories which
|
|
|
ec5f63 |
describe the type of translation they are doing. Specific translation
|
|
|
ec5f63 |
files are produced automatically using the centos-art
|
|
|
ec5f63 |
script.
|
|
|
ec5f63 |
|
|
|
ec5f63 |
trunk/Translations/Identity/Themes/Distro/BootUp/Firstboot/
|
|
|
ec5f63 |
|-- 3
|
|
|
ec5f63 |
| `-- splash-small.sed <-- CentOS 3 specific translation file.
|
|
|
ec5f63 |
|-- 4
|
|
|
ec5f63 |
| `-- splash-small.sed <-- CentOS 4 specific translation file.
|
|
|
ec5f63 |
|-- 5
|
|
|
ec5f63 |
| `-- splash-small.sed <-- CentOS 5 specific translation file.
|
|
|
ec5f63 |
|-- 6
|
|
|
ec5f63 |
| `-- splash-small.sed <-- CentOS 6 specific translation file.
|
|
|
ec5f63 |
|-- Tpl
|
|
|
ec5f63 |
| `-- splash-small.sed
|
|
|
ec5f63 |
`-- firstboot-left.sed
|
|
|
ec5f63 |
|
|
|
ec5f63 |
|
|
|
13b177 |
|
|
|
ec5f63 |
3.50.2.7 Translation Rendering
|
|
|
ec5f63 |
|
|
|
ec5f63 |
When rendering translations, the centos-art script checks
|
|
|
ec5f63 |
the translation entry to verify that it has a translation template
|
|
|
ec5f63 |
directory inside. The translation template directory (<tt>`Tpl/'</tt>)
|
|
|
ec5f63 |
contains common translation files used to build release-specific
|
|
|
ec5f63 |
translation files. If the translation template directory doesn't exist
|
|
|
ec5f63 |
inside the translation entry the translation rendering fails. In this
|
|
|
ec5f63 |
case the centos-art script outputs a message and quits
|
|
|
ec5f63 |
script execution.
|
|
|
ec5f63 |
|
|
|
ec5f63 |
|
|
|
13b177 |
|
|
|
ec5f63 |
3.50.2.8 Translation (Pre-)Rendering Configuration Scripts
|
|
|
ec5f63 |
|
|
|
ec5f63 |
When the centos-art script finds a translation template
|
|
|
ec5f63 |
directory inside translation entry, it looks for translations
|
|
|
ec5f63 |
pre-rendering configuration scripts for that translation entry.
|
|
|
ec5f63 |
Translation pre-rendering configuration scripts let you extend
|
|
|
8e85aa |
translation default functionality (described below).
|
|
|
ec5f63 |
|
|
|
ec5f63 |
Translation pre-rendering configuration scripts are stored under
|
|
|
ec5f63 |
<tt>`trunk/Scripts'</tt> directory, specifically under the appropriate
|
|
|
8e85aa |
language implementation. If you are using centos-art Bash
|
|
|
ec5f63 |
implementation, the translation pre-rendering scripts are store in the
|
|
|
ec5f63 |
<tt>`trunk/Scripts/Bash/Config'</tt> location; if you are using
|
|
|
8e85aa |
centos-art Python implementation, then translation
|
|
|
ec5f63 |
pre-rendering scripts are stored in the
|
|
|
ec5f63 |
<tt>`trunk/Scripts/Python/Config'</tt> location, and so on for other
|
|
|
ec5f63 |
implementations.
|
|
|
ec5f63 |
|
|
|
8e85aa |
Bash translation pre-rendering configuration scripts look like the
|
|
|
ec5f63 |
following:
|
|
|
ec5f63 |
|
|
|
ec5f63 |
#!/bin/bash
|
|
|
ec5f63 |
#
|
|
|
ec5f63 |
# render_loadConfig.sh -- brief description here.
|
|
|
ec5f63 |
#
|
|
|
ec5f63 |
# Copyright (C) YEAR YOURNAME
|
|
|
ec5f63 |
#
|
|
|
ec5f63 |
# This program is free software; you can redistribute it and/or modify
|
|
|
ec5f63 |
# it under the terms of the GNU General Public License as published by
|
|
|
ec5f63 |
# the Free Software Foundation; either version 2 of the License, or
|
|
|
ec5f63 |
# (at your option) any later version.
|
|
|
ec5f63 |
#
|
|
|
ec5f63 |
# This program is distributed in the hope that it will be useful, but
|
|
|
ec5f63 |
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
ec5f63 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
ec5f63 |
# General Public License for more details.
|
|
|
ec5f63 |
#
|
|
|
ec5f63 |
# You should have received a copy of the GNU General Public License
|
|
|
ec5f63 |
# along with this program; if not, write to the Free Software
|
|
|
ec5f63 |
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
|
|
ec5f63 |
# USA.
|
|
|
ec5f63 |
#
|
|
|
ec5f63 |
# ----------------------------------------------------------------------
|
|
|
ec5f63 |
# $Id: render_loadConfig.sh 94 2010-09-18 10:59:42Z al $
|
|
|
ec5f63 |
# ----------------------------------------------------------------------
|
|
|
ec5f63 |
|
|
|
ec5f63 |
function render_loadConfig {
|
|
|
ec5f63 |
...
|
|
|
ec5f63 |
}
|
|
|
ec5f63 |
|
|
|
ec5f63 |
Translation pre-rendering scripts are function scripts loaded and
|
|
|
ec5f63 |
executed when rendering a translation entry. Translation pre-rendering
|
|
|
ec5f63 |
scripts are loaded using the translation entry being rendered as
|
|
|
ec5f63 |
reference. For example, suppose you are using the
|
|
|
8e85aa |
centos-art Bash implementation, and you are rendering
|
|
|
ec5f63 |
translations for CentOS brands, in this situation the translation
|
|
|
ec5f63 |
entry would be:
|
|
|
ec5f63 |
|
|
|
ec5f63 |
trunk/Translations/Identity/Brands
|
|
|
ec5f63 |
|
|
|
ec5f63 |
and the entry inside the translation pre-rendering configuration
|
|
|
ec5f63 |
structure would be:
|
|
|
ec5f63 |
|
|
|
ec5f63 |
trunk/Scripts/Bash/Config/Identity/Brands
|
|
|
ec5f63 |
|
|
|
ec5f63 |
Once the centos-art script detects that translation
|
|
|
ec5f63 |
pre-rendering configuration directory exists, the centos-art
|
|
|
ec5f63 |
script looks for the translation pre-rendering configuration file. If
|
|
|
ec5f63 |
the translation pre-rendering configuration file exists, it is loaded
|
|
|
ec5f63 |
and executed. Once the translation pre-rendering configuration file
|
|
|
ec5f63 |
has been executed the translation rendering process is over, and so
|
|
|
ec5f63 |
the script execution.
|
|
|
ec5f63 |
|
|
|
ec5f63 |
Note Translation pre-rendering configuration files have the
|
|
|
ec5f63 |
following form:
|
|
|
ec5f63 |
render.conf.extension
|
|
|
ec5f63 |
where <samp>`extension'</samp> refers the programming language implementation
|
|
|
8e85aa |
you are using. For example, <samp>`sh'</samp> for Bash, <samp>`py'</samp> for Python,
|
|
|
8e85aa |
<samp>`pl'</samp> for Perl, and so on for other implementations.
|
|
|
ec5f63 |
|
|
|
ec5f63 |
|
|
|
ec5f63 |
As we are using Bash implementation to describe the translation
|
|
|
ec5f63 |
pre-rendering configuration example, the translation pre-rendering
|
|
|
ec5f63 |
configuration file that centos-art looks for, inside the
|
|
|
ec5f63 |
above translation pre-rendering configuration directory, is
|
|
|
ec5f63 |
<tt>`render.conf.sh'</tt>.
|
|
|
ec5f63 |
|
|
|
ec5f63 |
|
|
|
13b177 |
|
|
|
ec5f63 |
3.50.2.9 Translation Rendering Default Functionality
|
|
|
ec5f63 |
|
|
|
ec5f63 |
In the other hand, if the translation pre-rendering configuration file
|
|
|
ec5f63 |
doesn't exist, or it isn't written as function script, the
|
|
|
ec5f63 |
centos-art script ignore translation pre-rendering
|
|
|
ec5f63 |
configuration functionality and passes to render translation using
|
|
|
ec5f63 |
default functionality instead.
|
|
|
ec5f63 |
|
|
|
ec5f63 |
The translation rendering default functionality takes template
|
|
|
ec5f63 |
translation directory structure, duplicates it for each release number
|
|
|
ec5f63 |
specified in the <samp>`--filter='release-number''</samp> argument and
|
|
|
ec5f63 |
produces release-specific directories. As part of template translation
|
|
|
ec5f63 |
duplication process take place, the centos-art script adds
|
|
|
5cee2c |
release-specific replacement commands for each specific translation
|
|
|
ec5f63 |
file inside release-specific directories. As result, specific
|
|
|
ec5f63 |
translation files, inside release-specific directories, contain
|
|
|
ec5f63 |
template translation replacement commands plus,
|
|
|
ec5f63 |
release-specific replacement commands.
|
|
|
ec5f63 |
|
|
|
ec5f63 |
Note Release-specific replacement commands are standardized
|
|
|
ec5f63 |
inside centos-art script using predifined release
|
|
|
ec5f63 |
translation markers. Release translation markers are described in the
|
|
|
ec5f63 |
translation marker section
|
|
|
ec5f63 |
(see Translation Markers).
|
|
|
ec5f63 |
|
|
|
ec5f63 |
|
|
|
ec5f63 |
|
|
|
ec5f63 |
|
|
|
13b177 |
|
|
|
ec5f63 |
3.50.3 Usage
|
|
|
ec5f63 |
|
|
|
ec5f63 |
|
|
|
ec5f63 |
<samp>`centos-art render --entry='path/to/dir''</samp>
|
|
|
ec5f63 |
|
|
|
ec5f63 |
When <samp>`path/to/dir'</samp> refers one directory under
|
|
|
ec5f63 |
<samp>`trunk/Translations'</samp>, this command orverwrites available
|
|
|
ec5f63 |
translation files using translation templates.
|
|
|
ec5f63 |
|
|
|
ec5f63 |
|
|
|
ec5f63 |
<samp>`centos-art render --entry='path/to/dir' --filter='pattern''</samp>
|
|
|
ec5f63 |
|
|
|
ec5f63 |
When <samp>`path/to/dir'</samp> refers one directory under
|
|
|
ec5f63 |
<tt>`trunk/Translations'</tt>, this command renders release-specific
|
|
|
ec5f63 |
translation files as you specify in the <samp>`--filter='pattern''</samp>
|
|
|
ec5f63 |
argument. In this case, <samp>`pattern'</samp> not a regular expression but an
|
|
|
ec5f63 |
number (e.g., <samp>`5'</samp>) or a list of numbers separated by commas
|
|
|
ec5f63 |
(e.g., <samp>`3,4,5,6'</samp>) that specify the major release of CentOS
|
|
|
ec5f63 |
distribution you want to render translations for.
|
|
|
ec5f63 |
|
|
|
ec5f63 |
|
|
|
ec5f63 |
|
|
|
ec5f63 |
|
|
|
13b177 |
|
|
|
4c79b5 |
3.50.4 See also
|
|
|
4c79b5 |
|
|
|
ec5f63 |
|
|
|
13b177 |
3.52 trunk/Translations/Identity/Brands
|
|
|
ec5f63 |
|
|
|
13b177 |
3.54 trunk/Translations/Identity/Fonts
|
|
|
ec5f63 |
|
|
|
13b177 |
3.55 trunk/Translations/Identity/Models
|
|
|
ec5f63 |
|
|
|
13b177 |
3.56 trunk/Translations/Identity/Release
|
|
|
ec5f63 |
|
|
|
13b177 |
3.57 trunk/Translations/Identity/Themes
|
|
|
ec5f63 |
|
|
|
ec5f63 |
3.1 trunk/Identity
|
|
|
ec5f63 |
|
|
|
ec5f63 |
|
|
|
300762 |
|
|
|
300762 |
|
|
|
4c79b5 |
|
|
|
13b177 |
[ < ]
|
|
|
13b177 |
[ > ]
|
|
|
4c79b5 |
|
|
|
4c79b5 |
[ << ]
|
|
|
13b177 |
[ Up ]
|
|
|
13b177 |
[ >> ]
|
|
|
4c79b5 |
|
|
|
4c79b5 |
|
|
|
4c79b5 |
<font size="-1">
|
|
|
139290 |
This document was generated on January, 14 2011 using texi2html 1.76.
|
|
|
4c79b5 |
</font>
|
|
|
4c79b5 |
|
|
|
4c79b5 |
|
|
|
4c79b5 |
|
|
|
4c79b5 |
</body>
|
|
|
4c79b5 |
</html>
|