Skip to content

Commit e2b0e49

Browse files
author
macho
committed
restoring accidantly updated files - sorry for that
git-svn-id: http://svn.osgeo.org/qgis/trunk@12333 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 5a9e352 commit e2b0e49

File tree

2 files changed

+46
-27
lines changed

2 files changed

+46
-27
lines changed

scripts/update_ts_files.sh

+41-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/sh
1+
#!/bin/bash
22
# Update the translation files with strings used in QGIS
33
# 1. create a clean Qt .pro file for the project
44
# 2. run lupdate using the .pro file from step 1
@@ -7,18 +7,53 @@
77
# name is reserved for the Windows qmake project file
88
# update_ts_files.sh,v 1.3 2004/07/14 18:16:24 gsherman Exp
99

10+
set -e
11+
1012
PATH=$QTDIR/bin:$PATH
1113

1214
#first tar the qt_xx.ts files in i18n folder such that lupdate does not
1315
#merge the qgis strings to them
1416
echo Creating qt_ts.tar
15-
tar -cvf i18n/qt_ts.tar i18n/qt_*.ts
16-
rm i18n/qt_*.ts
17+
tar --remove-files -cvf i18n/qt_ts.tar i18n/qt_*.ts
18+
exclude=
19+
opts=
20+
for i in "$@"; do
21+
if [ -f "i18n/qgis_$i.ts" ]; then
22+
exclude="$exclude --exclude i18n/qgis_$i.ts"
23+
else
24+
opts=" $i"
25+
fi
26+
done
27+
if [ -n "$exclude" ]; then
28+
tar --remove-files -cvf i18n/qgis_ts.tar i18n/qgis_*.ts$exclude
29+
fi
30+
echo Updating python translations
31+
cd python
32+
pylupdate4 utils.py -ts python-i18n.ts
33+
perl ../scripts/ts2cpp.pl python-i18n.ts python-i18n.cpp
34+
rm python-i18n.ts
35+
cd ..
36+
for i in python/plugins/*/CMakeLists.txt; do
37+
cd ${i%/*}
38+
pylupdate4 $(find . -name "*.py" -o -name "*.ui") -ts python-i18n.ts
39+
perl ../../../scripts/ts2cpp.pl python-i18n.ts python-i18n.cpp
40+
rm python-i18n.ts
41+
cd ../../..
42+
done
1743
echo Creating qmake project file
18-
qmake -project -o qgis_ts.pro
44+
qmake -project -o qgis_ts.pro -nopwd src python i18n
1945
echo Updating translation files
20-
lupdate -verbose qgis_ts.pro
46+
lupdate$opts -verbose qgis_ts.pro
47+
echo Removing temporary python translation files
48+
perl -i.bak -ne 'print unless /^\s+<location.*python-i18n\.cpp.*$/;' i18n/qgis_*.ts
49+
rm python/python-i18n.cpp python/plugins/*/python-i18n.cpp i18n/qgis_*.ts.bak
2150
echo Removing qmake project file
2251
rm qgis_ts.pro
2352
echo Unpacking qt_ts.tar
24-
tar -xvf i18n/qt_ts.tar
53+
tar -xvf i18n/qt_ts.tar
54+
rm i18n/qt_ts.tar
55+
if [ -f i18n/qgis_ts.tar ]; then
56+
echo Unpacking i18n/qgis_ts.tar
57+
tar -xvf i18n/qgis_ts.tar
58+
rm i18n/qgis_ts.tar
59+
fi

src/ui/qgspgsourceselectbase.ui

+5-21
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@
165165
<item>
166166
<widget class="QDialogButtonBox" name="buttonBox">
167167
<property name="standardButtons">
168-
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Help|QDialogButtonBox::Open</set>
168+
<set>QDialogButtonBox::Close|QDialogButtonBox::Help</set>
169169
</property>
170170
</widget>
171171
</item>
@@ -195,28 +195,12 @@
195195
<slot>reject()</slot>
196196
<hints>
197197
<hint type="sourcelabel">
198-
<x>265</x>
199-
<y>449</y>
198+
<x>353</x>
199+
<y>446</y>
200200
</hint>
201201
<hint type="destinationlabel">
202-
<x>399</x>
203-
<y>310</y>
204-
</hint>
205-
</hints>
206-
</connection>
207-
<connection>
208-
<sender>buttonBox</sender>
209-
<signal>accepted()</signal>
210-
<receiver>QgsPgSourceSelectBase</receiver>
211-
<slot>accept()</slot>
212-
<hints>
213-
<hint type="sourcelabel">
214-
<x>368</x>
215-
<y>450</y>
216-
</hint>
217-
<hint type="destinationlabel">
218-
<x>401</x>
219-
<y>377</y>
202+
<x>404</x>
203+
<y>421</y>
220204
</hint>
221205
</hints>
222206
</connection>

0 commit comments

Comments
 (0)