|
|
0668a4 |
% Part : Concepts
|
|
|
0668a4 |
% Chapter: Translations
|
|
|
0668a4 |
% ------------------------------------------------------------
|
|
|
0668a4 |
% $Id: translations.tex 6191 2010-08-02 02:36:14Z al $
|
|
|
0668a4 |
% ------------------------------------------------------------
|
|
|
0668a4 |
|
|
|
0668a4 |
\begin{description}
|
|
|
0668a4 |
\item[framework:] trunk/Translations/
|
|
|
0668a4 |
\end{description}
|
|
|
0668a4 |
|
|
|
0668a4 |
\noindent Here is where translators locale images. Image localization
|
|
|
0668a4 |
is defined inside \texttt{.sed} files, also known as translation
|
|
|
0668a4 |
files. Translation files can be common or specific. The given
|
|
|
0668a4 |
organization of translation files defines the translation path.
|
|
|
0668a4 |
|
|
|
0668a4 |
\section{Common Translations}
|
|
|
0668a4 |
\hypertarget{sec:Concepts:Translations:Common}{}
|
|
|
0668a4 |
|
|
|
0668a4 |
Common translation files contain common localization or no
|
|
|
0668a4 |
localization at all for their related images. They are in the root
|
|
|
0668a4 |
directory of the translation path. Common translation files create
|
|
|
0668a4 |
common images for all major releases of CentOS Distribution.
|
|
|
0668a4 |
|
|
|
0668a4 |
\section{Specific Translations}
|
|
|
0668a4 |
\hypertarget{sec:Concepts:Translations:Specific}{}
|
|
|
0668a4 |
|
|
|
0668a4 |
Specific translation files contain specific localization for their
|
|
|
0668a4 |
related images. Specific translation files are not in the root
|
|
|
0668a4 |
directory of the translation path. Specific translation files are
|
|
|
0668a4 |
inside directories which describe the type of translation they are
|
|
|
0668a4 |
doing.
|
|
|
0668a4 |
|
|
|
0668a4 |
\section{Translation Path}
|
|
|
0668a4 |
\hypertarget{sec:Concepts:Translations:Path}{}
|
|
|
0668a4 |
|
|
|
0668a4 |
Translation path is where we organize common and specific translation
|
|
|
0668a4 |
files. Translation path is also used as reference to build the path of
|
|
|
0668a4 |
rendered images inside image directory (see
|
|
|
0668a4 |
\hyperlink{sec:Concepts:Frameworks:Image}{Image Files}).
|
|
|
0668a4 |
|
|
|
0668a4 |
When rendering images, if no REGEX argument is provided to
|
|
|
0668a4 |
\texttt{render.sh} identity script, all translation files in the
|
|
|
0668a4 |
translation path are read and applied one by one to its related design
|
|
|
0668a4 |
template ---as defined in \texttt{getMatchingList} function--- to
|
|
|
0668a4 |
produce a translated image. Images produced using the
|
|
|
0668a4 |
\texttt{render.sh} identity script have the same name of its
|
|
|
0668a4 |
translation file, but with the \texttt{.png} extension instead.
|
|
|
0668a4 |
|
|
|
0668a4 |
To control the number of images produced by \texttt{render.sh}
|
|
|
0668a4 |
identity script, you need to look into the translation path and
|
|
|
0668a4 |
provide a regular expression pattern that matches the translation
|
|
|
0668a4 |
path, or paths, related to the image, or images, you want to produce.
|
|
|
0668a4 |
|
|
|
0668a4 |
The regular expression pattern you provide to \texttt{render.sh}
|
|
|
0668a4 |
identity script is applied to the translation path from its very
|
|
|
0668a4 |
beginning. It is not the same to say \texttt{5/es/01-welcome} that
|
|
|
0668a4 |
\texttt{01-welcome}, the frist expression matches but the last one
|
|
|
0668a4 |
does not.
|
|
|
0668a4 |
|
|
|
0668a4 |
When using REGEX you don't need to specify the file extension. It is
|
|
|
0668a4 |
removed from translation path before applying the REGEX pattern, so it
|
|
|
0668a4 |
doesn't count here.
|
|
|
0668a4 |
|
|
|
0668a4 |
\section{Translation Markers}
|
|
|
0668a4 |
\hypertarget{sec:Concepts:Translations:Markers}{}
|
|
|
0668a4 |
|
|
|
0668a4 |
Translation markers are used in design templates and translation files
|
|
|
0668a4 |
as replacement pattern to commit image translation. When
|
|
|
0668a4 |
\texttt{render.sh} identity script renders images, translation files
|
|
|
0668a4 |
are applied to design templates to get a PNG translated image as
|
|
|
0668a4 |
result. In order to have the appropriate translation on the PNG
|
|
|
0668a4 |
image, marker defintion in translation files should match markers in
|
|
|
0668a4 |
design templates.
|
|
|
0668a4 |
|
|
|
0668a4 |
Translation markers can be whatever text you want, but as convenction
|
|
|
0668a4 |
we've defined those we use inside CentOS Artwork Repository. This
|
|
|
0668a4 |
definition creates a common point of reference to translators and
|
|
|
0668a4 |
graphic designers. To have a clean definition of translation markers
|
|
|
0668a4 |
is what makes possible that translators and graphic designers can work
|
|
|
0668a4 |
together but independently one another.
|
|
|
0668a4 |
|
|
|
0668a4 |
\section{Translation Rendering}
|
|
|
0668a4 |
\hypertarget{sec:Concepts:Translations:Rendering}{}
|
|
|
0668a4 |
|
|
|
0668a4 |
Translation paths and files ---also known as the translation
|
|
|
0668a4 |
structure--- are produced using the \texttt{render.sh} translation
|
|
|
0668a4 |
script, available in the current translation directory.
|
|
|
0668a4 |
|
|
|
0668a4 |
The \texttt{render.sh} translation script combines the content of a
|
|
|
0668a4 |
translation template directory ---holding common information--- with
|
|
|
0668a4 |
the release-specific information you provide as argument when
|
|
|
0668a4 |
executing the script. As result, the \texttt{render.sh} translation
|
|
|
0668a4 |
script produces the translation structure that \texttt{render.sh}
|
|
|
0668a4 |
identity script needs to create translated images.
|
|
|
0668a4 |
|
|
|
0668a4 |
\section{Translation Rendering Script}
|
|
|
0668a4 |
\hypertarget{sec:Concepts:Translations:RenderingScripts}{}
|
|
|
0668a4 |
|
|
|
0668a4 |
The \texttt{render.sh} translation script produces release-specific
|
|
|
0668a4 |
translation directories. Use the \texttt{render.sh} translation script
|
|
|
0668a4 |
whenever you need to create a new release-specific translation
|
|
|
0668a4 |
directory based on translation template directory. The \texttt{render.sh}
|
|
|
0668a4 |
translation script has the following syntax:
|
|
|
0668a4 |
|
|
|
0668a4 |
\begin{quote}
|
|
|
0668a4 |
\texttt{./render.sh RELEASE ...}
|
|
|
0668a4 |
\end{quote}
|
|
|
0668a4 |
|
|
|
0668a4 |
The RELEASE argument defines the release number used to create the
|
|
|
0668a4 |
release-specific translation directory. You can pass many RELEASE
|
|
|
0668a4 |
arguments, separated by one or more spaces, to \texttt{render.sh}
|
|
|
0668a4 |
translation script in a single call. If no RELEASE argument is passed
|
|
|
0668a4 |
to \texttt{render.sh} translation script then all release-specific
|
|
|
0668a4 |
translation directories, available in the current translation
|
|
|
0668a4 |
directory, are updated using the translation template as reference.
|
|
|
0668a4 |
|
|
|
0668a4 |
Default behaviour of \texttt{render.sh} translation script may be
|
|
|
0668a4 |
usefull if all your release-specific translation directories always
|
|
|
0668a4 |
have the same information that translation template does. If this is
|
|
|
0668a4 |
the case, you only need to maintain the translation template and use
|
|
|
0668a4 |
the \texttt{render.sh} translation script to propagate changes to each
|
|
|
0668a4 |
release-specific translation directory.
|
|
|
0668a4 |
|
|
|
0668a4 |
In contrast, if you are using the \texttt{render.sh} translation
|
|
|
0668a4 |
script to create release-specific translation directories that use
|
|
|
0668a4 |
translation template as base to introduce non-reusable translations,
|
|
|
0668a4 |
you should take care when executing the \texttt{render.sh} translation
|
|
|
0668a4 |
script. Otherwise, your non-reusable translations may be replaced
|
|
|
0668a4 |
with those in template.
|
|
|
0668a4 |
|
|
|
0668a4 |
Inside CentOS Artwork Repository, all translation directories
|
|
|
0668a4 |
(reusable and non-reusable) are versioned. If you accidentally
|
|
|
0668a4 |
propagate template content to a non-reusable translation, you have the
|
|
|
0668a4 |
Subversion's \texttt{revert} and \texttt{update} commands to undo the
|
|
|
0668a4 |
mess.
|
|
|
0668a4 |
|
|
|
0668a4 |
As general rule, when you use the \texttt{render.sh} translations
|
|
|
0668a4 |
script, take care of details and check twice before commit your
|
|
|
0668a4 |
translation changes up to CentOS Artwork Repository.
|
|
|
0668a4 |
|
|
|
0668a4 |
\section{Translation Template Directory}
|
|
|
0668a4 |
\hypertarget{sec:Concepts:Translations:TemplateDirectory}{}
|
|
|
0668a4 |
|
|
|
0668a4 |
The translation template directory is located in the current
|
|
|
0668a4 |
translation directory and contains common translations for all
|
|
|
0668a4 |
release-specific translation directories. It is also used as base to
|
|
|
0668a4 |
build non-reusable translation.
|