Blame Manuals/Repository-fs/trunk/Locales.texi

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