mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-04 00:04:03 -04:00
update i18n scripts
This commit is contained in:
parent
7642ce9d77
commit
f389069b4e
@ -34,7 +34,7 @@ FIND_PATH(QWT_INCLUDE_DIR NAMES qwt.h PATHS
|
||||
/usr/local/include
|
||||
"$ENV{LIB_DIR}/include"
|
||||
"$ENV{INCLUDE}"
|
||||
PATH_SUFFIXES qwt-qt4 qwt qwt5 qwt6
|
||||
PATH_SUFFIXES qwt-qt5 qwt qwt5 qwt6
|
||||
)
|
||||
|
||||
IF (QWT_INCLUDE_DIR AND QWT_LIBRARY)
|
||||
|
@ -21,7 +21,7 @@ print <<EOF;
|
||||
/*
|
||||
This is NOT a proper c++ source code. This file is only designed to be caught
|
||||
by qmake and included in lupdate. It contains all translateable strings collected
|
||||
by pylupdate4.
|
||||
by pylupdate5.
|
||||
*/
|
||||
|
||||
EOF
|
||||
|
@ -26,7 +26,7 @@ print F <<EOF;
|
||||
/*
|
||||
This is NOT a proper c++ source code. This file is only designed to be caught
|
||||
by qmake and included in lupdate. It contains all translateable strings collected
|
||||
by pylupdate4.
|
||||
by pylupdate5.
|
||||
*/
|
||||
|
||||
EOF
|
||||
|
@ -48,19 +48,19 @@ cleanup() {
|
||||
|
||||
PATH=$QTDIR/bin:$PATH
|
||||
|
||||
if type qmake-qt4 >/dev/null 2>&1; then
|
||||
QMAKE=qmake-qt4
|
||||
if type qmake-qt5 >/dev/null 2>&1; then
|
||||
QMAKE=qmake-qt5
|
||||
else
|
||||
QMAKE=qmake
|
||||
fi
|
||||
|
||||
if ! type pylupdate4 >/dev/null 2>&1; then
|
||||
if ! type pylupdate5 >/dev/null 2>&1; then
|
||||
echo "pylupdate4 not found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if type lupdate-qt4 >/dev/null 2>&1; then
|
||||
LUPDATE=lupdate-qt4
|
||||
if type lupdate-qt5 >/dev/null 2>&1; then
|
||||
LUPDATE=lupdate-qt5
|
||||
else
|
||||
LUPDATE=lupdate
|
||||
fi
|
||||
|
@ -56,19 +56,19 @@ cleanup() {
|
||||
|
||||
PATH=$QTDIR/bin:$PATH
|
||||
|
||||
if type qmake-qt4 >/dev/null 2>&1; then
|
||||
QMAKE=qmake-qt4
|
||||
if type qmake-qt5 >/dev/null 2>&1; then
|
||||
QMAKE=qmake-qt5
|
||||
else
|
||||
QMAKE=qmake
|
||||
fi
|
||||
|
||||
if ! type pylupdate4 >/dev/null 2>&1; then
|
||||
echo "pylupdate4 not found"
|
||||
if ! type pylupdate5 >/dev/null 2>&1; then
|
||||
echo "pylupdate5 not found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if type lupdate-qt4 >/dev/null 2>&1; then
|
||||
LUPDATE=lupdate-qt4
|
||||
if type lupdate-qt5 >/dev/null 2>&1; then
|
||||
LUPDATE=lupdate-qt5
|
||||
else
|
||||
LUPDATE=lupdate
|
||||
fi
|
||||
@ -118,13 +118,13 @@ fi
|
||||
|
||||
echo Updating python translations
|
||||
cd python
|
||||
pylupdate4 utils.py {console,pyplugin_installer}/*.{py,ui} -ts python-i18n.ts
|
||||
pylupdate5 utils.py {console,pyplugin_installer}/*.{py,ui} -ts python-i18n.ts
|
||||
perl ../scripts/ts2cpp.pl python-i18n.ts python-i18n.cpp
|
||||
rm python-i18n.ts
|
||||
cd ..
|
||||
for i in python/plugins/*/CMakeLists.txt; do
|
||||
cd ${i%/*}
|
||||
pylupdate4 $(find . -name "*.py" -o -name "*.ui") -ts python-i18n.ts
|
||||
pylupdate5 $(find . -name "*.py" -o -name "*.ui") -ts python-i18n.ts
|
||||
perl ../../../scripts/ts2cpp.pl python-i18n.ts python-i18n.cpp
|
||||
rm python-i18n.ts
|
||||
cd ../../..
|
||||
|
@ -111,41 +111,10 @@ void QgsRequestHandler::setupParameters()
|
||||
const QgsServerRequest::Parameters parameters = mRequest.parameters();
|
||||
|
||||
// SLD
|
||||
|
||||
QString value = parameters.value( QStringLiteral( "SLD" ) );
|
||||
if ( !value.isEmpty() )
|
||||
{
|
||||
// XXX Why keeping this ????
|
||||
#if QT_VERSION < 0x050000
|
||||
QByteArray fileContents;
|
||||
if ( value.startsWith( "http", Qt::CaseInsensitive ) )
|
||||
{
|
||||
QgsHttpTransaction http( value );
|
||||
if ( !http.getSynchronously( fileContents ) )
|
||||
{
|
||||
fileContents.clear();
|
||||
}
|
||||
}
|
||||
else if ( value.startsWith( "ftp", Qt::CaseInsensitive ) )
|
||||
{
|
||||
Q_NOWARN_DEPRECATED_PUSH;
|
||||
QgsFtpTransaction ftp;
|
||||
if ( !ftp.get( value, fileContents ) )
|
||||
{
|
||||
fileContents.clear();
|
||||
}
|
||||
value = QUrl::fromPercentEncoding( fileContents );
|
||||
Q_NOWARN_DEPRECATED_POP;
|
||||
}
|
||||
|
||||
if fileContents.size() > 0 )
|
||||
{
|
||||
mRequest.setParameter( QStringLiteral( "SLD" ), QUrl::fromPercentEncoding( fileContents ) );
|
||||
}
|
||||
#else
|
||||
QgsMessageLog::logMessage( QStringLiteral( "http and ftp methods not supported with Qt5." ) );
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
// SLD_BODY
|
||||
|
Loading…
x
Reference in New Issue
Block a user