Skip to content

Commit 00f8eff

Browse files
committedMar 22, 2016
update_ts.sh: pulling doesn't require a build directory
1 parent 53d40e8 commit 00f8eff

File tree

4 files changed

+20
-15
lines changed

4 files changed

+20
-15
lines changed
 

‎scripts/pull_ts.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@
1515
###########################################################################
1616

1717
# Pull the translations from transifex and update TRANSLATORS
18-
scripts/update_ts.sh pull
18+
scripts/update_ts.sh pull $1

‎scripts/push_ts.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@
1515
###########################################################################
1616

1717
# Update the english translation and push it to transifex
18-
scripts/update_ts.sh push
18+
scripts/update_ts.sh push $1

‎scripts/update_ts.sh

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,22 @@ if ! type tx >/dev/null 2>&1; then
7070
exit 1
7171
fi
7272

73+
builddir=$2
74+
if [ -d "$builddir" ]; then
75+
textcpp=
76+
for i in $builddir/src/core/qgsexpression_texts.cpp $builddir/src/core/qgscontexthelp_texts.cpp; do
77+
if [ -f $i ]; then
78+
textcpp="$textcpp $i"
79+
elif [ "$1" != "pull" ]; then
80+
echo Generated help file $i not found
81+
exit 1
82+
fi
83+
done
84+
elif [ "$1" != "pull" ]; then
85+
echo Build directory not found
86+
exit 1
87+
fi
88+
7389
trap cleanup EXIT
7490

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

90-
builddir=$2
91-
if [ ! -d "$builddir" ]; then
92-
echo Build directory not found
93-
exit 1
94-
fi
95-
96-
if [ ! -f "$builddir/src/core/qgsexpression_texts.cpp" -o ! -f "$builddir/src/core/qgscontexthelp_texts.cpp" ]; then
97-
echo Generated help files not found
98-
exit 1
99-
fi
100-
101106
echo Updating python translations
102107
cd python
103108
pylupdate4 user.py utils.py {console,pyplugin_installer}/*.{py,ui} -ts python-i18n.ts
@@ -119,7 +124,7 @@ echo Updating processing translations
119124
perl scripts/processing2cpp.pl python/plugins/processing/processing-i18n.cpp
120125

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

124129
echo Updating translations
125130
$LUPDATE -locations absolute -verbose qgis_ts.pro

‎src/providers/oracle/qgsoracleconn.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ QgsOracleConn::QgsOracleConn( QgsDataSourceURI uri )
129129
if ( !qry.exec( QString( "BEGIN\nDBMS_WM.GotoWorkspace(%1);\nEND;" ).arg( quotedValue( workspace ) ) ) )
130130
{
131131
mDatabase.close();
132-
QgsMessageLog::logMessage( tr( "Could not with to workspace %1 [%2]" ).arg( workspace, qry.lastError().databaseText() ), tr( "Oracle" ) );
132+
QgsMessageLog::logMessage( tr( "Could not switch to workspace %1 [%2]" ).arg( workspace, qry.lastError().databaseText() ), tr( "Oracle" ) );
133133
mRef = 0;
134134
return;
135135
}

0 commit comments

Comments
 (0)
Please sign in to comment.