Skip to content
Permalink
Browse files

update i18n scripts

  • Loading branch information
jef-n committed Jan 25, 2017
1 parent 7642ce9 commit f389069b4ec621cef415473e3f9324409e1c55e3
Showing with 16 additions and 47 deletions.
  1. +1 −1 cmake/FindQwt.cmake
  2. +1 −1 scripts/qgm2cpp.pl
  3. +1 −1 scripts/ts2cpp.pl
  4. +5 −5 scripts/update_ts.sh
  5. +8 −8 scripts/update_ts_files.sh
  6. +0 −31 src/server/qgsrequesthandler.cpp
@@ -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 @@
/*
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 @@
/*
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

0 comments on commit f389069

Please sign in to comment.
You can’t perform that action at this time.