Blame Manuals/Tcar-ug/Repository/History/2012.docbook

b0cc66
<sect1 id="repository-history-2012">
b0cc66
6acace
    <title>2012's</title>
6acace
6acace
    <para>
6acace
        &TCAR; development was eventually stopped at November 2011
cea04d
        until July 2012 when we needed to make the
6acace
        <command>centos-art.sh</command> script a bit more
6acace
        customizable than it presently was. For example, it was
1df8fc
        considered as a need that functionalities inside the
1df8fc
        <command>centos-art.sh</command> script must be not just
1df8fc
        conceived independent one another but reusable in different
cea04d
        contexts as well.
6acace
    </para>
378f37
b0cc66
    <sect2 id="repository-history-2012-UpdateLocales">
b0cc66
b0cc66
    <title>Make Localization Of <command>centos-art.sh</command>
b0cc66
    Script Specific To Different Contexts</title>
b0cc66
 
b0cc66
    <para>
b0cc66
        The procedure used to locale messages inside the
b0cc66
        <command>centos-art.sh</command> script had to be re-designed
b0cc66
        in order to accept such pluggable behavior into the script. We
b0cc66
        couldn't publish unique <filename>centos-art.sh.po</filename>
b0cc66
        and <filename>centos-art.sh.mo</filename> files because they
b0cc66
        may contain different information in different contexts. For
b0cc66
        example, if you are using the <function>render</function> and
b0cc66
        <function>help</function> functionalities you only need
b0cc66
        translation messages for them and not those from other
b0cc66
        functionalities that may exist in the central repository but
b0cc66
        you didn't download nor use into your working copy.
b0cc66
    </para>
b0cc66
b0cc66
    <para>
b0cc66
        One solution for this could be to have independent PO files
b0cc66
        for each functionality of <command>centos-art.sh</command>
b0cc66
        script which are combined to create the final PO and MO files
b0cc66
        that <application>gettext</application> uses to retrive
b0cc66
        translated strings when <command>centos-art.sh</command>
b0cc66
        script is running. For this solution to be effective, you must
b0cc66
        be selective about the functionalities and locales directories
b0cc66
        you download into your working copy. For example, if you want
b0cc66
        to use the render functionality and its locale messages only,
b0cc66
        you must download the required directories and exclude others.
b0cc66
    </para>
b0cc66
378f37
    <note>
378f37
    <para>
b0cc66
        In case you don't want to be selective and download the whole
b0cc66
        repository, the creation of the
b0cc66
        <filename>centos-art.sh.po</filename>,
b0cc66
        <filename>centos-art.sh.pot</filename> and
b0cc66
        <filename>centos-art.sh.mo</filename> files will occur
b0cc66
        automatically the first time you run the
b0cc66
        <function>prepare</function> functionality (which require the
b0cc66
        <function>locale</function> functionality to be available), or
b0cc66
        later, by running the following command: 
b0cc66
        <screen>centos-art locale trunk/Scripts/Bash --update</screen>
378f37
    </para>
b0cc66
b0cc66
    <para>
b0cc66
        For more information about the <function>prepare</function>
b0cc66
        and <function>locale</function> functionalities, see 
b0cc66
        linkend="scripts-bash-locale" /> and 
b0cc66
        linkend="scripts-bash-prepare" /> respectively.
b0cc66
    </para>
b0cc66
378f37
    </note>
b0cc66
6acace
    <para>
b0cc66
        As shown in <xref linkend="repository-history-2012-2" />, both
b0cc66
        <function>Commons</function> and <function>Locales</function>
b0cc66
        functionalities will always be required directories. The
b0cc66
        <function>Commons</function> directory contains the common
b0cc66
        functionalities and the <function>Locales</function> directory
b0cc66
        contains the standard procedures you need to run in order to
b0cc66
        build the final <filename>centos-art.sh.mo</filename> file
b0cc66
        used by <application>gettext</application> to retrive
b0cc66
        translation strings when the <command>centos-art.sh</command>
b0cc66
        script is running. Remember that
b0cc66
        <filename>centos-art.sh.pot</filename>,
b0cc66
        <filename>centos-art.sh.po</filename> files aren't under
b0cc66
        version control and they are built by combining each
b0cc66
        funtionality message.po file into a PO and later a MO file.
6acace
    </para>
6acace
b0cc66
    <example id="repository-history-2012-2">
b0cc66
    <title>Directory structure of a rendering-only context</title>
b0cc66
    <screenshot>
b0cc66
    <screeninfo>Directory structure of a rendering-only context</screeninfo>
b0cc66
    <mediaobject>
b0cc66
    <textobject>
b0cc66
<programlisting>
b0cc66
/home/centos/Projects/artwork/trunk/
b0cc66
|-- Locales/
b0cc66
|   `-- Scripts/
b0cc66
|       `-- Bash/
b0cc66
|           `-- es_ES/
b0cc66
|               |-- Functions/
b0cc66
|               |   |-- Commons/
b0cc66
|               |   |   |-- messages.po
b0cc66
|               |   |   `-- messages.pot
b0cc66
|               |   |-- Locales/
b0cc66
|               |   |   |-- messages.po
b0cc66
|               |   |   `-- messages.pot
b0cc66
|               |   `-- Render/
b0cc66
|               |       |-- messages.po
b0cc66
|               |       `-- messages.pot
b0cc66
|               |-- LC_MESSAGES/
b0cc66
|               |   `-- centos-art.sh.mo
b0cc66
|               |-- centos-art.sh.po
b0cc66
|               `-- centos-art.sh.pot
b0cc66
`-- Scripts/
b0cc66
    `-- Bash/
b0cc66
        |-- Functions/
b0cc66
        |   |-- Commons/
b0cc66
        |   |-- Locales/
b0cc66
        |   `-- Render/
b0cc66
        `-- centos-art.sh
b0cc66
</programlisting>
b0cc66
    </textobject>
b0cc66
    </mediaobject>
b0cc66
    </screenshot>
b0cc66
    </example>
b0cc66
6acace
    <para>
b0cc66
        A practical example of using the solution described above may
b0cc66
        be found when you are working on the corporate identity of
b0cc66
        &TC;; and then need to start a new corporate identity project
b0cc66
        for another organization. You want to keep the directory
b0cc66
        structure of &TCAR; and its automation tool, the
b0cc66
        <command>centos-art.sh</command> script.  Your new project
b0cc66
        requires you to introduce new functionalities to
b0cc66
        <command>centos-art.sh</command> which don't fit the needs of
6acace
        &TC;; (e.g., you want to introduce a
6acace
        <function>report</function> functionality to mesure how much
b0cc66
        connect time do you consume through your PPP internface.) or
b0cc66
        you just want to keep the directory structure of your new
b0cc66
        project as simple as possible.
6acace
    </para>
6acace
6acace
    <para>
b0cc66
        To go through this it is possible to mix specific parts of
6acace
        different central repositories into one single working copy.
6acace
        This is the working copy you'll use to manage your new
768ba4
        project. In <xref linkend="repository-history-2012-1" />, we
b0cc66
        see how the <filename class="directory">Render</filename>,
b0cc66
        <filename class="directory">Locales</filename> and 
b0cc66
        class="directory">Commons</filename> directories which come
b0cc66
        from the &TCAR; has been integrated into the working copy of
b0cc66
        your new project.
6acace
    </para>
6acace
        
6acace
    <example id="repository-history-2012-1">
6acace
    <title>Mixing automation functionalities.</title>
6acace
    <screenshot>
6acace
    <screeninfo>Mixing automation functionalities.</screeninfo>
6acace
    <mediaobject>
6acace
    <textobject>
6acace
<programlisting>
b0cc66
/home/al/Projects/Myapp/trunk/
b0cc66
|-- Locales/           
b0cc66
|   `-- Scripts/
b0cc66
|       `-- Bash/         
b0cc66
|           `-- es_ES/
b0cc66
|               |-- Functions/
b0cc66
|               |   |-- Commons/ <--| from https://projects.centos.org/svn/artwork/
b0cc66
|               |   |   |-- messages.po
b0cc66
|               |   |   `-- messages.pot
b0cc66
|               |   |-- Locales/ <--| from https://projects.centos.org/svn/artwork/
b0cc66
|               |   |   |-- messages.po
b0cc66
|               |   |   `-- messages.pot
b0cc66
|               |   |-- Render/  <--| from https://projects.centos.org/svn/artwork/
b0cc66
|               |   |   |-- messages.po
b0cc66
|               |   |   `-- messages.pot
b0cc66
|               |   `-- Report/
b0cc66
|               |       |-- messages.po
b0cc66
|               |       `-- messages.pot
b0cc66
|               |-- LC_MESSAGES/
b0cc66
|               |   `-- myapp.sh.mo
b0cc66
|               |-- myapp.sh.po
b0cc66
|               `-- myapp.sh.pot
b0cc66
`-- Scripts/
b0cc66
    `-- Bash/
b0cc66
        |-- Functions/
b0cc66
        |   |-- Commons/ <--| from https://projects.centos.org/svn/artwork/
b0cc66
        |   |-- Locales/ <--| from https://projects.centos.org/svn/artwork/
b0cc66
        |   |-- Render/  <--| from https://projects.centos.org/svn/artwork/
b0cc66
        |   `-- Report/
b0cc66
        `-- myapp.sh
6acace
</programlisting>
6acace
    </textobject>
6acace
    </mediaobject>
6acace
    </screenshot>
6acace
    </example>
6acace
6acace
    <para>
b0cc66
        At this point, your working copy contains files from two
768ba4
        different central repositories. One repository provides the
768ba4
        files of your new organization project and the other one
768ba4
        provides the files related to the <function>render</function>
768ba4
        functionality from &TCAR;.  In this environment, all updates
b0cc66
        commited to the <filename class="directory">Render</filename>,
b0cc66
        <filename class="directory">Locales</filename> and 
b0cc66
        class="directory">Commons</filename> directories at &TCAR;
b0cc66
        will be available to you too, the next time you update your
b0cc66
        working copy. Likewise, if you change something in any of
b0cc66
        these directories and commit your changes, your changes will
b0cc66
        be available to poeple working in &TCAR; the next time they
b0cc66
        update their working copies.
6acace
    </para>
6acace
6acace
    <para>
b0cc66
        Understanding the need of mixing different central
b0cc66
        repositories into a single working copy is an important step
b0cc66
        for reusing the functionalities that come with centos-art.sh
b0cc66
        script, but it is not enough if you want to customize the
b0cc66
        information produced by it.  By default, the centos-art.sh
b0cc66
        script uses information related to &TC;;. You probably need to
b0cc66
        change this if you are producing images to a different
b0cc66
        organization than &TC;;. For example, some of the information
b0cc66
        you might need to change would be the copyright holder,
b0cc66
        brands, domain names, mailing lists, and so forth.  To change
b0cc66
        this information you need to duplicate the file
b0cc66
        <filename>centos-art.sh</filename> and rename it to something
b0cc66
        else. Later, you need to edit the renamed version and change
b0cc66
        variables inside according your needs. In 
b0cc66
        linkend="repository-history-2012-1" />, we used the name
b0cc66
        <command>myapp.sh</command> instead of
b0cc66
        <command>centos-art.sh</command> so the information we set
319720
        inside it could reflect the specific needs that motivated the
6acace
        creation of a new project without affecting those from &TC;;.
6acace
    </para>
6acace
6acace
    <para>
6acace
        Most of the information you need to change in your duplicated
6acace
        version of <filename>centos-art.sh</filename> file is
319720
        controlled by a set of read-only variables. You modify these
6acace
        variables here and they will be available all along the script
6acace
        execution time. For example, you can change the value of
6acace
        <varname>CLI_WRKCOPY</varname> variable inside your duplicated
6acace
        version of <filename>centos-art.sh</filename> to change the
319720
        absolute path you use to store your working copy.
6acace
    </para>
6acace
b0cc66
    </sect2>
b0cc66
b0cc66
    <sect2 id="repository-history-2012-UnifyCommonFunctionalities">
b0cc66
    <title>Unify Common Functionalities Into One Single File</title>
b0cc66
    <para>
b0cc66
        ...
b0cc66
    </para>
b0cc66
    </sect2>
6acace
6acace
</sect1>