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

4c79b5
4c79b5
<html>
4c79b5
4c79b5
can you do inside it.
4c79b5
4c79b5
Copyright C 2009, 2010 CentOS Artwork SIG. 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
-->
54264c
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>
cb2a5d
<title>CentOS Artwork Repository: 3.50 trunk/Translations</title>
4c79b5
cb2a5d
<meta name="description" content="CentOS Artwork Repository: 3.50 trunk/Translations">
cb2a5d
<meta name="keywords" content="CentOS Artwork Repository: 3.50 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
54264c
[ < ]
54264c
[ > ]
4c79b5
   
4c79b5
[ << ]
4c79b5
[ Up ]
cb2a5d
[ >> ]
4c79b5
   
4c79b5
   
4c79b5
   
4c79b5
   
4c79b5
[Top]
4c79b5
[Contents]
cb2a5d
[Index]
4c79b5
[ ? ]
4c79b5
cb2a5d
54264c
cb2a5d

3.50 trunk/Translations

4c79b5
4c79b5
54264c
4c79b5

3.50.1 Goals

4c79b5
cb2a5d

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

cb2a5d

4c79b5
    cb2a5d
  • Organize translation files.
  • cb2a5d
  • Organize translation templates used to produce translation files.
  • 4c79b5
    4c79b5
    4c79b5
    54264c
    4c79b5

    3.50.2 Description

    4c79b5
    cb2a5d

    When you create artwork for CentOS distribution you find that some

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

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

      In order to aliviate maintainance of artwork production for such

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

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

        Inside CentOS Artwork Repository, the artworks' translation production

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

        cb2a5d

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

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

        4c79b5
        54264c
        cb2a5d

        3.50.2.1 Translation Entries

        4c79b5
        cb2a5d

        Translation entries exists for each artwork you want to produce.

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

        cb2a5d

        When translation entries are empty directories, the identity entry is

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

        cb2a5d

        When translation entries contain translation files, the translation

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

        cb2a5d

        To find out correspondence between translation entries and identity

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

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

        and its translation entry is:

        cb2a5d

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

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

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

        cb2a5d
        info

        Note

        Translation entries related to identity entries under

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

        cb2a5d

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

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

        6ba043
        cb2a5d

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

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

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

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

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

        cb2a5d

        Trying to make things plain and simple: inside CentOS Artwork

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

        6ba043
        54264c
        cb2a5d

        3.50.2.2 Translation Markers

        cb2a5d

        cb2a5d
        cb2a5d

        cb2a5d

        Translation markers are used in "Theme Model Designs" and

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

        cb2a5d
        cb2a5d

        Translation Markers

        cb2a5d
        cb2a5d

        Figure 3.6: The image rendering flow.

        cb2a5d
        cb2a5d

        cb2a5d

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

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

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

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

        cb2a5d
        release is represented by the N letter.
        cb2a5d

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

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

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

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

        Replace the full release of CentOS distribution. It is

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

        cb2a5d
        cb2a5d
        cb2a5d

        Specific translation markers convenctions are described inside

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

        cb2a5d

        Translation markers standardization creates a common point of

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

        cb2a5d
        cb2a5d
        cb2a5d

        3.50.2.3 Translation Files

        cb2a5d
        cb2a5d

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

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

        cb2a5d

        For example, the Firstboot artwork of CentOS distribution uses the

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

        cb2a5d

        If we want to produce Firstboot artwork for different major releases

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

        cb2a5d
        info

        Note

        The monolithic visual identity is implemented using

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

        cb2a5d
        cb2a5d

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

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

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

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

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

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

        The above command produces the following translation entiry:

        cb2a5d

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

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

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

        cb2a5d
        cb2a5d
        cb2a5d

        3.50.2.4 Template Translation Files

        cb2a5d
        cb2a5d

        Template translation files are translation files stored inside

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

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

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

        cb2a5d
        translation file and looks like:
        cb2a5d

        cb2a5d
        # -------------------------------------
        cb2a5d
        # $Id: Translations.texi 94 2010-09-18 10:59:42Z al $
        cb2a5d
        # -------------------------------------
        cb2a5d
        cb2a5d

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

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

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

        If template translation files are not empty, replacement commands

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

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

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

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

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

        Note

        Release-specific translation directories preserve

        cb2a5d
        template translation directory structure and file names.
        cb2a5d

        cb2a5d
        cb2a5d

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

        cb2a5d
        following:
        cb2a5d

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

        and, after render the translation entry, specific translation files

        cb2a5d
        look like the following:
        cb2a5d

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

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

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

        cb2a5d
        s/REGEXP/REPLACEMENT/FLAGS
        cb2a5d
        cb2a5d

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

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

        cb2a5d

        The s command is probably the most important in

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

        cb2a5d

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

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

        cb2a5d
        Info

        Tip

        More information about how to use sed's

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

        info sed
        cb2a5d
        cb2a5d
        cb2a5d

        Inside translation files, you can use translation markers not only

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

        cb2a5d
        cb2a5d
        cb2a5d

        3.50.2.5 Common Translation Files

        cb2a5d
        cb2a5d

        Common translation files contain common translations or no

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

        cb2a5d

        Translation entries, with common translation files inside, look like

        cb2a5d
        the following:
        cb2a5d

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

        3.50.2.6 Specific Translation Files

        cb2a5d
        cb2a5d

        Specific translation files contain specific translations for their

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

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

        3.50.2.7 Translation Rendering

        cb2a5d
        cb2a5d

        When rendering translations, the centos-art script checks

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

        cb2a5d
        cb2a5d
        cb2a5d

        3.50.2.8 Translation (Pre-)Rendering Configuration Scripts

        cb2a5d
        cb2a5d

        When the centos-art script finds a translation template

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

        cb2a5d

        Translation pre-rendering configuration scripts are stored under

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

        cb2a5d

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

        cb2a5d
        following:
        cb2a5d

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

        Translation pre-rendering scripts are function scripts loaded and

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

        cb2a5d
        trunk/Translations/Identity/Brands
        cb2a5d
        cb2a5d

        and the entry inside the translation pre-rendering configuration

        cb2a5d
        structure would be:
        cb2a5d

        cb2a5d
        trunk/Scripts/Bash/Config/Identity/Brands
        cb2a5d
        cb2a5d

        Once the centos-art script detects that translation

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

        cb2a5d
        info

        Note

        Translation pre-rendering configuration files have the

        cb2a5d
        following form:
        cb2a5d

        render.conf.extension
        cb2a5d

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

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

        cb2a5d
        cb2a5d

        As we are using Bash implementation to describe the translation

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

        cb2a5d
        cb2a5d
        cb2a5d

        3.50.2.9 Translation Rendering Default Functionality

        cb2a5d
        cb2a5d

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

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

        cb2a5d

        The translation rendering default functionality takes template

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

        cb2a5d
        info

        Note

        Release-specific replacement commands are standardized

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

        cb2a5d
        cb2a5d
        cb2a5d
        cb2a5d
        cb2a5d

        3.50.3 Usage

        cb2a5d
        cb2a5d
        cb2a5d
        <samp>`centos-art render 'path/to/dir''</samp>
        cb2a5d
        cb2a5d

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

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

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

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

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

        cb2a5d
        cb2a5d
        cb2a5d
        cb2a5d
        cb2a5d
        4c79b5

        3.50.4 See also

        4c79b5
        cb2a5d
        cb2a5d
        3.52 trunk/Translations/Identity/Brands  
        cb2a5d
        cb2a5d
        3.54 trunk/Translations/Identity/Fonts  
        cb2a5d
        cb2a5d
        3.55 trunk/Translations/Identity/Models  
        cb2a5d
        cb2a5d
        3.56 trunk/Translations/Identity/Release  
        cb2a5d
        cb2a5d
        3.57 trunk/Translations/Identity/Themes  
        cb2a5d
        cb2a5d
        3.1 trunk/Identity  
        cb2a5d
        cb2a5d
        300762
        300762
        4c79b5
        cb2a5d
        [ < ]
        cb2a5d
        [ > ]
        4c79b5
           
        4c79b5
        [ << ]
        54264c
        [ Up ]
        cb2a5d
        [ >> ]
        4c79b5
        4c79b5

        4c79b5
         <font size="-1">
        54264c
          This document was generated on October, 27 2010 using texi2html 1.76.
        4c79b5
         </font>
        4c79b5
         
        4c79b5
        4c79b5

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