|
|
ecb17b |
#!/bin/bash
|
|
|
ecb17b |
#
|
|
|
ecb17b |
# render_loadConfig.sh -- This function specifies translation markers
|
|
|
ecb17b |
# and replacements for release notes in HTML format.
|
|
|
ecb17b |
#
|
|
|
ecb17b |
# Copyright (C) 2009-2011 Alain Reguera Delgado
|
|
|
ecb17b |
#
|
|
|
ecb17b |
# This program is free software; you can redistribute it and/or
|
|
|
ecb17b |
# modify it under the terms of the GNU General Public License as
|
|
|
ecb17b |
# published by the Free Software Foundation; either version 2 of the
|
|
|
ecb17b |
# License, or (at your option) any later version.
|
|
|
ecb17b |
#
|
|
|
ecb17b |
# This program is distributed in the hope that it will be useful, but
|
|
|
ecb17b |
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
ecb17b |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
ecb17b |
# General Public License for more details.
|
|
|
ecb17b |
#
|
|
|
ecb17b |
# You should have received a copy of the GNU General Public License
|
|
|
ecb17b |
# along with this program; if not, write to the Free Software
|
|
|
ecb17b |
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
|
|
ecb17b |
# USA.
|
|
|
ecb17b |
# ----------------------------------------------------------------------
|
|
|
ecb17b |
# $Id: splash.png.sh 963 2011-01-26 17:25:47Z al $
|
|
|
ecb17b |
# ----------------------------------------------------------------------
|
|
|
ecb17b |
|
|
|
ecb17b |
function render_loadConfig {
|
|
|
ecb17b |
|
|
|
ecb17b |
local INDEX=''
|
|
|
ecb17b |
local -a URL
|
|
|
ecb17b |
local COUNT=0
|
|
|
ecb17b |
|
|
|
ecb17b |
# Define translation markers.
|
|
|
ecb17b |
SRC[0]='=TITLE='
|
|
|
ecb17b |
for INDEX in {1..6};do
|
|
|
ecb17b |
SRC[$INDEX]="=P${INDEX}="
|
|
|
ecb17b |
done
|
|
|
ecb17b |
SRC[7]='=LOCALE='
|
|
|
ecb17b |
|
|
|
ecb17b |
# Define and build URLs for replacements.
|
|
|
ecb17b |
URLS[0]=''
|
|
|
ecb17b |
URLS[1]=''
|
|
|
964511 |
URLS[2]='=URL_WIKI=Manuals/ReleaseNotes/=RELEASE=/'
|
|
|
964511 |
URLS[3]='=URL_WIKI=FAQs/=MAJOR_RELEASE=/'
|
|
|
ecb17b |
URLS[4]='=URL_WIKI=Help/'
|
|
|
ecb17b |
URLS[5]='=URL_WIKI=Contribute/'
|
|
|
ecb17b |
URLS[6]='=URL='
|
|
|
ecb17b |
|
|
|
ecb17b |
# Define replacements for translation markers.
|
|
|
ecb17b |
DST[0]="`gettext "CentOS =RELEASE= Release Notes"`"
|
|
|
ecb17b |
|
|
|
ecb17b |
DST[1]="`gettext "The CentOS project welcomes you to CentOS
|
|
|
ecb17b |
=RELEASE=."`"
|
|
|
ecb17b |
|
|
|
ecb17b |
DST[2]="`gettext "The complete release notes for CentOS =RELEASE=
|
|
|
ecb17b |
can be found online at: =LINK="`"
|
|
|
ecb17b |
|
|
|
ecb17b |
DST[3]="`gettext "A list of frequently asked questions and answers
|
|
|
964511 |
about CentOS =MAJOR_RELEASE= can be found online at: =LINK="`"
|
|
|
ecb17b |
|
|
|
ecb17b |
DST[4]="`eval_gettext "If you are looking for help with CentOS, we
|
|
|
ecb17b |
recommend you start at =LINK= for pointers to the different
|
|
|
ecb17b |
sources where you can get help."`"
|
|
|
ecb17b |
|
|
|
ecb17b |
DST[5]="`gettext "For more information about The CentOS Project in
|
|
|
ecb17b |
general please visit our homepage at: =LINK=."`"
|
|
|
ecb17b |
|
|
|
ecb17b |
DST[6]="`gettext "If you would like to contribute to the CentOS
|
|
|
ecb17b |
Project, see =LINK= for areas where you could help."`"
|
|
|
ecb17b |
|
|
|
ecb17b |
DST[7]="$(cli_getCurrentLocale)"
|
|
|
ecb17b |
|
|
|
ecb17b |
# Redefine replacements in order to convert urls into html links.
|
|
|
ecb17b |
while [[ $COUNT -lt ${#URLS[*]} ]];do
|
|
|
ecb17b |
DST[$COUNT]=$(echo ${DST[$COUNT]} \
|
|
|
ecb17b |
| sed -r "s!=LINK=!${URLS[$COUNT]}!g")
|
|
|
ecb17b |
COUNT=$(($COUNT + 1))
|
|
|
ecb17b |
done
|
|
|
ecb17b |
|
|
|
ecb17b |
}
|