Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
update_ts.sh: pulling doesn't require a build directory
  • Loading branch information
jef-n committed Mar 22, 2016
1 parent 53d40e8 commit 00f8eff
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 15 deletions.
2 changes: 1 addition & 1 deletion scripts/pull_ts.sh
Expand Up @@ -15,4 +15,4 @@
###########################################################################

# Pull the translations from transifex and update TRANSLATORS
scripts/update_ts.sh pull
scripts/update_ts.sh pull $1
2 changes: 1 addition & 1 deletion scripts/push_ts.sh
Expand Up @@ -15,4 +15,4 @@
###########################################################################

# Update the english translation and push it to transifex
scripts/update_ts.sh push
scripts/update_ts.sh push $1
29 changes: 17 additions & 12 deletions scripts/update_ts.sh
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/providers/oracle/qgsoracleconn.cpp
Expand Up @@ -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;
}
Expand Down

0 comments on commit 00f8eff

Please sign in to comment.