Blame Identity/Manual/repository-html/repository_72.html

728c6d
728c6d
728c6d
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
728c6d
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
728c6d
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
728c6d
632e8b
<head>
ed9de5
<title>CentOS Artwork Repository: 2.65 The trunk/Scripts/Functions/Locale Directory</title>
632e8b
728c6d
    <meta name="description" content="CentOS Artwork Repository: 2.65 The trunk/Scripts/Functions/Locale Directory" />
728c6d
    <meta name="keywords" content="CentOS Artwork Repository: 2.65 The trunk/Scripts/Functions/Locale Directory" />
728c6d
    <meta name="resource-type" content="document" />
728c6d
    <meta name="distribution" content="global" />
728c6d
    <meta name="generator" content="texi2html 1.76" />
728c6d
    <meta name="copyright" content="2009-2011 Alain Reguera Delgado" />
632e8b
728c6d
    <link href="/home/centos/artwork/trunk/Identity/Manual/repository.css" rel="stylesheet" type="text/css" media="screen projection"/>
632e8b
632e8b
</head>
632e8b
728c6d
<body>
632e8b
728c6d
728c6d
728c6d
728c6d
728c6d
    
728c6d
    Start page body definitions.
728c6d
    -->
728c6d
728c6d
    
728c6d
728c6d
        
632e8b
ed9de5
[ < ]
ed9de5
[ > ]
632e8b
   
1075b9
[ << ]
1075b9
[ Up ]
ed9de5
[ >> ]
632e8b
   
632e8b
   
632e8b
   
632e8b
   
1075b9
[Top]
1075b9
[Contents]
ed9de5
[Index]
1075b9
[ ? ]
632e8b
ed9de5
ed9de5
ed9de5

2.65 The <tt>`trunk/Scripts/Functions/Locale'</tt> Directory

632e8b
728c6d

ed9de5
52772c

2.65.1 Goals

9bfd15
06d106
    06d106
  • ...
  • 06d106
    06d106
    728c6d

    ed9de5
    52772c

    2.65.2 Description

    06d106
    ed9de5

    This command looks for <samp>`.sh'</samp> files inside Bash directory and

    ed9de5
    extracts translatable strings from files, using xgettext
    ed9de5
    command, in order to create a portable object template
    ed9de5
    (<tt>`centos-art.sh.pot'</tt>) file for them.
    ed9de5

    ed9de5

    With the <tt>`centos-art.sh.pot'</tt> file up to date, the

    ed9de5
    centos-art command removes the temporal list of files sotred
    ed9de5
    inside <tt>`/tmp'</tt> directory and checks the current language of your
    ed9de5
    user's session to create a portable object file for it, in the
    ed9de5
    location <tt>`$CLI_LANG/$CLI_LANG.po'</tt>. 
    ed9de5

    ed9de5

    The CLI_LANG variable discribes the locale language used to

    ed9de5
    output messages inside centos-art command. The locale
    ed9de5
    language used inside centos-art command is taken from the
    ed9de5
    LANG environment variable.  The CLI_LANG variable has the
    ed9de5
    <samp>`LL_CC'</samp> format, where <samp>`LL'</samp> is a language code from the
    ed9de5
    ISO-639 standard, and <samp>`CC'</samp> a country code from the ISO-3166
    ed9de5
    standard.
    ed9de5

    ed9de5

    The LANG environment variable is set when you do log in to your

    ed9de5
    system. If you are using a graphical session, change language to your
    ed9de5
    native language and do login. That would set and exoprt the LANG
    ed9de5
    environment variable to the correct value. On the other side, if you
    ed9de5
    are using a text session edit your <tt>`~/.bash_profile'</tt> file to set
    ed9de5
    and export the LANG environment variable to your native locale
    ed9de5
    as defines the locale -a command output; do logout, and do
    ed9de5
    login again.
    ed9de5

    ed9de5

    At this point, the LANG environment variable has the appropriate

    ed9de5
    value you need, in order to translate centos-art.sh messages
    ed9de5
    to your native language (the one set in LANG environment
    ed9de5
    variable). 
    ed9de5

    ed9de5

    With the <tt>`$CLI_LANG/$CLI_LANG.po'</tt> file up to date, the

    ed9de5
    centos-art opens it for you to update translation strings.
    ed9de5
    The centos-art command uses the value of EDITOR
    ed9de5
    environment variable to determine your favorite text editor. If no
    ed9de5
    value is defined on EDITOR, the <tt>`/usr/bin/vim'</tt> text editor
    ed9de5
    is used as default.
    ed9de5

    ed9de5

    When you finishd PO file edition and quit text editor, the

    ed9de5
    centos-art command creates the related machine object in the
    ed9de5
    location <tt>`$CLI_LANG/LC_MESSAGES/$TEXTDOMAIN.mo'</tt>.
    ed9de5

    ed9de5

    At this point, all translations you made in the PO file should be

    ed9de5
    available to your language when runing centos-art.sh script. 
    ed9de5

    ed9de5

    In order to make the centos-art.sh internationalization, the

    ed9de5
    centos-art.sh script was modified as described in the
    ed9de5
    gettext info documentation (info gettext).  You
    ed9de5
    can find such modifications in the following files:
    ed9de5

    ed9de5
      ed9de5
    • <tt>`trunk/Scripts/Bash/initFunctions.sh'</tt>
    • ed9de5
    • <tt>`trunk/Scripts/Bash/Functions/Help/cli_localeMessages.sh'</tt>
    • ed9de5
    • <tt>`trunk/Scripts/Bash/Functions/Help/cli_localeMessagesStatus.sh'</tt>
    • ed9de5
      ed9de5
      06d106
        06d106
      • ...
      • 06d106
        9bfd15
        728c6d

        ed9de5
        52772c

        2.65.3 Usage

        632e8b
        ed9de5
        ed9de5
        <samp>`centos-art locale --edit'</samp>
        ed9de5

        Use this command to translate command-line interface output messages

        ed9de5
        in the current system locale you are using (as specified in LANG
        ed9de5
        environment variable).
        ed9de5

        ed9de5
        <samp>`centos-art locale --list'</samp>
        ed9de5

        Use this command to see the command-line interface locale report.

        ed9de5

        ed9de5
        632e8b
        728c6d

        ed9de5
        52772c

        2.65.4 See also

        632e8b
        632e8b
        728c6d

        632e8b
        ed9de5
        [ < ]
        ed9de5
        [ > ]
        632e8b
           
        1075b9
        [ << ]
        ed9de5
        [ Up ]
        ed9de5
        [ >> ]
        632e8b
        632e8b
        728c6d
                    
        728c6d
                    The content of left column ends here.
        728c6d
                    -->
        728c6d
                    

        728c6d
        728c6d
                
        728c6d
        728c6d
            
        728c6d
        728c6d
            
        728c6d
            Start page footer definitions.
        728c6d
            -->
        728c6d
            

        728c6d
        728c6d
        728c6d
        632e8b
        </body>
        728c6d
        632e8b
        </html>