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