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