|
|
0bd190 |
#!/bin/bash
|
|
|
0bd190 |
#
|
|
|
0bd190 |
# locale_updateMessageXmlDocbook.sh -- This function retrives
|
|
|
0bd190 |
# translation messages from Docbook files and creates related portable
|
|
|
0bd190 |
# object template for them.
|
|
|
0bd190 |
#
|
|
|
5e8996 |
# Copyright (C) 2009, 2010, 2011, 2012 The CentOS Project
|
|
|
0bd190 |
#
|
|
|
0bd190 |
# This program is free software; you can redistribute it and/or modify
|
|
|
0bd190 |
|
|
|
0bd190 |
|
|
|
0bd190 |
|
|
|
0bd190 |
#
|
|
|
0bd190 |
|
|
|
0bd190 |
|
|
|
0bd190 |
|
|
|
0bd190 |
# General Public License for more details.
|
|
|
0bd190 |
#
|
|
|
0bd190 |
|
|
|
0bd190 |
# along with this program; if not, write to the Free Software
|
|
|
0bd190 |
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
0bd190 |
#
|
|
|
0bd190 |
# ----------------------------------------------------------------------
|
|
|
e94a3a |
# $Id$
|
|
|
0bd190 |
# ----------------------------------------------------------------------
|
|
|
0bd190 |
|
|
|
0bd190 |
function locale_updateMessageXmlDocbook {
|
|
|
0bd190 |
|
|
|
0bd190 |
|
|
|
0bd190 |
cli_printMessage "${MESSAGES}.pot" --as-updating-line
|
|
|
0bd190 |
|
|
|
096bac |
|
|
|
096bac |
|
|
|
096bac |
local EXTENSION='docbook'
|
|
|
096bac |
|
|
|
096bac |
|
|
|
096bac |
local TEMPLATE=$(cli_getFilesList ${ACTIONVAL} \
|
|
|
096bac |
--maxdepth=1 --mindepth=1 --type='f' \
|
|
|
096bac |
--pattern="$(cli_getRepoName ${ACTIONVAL} -f)\.${EXTENSION}$")
|
|
|
0bd190 |
|
|
|
0bd190 |
|
|
|
0bd190 |
|
|
|
e94a3a |
cli_checkFiles -e ${TEMPLATE}
|
|
|
0bd190 |
|
|
|
0bd190 |
|
|
|
0bd190 |
|
|
|
0bd190 |
|
|
|
0bd190 |
local INSTANCE=$(cli_getTemporalFile "$(basename ${TEMPLATE})")
|
|
|
0bd190 |
|
|
|
0bd190 |
|
|
|
0bd190 |
cp ${TEMPLATE} ${INSTANCE}
|
|
|
0bd190 |
|
|
|
0bd190 |
|
|
|
0bd190 |
cli_expandTMarkers ${INSTANCE}
|
|
|
0bd190 |
|
|
|
0bd190 |
|
|
|
0bd190 |
cli_exportFunctions "Render/Docbook/docbook_expandSystemEntities"
|
|
|
0bd190 |
docbook_expandSystemEntities ${INSTANCE}
|
|
|
0bd190 |
|
|
|
0bd190 |
|
|
|
0bd190 |
cli_exportFunctions "Render/Docbook/docbook_expandLicenses"
|
|
|
0bd190 |
docbook_expandLicenses ${INSTANCE}
|
|
|
0bd190 |
|
|
|
0bd190 |
|
|
|
0bd190 |
|
|
|
0bd190 |
|
|
|
0bd190 |
ln -s ${TCAR_WORKDIR}/trunk/Identity/Images/Webenv $(dirname ${INSTANCE})/Images
|
|
|
0bd190 |
|
|
|
0bd190 |
|
|
|
0bd190 |
pushd $(dirname ${INSTANCE}) > /dev/null
|
|
|
0bd190 |
|
|
|
0bd190 |
|
|
|
0bd190 |
xmllint
|
|
|
0bd190 |
| msgcat --output=${MESSAGES}.pot --width=70 --no-location -
|
|
|
0bd190 |
|
|
|
0bd190 |
|
|
|
0bd190 |
popd > /dev/null
|
|
|
0bd190 |
|
|
|
0bd190 |
|
|
|
0bd190 |
rm ${INSTANCE}
|
|
|
0bd190 |
|
|
|
0bd190 |
}
|