Skip to content
Permalink
Browse files

update_ts.sh: pulling doesn't require a build directory

  • Loading branch information
jef-n committed Mar 22, 2016
1 parent 53d40e8 commit 00f8eff034df3dd25bf304e3b0c25d8afe450f98
Showing with 20 additions and 15 deletions.
  1. +1 −1 scripts/pull_ts.sh
  2. +1 −1 scripts/push_ts.sh
  3. +17 −12 scripts/update_ts.sh
  4. +1 −1 src/providers/oracle/qgsoracleconn.cpp
@@ -15,4 +15,4 @@
###########################################################################

# Pull the translations from transifex and update TRANSLATORS
scripts/update_ts.sh pull
scripts/update_ts.sh pull $1
@@ -15,4 +15,4 @@
###########################################################################

# Update the english translation and push it to transifex
scripts/update_ts.sh push
scripts/update_ts.sh push $1
@@ -70,6 +70,22 @@ if ! type tx >/dev/null 2>&1; then
exit 1
fi

builddir=$2
if [ -d "$builddir" ]; then
textcpp=
for i in $builddir/src/core/qgsexpression_texts.cpp $builddir/src/core/qgscontexthelp_texts.cpp; do
if [ -f $i ]; then
textcpp="$textcpp $i"
elif [ "$1" != "pull" ]; then
echo Generated help file $i not found
exit 1
fi
done
elif [ "$1" != "pull" ]; then
echo Build directory not found
exit 1
fi

trap cleanup EXIT

echo Saving translations
@@ -87,17 +103,6 @@ elif [ $1 = pull ]; then
tx pull -a -s --minimum-perc=35
fi

builddir=$2
if [ ! -d "$builddir" ]; then
echo Build directory not found
exit 1
fi

if [ ! -f "$builddir/src/core/qgsexpression_texts.cpp" -o ! -f "$builddir/src/core/qgscontexthelp_texts.cpp" ]; then
echo Generated help files not found
exit 1
fi

echo Updating python translations
cd python
pylupdate4 user.py utils.py {console,pyplugin_installer}/*.{py,ui} -ts python-i18n.ts
@@ -119,7 +124,7 @@ echo Updating processing translations
perl scripts/processing2cpp.pl python/plugins/processing/processing-i18n.cpp

echo Creating qmake project file
$QMAKE -project -o qgis_ts.pro -nopwd src python i18n "$builddir/src/core/qgsexpression_texts.cpp" "$builddir/src/core/qgscontexthelp_texts.cpp"
$QMAKE -project -o qgis_ts.pro -nopwd src python i18n $textcpp

echo Updating translations
$LUPDATE -locations absolute -verbose qgis_ts.pro
@@ -129,7 +129,7 @@ QgsOracleConn::QgsOracleConn( QgsDataSourceURI uri )
if ( !qry.exec( QString( "BEGIN\nDBMS_WM.GotoWorkspace(%1);\nEND;" ).arg( quotedValue( workspace ) ) ) )
{
mDatabase.close();
QgsMessageLog::logMessage( tr( "Could not with to workspace %1 [%2]" ).arg( workspace, qry.lastError().databaseText() ), tr( "Oracle" ) );
QgsMessageLog::logMessage( tr( "Could not switch to workspace %1 [%2]" ).arg( workspace, qry.lastError().databaseText() ), tr( "Oracle" ) );
mRef = 0;
return;
}

0 comments on commit 00f8eff

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