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

4c79b5
4c79b5
<html>
6414c4
09d4f2
6414c4
Copyright C 2009, 2010, 2011  Alain Reguera Delgado
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
-->
27dad7
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>
3f9ae1
<title>The CentOS Artwork Repository: 3.51 trunk/Translations</title>
4c79b5
3f9ae1
<meta name="description" content="The CentOS Artwork Repository: 3.51 trunk/Translations">
3f9ae1
<meta name="keywords" content="The CentOS Artwork Repository: 3.51 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
3f9ae1
[ < ]
3f9ae1
[ > ]
4c79b5
   
4c79b5
[ << ]
4c79b5
[ Up ]
3f9ae1
[ >> ]
4c79b5
   
4c79b5
   
4c79b5
   
4c79b5
   
4c79b5
[Top]
4c79b5
[Contents]
3f9ae1
[Index]
4c79b5
[ ? ]
4c79b5
3f9ae1
3f9ae1
3f9ae1

3.51 trunk/Translations

6aec21
fe989b
3f9ae1
081970

3.51.1 Goals

6aec21
3f9ae1

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

3f9ae1

008ee0
    3f9ae1
  • Organize translation files.
  • 3f9ae1
  • Organize translation templates used to produce translation files.
  • 008ee0
    fe989b
    008ee0
    3f9ae1
    273af8

    3.51.2 Description

    60c152
    3f9ae1

    When you create artwork for CentOS distribution you find that some

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

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

      In order to aliviate maintainance of artwork production for such

      3f9ae1
      environment, we divided artwork production in three production lines:
      3f9ae1

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

        Inside CentOS Artwork Repository, the artworks' translation production

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

        3f9ae1

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

        3f9ae1
        entries" to organize artworks' "translation files" and artworks'
        3f9ae1
        "translation templates".
        3f9ae1

        3f9ae1
        3f9ae1
        3f9ae1

        3.51.2.1 Translation Entries

        3f9ae1
        3f9ae1

        Translation entries exists for each artwork you want to produce.

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

        3f9ae1

        When translation entries are empty directories, the identity entry is

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

        3f9ae1

        When translation entries contain translation files, the translation

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

        3f9ae1

        To find out correspondence between translation entries and identity

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

        3f9ae1
        trunk/Identity/Themes/Motifs/Modern/Distro/Anaconda/Progress
        3f9ae1
        3f9ae1

        and its translation entry is:

        3f9ae1

        3f9ae1
        trunk/Translations/Identity/Themes/Distro/Anaconda/Progress
        3f9ae1
        3f9ae1

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

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

        3f9ae1
        info

        Note

        Translation entries related to identity entries under

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

        3f9ae1

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

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

        3f9ae1
        3f9ae1

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

        3f9ae1
        identity entries. For example the following identity entries:
        3f9ae1

        3f9ae1
        trunk/Identity/Themes/Motifs/Modern/Distro/Anaconda/Progress/
        3f9ae1
        trunk/Identity/Themes/Motifs/TreeFlower/Distro/Anaconda/Progress/
        3f9ae1
        trunk/Identity/Themes/Motifs/Mettle/Distro/Anaconda/Progress/
        3f9ae1
        3f9ae1

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

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

        3f9ae1

        Trying to make things plain and simple: inside CentOS Artwork

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

        3f9ae1
        3f9ae1
        3f9ae1

        3.51.2.2 Translation Markers

        3f9ae1

        3f9ae1
        3f9ae1

        3f9ae1

        Translation markers are used in "Theme Model Designs" and

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

        3f9ae1
        3f9ae1

        Translation Markers

        3f9ae1
        3f9ae1

        Figure 3.22: The image rendering flow.

        3f9ae1
        3f9ae1

        3f9ae1

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

        3f9ae1
        we use the following to represent releases of CentOS distribution:
        3f9ae1

        3f9ae1
        3f9ae1
        <samp>`=MINOR_RELEASE='</samp>
        3f9ae1

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

        3f9ae1
        release is represented by the N letter.
        3f9ae1

        3f9ae1
        <samp>`=MAJOR_RELEASE='</samp>
        3f9ae1

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

        3f9ae1
        the major release is represented by the M letter.
        3f9ae1

        3f9ae1
        <samp>`=RELEASE='</samp>
        3f9ae1

        Replace the full release of CentOS distribution. It is

        3f9ae1
        <samp>`=MAJOR_RELEASE=.=MINOR_RELEASE='</samp> basically. 
        3f9ae1

        3f9ae1
        3f9ae1
        3f9ae1

        Specific translation markers convenctions are described inside

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

        3f9ae1

        Translation markers standardization creates a common point of

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

        3f9ae1
        3f9ae1
        3f9ae1

        3.51.2.3 Translation Files

        3f9ae1
        3f9ae1

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

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

        3f9ae1

        For example, the Firstboot artwork of CentOS distribution uses the

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

        3f9ae1

        If we want to produce Firstboot artwork for different major releases

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

        3f9ae1
        info

        Note

        The monolithic visual identity is implemented using

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

        3f9ae1
        3f9ae1

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

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

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

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

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

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

        The above command produces the following translation entiry:

        3f9ae1

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

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

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

        3f9ae1
        3f9ae1
        3f9ae1

        3.51.2.4 Template Translation Files

        3f9ae1
        3f9ae1

        Template translation files are translation files stored inside

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

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

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

        3f9ae1
        translation file and looks like:
        3f9ae1

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

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

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

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

        If template translation files are not empty, replacement commands

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

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

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

        3f9ae1
        releases, the translation entry would look like the following:
        3f9ae1

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

        Note

        Release-specific translation directories preserve

        3f9ae1
        template translation directory structure and file names.
        3f9ae1

        3f9ae1
        3f9ae1

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

        3f9ae1
        following:
        3f9ae1

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

        and, after render the translation entry, specific translation files

        3f9ae1
        look like the following:
        3f9ae1

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

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

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

        3f9ae1
        s/REGEXP/REPLACEMENT/FLAGS
        3f9ae1
        3f9ae1

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

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

        3f9ae1

        The s command is probably the most important in

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

        3f9ae1

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

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

        3f9ae1
        Info

        Tip

        More information about how to use sed's

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

        info sed
        3f9ae1
        3f9ae1
        3f9ae1

        Inside translation files, you can use translation markers not only

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

        3f9ae1
        3f9ae1
        3f9ae1

        3.51.2.5 Common Translation Files

        3f9ae1
        3f9ae1

        Common translation files contain common translations or no

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

        3f9ae1

        Translation entries, with common translation files inside, look like

        3f9ae1
        the following:
        3f9ae1

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

        3.51.2.6 Specific Translation Files

        3f9ae1
        3f9ae1

        Specific translation files contain specific translations for their

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

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

        3.51.2.7 Translation Rendering

        3f9ae1
        3f9ae1

        When rendering translations, the centos-art script checks

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

        3f9ae1
        3f9ae1
        3f9ae1

        3.51.2.8 Translation (Pre-)Rendering Configuration Scripts

        3f9ae1
        3f9ae1

        When the centos-art script finds a translation template

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

        3f9ae1

        Translation pre-rendering configuration scripts are stored under

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

        3f9ae1

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

        3f9ae1
        following:
        3f9ae1

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

        Translation pre-rendering scripts are function scripts loaded and

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

        3f9ae1
        trunk/Translations/Identity/Brands
        3f9ae1
        3f9ae1

        and the entry inside the translation pre-rendering configuration

        3f9ae1
        structure would be:
        3f9ae1

        3f9ae1
        trunk/Scripts/Bash/Config/Identity/Brands
        3f9ae1
        3f9ae1

        Once the centos-art script detects that translation

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

        3f9ae1
        info

        Note

        Translation pre-rendering configuration files have the

        3f9ae1
        following form:
        3f9ae1

        render.conf.extension
        3f9ae1

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

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

        3f9ae1
        3f9ae1

        As we are using Bash implementation to describe the translation

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

        3f9ae1
        3f9ae1
        3f9ae1

        3.51.2.9 Translation Rendering Default Functionality

        3f9ae1
        3f9ae1

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

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

        3f9ae1

        The translation rendering default functionality takes template

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

        3f9ae1
        info

        Note

        Release-specific replacement commands are standardized

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

        3f9ae1
        3f9ae1
        e37211
        01b527
        e37211

        3.51.3 Usage

        e37211
        3f9ae1
        3f9ae1
        <samp>`centos-art render --entry='path/to/dir''</samp>
        3f9ae1
        3f9ae1

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

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

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

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

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

        3f9ae1
        e37211
        035049
        01b527
        4c79b5

        3.51.4 See also

        4c79b5
        63f275
        3f9ae1
        3.53 trunk/Translations/Identity/Brands  
        035049
        3f9ae1
        3.55 trunk/Translations/Identity/Fonts  
        035049
        3f9ae1
        3.56 trunk/Translations/Identity/Models  
        035049
        3f9ae1
        3.57 trunk/Translations/Identity/Release  
        035049
        3f9ae1
        3.58 trunk/Translations/Identity/Themes  
        63f275
        035049
        3.1 trunk/Identity  
        63f275
        63f275
        4c79b5
        4c79b5
        4c79b5
        01b527
        [ < ]
        01b527
        [ > ]
        4c79b5
           
        4c79b5
        [ << ]
        3f9ae1
        [ Up ]
        3f9ae1
        [ >> ]
        4c79b5
        4c79b5

        4c79b5
         <font size="-1">
        27dad7
          This document was generated on January, 6 2011 using texi2html 1.76.
        4c79b5
         </font>
        4c79b5
         
        4c79b5
        4c79b5

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