Blame Scripts/Documentation/Reference/Tcar/tcar_setTranslationMarkers.asciidoc

Alain Reguera Delgado cdbf5c
tcar_setTranslationMarkers(1)
Alain Reguera Delgado cdbf5c
=============================
Alain Reguera Delgado cdbf5c
Alain Reguera Delgado cdbf5c
== Name
Alain Reguera Delgado cdbf5c
Alain Reguera Delgado cdbf5c
tcar_setTranslationMarkers - Expands translation markers.
Alain Reguera Delgado cdbf5c
Alain Reguera Delgado cdbf5c
== Synopsis
Alain Reguera Delgado cdbf5c
Alain Reguera Delgado cdbf5c
*tcar_setTranslationMarkers "FILE"*
Alain Reguera Delgado cdbf5c
Alain Reguera Delgado cdbf5c
== Description
Alain Reguera Delgado cdbf5c
Alain Reguera Delgado cdbf5c
The *cli_setTranslationMarkers* standardizes construction of
Alain Reguera Delgado cdbf5c
translation markers and their related expansion. As convention,
Alain Reguera Delgado cdbf5c
translation markers are set inside source files (e.g., DocBook, SVG)
Alain Reguera Delgado cdbf5c
and expanded inside temporal instances used to produce final contents.
Alain Reguera Delgado cdbf5c
The +FILE+ argument should point to the temporal file where
Alain Reguera Delgado cdbf5c
translation markers expansion takes place in.
Alain Reguera Delgado cdbf5c
Alain Reguera Delgado cdbf5c
Translation markers written in source files must comply the
Alain Reguera Delgado cdbf5c
++=[A-Z_]+=++ regular expression pattern. For example,
Alain Reguera Delgado cdbf5c
+=UNKNOWN_MARKER=+ is a valid translation marker without any
Alain Reguera Delgado cdbf5c
replacement. To prevent *centos-art.sh* script from
Alain Reguera Delgado cdbf5c
expanding translation markers, add a backslash (+\+) between the first
Alain Reguera Delgado cdbf5c
equal sign and the following letter. For example, +=\...=+ won't be
Alain Reguera Delgado cdbf5c
expanded.
Alain Reguera Delgado cdbf5c
Alain Reguera Delgado cdbf5c
The *cli_setTranslationMarkers* supports the following translation
Alain Reguera Delgado cdbf5c
markers:
Alain Reguera Delgado cdbf5c
Alain Reguera Delgado cdbf5c
+=\COPYRIGHT_YEAR_LAST=+, +=\COPYRIGHT_YEAR=+::
Alain Reguera Delgado cdbf5c
    These translation markers expand to the last year used in
Alain Reguera Delgado cdbf5c
    copyright notes. For example, +=COPYRIGHT_YEAR_LAST=+.
Alain Reguera Delgado cdbf5c
Alain Reguera Delgado cdbf5c
+=\COPYRIGHT_YEAR_LIST=+, +=\COPYRIGHT_YEARS_LIST=+::
Alain Reguera Delgado cdbf5c
    This translation markers expand to the list of years used in
Alain Reguera Delgado cdbf5c
    copyright notes. For example, +=COPYRIGHT_YEARS_LIST=+.  The first
Alain Reguera Delgado cdbf5c
    year represents the time we began to work on The CentOS Artwork
Alain Reguera Delgado cdbf5c
    Repository.
Alain Reguera Delgado cdbf5c
Alain Reguera Delgado cdbf5c
+=\COPYRIGHT_HOLDER=+::
Alain Reguera Delgado cdbf5c
    This translation marker expands to the holder used in copyright
Alain Reguera Delgado cdbf5c
    notes. For example, +=COPYRIGHT_HOLDER=+.
Alain Reguera Delgado cdbf5c
Alain Reguera Delgado cdbf5c
+=\COPYRIGHT_HOLDER_PREDICATE=+::
Alain Reguera Delgado cdbf5c
    This translation marker expands both the holder and the predicate
Alain Reguera Delgado cdbf5c
    used in copyright notes. For example,
Alain Reguera Delgado cdbf5c
    +=COPYRIGHT_HOLDER_PREDICATE=+.
Alain Reguera Delgado cdbf5c
Alain Reguera Delgado cdbf5c
+=\BRAND=+::
Alain Reguera Delgado cdbf5c
    This translation marker expands to the brand name used on files
Alain Reguera Delgado cdbf5c
    names and URLs inside The CentOS Artwork Repository.  For example,
Alain Reguera Delgado cdbf5c
    +=BRAND=+.
Alain Reguera Delgado cdbf5c
Alain Reguera Delgado cdbf5c
+=\LICENSE=+::
Alain Reguera Delgado cdbf5c
    This translation marker expands to the license information used in
Alain Reguera Delgado cdbf5c
    files created by *centos-art.sh* script. For
Alain Reguera Delgado cdbf5c
    example, +=LICENSE=+.
Alain Reguera Delgado cdbf5c
Alain Reguera Delgado cdbf5c
+=\LICENSE_URL=+::
Alain Reguera Delgado cdbf5c
    This translation marker expands to the license URL used in files
Alain Reguera Delgado cdbf5c
    created by *centos-art.sh* script. For example,
Alain Reguera Delgado cdbf5c
    +=LICENSE_URL=+.
Alain Reguera Delgado cdbf5c
Alain Reguera Delgado cdbf5c
+=\THEME=+::
Alain Reguera Delgado cdbf5c
    This translation marker expands to the theme portion of path you
Alain Reguera Delgado cdbf5c
    are producing through centos-art.sh script. As consequence, this
Alain Reguera Delgado cdbf5c
    translation marker should be used in situations where you are
Alain Reguera Delgado cdbf5c
    producing theme components only.  This translation marker expands
Alain Reguera Delgado cdbf5c
    its value by retrieving the theme part of the path you provide as
Alain Reguera Delgado cdbf5c
    non-option argument to *centos-art.sh* script.
Alain Reguera Delgado cdbf5c
    For example, if you provide the path
Alain Reguera Delgado cdbf5c
    +Identity/Images/Themes/Modern/2/Distro/5+,
Alain Reguera Delgado cdbf5c
    this translation will expand to the +Modern/2/+ value.
Alain Reguera Delgado cdbf5c
+
Alain Reguera Delgado cdbf5c
In case you need to retrieve the theme name or version separately one
Alain Reguera Delgado cdbf5c
another, then you can use the +=\THEMENAME=+ and +=\THEMERELEASE=+
Alain Reguera Delgado cdbf5c
translation markers, respectively. When you use these translation
Alain Reguera Delgado cdbf5c
markers, forward slashes are removed from result. So, if you provide
Alain Reguera Delgado cdbf5c
the path
Alain Reguera Delgado cdbf5c
+Identity/Images/Themes/Modern/2/Distro/5+,
Alain Reguera Delgado cdbf5c
+=\THEMENAME=+ will expand to +Modern+ and +=THEMERELEASE=+ will
Alain Reguera Delgado cdbf5c
expand to +2+.
Alain Reguera Delgado cdbf5c
Alain Reguera Delgado cdbf5c
+=\RELEASE=+::
Alain Reguera Delgado cdbf5c
    This translation marker expands to the current release information
Alain Reguera Delgado cdbf5c
    of your CentOS distribution. By default this information is
Alain Reguera Delgado cdbf5c
    retrieved from +/etc/redhat-release+. In case
Alain Reguera Delgado cdbf5c
    the option *--release* be passed, the value specified with it will
Alain Reguera Delgado cdbf5c
    overwrite the default value and will be this the one used as
Alain Reguera Delgado cdbf5c
    section for this translation marker to retrieve the release
Alain Reguera Delgado cdbf5c
    information. So, for example, if you are running a CentOS-5.8
Alain Reguera Delgado cdbf5c
    distribution and no *--release* option is passed to
Alain Reguera Delgado cdbf5c
    *centos-art.sh* script, this translation marker
Alain Reguera Delgado cdbf5c
    expands to +5.8+. On the other hand, if you are still running a
Alain Reguera Delgado cdbf5c
    CentOS-5.8 distribution but provide the *--release=6.3* option to
Alain Reguera Delgado cdbf5c
    *centos-art.sh* script, this translation marker
Alain Reguera Delgado cdbf5c
    expands to +6.3+ instead.
Alain Reguera Delgado cdbf5c
+
Alain Reguera Delgado cdbf5c
In case you need to retrieve minor and major release numbers
Alain Reguera Delgado cdbf5c
separately one another, then you can use the +=\MINOR_RELEASE=+ and
Alain Reguera Delgado cdbf5c
+=\MAJOR_RELEASE=+ translation makers, respectively.
Alain Reguera Delgado cdbf5c
Alain Reguera Delgado cdbf5c
+=\ARCH=+::
Alain Reguera Delgado cdbf5c
    This translation marker expands to the current architecture of
Alain Reguera Delgado cdbf5c
    your CentOS Distribution. By default this information is retrieved
Alain Reguera Delgado cdbf5c
    from *uname -i*. In case the option *--arch* be
Alain Reguera Delgado cdbf5c
    passed, the value specified with it will overwrite the default
Alain Reguera Delgado cdbf5c
    value and will be the one used as section. For example, if the
Alain Reguera Delgado cdbf5c
    *uname -i* outputs the line
Alain Reguera Delgado cdbf5c
    <computeroutput>i386</computeroutput>, this translation marker
Alain Reguera Delgado cdbf5c
    will expand to +i386+. On the other hand, if you pass the
Alain Reguera Delgado cdbf5c
    *--arch=x86_64* option to *centos-art.sh* script,
Alain Reguera Delgado cdbf5c
    this translation marker will expand to +x86_64+ instead.
Alain Reguera Delgado cdbf5c
Alain Reguera Delgado cdbf5c
+=\URL=+:: This translation marker expands to the URL which points to
Alain Reguera Delgado cdbf5c
The CentOS Project home page. For example, +=URL=+.  In case you are
Alain Reguera Delgado cdbf5c
using the centos-art.sh script in a different locale but English
Alain Reguera Delgado cdbf5c
(+en_US.UTF-8+), this translation marker expands as usual but with the
Alain Reguera Delgado cdbf5c
language information appended to the end of the string. For example,
Alain Reguera Delgado cdbf5c
if you are executing the centos-art.shscript for Spanish locale (e.g.,
Alain Reguera Delgado cdbf5c
+es_ES.UTF-8+), this translation marker expands to +=URL=es/+.
Alain Reguera Delgado cdbf5c
+
Alain Reguera Delgado cdbf5c
In case you need to expand other URL related to The CentOS Project
Alain Reguera Delgado cdbf5c
domain, use translation markers described in
Alain Reguera Delgado cdbf5c
<<url-related-translation-markers>>.  Likewise =\URL=, translation
Alain Reguera Delgado cdbf5c
markers described in <<url-related-translation-markers>> does append
Alain Reguera Delgado cdbf5c
the current language information to the end of the URL string based on
Alain Reguera Delgado cdbf5c
the locale information you are currently executing the *centos-art.sh*
Alain Reguera Delgado cdbf5c
script.
Alain Reguera Delgado cdbf5c
Alain Reguera Delgado cdbf5c
[[url-related-translation-markers]]
Alain Reguera Delgado cdbf5c
.URL-related translation markers
Alain Reguera Delgado cdbf5c
-------------------`-----------------
Alain Reguera Delgado cdbf5c
Translation         Marker Expands To
Alain Reguera Delgado cdbf5c
-------------------------------------
Alain Reguera Delgado cdbf5c
=\URL_WIKI=         =URL_WIKI=
Alain Reguera Delgado cdbf5c
=\URL_LISTS=        =URL_LISTS=
Alain Reguera Delgado cdbf5c
=\URL_FORUMS=       =URL_FORUMS=
Alain Reguera Delgado cdbf5c
=\URL_MIRRORS=      =URL_MIRRORS=
Alain Reguera Delgado cdbf5c
=\URL_DOCS=         =URL_DOCS=
Alain Reguera Delgado cdbf5c
=\URL_PROJECTS=     =URL_PROJECTS=
Alain Reguera Delgado cdbf5c
=\URL_SVN=          =URL_SVN=
Alain Reguera Delgado cdbf5c
=\URL_TRAC=         =URL_TRAC=
Alain Reguera Delgado cdbf5c
=\URL_PLANET=       =URL_PLANET=
Alain Reguera Delgado cdbf5c
-------------------------------------
Alain Reguera Delgado cdbf5c
Alain Reguera Delgado cdbf5c
+=\MAIL_DOCS=+::
Alain Reguera Delgado cdbf5c
    This translation marker expands to CentOS documentation mailing
Alain Reguera Delgado cdbf5c
    list address. For example, +=MAIL_DOCS=+.
Alain Reguera Delgado cdbf5c
Alain Reguera Delgado cdbf5c
+=\LOCALE=+::
Alain Reguera Delgado cdbf5c
    This translation marker expands to the current locale information
Alain Reguera Delgado cdbf5c
    used by *centos-art.sh* script.  This value is
Alain Reguera Delgado cdbf5c
    retrieved from the <envar>LANG</envar> environment variable and
Alain Reguera Delgado cdbf5c
    should look like +=LOCALE=+.  In case you need to retrieve the
Alain Reguera Delgado cdbf5c
    language and country part separately one another, you can use the
Alain Reguera Delgado cdbf5c
    +=\LOCALE_LL=+ and +=\LOCALE_CC=+, respectively.
Alain Reguera Delgado cdbf5c
Alain Reguera Delgado cdbf5c
+=\REPO_TLDIR=+::
Alain Reguera Delgado cdbf5c
    This translation marker expands to the absolute path to 
Alain Reguera Delgado cdbf5c
    class="directory">+ directory inside your workstation.  For
Alain Reguera Delgado cdbf5c
    example, +/home/al/Projects/CentOS/artwork/trunk+.
Alain Reguera Delgado cdbf5c
Alain Reguera Delgado cdbf5c
+=\REPO_HOME=+, +=\TCAR_WORKDIR=+::
Alain Reguera Delgado cdbf5c
    This translation marker expands to the absolute path of your
Alain Reguera Delgado cdbf5c
    working copy.  For example, +/home/al/Projects/CentOS/artwork+.
Alain Reguera Delgado cdbf5c
Alain Reguera Delgado cdbf5c
== Bugs
Alain Reguera Delgado cdbf5c
Alain Reguera Delgado cdbf5c
See https://centos.org.cu/bugs/
Alain Reguera Delgado cdbf5c
Alain Reguera Delgado cdbf5c
== Authors
Alain Reguera Delgado cdbf5c
Alain Reguera Delgado cdbf5c
The *tcar_setTranslationMarkers* function has received contributions
Alain Reguera Delgado cdbf5c
from the following people:
Alain Reguera Delgado cdbf5c
Alain Reguera Delgado cdbf5c
- Alain Reguera Delgado <al@centos.org.cu>, =COPYRIGHT_YEAR_LIST=
Alain Reguera Delgado cdbf5c
Alain Reguera Delgado cdbf5c
== License
Alain Reguera Delgado cdbf5c
Alain Reguera Delgado cdbf5c
Copyright (C) =COPYRIGHT_YEAR_LIST= =COPYRIGHT_HOLDER=
Alain Reguera Delgado cdbf5c
Alain Reguera Delgado cdbf5c
This program is free software; you can redistribute it and/or modify
Alain Reguera Delgado cdbf5c
it under the terms of the GNU General Public License as published by
Alain Reguera Delgado cdbf5c
the Free Software Foundation; either version 2 of the License, or (at
Alain Reguera Delgado cdbf5c
your option) any later version.
Alain Reguera Delgado cdbf5c
Alain Reguera Delgado cdbf5c
This program is distributed in the hope that it will be useful, but
Alain Reguera Delgado cdbf5c
WITHOUT ANY WARRANTY; without even the implied warranty of
Alain Reguera Delgado cdbf5c
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Alain Reguera Delgado cdbf5c
General Public License for more details.
Alain Reguera Delgado cdbf5c
Alain Reguera Delgado cdbf5c
You should have received a copy of the GNU General Public License
Alain Reguera Delgado cdbf5c
along with this program; if not, write to the Free Software
Alain Reguera Delgado cdbf5c
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
Alain Reguera Delgado cdbf5c
Alain Reguera Delgado cdbf5c
// vim: set syntax=asciidoc: