Blame Manuals/en/Html/Repository/repository_52.html

4c79b5
4c79b5
<html>
09d4f2
09d4f2
09d4f2
The CentOS Artwork Repository exists to organize and automate The
09d4f2
CentOS Project corporate visual identity (, to
09d4f2
start on).
4c79b5
6c4982
Copyright C 2009, 2010 Alain Reguera Delgado. All rights
4c79b5
reserved.
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
-->
008ee0
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>
e68a7a
<title>CentOS Artwork Repository: 3.49 trunk/Translations</title>
4c79b5
e68a7a
<meta name="description" content="CentOS Artwork Repository: 3.49 trunk/Translations">
e68a7a
<meta name="keywords" content="CentOS Artwork Repository: 3.49 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
cbf5a9
[ < ]
cbf5a9
[ > ]
4c79b5
   
4c79b5
[ << ]
4c79b5
[ Up ]
e68a7a
[ >> ]
4c79b5
   
4c79b5
   
4c79b5
   
4c79b5
   
4c79b5
[Top]
4c79b5
[Contents]
e68a7a
[Index]
4c79b5
[ ? ]
4c79b5
e68a7a
cbf5a9
e68a7a

3.49 trunk/Translations

008ee0
008ee0
cbf5a9
54b5a5

3.49.1 Goals

008ee0
e68a7a

The <tt>`trunk/Translations'</tt> directory exists to:

e68a7a

63f275
    e68a7a
  • Organize translation files.
  • e68a7a
  • Organize translation templates used to produce translation files.
  • 63f275
    63f275
    008ee0
    cbf5a9
    54b5a5

    3.49.2 Description

    6aec21
    e68a7a

    When you create artwork for CentOS distribution you find that some

    e68a7a
    artworks need to be created for different major releases of CentOS
    e68a7a
    distribution and inside each major release they need to be created for
    e68a7a
    different locales. To get an approximate idea of how many files we are
    e68a7a
    talking about, consider the followig approximate statistic:
    e68a7a

    63f275
      e68a7a
    • Inside CentOS distribution, there are around 30 images to
    • e68a7a
      rebrand.(2)
      e68a7a
      e68a7a
    • There are near to four major releases of CentOS distribution to
    • e68a7a
      rebrand in parallel development.(3) 
      e68a7a
      e68a7a
    • Each CentOS distribution in parallel development supports more
    • e68a7a
      than two hundreds locales.(4)
      63f275
      63f275
      e68a7a

      In order to aliviate maintainance of artwork production for such

      e68a7a
      environment, we divided artwork production in three production lines:
      e68a7a

      e68a7a
        e68a7a
      1. See section trunk/Identity/Themes/Models, to define artworks
      2. e68a7a
        characteristics (e.g., dimensions, position on the screen, etc.).
        e68a7a
      3. See section trunk/Identity/Themes/Motifs, to define artworks visual
      4. e68a7a
        styles (e.g., the look and feel).
        e68a7a
      5. Translations, to define which major releases and locales
      6. e68a7a
        artworks are produced for. 
        e68a7a
        e68a7a
        e68a7a

        Inside CentOS Artwork Repository, the artworks' translation production

        e68a7a
        line is stored under <tt>`trunk/Translations'</tt> directory.
        e68a7a

        e68a7a

        Inside <tt>`trunk/Translations'</tt> directory, we use "translation

        e68a7a
        entries" to organize artworks' "translation files" and artworks'
        e68a7a
        "translation templates".
        e68a7a

        008ee0
        cbf5a9
        e68a7a

        3.49.2.1 Translation Entries

        38bcd9
        e68a7a

        Translation entries exists for each artwork you want to produce.

        e68a7a
        Translation entries can be empty directories, or directories
        e68a7a
        containing translation files and translation templates.  
        e68a7a

        e68a7a

        When translation entries are empty directories, the identity entry is

        e68a7a
        used as reference to create file names and directories layout for
        e68a7a
        rendered files.  In this case, the centos-art script takes
        e68a7a
        one design template and outputs one non-translated file for each
        e68a7a
        design template available.  This configuration is mainly used to
        e68a7a
        produce non-translatable artworks like themes' backgrounds.
        e68a7a

        e68a7a

        When translation entries contain translation files, the translation

        e68a7a
        entry implements the CentOS release schema and is used as reference to
        e68a7a
        create file names and directories layout for translated artworks. In
        e68a7a
        this case, the centos-art script applies one translation
        e68a7a
        file to one design template to create one translated instance which is
        e68a7a
        used to output one translated file. When the translated file is
        e68a7a
        rendered, the centos-art script remove the previous instance
        e68a7a
        and takes the next file in the list of translation files to repate the
        e68a7a
        whole process once again, and so on for all files in the list. This
        e68a7a
        configuration is mainly used to produce translatable artworks like
        e68a7a
        Anaconda's progress slide images.
        e68a7a

        e68a7a

        To find out correspondence between translation entries and identity

        e68a7a
        entries, you need to look the path of both translation entries and
        e68a7a
        identity entries. For example, if you are using the Modern's artisitic
        e68a7a
        motif, the identity entry for Anaconda progress artwork is:
        e68a7a

        e68a7a
        trunk/Identity/Themes/Motifs/Modern/Distro/Anaconda/Progress
        e68a7a
        e68a7a

        and its translation entry is:

        e68a7a

        e68a7a
        trunk/Translations/Identity/Themes/Distro/Anaconda/Progress
        e68a7a
        e68a7a

        Note how the <tt>`Translations/'</tt> directory prefixes <tt>`Identity/'</tt>

        e68a7a
        directory, also how static values (e.g., Identity, Themes, Distro,
        e68a7a
        etc.) in the identity's entry path remain in translation's entry path,
        e68a7a
        and how variable values like theme names (e.g., Modern) are stript out
        e68a7a
        from translation's entry path. The same convenction can be applied to
        e68a7a
        other identity entries in order to determine their translation
        e68a7a
        entries, or to other translation entries to determine their identity
        e68a7a
        entries.
        e68a7a

        e68a7a
        info

        Note

        Translation entries related to identity entries under

        e68a7a
        <tt>`trunk/Identity/Themes/Motifs'</tt> do not use <tt>`Motifs/'</tt> in the
        e68a7a
        path.  We've done this because <tt>`trunk/Identity/Themes/Models'</tt>
        e68a7a
        structure, the other structure under <tt>`trunk/Identity/Themes'</tt>,
        e68a7a
        doesn't require translation paths so far. So in the sake of saving
        e68a7a
        characters space when building translation entries for
        e68a7a
        <tt>`trunk/Identity/Themes/Motifs'</tt> structure, we organize Motifs
        e68a7a
        translation entries under <tt>`trunk/Translations/Identity/Themes/'</tt>
        e68a7a
        directly. 
        e68a7a

        e68a7a

        If for some reason <tt>`trunk/Identity/Themes/Models'</tt> structure

        e68a7a
        requires translation entries, we need to re-oraganize the current
        e68a7a
        directory structure accordingly.
        e68a7a

        63f275
        e68a7a

        Translation entries, as described above, can be re-used by similar

        e68a7a
        identity entries. For example the following identity entries:
        e68a7a

        e68a7a
        trunk/Identity/Themes/Motifs/Modern/Distro/Anaconda/Progress/
        e68a7a
        trunk/Identity/Themes/Motifs/TreeFlower/Distro/Anaconda/Progress/
        e68a7a
        trunk/Identity/Themes/Motifs/Mettle/Distro/Anaconda/Progress/
        e68a7a
        e68a7a

        are all valid identity entries able to re-use translation files inside

        e68a7a
        Anaconda progress translation entry (the one shown in our example
        e68a7a
        above). This way, you can create several identity entries and maintain
        e68a7a
        just one translation entry for all of them.  Once you change the
        e68a7a
        translation files inside the common translation entry, changes inside
        e68a7a
        identity entries will take effect inside the next you render them.
        e68a7a

        e68a7a

        Trying to make things plain and simple: inside CentOS Artwork

        e68a7a
        Repository, graphic designers can concentrate their efforts in
        e68a7a
        artworks look and feel (the identity entries), and translators in
        e68a7a
        artworks translations (the translation entries).
        e68a7a

        38bcd9
        cbf5a9
        e68a7a

        3.49.2.2 Translation Markers

        e68a7a

        e68a7a
        e68a7a

        e68a7a

        Translation markers are used in "Theme Model Designs" and

        e68a7a
        "Translation Files" as replacement patterns to commit content
        e68a7a
        translation.  When you are rendering content using
        e68a7a
        centos-art script inisde <tt>`trunk/Identity'</tt> structure,
        e68a7a
        artistic motifs and translation files are applied to model designs to
        e68a7a
        produce translated content as result. In order to have the appropriate
        e68a7a
        translation in content rendered, markers defintion in translation
        e68a7a
        files should match markers in model designs exactly. 
        e68a7a

        e68a7a
        e68a7a

        Translation Markers

        e68a7a
        e68a7a

        Figure 3.15: The image rendering flow.

        e68a7a
        e68a7a

        e68a7a

        Translation markers can be whatever text you want, but as convenction

        e68a7a
        we use the following to represent releases of CentOS distribution:
        e68a7a

        e68a7a
        e68a7a
        <samp>`=MINOR_RELEASE='</samp>
        e68a7a

        Replace with minor release of CentOS distribution. In the schema M.N, the minor

        e68a7a
        release is represented by the N letter.
        e68a7a

        e68a7a
        <samp>`=MAJOR_RELEASE='</samp>
        e68a7a

        Replace with major release of CentOS distribution. In the schema M.N,

        e68a7a
        the major release is represented by the M letter.
        e68a7a

        e68a7a
        <samp>`=RELEASE='</samp>
        e68a7a

        Replace the full release of CentOS distribution. It is

        e68a7a
        <samp>`=MAJOR_RELEASE=.=MINOR_RELEASE='</samp> basically. 
        e68a7a

        e68a7a
        e68a7a
        e68a7a

        Specific translation markers convenctions are described inside

        e68a7a
        specific translation entries. Read translation entries documentation
        e68a7a
        to know more about supported translation markers.
        e68a7a

        e68a7a

        Translation markers standardization creates a common point of

        e68a7a
        reference for translators and graphic designers. To have translation
        e68a7a
        markers well defined makes possible that translators and graphic
        e68a7a
        designers can work together but independently one another.
        e68a7a

        e68a7a
        e68a7a
        e68a7a

        3.49.2.3 Translation Files

        e68a7a
        e68a7a

        Translation files are text files with sed's commands inside,

        e68a7a
        replacement commands mainly. As convenction, translation file names
        e68a7a
        end in <samp>`.sed'</samp>. Translation files are used by centos-art
        e68a7a
        script to produce translated artworks for specific major releases of
        e68a7a
        CentOS Distribution. There are common translation files, specific
        e68a7a
        translation, and template translation files.
        e68a7a

        e68a7a

        For example, the Firstboot artwork of CentOS distribution uses the

        e68a7a
        images <tt>`splash-small.png'</tt> and <tt>`firstboot-left.png'</tt> as based
        e68a7a
        to control its visual style. The <tt>`splash-small.png'</tt> image
        e68a7a
        contains, in its graphic design, the release number information of
        e68a7a
        CentOS distribution. So the <tt>`splash-small.png'</tt> is
        e68a7a
        release-specific. In the other hand, the <tt>`firstboot-left.png'</tt>
        e68a7a
        doesn't contain release number information. So the
        e68a7a
        <tt>`firstboot-left.png'</tt> is not release-specific.
        e68a7a

        e68a7a

        If we want to produce Firstboot artwork for different major releases

        e68a7a
        of CentOS distribution, using a monolithic visual identity, all
        e68a7a
        Firstboot images should have the same visual style and, at the same
        e68a7a
        time, the release-specific information in the release-specific images. 
        e68a7a

        e68a7a
        info

        Note

        The monolithic visual identity is implemented using

        e68a7a
        theme models (see section trunk/Identity/Themes/Models) and artistic
        e68a7a
        motifs (see section trunk/Identity/Themes/Motifs).
        e68a7a

        e68a7a
        e68a7a

        Assuming that both theme models and theme motifs are ready for using,

        e68a7a
        the initial translation entry to produce Firstboot artworks would look
        e68a7a
        like the following:
        e68a7a

        e68a7a
        trunk/Translations/Identity/Themes/Distro/BootUp/Firstboot/
        e68a7a
        |-- Tpl
        e68a7a
        |   `-- splash-small.sed
        e68a7a
        `-- firstboot-left.sed
        e68a7a
        e68a7a

        With the translation entry above, centos-art command is able

        e68a7a
        to produce the image <tt>`firstboot-left.png'</tt> only. To produce
        e68a7a
        <tt>`splash-small.png'</tt> images for major releases (e.g., 3, 4, 5, and
        e68a7a
        6) of CentOS distribution we need to produce the release-specific
        e68a7a
        translation files using the centos-art script as following:
        e68a7a

        e68a7a
        centos-art render --entry=/home/centos/artwork/trunk/Translations/Identity/Themes/BootUp/Firstboot --filter='3,4,5,6'
        e68a7a
        e68a7a

        The above command produces the following translation entiry:

        e68a7a

        e68a7a
        trunk/Translations/Identity/Themes/Distro/BootUp/Firstboot/
        e68a7a
        |-- 3
        e68a7a
        |   `-- splash-small.sed
        e68a7a
        |-- 4
        e68a7a
        |   `-- splash-small.sed
        e68a7a
        |-- 5
        e68a7a
        |   `-- splash-small.sed
        e68a7a
        |-- 6
        e68a7a
        |   `-- splash-small.sed
        e68a7a
        |-- Tpl
        e68a7a
        |   `-- splash-small.sed
        e68a7a
        `-- firstboot-left.sed
        e68a7a
        e68a7a

        At this point centos-art is able to produce the Firstboot

        e68a7a
        artwork images for major releases of CentOS distribution. To add new
        e68a7a
        release-specific translation files, run the translation rendering
        e68a7a
        command with the release number you want to produce translation files
        e68a7a
        for in the <samp>`--filter='release-number''</samp> argument.
        e68a7a

        e68a7a
        e68a7a
        e68a7a

        3.49.2.4 Template Translation Files

        e68a7a
        e68a7a

        Template translation files are translation files stored inside

        e68a7a
        translation template directory. Template translation files are used by
        e68a7a
        centos-art script to produce specific translation files
        e68a7a
        only. Template translation files may be empty or contain
        e68a7a
        sed's replacement commands. If template translation files
        e68a7a
        are empty files, the final specifc translation file built from it
        e68a7a
        contains release-specific replacement commands only. For example,
        e68a7a
        see the following translation entry:
        e68a7a

        e68a7a
        trunk/Translations/Identity/Themes/Distro/BootUp/Firstboot/
        e68a7a
        |-- 3
        e68a7a
        |   `-- splash-small.sed
        e68a7a
        |-- 4
        e68a7a
        |   `-- splash-small.sed
        e68a7a
        |-- 5
        e68a7a
        |   `-- splash-small.sed
        e68a7a
        |-- 6
        e68a7a
        |   `-- splash-small.sed
        e68a7a
        |-- Tpl
        e68a7a
        |   `-- splash-small.sed    <-- template translation file.
        e68a7a
        `-- firstboot-left.sed
        e68a7a
        e68a7a

        In the above exmaple, the <tt>`splash-small.sed'</tt> file is a template

        e68a7a
        translation file and looks like:
        e68a7a

        e68a7a
        # -------------------------------------
        e68a7a
        # $Id: splash-small.sed 94 2010-09-18 10:59:42Z al $
        e68a7a
        # -------------------------------------
        e68a7a
        e68a7a

        In the above template translation file there are three comments lines,

        e68a7a
        but when you render it, the centos-art adds the
        e68a7a
        release-specific replacement commands. In our Firstboot example, after
        e68a7a
        rendering Firstboot translation entry, the <tt>`splash-small.sed'</tt>
        e68a7a
        translation file specific to CentOS 5, looks like the following:
        e68a7a

        e68a7a
        # Warning: Do not modify this file directly. This file is created
        e68a7a
        # automatically using 'centos-art' command line interface.  Any change
        e68a7a
        # you do in this file will be lost the next time you update
        e68a7a
        # translation files using 'centos-art' command line interface. If you
        e68a7a
        # want to improve the content of this translation file, improve its
        e68a7a
        # template file instead and run the 'centos-art' command line
        e68a7a
        # interface later to propagate your changes.
        e68a7a
        # -------------------------------------
        e68a7a
        # $Id: splash-small.sed 94 2010-09-18 10:59:42Z al $
        e68a7a
        # -------------------------------------
        e68a7a
        e68a7a
        # Release number information.
        e68a7a
        s!=RELEASE=!=MAJOR_RELEASE=.=MINOR_RELEASE=!g
        e68a7a
        s!=MINOR_RELEASE=!0!g
        e68a7a
        s!=MAJOR_RELEASE=!5!g
        e68a7a
        e68a7a

        If template translation files are not empty, replacement commands

        e68a7a
        inside template translation files are preserved inside
        e68a7a
        release-specific translation files.  For example, consider the English
        e68a7a
        template translation file of Anaconda progress welcome slide.  The
        e68a7a
        translation template directory structure looks like the following:
        e68a7a

        e68a7a
        trunk/Translations/Identity/Themes/Distro/Anaconda/Progress/
        e68a7a
        `-- Tpl
        e68a7a
            `-- en
        e68a7a
                `-- 01-welcome.sed
        e68a7a
        e68a7a

        and if we render translation files for CentOS 4 and CentOS 5 major

        e68a7a
        releases, the translation entry would look like the following:
        e68a7a

        e68a7a
        trunk/Translations/Identity/Themes/Distro/Anaconda/Progress/
        e68a7a
        |-- 4
        e68a7a
        |   `-- en
        e68a7a
        |       `-- 01-welcome.sed
        e68a7a
        |-- 5
        e68a7a
        |   `-- en
        e68a7a
        |       `-- 01-welcome.sed
        e68a7a
        `-- Tpl
        e68a7a
            `-- en
        e68a7a
                `-- 01-welcome.sed
        e68a7a
        e68a7a
        info

        Note

        Release-specific translation directories preserve

        e68a7a
        template translation directory structure and file names.
        e68a7a

        e68a7a
        e68a7a

        In the example above, the template translation file looks like the

        e68a7a
        following:
        e68a7a

        e68a7a
        # ------------------------------------------------------------
        e68a7a
        # $Id: 01-welcome.sed 94 2010-09-18 10:59:42Z al $
        e68a7a
        # ------------------------------------------------------------
        e68a7a
        s/=TITLE=/Welcome to CentOS =MAJOR_RELEASE= !/
        e68a7a
        s/=TEXT1=/Thank you for installing CentOS =MAJOR_RELEASE=./
        e68a7a
        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./
        e68a7a
        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./
        e68a7a
        s/=TEXT4=//
        e68a7a
        s/=TEXT5=//
        e68a7a
        s/=TEXT6=//
        e68a7a
        s!=URL=!http://www.centos.org/!
        e68a7a
        e68a7a

        and, after render the translation entry, specific translation files

        e68a7a
        look like the following:
        e68a7a

        e68a7a
        # Warning: Do not modify this file directly. This file is created
        e68a7a
        # automatically using 'centos-art' command line interface.  Any change
        e68a7a
        # you do in this file will be lost the next time you update
        e68a7a
        # translation files using 'centos-art' command line interface. If you
        e68a7a
        # want to improve the content of this translation file, improve its
        e68a7a
        # template file instead and run the 'centos-art' command line
        e68a7a
        # interface later to propagate your changes.
        e68a7a
        # ------------------------------------------------------------
        e68a7a
        # $Id: 01-welcome.sed 94 2010-09-18 10:59:42Z al $
        e68a7a
        # ------------------------------------------------------------
        e68a7a
        e68a7a
        s/=TITLE=/Welcome to CentOS =MAJOR_RELEASE= !/
        e68a7a
        s/=TEXT1=/Thank you for installing CentOS =MAJOR_RELEASE=./
        e68a7a
        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./
        e68a7a
        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./
        e68a7a
        s/=TEXT4=//
        e68a7a
        s/=TEXT5=//
        e68a7a
        s/=TEXT6=//
        e68a7a
        s!=URL=!http://www.centos.org/!
        e68a7a
        e68a7a
        # Release number information.
        e68a7a
        s!=RELEASE=!=MAJOR_RELEASE=.=MINOR_RELEASE=!g
        e68a7a
        s!=MINOR_RELEASE=!0!g
        e68a7a
        s!=MAJOR_RELEASE=!5!g
        e68a7a
        e68a7a

        In the example above, relevant lines begin with the <samp>`s'</samp> word

        e68a7a
        followed by a separation character (e.g., <samp>`/'</samp>, <samp>`!'</samp>, etc.).
        e68a7a
        These lines have the following format:
        e68a7a

        e68a7a
        s/REGEXP/REPLACEMENT/FLAGS
        e68a7a
        e68a7a

        The <samp>`/'</samp> characters may be uniformly replaced by any other single

        e68a7a
        character within any given s command.  The <samp>`/'</samp>
        e68a7a
        character (or whatever other character is used in its stead) can
        e68a7a
        appear in the REGEXP or REPLACEMENT only if it is preceded by a
        e68a7a
        <samp>`\'</samp> character.
        e68a7a

        e68a7a

        The s command is probably the most important in

        e68a7a
        sed and has a lot of different options.  Its basic concept
        e68a7a
        is simple: the s command attempts to match the pattern space
        e68a7a
        against the supplied REGEXP; if the match is successful, then that
        e68a7a
        portion of the pattern space which was matched is replaced with
        e68a7a
        REPLACEMENT.
        e68a7a

        e68a7a

        In the context of our translation files, the REGEXP is where you

        e68a7a
        define translation markers and REPLACEMENT where you define the
        e68a7a
        translation text you want to have after artworks rendering.  Sometimes
        e68a7a
        we use the FLAG component with the <samp>`g'</samp> command to apply the
        e68a7a
        replacements globally.
        e68a7a

        e68a7a
        Info

        Tip

        More information about how to use sed's

        e68a7a
        replacement commands and flags is available in sed's
        e68a7a
        documentation manual. To read sed's documentation manual type the
        e68a7a
        following command: 
        e68a7a

        info sed
        e68a7a
        e68a7a
        e68a7a

        Inside translation files, you can use translation markers not only

        e68a7a
        inside the REGEXP but in the REPLACEMENT too. In order for this
        e68a7a
        configuration to work, the REPLACEMENT of translation markers needs to
        e68a7a
        be define after its definition. For example, see in the
        e68a7a
        release-specific translation file above, how the
        e68a7a
        <samp>`s!=MAJOR_RELASE=!5!g'</samp> replacement command is defined
        e68a7a
        after <samp>`=MAJOR_RELASE='</samp> translation marker definition in
        e68a7a
        the REPLACEMENT of <samp>`=TITLE='</samp> translation marker replacement
        e68a7a
        command.
        e68a7a

        e68a7a
        e68a7a
        e68a7a

        3.49.2.5 Common Translation Files

        e68a7a
        e68a7a

        Common translation files contain common translations or no

        e68a7a
        translation at all for their related artworks.  They are in the root
        e68a7a
        directory of the translation entry. Common translation files create
        e68a7a
        common artworks for all major releases of CentOS Distribution. 
        e68a7a

        e68a7a

        Translation entries, with common translation files inside, look like

        e68a7a
        the following:
        e68a7a

        e68a7a
        trunk/Translations/Identity/Themes/Distro/BootUp/Firstboot/
        e68a7a
        |-- 3
        e68a7a
        |   `-- splash-small.sed
        e68a7a
        |-- 4
        e68a7a
        |   `-- splash-small.sed
        e68a7a
        |-- 5
        e68a7a
        |   `-- splash-small.sed
        e68a7a
        |-- 6
        e68a7a
        |   `-- splash-small.sed
        e68a7a
        |-- Tpl
        e68a7a
        |   `-- splash-small.sed
        e68a7a
        `-- firstboot-left.sed      <-- common translation file.
        e68a7a
        e68a7a
        e68a7a
        e68a7a

        3.49.2.6 Specific Translation Files

        e68a7a
        e68a7a

        Specific translation files contain specific translations for their

        e68a7a
        related artworks. Specific translation files are not in the root
        e68a7a
        directory of the translation entry, but inside directories which
        e68a7a
        describe the type of translation they are doing. Specific translation
        e68a7a
        files are produced automatically using the centos-art
        e68a7a
        script.
        e68a7a

        e68a7a
        trunk/Translations/Identity/Themes/Distro/BootUp/Firstboot/
        e68a7a
        |-- 3
        e68a7a
        |   `-- splash-small.sed    <-- CentOS 3 specific translation file.
        e68a7a
        |-- 4
        e68a7a
        |   `-- splash-small.sed    <-- CentOS 4 specific translation file.
        e68a7a
        |-- 5
        e68a7a
        |   `-- splash-small.sed    <-- CentOS 5 specific translation file.
        e68a7a
        |-- 6
        e68a7a
        |   `-- splash-small.sed    <-- CentOS 6 specific translation file.
        e68a7a
        |-- Tpl
        e68a7a
        |   `-- splash-small.sed
        e68a7a
        `-- firstboot-left.sed
        e68a7a
        e68a7a
        e68a7a
        e68a7a

        3.49.2.7 Translation Rendering

        e68a7a
        e68a7a

        When rendering translations, the centos-art script checks

        e68a7a
        the translation entry to verify that it has a translation template
        e68a7a
        directory inside. The translation template directory (<tt>`Tpl/'</tt>)
        e68a7a
        contains common translation files used to build release-specific
        e68a7a
        translation files. If the translation template directory doesn't exist
        e68a7a
        inside the translation entry the translation rendering fails. In this
        e68a7a
        case the centos-art script outputs a message and quits
        e68a7a
        script execution.
        e68a7a

        e68a7a
        e68a7a
        e68a7a

        3.49.2.8 Translation (Pre-)Rendering Configuration Scripts

        e68a7a
        e68a7a

        When the centos-art script finds a translation template

        e68a7a
        directory inside translation entry, it looks for translations
        e68a7a
        pre-rendering configuration scripts for that translation entry.
        e68a7a
        Translation pre-rendering configuration scripts let you extend
        e68a7a
        translation's default functionality (described below). 
        e68a7a

        e68a7a

        Translation pre-rendering configuration scripts are stored under

        e68a7a
        <tt>`trunk/Scripts'</tt> directory, specifically under the appropriate
        e68a7a
        language implementation. If you are using centos-art Bash's
        e68a7a
        implementation, the translation pre-rendering scripts are store in the
        e68a7a
        <tt>`trunk/Scripts/Bash/Config'</tt> location; if you are using
        e68a7a
        centos-art Python's implementation, then translation
        e68a7a
        pre-rendering scripts are stored in the
        e68a7a
        <tt>`trunk/Scripts/Python/Config'</tt> location, and so on for other
        e68a7a
        implementations.
        e68a7a

        e68a7a

        Bash's translation pre-rendering configuration scripts look like the

        e68a7a
        following:
        e68a7a

        e68a7a
        #!/bin/bash
        e68a7a
        #
        e68a7a
        # render_loadConfig.sh -- brief description here.
        e68a7a
        #
        e68a7a
        # Copyright (C) YEAR YOURNAME
        e68a7a
        # 
        e68a7a
        # This program is free software; you can redistribute it and/or modify
        e68a7a
        # it under the terms of the GNU General Public License as published by
        e68a7a
        # the Free Software Foundation; either version 2 of the License, or
        e68a7a
        # (at your option) any later version.
        e68a7a
        # 
        e68a7a
        # This program is distributed in the hope that it will be useful, but
        e68a7a
        # WITHOUT ANY WARRANTY; without even the implied warranty of
        e68a7a
        # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
        e68a7a
        # General Public License for more details.
        e68a7a
        #
        e68a7a
        # You should have received a copy of the GNU General Public License
        e68a7a
        # along with this program; if not, write to the Free Software
        e68a7a
        # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
        e68a7a
        # USA.
        e68a7a
        # 
        e68a7a
        # ----------------------------------------------------------------------
        e68a7a
        # $Id: render_loadConfig.sh 94 2010-09-18 10:59:42Z al $
        e68a7a
        # ----------------------------------------------------------------------
        e68a7a
        e68a7a
        function render_loadConfig {
        e68a7a
        ...
        e68a7a
        }
        e68a7a
        e68a7a

        Translation pre-rendering scripts are function scripts loaded and

        e68a7a
        executed when rendering a translation entry. Translation pre-rendering
        e68a7a
        scripts are loaded using the translation entry being rendered as
        e68a7a
        reference. For example, suppose you are using the
        e68a7a
        centos-art Bash's implementation, and you are rendering
        e68a7a
        translations for CentOS brands, in this situation the translation
        e68a7a
        entry would be:
        e68a7a

        e68a7a
        trunk/Translations/Identity/Brands
        e68a7a
        e68a7a

        and the entry inside the translation pre-rendering configuration

        e68a7a
        structure would be:
        e68a7a

        e68a7a
        trunk/Scripts/Bash/Config/Identity/Brands
        e68a7a
        e68a7a

        Once the centos-art script detects that translation

        e68a7a
        pre-rendering configuration directory exists, the centos-art
        e68a7a
        script looks for the translation pre-rendering configuration file.  If
        e68a7a
        the translation pre-rendering configuration file exists, it is loaded
        e68a7a
        and executed.  Once the translation pre-rendering configuration file
        e68a7a
        has been executed the translation rendering process is over, and so
        e68a7a
        the script execution.
        e68a7a

        e68a7a
        info

        Note

        Translation pre-rendering configuration files have the

        e68a7a
        following form:
        e68a7a

        render.conf.extension
        e68a7a

        where <samp>`extension'</samp> refers the programming language implementation

        e68a7a
        you are using. For example, <samp>`sh'</samp> for Bash's, <samp>`py'</samp> for
        e68a7a
        Python's, <samp>`pl'</samp> for Perl's, and so on for other implementations.
        e68a7a

        e68a7a
        e68a7a

        As we are using Bash implementation to describe the translation

        e68a7a
        pre-rendering configuration example, the translation pre-rendering
        e68a7a
        configuration file that centos-art looks for, inside the
        e68a7a
        above translation pre-rendering configuration directory, is
        e68a7a
        <tt>`render.conf.sh'</tt>.
        e68a7a

        e68a7a
        e68a7a
        e68a7a

        3.49.2.9 Translation Rendering Default Functionality

        e68a7a
        e68a7a

        In the other hand, if the translation pre-rendering configuration file

        e68a7a
        doesn't exist, or it isn't written as function script, the
        e68a7a
        centos-art script ignore translation pre-rendering
        e68a7a
        configuration functionality and passes to render translation using
        e68a7a
        default functionality instead.
        e68a7a

        e68a7a

        The translation rendering default functionality takes template

        e68a7a
        translation directory structure, duplicates it for each release number
        e68a7a
        specified in the <samp>`--filter='release-number''</samp> argument and
        e68a7a
        produces release-specific directories. As part of template translation
        e68a7a
        duplication process take place, the centos-art script adds
        e68a7a
        release-specific replacement commands to each specific translation
        e68a7a
        file inside release-specific directories. As result, specific
        e68a7a
        translation files, inside release-specific directories, contain
        e68a7a
        template translation replacement commands plus,
        e68a7a
        release-specific replacement commands.
        e68a7a

        e68a7a
        info

        Note

        Release-specific replacement commands are standardized

        e68a7a
        inside centos-art script using predifined release
        e68a7a
        translation markers. Release translation markers are described in the
        e68a7a
        translation marker section
        e68a7a
        (see Translation Markers).
        e68a7a

        e68a7a
        e68a7a
        e68a7a
        e68a7a
        e68a7a

        3.49.3 Usage

        e68a7a
        e68a7a
        e68a7a
        <samp>`centos-art render --entry='path/to/dir''</samp>
        e68a7a
        e68a7a

        When <samp>`path/to/dir'</samp> refers one directory under

        e68a7a
        <samp>`trunk/Translations'</samp>, this command orverwrites available
        e68a7a
        translation files using translation templates.
        e68a7a

        e68a7a
        e68a7a
        <samp>`centos-art render --entry='path/to/dir' --filter='pattern''</samp>
        e68a7a
        e68a7a

        When <samp>`path/to/dir'</samp> refers one directory under

        e68a7a
        <tt>`trunk/Translations'</tt>, this command renders release-specific
        e68a7a
        translation files as you specify in the <samp>`--filter='pattern''</samp>
        e68a7a
        argument. In this case, <samp>`pattern'</samp> not a regular expression but an
        e68a7a
        number (e.g., <samp>`5'</samp>) or a list of numbers separated by commas
        e68a7a
        (e.g., <samp>`3,4,5,6'</samp>) that specify the major release of CentOS
        e68a7a
        distribution you want to render translations for.  
        e68a7a

        e68a7a
        e68a7a
        e68a7a
        e68a7a
        4c79b5

        3.49.4 See also

        4c79b5
        e68a7a
        e68a7a
        3.51 trunk/Translations/Identity/Brands  
        e68a7a
        e68a7a
        3.53 trunk/Translations/Identity/Fonts  
        e68a7a
        e68a7a
        3.54 trunk/Translations/Identity/Models  
        e68a7a
        e68a7a
        3.55 trunk/Translations/Identity/Release  
        e68a7a
        e68a7a
        3.56 trunk/Translations/Identity/Themes  
        e68a7a
        e68a7a
        3.1 trunk/Identity  
        e68a7a
        e68a7a
        4c79b5
        4c79b5
        4c79b5
        e68a7a
        [ < ]
        e68a7a
        [ > ]
        4c79b5
           
        4c79b5
        [ << ]
        cbf5a9
        [ Up ]
        e68a7a
        [ >> ]
        4c79b5
        4c79b5

        4c79b5
         <font size="-1">
        008ee0
          This document was generated on December, 2 2010 using texi2html 1.76.
        4c79b5
         </font>
        4c79b5
         
        4c79b5
        4c79b5

        4c79b5
        </body>
        4c79b5
        </html>