|
|
4c79b5 |
|
|
|
4c79b5 |
<html>
|
|
|
ccb7a3 |
|
|
|
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 |
-->
|
|
|
4a9d2a |
|
|
|
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>
|
|
|
4a9d2a |
<title>CentOS Artwork Repository: 3.61 trunk/Translations</title>
|
|
|
4c79b5 |
|
|
|
4a9d2a |
<meta name="description" content="CentOS Artwork Repository: 3.61 trunk/Translations">
|
|
|
4a9d2a |
<meta name="keywords" content="CentOS Artwork Repository: 3.61 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 |
|
|
|
5fb024 |
@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 |
|
|
|
5fb024 |
|
|
|
13b177 |
[ < ]
|
|
|
4a9d2a |
[ > ]
|
|
|
4c79b5 |
|
|
|
035049 |
[ << ]
|
|
|
4a9d2a |
[ Up ]
|
|
|
4a9d2a |
[ >> ]
|
|
|
4c79b5 |
|
|
|
4c79b5 |
|
|
|
4c79b5 |
|
|
|
4c79b5 |
|
|
|
4c79b5 |
[Top]
|
|
|
4c79b5 |
[Contents]
|
|
|
4a9d2a |
[Index]
|
|
|
4c79b5 |
[ ? ]
|
|
|
4c79b5 |
|
|
|
4a9d2a |
|
|
|
13b177 |
|
|
|
4a9d2a |
3.61 trunk/Translations
|
|
|
4a9d2a |
|
|
|
4a9d2a |
|
|
|
4a9d2a |
|
|
|
4a9d2a |
3.61.1 Goals
|
|
|
4a9d2a |
|
|
|
4a9d2a |
The <tt>`trunk/Translations'</tt> directory exists to:
|
|
|
4a9d2a |
|
|
|
4a9d2a |
|
|
|
4a9d2a |
Organize translation files.
|
|
|
4a9d2a |
Organize translation templates used to produce translation files.
|
|
|
4a9d2a |
|
|
|
4a9d2a |
|
|
|
4a9d2a |
|
|
|
4a9d2a |
|
|
|
4a9d2a |
3.61.2 Description
|
|
|
4a9d2a |
|
|
|
4a9d2a |
When you create artwork for CentOS distribution you find that some
|
|
|
4a9d2a |
artworks need to be created for different major releases of CentOS
|
|
|
4a9d2a |
distribution and inside each major release that needs to be created for
|
|
|
4a9d2a |
different locales. To get an approximate idea of how many files we are
|
|
|
4a9d2a |
talking about, consider the followig approximate statistic:
|
|
|
4a9d2a |
|
|
|
4a9d2a |
|
|
|
4a9d2a |
Inside CentOS distribution, there are around 30 images to
|
|
|
4a9d2a |
rebrand.(5)
|
|
|
4a9d2a |
|
|
|
4a9d2a |
There are near to four major releases of CentOS distribution to
|
|
|
4a9d2a |
rebrand in parallel development.(6)
|
|
|
4a9d2a |
|
|
|
4a9d2a |
Each CentOS distribution in parallel development supports more
|
|
|
4a9d2a |
than two hundreds locales.(7)
|
|
|
4a9d2a |
|
|
|
4a9d2a |
|
|
|
4a9d2a |
In order to aliviate maintainance of artwork production for such
|
|
|
4a9d2a |
environment, we divided artwork production in three production lines:
|
|
|
4a9d2a |
|
|
|
4a9d2a |
|
|
|
4a9d2a |
See section trunk/Identity/Themes/Models, to define artworks
|
|
|
4a9d2a |
characteristics (e.g., dimensions, position on the screen, etc.).
|
|
|
4a9d2a |
See section trunk/Identity/Themes/Motifs, to define artworks visual
|
|
|
4a9d2a |
styles (e.g., the look and feel).
|
|
|
4a9d2a |
Translations, to define which major releases and locales
|
|
|
4a9d2a |
artworks are produced for.
|
|
|
4a9d2a |
|
|
|
4a9d2a |
|
|
|
4a9d2a |
Inside CentOS Artwork Repository, the artworks' translation production
|
|
|
4a9d2a |
line is stored under <tt>`trunk/Translations'</tt> directory.
|
|
|
4a9d2a |
|
|
|
4a9d2a |
Inside <tt>`trunk/Translations'</tt> directory, we use "translation
|
|
|
4a9d2a |
entries" to organize artworks' "translation files" and artworks'
|
|
|
4a9d2a |
"translation templates".
|
|
|
4a9d2a |
|
|
|
4a9d2a |
|
|
|
4a9d2a |
|
|
|
4a9d2a |
3.61.2.1 Translation Entries
|
|
|
4a9d2a |
|
|
|
4a9d2a |
Translation entries exists for each artwork you want to produce.
|
|
|
4a9d2a |
Translation entries can be empty directories, or directories
|
|
|
4a9d2a |
containing translation files and translation templates.
|
|
|
4a9d2a |
|
|
|
4a9d2a |
When translation entries are empty directories, the identity entry is
|
|
|
4a9d2a |
used as reference to create file names and directories layout for
|
|
|
4a9d2a |
rendered files. In this case, the centos-art script takes
|
|
|
4a9d2a |
one design template and outputs one non-translated file for each
|
|
|
4a9d2a |
design template available. This configuration is mainly used to
|
|
|
4a9d2a |
produce non-translatable artworks like themes' backgrounds.
|
|
|
4a9d2a |
|
|
|
4a9d2a |
When translation entries contain translation files, the translation
|
|
|
4a9d2a |
entry implements the CentOS release schema and is used as reference to
|
|
|
4a9d2a |
create file names and directories layout for translated artworks. In
|
|
|
4a9d2a |
this case, the centos-art script applies one translation
|
|
|
4a9d2a |
file to one design template to create one translated instance which is
|
|
|
4a9d2a |
used to output one translated file. When the translated file is
|
|
|
4a9d2a |
rendered, the centos-art script remove the previous instance
|
|
|
4a9d2a |
and takes the next file in the list of translation files to repate the
|
|
|
4a9d2a |
whole process once again, and so on for all files in the list. This
|
|
|
4a9d2a |
configuration is mainly used to produce translatable artworks like
|
|
|
4a9d2a |
Anaconda progress slide images.
|
|
|
4a9d2a |
|
|
|
4a9d2a |
To find out correspondence between translation entries and identity
|
|
|
4a9d2a |
entries, you need to look the path of both translation entries and
|
|
|
4a9d2a |
identity entries. For example, if you are using the Modern
|
|
|
4a9d2a |
artisitic motif, the identity entry for Anaconda progress artwork is:
|
|
|
4a9d2a |
|
|
|
4a9d2a |
trunk/Identity/Themes/Motifs/Modern/Distro/Anaconda/Progress
|
|
|
4a9d2a |
|
|
|
4a9d2a |
and its translation entry is:
|
|
|
4a9d2a |
|
|
|
4a9d2a |
trunk/Translations/Identity/Themes/Distro/Anaconda/Progress
|
|
|
4a9d2a |
|
|
|
4a9d2a |
Note how the <tt>`Translations/'</tt> directory prefixes <tt>`Identity/'</tt>
|
|
|
4a9d2a |
directory, also how static values (e.g., Identity, Themes, Distro,
|
|
|
4a9d2a |
etc.) in the identity entry path remain in translation entry path, and
|
|
|
4a9d2a |
how variable values like theme names (e.g., Modern) are stript
|
|
|
4a9d2a |
out from translation entry path. The same convenction can be applied
|
|
|
4a9d2a |
to other identity entries in order to determine their translation
|
|
|
4a9d2a |
entries, or to other translation entries to determine their identity
|
|
|
4a9d2a |
entries.
|
|
|
4a9d2a |
|
|
|
4a9d2a |
Note Translation entries related to identity entries under
|
|
|
4a9d2a |
<tt>`trunk/Identity/Themes/Motifs'</tt> do not use <tt>`Motifs/'</tt> in the
|
|
|
4a9d2a |
path. We've done this because <tt>`trunk/Identity/Themes/Models'</tt>
|
|
|
4a9d2a |
structure, the other structure under <tt>`trunk/Identity/Themes'</tt>,
|
|
|
4a9d2a |
doesn't require translation paths so far. So in the sake of saving
|
|
|
4a9d2a |
characters space when building translation entries for
|
|
|
4a9d2a |
<tt>`trunk/Identity/Themes/Motifs'</tt> structure, we organize Motifs
|
|
|
4a9d2a |
translation entries under <tt>`trunk/Translations/Identity/Themes/'</tt>
|
|
|
4a9d2a |
directly.
|
|
|
4a9d2a |
|
|
|
4a9d2a |
If for some reason <tt>`trunk/Identity/Themes/Models'</tt> structure
|
|
|
4a9d2a |
requires translation entries, we need to re-oraganize the current
|
|
|
4a9d2a |
directory structure accordingly.
|
|
|
4a9d2a |
|
|
|
4a9d2a |
|
|
|
4a9d2a |
Translation entries, as described above, can be re-used by similar
|
|
|
4a9d2a |
identity entries. For example the following identity entries:
|
|
|
4a9d2a |
|
|
|
4a9d2a |
trunk/Identity/Themes/Motifs/Modern/Distro/Anaconda/Progress/
|
|
|
4a9d2a |
trunk/Identity/Themes/Motifs/TreeFlower/Distro/Anaconda/Progress/
|
|
|
4a9d2a |
trunk/Identity/Themes/Motifs/Mettle/Distro/Anaconda/Progress/
|
|
|
4a9d2a |
|
|
|
4a9d2a |
are all valid identity entries able to re-use translation files inside
|
|
|
4a9d2a |
Anaconda progress translation entry (the one shown in our example
|
|
|
4a9d2a |
above). This way, you can create several identity entries and maintain
|
|
|
4a9d2a |
just one translation entry for all of them. Once you change the
|
|
|
4a9d2a |
translation files inside the common translation entry, changes inside
|
|
|
4a9d2a |
identity entries will take effect inside the next you render them.
|
|
|
4a9d2a |
|
|
|
4a9d2a |
Trying to make things plain and simple: inside CentOS Artwork
|
|
|
4a9d2a |
Repository, graphic designers can concentrate their efforts in
|
|
|
4a9d2a |
artworks look and feel (the identity entries), and translators in
|
|
|
4a9d2a |
artworks translations (the translation entries).
|
|
|
4a9d2a |
|
|
|
4a9d2a |
|
|
|
4a9d2a |
|
|
|
4a9d2a |
3.61.2.2 Translation Markers
|
|
|
4a9d2a |
|
|
|
4a9d2a |
|
|
|
4a9d2a |
|
|
|
4a9d2a |
Translation markers are used in "Theme Model Designs" and
|
|
|
4a9d2a |
"Translation Files" as replacement patterns to commit content
|
|
|
4a9d2a |
translation. When you are rendering content using
|
|
|
4a9d2a |
centos-art script inisde <tt>`trunk/Identity'</tt> structure,
|
|
|
4a9d2a |
artistic motifs and translation files are applied to model designs to
|
|
|
4a9d2a |
produce translated content as result. In order to have the appropriate
|
|
|
4a9d2a |
translation in content rendered, markers defintion in translation
|
|
|
4a9d2a |
files should match markers in model designs exactly.
|
|
|
4a9d2a |
|
|
|
4a9d2a |
Translation markers can be whatever text you want, but as convenction
|
|
|
4a9d2a |
we use the following to represent releases of CentOS distribution:
|
|
|
4a9d2a |
|
|
|
4a9d2a |
|
|
|
4a9d2a |
<samp>`=MINOR_RELEASE='</samp>
|
|
|
4a9d2a |
Replace with minor release of CentOS distribution. In the schema M.N, the minor
|
|
|
4a9d2a |
release is represented by the N letter.
|
|
|
4a9d2a |
|
|
|
4a9d2a |
<samp>`=MAJOR_RELEASE='</samp>
|
|
|
4a9d2a |
Replace with major release of CentOS distribution. In the schema M.N,
|
|
|
4a9d2a |
the major release is represented by the M letter.
|
|
|
4a9d2a |
|
|
|
4a9d2a |
<samp>`=RELEASE='</samp>
|
|
|
4a9d2a |
Replace the full release of CentOS distribution. It is
|
|
|
4a9d2a |
<samp>`=MAJOR_RELEASE=.=MINOR_RELEASE='</samp> basically.
|
|
|
4a9d2a |
|
|
|
4a9d2a |
|
|
|
4a9d2a |
|
|
|
4a9d2a |
Specific translation markers convenctions are described inside
|
|
|
4a9d2a |
specific translation entries. Read translation entries documentation
|
|
|
4a9d2a |
to know more about supported translation markers.
|
|
|
4a9d2a |
|
|
|
4a9d2a |
Translation markers standardization creates a common point of
|
|
|
4a9d2a |
reference for translators and graphic designers. To have translation
|
|
|
4a9d2a |
markers well defined makes possible that translators and graphic
|
|
|
4a9d2a |
designers can work together but independently one another.
|
|
|
4a9d2a |
|
|
|
4a9d2a |
|
|
|
4a9d2a |
|
|
|
4a9d2a |
3.61.2.3 Translation Files
|
|
|
4a9d2a |
|
|
|
4a9d2a |
Translation files are text files with sed commands inside,
|
|
|
4a9d2a |
replacement commands mainly. As convenction, translation file names
|
|
|
4a9d2a |
end in <samp>`.sed'</samp>. Translation files are used by centos-art
|
|
|
4a9d2a |
script to produce translated artworks for specific major releases of
|
|
|
4a9d2a |
CentOS Distribution. There are common translation files, specific
|
|
|
4a9d2a |
translation, and template translation files.
|
|
|
4a9d2a |
|
|
|
4a9d2a |
For example, the Firstboot artwork of CentOS distribution uses the
|
|
|
4a9d2a |
images <tt>`splash-small.png'</tt> and <tt>`firstboot-left.png'</tt> as based
|
|
|
4a9d2a |
to control its visual style. The <tt>`splash-small.png'</tt> image
|
|
|
4a9d2a |
contains, in its graphic design, the release number information of
|
|
|
4a9d2a |
CentOS distribution. So the <tt>`splash-small.png'</tt> is
|
|
|
4a9d2a |
release-specific. In the other hand, the <tt>`firstboot-left.png'</tt>
|
|
|
4a9d2a |
doesn't contain release number information. So the
|
|
|
4a9d2a |
<tt>`firstboot-left.png'</tt> is not release-specific.
|
|
|
4a9d2a |
|
|
|
4a9d2a |
If we want to produce Firstboot artwork for different major releases
|
|
|
4a9d2a |
of CentOS distribution, using a monolithic visual identity, all
|
|
|
4a9d2a |
Firstboot images should have the same visual style and, at the same
|
|
|
4a9d2a |
time, the release-specific information in the release-specific images.
|
|
|
4a9d2a |
|
|
|
4a9d2a |
Note The monolithic visual identity is implemented using
|
|
|
4a9d2a |
theme models (see section trunk/Identity/Themes/Models) and artistic
|
|
|
4a9d2a |
motifs (see section trunk/Identity/Themes/Motifs).
|
|
|
4a9d2a |
|
|
|
4a9d2a |
|
|
|
4a9d2a |
Assuming that both theme models and theme motifs are ready for using,
|
|
|
4a9d2a |
the initial translation entry to produce Firstboot artworks would look
|
|
|
4a9d2a |
like the following:
|
|
|
4a9d2a |
|
|
|
4a9d2a |
trunk/Translations/Identity/Themes/Distro/BootUp/Firstboot/
|
|
|
4a9d2a |
|-- Tpl
|
|
|
4a9d2a |
| `-- splash-small.sed
|
|
|
4a9d2a |
`-- firstboot-left.sed
|
|
|
4a9d2a |
|
|
|
4a9d2a |
With the translation entry above, centos-art command is able
|
|
|
4a9d2a |
to produce the image <tt>`firstboot-left.png'</tt> only. To produce
|
|
|
4a9d2a |
<tt>`splash-small.png'</tt> images for major releases (e.g., 3, 4, 5, and
|
|
|
4a9d2a |
6) of CentOS distribution we need to produce the release-specific
|
|
|
4a9d2a |
translation files using the centos-art script as following:
|
|
|
4a9d2a |
|
|
|
4a9d2a |
centos-art render --entry=/home/centos/artwork/trunk/Translations/Identity/Themes/BootUp/Firstboot --filter='3,4,5,6'
|
|
|
4a9d2a |
|
|
|
4a9d2a |
The above command produces the following translation entiry:
|
|
|
4a9d2a |
|
|
|
4a9d2a |
trunk/Translations/Identity/Themes/Distro/BootUp/Firstboot/
|
|
|
4a9d2a |
|-- 3
|
|
|
4a9d2a |
| `-- splash-small.sed
|
|
|
4a9d2a |
|-- 4
|
|
|
4a9d2a |
| `-- splash-small.sed
|
|
|
4a9d2a |
|-- 5
|
|
|
4a9d2a |
| `-- splash-small.sed
|
|
|
4a9d2a |
|-- 6
|
|
|
4a9d2a |
| `-- splash-small.sed
|
|
|
4a9d2a |
|-- Tpl
|
|
|
4a9d2a |
| `-- splash-small.sed
|
|
|
4a9d2a |
`-- firstboot-left.sed
|
|
|
4a9d2a |
|
|
|
4a9d2a |
At this point centos-art is able to produce the Firstboot
|
|
|
4a9d2a |
artwork images for major releases of CentOS distribution. To add new
|
|
|
4a9d2a |
release-specific translation files, run the translation rendering
|
|
|
4a9d2a |
command with the release number you want to produce translation files
|
|
|
4a9d2a |
for in the <samp>`--filter='release-number''</samp> argument.
|
|
|
4a9d2a |
|
|
|
4a9d2a |
|
|
|
4a9d2a |
|
|
|
4a9d2a |
3.61.2.4 Template Translation Files
|
|
|
4a9d2a |
|
|
|
4a9d2a |
Template translation files are translation files stored inside
|
|
|
4a9d2a |
translation template directory. Template translation files are used by
|
|
|
4a9d2a |
centos-art script to produce specific translation files
|
|
|
4a9d2a |
only. Template translation files may be empty or contain sed
|
|
|
4a9d2a |
replacement commands. If template translation files are empty files,
|
|
|
4a9d2a |
the final specifc translation file built from it contains
|
|
|
4a9d2a |
release-specific replacement commands only. For example, see the
|
|
|
4a9d2a |
following translation entry:
|
|
|
4a9d2a |
|
|
|
4a9d2a |
trunk/Translations/Identity/Themes/Distro/BootUp/Firstboot/
|
|
|
4a9d2a |
|-- 3
|
|
|
4a9d2a |
| `-- splash-small.sed
|
|
|
4a9d2a |
|-- 4
|
|
|
4a9d2a |
| `-- splash-small.sed
|
|
|
4a9d2a |
|-- 5
|
|
|
4a9d2a |
| `-- splash-small.sed
|
|
|
4a9d2a |
|-- 6
|
|
|
4a9d2a |
| `-- splash-small.sed
|
|
|
4a9d2a |
|-- Tpl
|
|
|
4a9d2a |
| `-- splash-small.sed <-- template translation file.
|
|
|
4a9d2a |
`-- firstboot-left.sed
|
|
|
4a9d2a |
|
|
|
4a9d2a |
In the above exmaple, the <tt>`splash-small.sed'</tt> file is a template
|
|
|
4a9d2a |
translation file and looks like:
|
|
|
4a9d2a |
|
|
|
4a9d2a |
# -------------------------------------
|
|
|
4a9d2a |
# $Id: splash-small.sed 94 2010-09-18 10:59:42Z al $
|
|
|
4a9d2a |
# -------------------------------------
|
|
|
4a9d2a |
|
|
|
4a9d2a |
In the above template translation file there are three comments lines,
|
|
|
4a9d2a |
but when you render it, the centos-art adds the
|
|
|
4a9d2a |
release-specific replacement commands. In our Firstboot example, after
|
|
|
4a9d2a |
rendering Firstboot translation entry, the <tt>`splash-small.sed'</tt>
|
|
|
4a9d2a |
translation file specific to CentOS 5, looks like the following:
|
|
|
4a9d2a |
|
|
|
4a9d2a |
# Warning: Do not modify this file directly. This file is created
|
|
|
4a9d2a |
# automatically using 'centos-art' command line interface. Any change
|
|
|
4a9d2a |
# you do in this file will be lost the next time you update
|
|
|
4a9d2a |
# translation files using 'centos-art' command line interface. If you
|
|
|
4a9d2a |
# want to improve the content of this translation file, improve its
|
|
|
4a9d2a |
# template file instead and run the 'centos-art' command line
|
|
|
4a9d2a |
# interface later to propagate your changes.
|
|
|
4a9d2a |
# -------------------------------------
|
|
|
4a9d2a |
# $Id: splash-small.sed 94 2010-09-18 10:59:42Z al $
|
|
|
4a9d2a |
# -------------------------------------
|
|
|
4a9d2a |
|
|
|
4a9d2a |
# Release number information.
|
|
|
4a9d2a |
s!=RELEASE=!=MAJOR_RELEASE=.=MINOR_RELEASE=!g
|
|
|
4a9d2a |
s!=MINOR_RELEASE=!0!g
|
|
|
4a9d2a |
s!=MAJOR_RELEASE=!5!g
|
|
|
4a9d2a |
|
|
|
4a9d2a |
If template translation files are not empty, replacement commands
|
|
|
4a9d2a |
inside template translation files are preserved inside
|
|
|
4a9d2a |
release-specific translation files. For example, consider the English
|
|
|
4a9d2a |
template translation file of Anaconda progress welcome slide. The
|
|
|
4a9d2a |
translation template directory structure looks like the following:
|
|
|
4a9d2a |
|
|
|
4a9d2a |
trunk/Translations/Identity/Themes/Distro/Anaconda/Progress/
|
|
|
4a9d2a |
`-- Tpl
|
|
|
4a9d2a |
`-- en
|
|
|
4a9d2a |
`-- 01-welcome.sed
|
|
|
4a9d2a |
|
|
|
4a9d2a |
and if we render translation files for CentOS 4 and CentOS 5 major
|
|
|
4a9d2a |
releases, the translation entry would look like the following:
|
|
|
4a9d2a |
|
|
|
4a9d2a |
trunk/Translations/Identity/Themes/Distro/Anaconda/Progress/
|
|
|
4a9d2a |
|-- 4
|
|
|
4a9d2a |
| `-- en
|
|
|
4a9d2a |
| `-- 01-welcome.sed
|
|
|
4a9d2a |
|-- 5
|
|
|
4a9d2a |
| `-- en
|
|
|
4a9d2a |
| `-- 01-welcome.sed
|
|
|
4a9d2a |
`-- Tpl
|
|
|
4a9d2a |
`-- en
|
|
|
4a9d2a |
`-- 01-welcome.sed
|
|
|
4a9d2a |
|
|
|
4a9d2a |
Note Release-specific translation directories preserve
|
|
|
4a9d2a |
template translation directory structure and file names.
|
|
|
4a9d2a |
|
|
|
4a9d2a |
|
|
|
4a9d2a |
In the example above, the template translation file looks like the
|
|
|
4a9d2a |
following:
|
|
|
4a9d2a |
|
|
|
4a9d2a |
# ------------------------------------------------------------
|
|
|
4a9d2a |
# $Id: 01-welcome.sed 94 2010-09-18 10:59:42Z al $
|
|
|
4a9d2a |
# ------------------------------------------------------------
|
|
|
4a9d2a |
s/=TITLE=/Welcome to CentOS =MAJOR_RELEASE= !/
|
|
|
4a9d2a |
s/=TEXT1=/Thank you for installing CentOS =MAJOR_RELEASE=./
|
|
|
4a9d2a |
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./
|
|
|
4a9d2a |
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./
|
|
|
4a9d2a |
s/=TEXT4=//
|
|
|
4a9d2a |
s/=TEXT5=//
|
|
|
4a9d2a |
s/=TEXT6=//
|
|
|
4a9d2a |
s!=URL=!http://www.centos.org/!
|
|
|
4a9d2a |
|
|
|
4a9d2a |
and, after render the translation entry, specific translation files
|
|
|
4a9d2a |
look like the following:
|
|
|
4a9d2a |
|
|
|
4a9d2a |
# Warning: Do not modify this file directly. This file is created
|
|
|
4a9d2a |
# automatically using 'centos-art' command line interface. Any change
|
|
|
4a9d2a |
# you do in this file will be lost the next time you update
|
|
|
4a9d2a |
# translation files using 'centos-art' command line interface. If you
|
|
|
4a9d2a |
# want to improve the content of this translation file, improve its
|
|
|
4a9d2a |
# template file instead and run the 'centos-art' command line
|
|
|
4a9d2a |
# interface later to propagate your changes.
|
|
|
4a9d2a |
# ------------------------------------------------------------
|
|
|
4a9d2a |
# $Id: 01-welcome.sed 94 2010-09-18 10:59:42Z al $
|
|
|
4a9d2a |
# ------------------------------------------------------------
|
|
|
4a9d2a |
|
|
|
4a9d2a |
s/=TITLE=/Welcome to CentOS =MAJOR_RELEASE= !/
|
|
|
4a9d2a |
s/=TEXT1=/Thank you for installing CentOS =MAJOR_RELEASE=./
|
|
|
4a9d2a |
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./
|
|
|
4a9d2a |
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./
|
|
|
4a9d2a |
s/=TEXT4=//
|
|
|
4a9d2a |
s/=TEXT5=//
|
|
|
4a9d2a |
s/=TEXT6=//
|
|
|
4a9d2a |
s!=URL=!http://www.centos.org/!
|
|
|
4a9d2a |
|
|
|
4a9d2a |
# Release number information.
|
|
|
4a9d2a |
s!=RELEASE=!=MAJOR_RELEASE=.=MINOR_RELEASE=!g
|
|
|
4a9d2a |
s!=MINOR_RELEASE=!0!g
|
|
|
4a9d2a |
s!=MAJOR_RELEASE=!5!g
|
|
|
4a9d2a |
|
|
|
4a9d2a |
In the example above, relevant lines begin with the <samp>`s'</samp> word
|
|
|
4a9d2a |
followed by a separation character (e.g., <samp>`/'</samp>, <samp>`!'</samp>, etc.).
|
|
|
4a9d2a |
These lines have the following format:
|
|
|
4a9d2a |
|
|
|
4a9d2a |
s/REGEXP/REPLACEMENT/FLAGS
|
|
|
4a9d2a |
|
|
|
4a9d2a |
The <samp>`/'</samp> characters may be uniformly replaced by any other single
|
|
|
4a9d2a |
character within any given s command. The <samp>`/'</samp>
|
|
|
4a9d2a |
character (or whatever other character is used in its stead) can
|
|
|
4a9d2a |
appear in the REGEXP or REPLACEMENT only if it is preceded by a
|
|
|
4a9d2a |
<samp>`\'</samp> character.
|
|
|
4a9d2a |
|
|
|
4a9d2a |
The s command is probably the most important in
|
|
|
4a9d2a |
sed and has a lot of different options. Its basic concept
|
|
|
4a9d2a |
is simple: the s command attempts to match the pattern space
|
|
|
4a9d2a |
against the supplied REGEXP; if the match is successful, then that
|
|
|
4a9d2a |
portion of the pattern space which was matched is replaced with
|
|
|
4a9d2a |
REPLACEMENT.
|
|
|
4a9d2a |
|
|
|
4a9d2a |
In the context of our translation files, the REGEXP is where you
|
|
|
4a9d2a |
define translation markers and REPLACEMENT where you define the
|
|
|
4a9d2a |
translation text you want to have after artworks rendering. Sometimes
|
|
|
4a9d2a |
we use the FLAG component with the <samp>`g'</samp> command to apply the
|
|
|
4a9d2a |
replacements globally.
|
|
|
4a9d2a |
|
|
|
4a9d2a |
Tip More information about how to use sed
|
|
|
4a9d2a |
replacement commands and flags is available in sed
|
|
|
4a9d2a |
documentation manual. To read sed documentation manual type
|
|
|
4a9d2a |
the following command:
|
|
|
4a9d2a |
info sed
|
|
|
4a9d2a |
|
|
|
4a9d2a |
|
|
|
4a9d2a |
Inside translation files, you can use translation markers not only
|
|
|
4a9d2a |
inside the REGEXP but in the REPLACEMENT too. In order for this
|
|
|
4a9d2a |
configuration to work, the REPLACEMENT of translation markers needs to
|
|
|
4a9d2a |
be define after its definition. For example, see in the
|
|
|
4a9d2a |
release-specific translation file above, how the
|
|
|
4a9d2a |
<samp>`s!=MAJOR_RELASE=!5!g'</samp> replacement command is defined
|
|
|
4a9d2a |
after <samp>`=MAJOR_RELASE='</samp> translation marker definition in
|
|
|
4a9d2a |
the REPLACEMENT of <samp>`=TITLE='</samp> translation marker replacement
|
|
|
4a9d2a |
command.
|
|
|
4a9d2a |
|
|
|
4a9d2a |
|
|
|
4a9d2a |
|
|
|
4a9d2a |
3.61.2.5 Common Translation Files
|
|
|
4a9d2a |
|
|
|
4a9d2a |
Common translation files contain common translations or no
|
|
|
4a9d2a |
translation at all for their related artworks. They are in the root
|
|
|
4a9d2a |
directory of the translation entry. Common translation files create
|
|
|
4a9d2a |
common artworks for all major releases of CentOS Distribution.
|
|
|
4a9d2a |
|
|
|
4a9d2a |
Translation entries, with common translation files inside, look like
|
|
|
4a9d2a |
the following:
|
|
|
4a9d2a |
|
|
|
4a9d2a |
trunk/Translations/Identity/Themes/Distro/BootUp/Firstboot/
|
|
|
4a9d2a |
|-- 3
|
|
|
4a9d2a |
| `-- splash-small.sed
|
|
|
4a9d2a |
|-- 4
|
|
|
4a9d2a |
| `-- splash-small.sed
|
|
|
4a9d2a |
|-- 5
|
|
|
4a9d2a |
| `-- splash-small.sed
|
|
|
4a9d2a |
|-- 6
|
|
|
4a9d2a |
| `-- splash-small.sed
|
|
|
4a9d2a |
|-- Tpl
|
|
|
4a9d2a |
| `-- splash-small.sed
|
|
|
4a9d2a |
`-- firstboot-left.sed <-- common translation file.
|
|
|
4a9d2a |
|
|
|
4a9d2a |
|
|
|
4a9d2a |
|
|
|
4a9d2a |
3.61.2.6 Specific Translation Files
|
|
|
4a9d2a |
|
|
|
4a9d2a |
Specific translation files contain specific translations for their
|
|
|
4a9d2a |
related artworks. Specific translation files are not in the root
|
|
|
4a9d2a |
directory of the translation entry, but inside directories which
|
|
|
4a9d2a |
describe the type of translation they are doing. Specific translation
|
|
|
4a9d2a |
files are produced automatically using the centos-art
|
|
|
4a9d2a |
script.
|
|
|
4a9d2a |
|
|
|
4a9d2a |
trunk/Translations/Identity/Themes/Distro/BootUp/Firstboot/
|
|
|
4a9d2a |
|-- 3
|
|
|
4a9d2a |
| `-- splash-small.sed <-- CentOS 3 specific translation file.
|
|
|
4a9d2a |
|-- 4
|
|
|
4a9d2a |
| `-- splash-small.sed <-- CentOS 4 specific translation file.
|
|
|
4a9d2a |
|-- 5
|
|
|
4a9d2a |
| `-- splash-small.sed <-- CentOS 5 specific translation file.
|
|
|
4a9d2a |
|-- 6
|
|
|
4a9d2a |
| `-- splash-small.sed <-- CentOS 6 specific translation file.
|
|
|
4a9d2a |
|-- Tpl
|
|
|
4a9d2a |
| `-- splash-small.sed
|
|
|
4a9d2a |
`-- firstboot-left.sed
|
|
|
4a9d2a |
|
|
|
4a9d2a |
|
|
|
4a9d2a |
|
|
|
4a9d2a |
3.61.2.7 Translation Rendering
|
|
|
4a9d2a |
|
|
|
4a9d2a |
When rendering translations, the centos-art script checks
|
|
|
4a9d2a |
the translation entry to verify that it has a translation template
|
|
|
4a9d2a |
directory inside. The translation template directory (<tt>`Tpl/'</tt>)
|
|
|
4a9d2a |
contains common translation files used to build release-specific
|
|
|
4a9d2a |
translation files. If the translation template directory doesn't exist
|
|
|
4a9d2a |
inside the translation entry the translation rendering fails. In this
|
|
|
4a9d2a |
case the centos-art script outputs a message and quits
|
|
|
4a9d2a |
script execution.
|
|
|
4a9d2a |
|
|
|
4a9d2a |
|
|
|
4a9d2a |
|
|
|
4a9d2a |
3.61.2.8 Translation (Pre-)Rendering Configuration Scripts
|
|
|
4a9d2a |
|
|
|
4a9d2a |
When the centos-art script finds a translation template
|
|
|
4a9d2a |
directory inside translation entry, it looks for translations
|
|
|
4a9d2a |
pre-rendering configuration scripts for that translation entry.
|
|
|
4a9d2a |
Translation pre-rendering configuration scripts let you extend
|
|
|
4a9d2a |
translation default functionality (described below).
|
|
|
4a9d2a |
|
|
|
4a9d2a |
Translation pre-rendering configuration scripts are stored under
|
|
|
4a9d2a |
<tt>`trunk/Scripts'</tt> directory, specifically under the appropriate
|
|
|
4a9d2a |
language implementation. If you are using centos-art Bash
|
|
|
4a9d2a |
implementation, the translation pre-rendering scripts are store in the
|
|
|
4a9d2a |
<tt>`trunk/Scripts/Bash/Config'</tt> location; if you are using
|
|
|
4a9d2a |
centos-art Python implementation, then translation
|
|
|
4a9d2a |
pre-rendering scripts are stored in the
|
|
|
4a9d2a |
<tt>`trunk/Scripts/Python/Config'</tt> location, and so on for other
|
|
|
4a9d2a |
implementations.
|
|
|
4a9d2a |
|
|
|
4a9d2a |
Bash translation pre-rendering configuration scripts look like the
|
|
|
4a9d2a |
following:
|
|
|
4a9d2a |
|
|
|
4a9d2a |
#!/bin/bash
|
|
|
4a9d2a |
#
|
|
|
4a9d2a |
# render_loadConfig.sh -- brief description here.
|
|
|
4a9d2a |
#
|
|
|
4a9d2a |
# Copyright (C) YEAR YOURNAME
|
|
|
4a9d2a |
#
|
|
|
4a9d2a |
# This program is free software; you can redistribute it and/or modify
|
|
|
4a9d2a |
# it under the terms of the GNU General Public License as published by
|
|
|
4a9d2a |
# the Free Software Foundation; either version 2 of the License, or
|
|
|
4a9d2a |
# (at your option) any later version.
|
|
|
4a9d2a |
#
|
|
|
4a9d2a |
# This program is distributed in the hope that it will be useful, but
|
|
|
4a9d2a |
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
4a9d2a |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
4a9d2a |
# General Public License for more details.
|
|
|
4a9d2a |
#
|
|
|
4a9d2a |
# You should have received a copy of the GNU General Public License
|
|
|
4a9d2a |
# along with this program; if not, write to the Free Software
|
|
|
4a9d2a |
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
|
|
4a9d2a |
# USA.
|
|
|
4a9d2a |
#
|
|
|
4a9d2a |
# ----------------------------------------------------------------------
|
|
|
4a9d2a |
# $Id: render_loadConfig.sh 94 2010-09-18 10:59:42Z al $
|
|
|
4a9d2a |
# ----------------------------------------------------------------------
|
|
|
4a9d2a |
|
|
|
4a9d2a |
function render_loadConfig {
|
|
|
4a9d2a |
...
|
|
|
4a9d2a |
}
|
|
|
4a9d2a |
|
|
|
4a9d2a |
Translation pre-rendering scripts are function scripts loaded and
|
|
|
4a9d2a |
executed when rendering a translation entry. Translation pre-rendering
|
|
|
4a9d2a |
scripts are loaded using the translation entry being rendered as
|
|
|
4a9d2a |
reference. For example, suppose you are using the
|
|
|
4a9d2a |
centos-art Bash implementation, and you are rendering
|
|
|
4a9d2a |
translations for CentOS brands, in this situation the translation
|
|
|
4a9d2a |
entry would be:
|
|
|
4a9d2a |
|
|
|
4a9d2a |
trunk/Translations/Identity/Brands
|
|
|
4a9d2a |
|
|
|
4a9d2a |
and the entry inside the translation pre-rendering configuration
|
|
|
4a9d2a |
structure would be:
|
|
|
4a9d2a |
|
|
|
4a9d2a |
trunk/Scripts/Bash/Config/Identity/Brands
|
|
|
4a9d2a |
|
|
|
4a9d2a |
Once the centos-art script detects that translation
|
|
|
4a9d2a |
pre-rendering configuration directory exists, the centos-art
|
|
|
4a9d2a |
script looks for the translation pre-rendering configuration file. If
|
|
|
4a9d2a |
the translation pre-rendering configuration file exists, it is loaded
|
|
|
4a9d2a |
and executed. Once the translation pre-rendering configuration file
|
|
|
4a9d2a |
has been executed the translation rendering process is over, and so
|
|
|
4a9d2a |
the script execution.
|
|
|
4a9d2a |
|
|
|
4a9d2a |
Note Translation pre-rendering configuration files have the
|
|
|
4a9d2a |
following form:
|
|
|
4a9d2a |
render.conf.extension
|
|
|
4a9d2a |
where <samp>`extension'</samp> refers the programming language implementation
|
|
|
4a9d2a |
you are using. For example, <samp>`sh'</samp> for Bash, <samp>`py'</samp> for Python,
|
|
|
4a9d2a |
<samp>`pl'</samp> for Perl, and so on for other implementations.
|
|
|
4a9d2a |
|
|
|
4a9d2a |
|
|
|
4a9d2a |
As we are using Bash implementation to describe the translation
|
|
|
4a9d2a |
pre-rendering configuration example, the translation pre-rendering
|
|
|
4a9d2a |
configuration file that centos-art looks for, inside the
|
|
|
4a9d2a |
above translation pre-rendering configuration directory, is
|
|
|
4a9d2a |
<tt>`render.conf.sh'</tt>.
|
|
|
4a9d2a |
|
|
|
4a9d2a |
|
|
|
4a9d2a |
|
|
|
4a9d2a |
3.61.2.9 Translation Rendering Default Functionality
|
|
|
4a9d2a |
|
|
|
4a9d2a |
In the other hand, if the translation pre-rendering configuration file
|
|
|
4a9d2a |
doesn't exist, or it isn't written as function script, the
|
|
|
4a9d2a |
centos-art script ignore translation pre-rendering
|
|
|
4a9d2a |
configuration functionality and passes to render translation using
|
|
|
4a9d2a |
default functionality instead.
|
|
|
4a9d2a |
|
|
|
4a9d2a |
The translation rendering default functionality takes template
|
|
|
4a9d2a |
translation directory structure, duplicates it for each release number
|
|
|
4a9d2a |
specified in the <samp>`--filter='release-number''</samp> argument and
|
|
|
4a9d2a |
produces release-specific directories. As part of template translation
|
|
|
4a9d2a |
duplication process take place, the centos-art script adds
|
|
|
4a9d2a |
release-specific replacement commands for each specific translation
|
|
|
4a9d2a |
file inside release-specific directories. As result, specific
|
|
|
4a9d2a |
translation files, inside release-specific directories, contain
|
|
|
4a9d2a |
template translation replacement commands plus,
|
|
|
4a9d2a |
release-specific replacement commands.
|
|
|
4a9d2a |
|
|
|
4a9d2a |
Note Release-specific replacement commands are standardized
|
|
|
4a9d2a |
inside centos-art script using predifined release
|
|
|
4a9d2a |
translation markers. Release translation markers are described in the
|
|
|
4a9d2a |
translation marker section
|
|
|
4a9d2a |
(see Translation Markers).
|
|
|
4a9d2a |
|
|
|
4a9d2a |
|
|
|
4a9d2a |
|
|
|
4a9d2a |
|
|
|
4a9d2a |
|
|
|
4a9d2a |
3.61.3 Usage
|
|
|
4a9d2a |
|
|
|
4a9d2a |
|
|
|
4a9d2a |
<samp>`centos-art render --entry='path/to/dir''</samp>
|
|
|
4a9d2a |
|
|
|
4a9d2a |
When <samp>`path/to/dir'</samp> refers one directory under
|
|
|
4a9d2a |
<samp>`trunk/Translations'</samp>, this command orverwrites available
|
|
|
4a9d2a |
translation files using translation templates.
|
|
|
4a9d2a |
|
|
|
4a9d2a |
|
|
|
4a9d2a |
<samp>`centos-art render --entry='path/to/dir' --filter='pattern''</samp>
|
|
|
4a9d2a |
|
|
|
4a9d2a |
When <samp>`path/to/dir'</samp> refers one directory under
|
|
|
4a9d2a |
<tt>`trunk/Translations'</tt>, this command renders release-specific
|
|
|
4a9d2a |
translation files as you specify in the <samp>`--filter='pattern''</samp>
|
|
|
4a9d2a |
argument. In this case, <samp>`pattern'</samp> not a regular expression but an
|
|
|
4a9d2a |
number (e.g., <samp>`5'</samp>) or a list of numbers separated by commas
|
|
|
4a9d2a |
(e.g., <samp>`3,4,5,6'</samp>) that specify the major release of CentOS
|
|
|
4a9d2a |
distribution you want to render translations for.
|
|
|
4a9d2a |
|
|
|
4a9d2a |
|
|
|
4a9d2a |
|
|
|
4a9d2a |
|
|
|
4a9d2a |
|
|
|
4a9d2a |
3.61.4 See also
|
|
|
4a9d2a |
|
|
|
4a9d2a |
|
|
|
4a9d2a |
3.63 trunk/Translations/Identity/Brands
|
|
|
4a9d2a |
|
|
|
4a9d2a |
3.65 trunk/Translations/Identity/Fonts
|
|
|
4a9d2a |
|
|
|
4a9d2a |
3.66 trunk/Translations/Identity/Models
|
|
|
4a9d2a |
|
|
|
4a9d2a |
3.67 trunk/Translations/Identity/Release
|
|
|
4a9d2a |
|
|
|
4a9d2a |
3.68 trunk/Translations/Identity/Themes
|
|
|
4a9d2a |
|
|
|
4a9d2a |
3.1 trunk/Identity
|
|
|
4a9d2a |
|
|
|
035049 |
|
|
|
008ee0 |
|
|
|
b8013f |
|
|
|
5fb024 |
|
|
|
4a9d2a |
[ < ]
|
|
|
4a9d2a |
[ > ]
|
|
|
5fb024 |
|
|
|
035049 |
[ << ]
|
|
|
4a9d2a |
[ Up ]
|
|
|
4a9d2a |
[ >> ]
|
|
|
5fb024 |
|
|
|
4c79b5 |
|
|
|
4c79b5 |
<font size="-1">
|
|
|
4a9d2a |
This document was generated on February, 25 2011 using texi2html 1.76.
|
|
|
4c79b5 |
</font>
|
|
|
4c79b5 |
|
|
|
4c79b5 |
|
|
|
4c79b5 |
|
|
|
4c79b5 |
</body>
|
|
|
4c79b5 |
</html>
|