mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-12 00:06:43 -04:00
make update_ts_files.sh less noisy and a bit more failsafe and fix a bunch or lupdate warnings
git-svn-id: http://svn.osgeo.org/qgis/trunk@13370 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
a91a01b182
commit
4e637e8124
@ -46,10 +46,10 @@ sub parse {
|
||||
|
||||
open I, "find src/plugins/grass -name '*.qgm' -o -name '*.qgc'|";
|
||||
while($file = <I>) {
|
||||
print STDERR "$file\n";
|
||||
#print STDERR "$file\n";
|
||||
chop $file;
|
||||
parse XMLin($file, ForceArray=>1);
|
||||
print STDERR "$file DONE\n";
|
||||
#print STDERR "$file DONE\n";
|
||||
}
|
||||
close I;
|
||||
|
||||
|
@ -5,16 +5,50 @@
|
||||
# 3. remove the .pro
|
||||
# Note the .pro file must NOT be named qgis.pro as this
|
||||
# name is reserved for the Windows qmake project file
|
||||
# update_ts_files.sh,v 1.3 2004/07/14 18:16:24 gsherman Exp
|
||||
# $Id$
|
||||
|
||||
set -e
|
||||
|
||||
cleanup() {
|
||||
if [ -f i18n/qt_ts.tar ]; then
|
||||
echo Restoring Qt translations
|
||||
tar -xf i18n/qt_ts.tar
|
||||
fi
|
||||
if [ -f i18n/qgis_ts.tar ]; then
|
||||
echo Restoring excluded translations
|
||||
tar -xf i18n/qgis_ts.tar
|
||||
fi
|
||||
|
||||
echo Removing temporary files
|
||||
perl -i.bak -ne 'print unless /^\s+<location.*python-i18n\.cpp.*$/;' i18n/qgis_*.ts
|
||||
for i in \
|
||||
python/python-i18n.{ts,cpp} \
|
||||
python/plugins/*/python-i18n.{ts,cpp} \
|
||||
i18n/qgis_*.ts.bak \
|
||||
src/plugins/grass/grasslabels-i18n.cpp \
|
||||
i18n/qt_ts.tar \
|
||||
i18n/qgis_ts.tar \
|
||||
qgis_ts.pro
|
||||
do
|
||||
[ -f "$i" ] && rm "$i"
|
||||
done
|
||||
|
||||
for i in \
|
||||
src/plugins/plugin_template/plugingui.cpp \
|
||||
src/plugins/plugin_template/plugin.cpp
|
||||
do
|
||||
[ -f "$i.save" ] && mv "$i.save" "$i"
|
||||
done
|
||||
}
|
||||
|
||||
trap cleanup EXIT
|
||||
|
||||
PATH=$QTDIR/bin:$PATH
|
||||
|
||||
#first tar the qt_xx.ts files in i18n folder such that lupdate does not
|
||||
#merge the qgis strings to them
|
||||
echo Creating qt_ts.tar
|
||||
tar --remove-files -cvf i18n/qt_ts.tar i18n/qt_*.ts
|
||||
echo Saving Qt translations
|
||||
tar --remove-files -cf i18n/qt_ts.tar i18n/qt_*.ts
|
||||
exclude=
|
||||
opts=
|
||||
for i in "$@"; do
|
||||
@ -25,7 +59,8 @@ for i in "$@"; do
|
||||
fi
|
||||
done
|
||||
if [ -n "$exclude" ]; then
|
||||
tar --remove-files -cvf i18n/qgis_ts.tar i18n/qgis_*.ts$exclude
|
||||
echo Saving excluded translations
|
||||
tar --remove-files -cf i18n/qgis_ts.tar i18n/qgis_*.ts$exclude
|
||||
fi
|
||||
echo Updating python translations
|
||||
cd python
|
||||
@ -40,21 +75,16 @@ for i in python/plugins/*/CMakeLists.txt; do
|
||||
rm python-i18n.ts
|
||||
cd ../../..
|
||||
done
|
||||
echo Updating GRASS module translations
|
||||
perl scripts/qgm2cpp.pl >src/plugins/grass/grasslabels-i18n.cpp
|
||||
mv src/plugins/plugin_template/plugingui.cpp src/plugins/plugin_template/plugingui.cpp.save
|
||||
echo Creating qmake project file
|
||||
for i in \
|
||||
src/plugins/plugin_template/plugingui.cpp \
|
||||
src/plugins/plugin_template/plugin.cpp
|
||||
do
|
||||
[ -f "$i" ] && mv "$i" "$i.save"
|
||||
done
|
||||
qmake -project -o qgis_ts.pro -nopwd src python i18n
|
||||
echo Updating translation files
|
||||
echo Updating translations
|
||||
lupdate$opts -verbose qgis_ts.pro
|
||||
echo Removing temporary python translation files
|
||||
perl -i.bak -ne 'print unless /^\s+<location.*python-i18n\.cpp.*$/;' i18n/qgis_*.ts
|
||||
rm python/python-i18n.cpp python/plugins/*/python-i18n.cpp i18n/qgis_*.ts.bak src/plugins/grass/grasslabels-i18n.cpp
|
||||
echo Removing qmake project file
|
||||
rm qgis_ts.pro
|
||||
echo Unpacking qt_ts.tar
|
||||
tar -xvf i18n/qt_ts.tar
|
||||
rm i18n/qt_ts.tar
|
||||
if [ -f i18n/qgis_ts.tar ]; then
|
||||
echo Unpacking i18n/qgis_ts.tar
|
||||
tar -xvf i18n/qgis_ts.tar
|
||||
rm i18n/qgis_ts.tar
|
||||
fi
|
||||
|
@ -131,6 +131,7 @@ SET (QGIS_APP_MOC_HDRS
|
||||
qgisappinterface.h
|
||||
qgsabout.h
|
||||
qgsaddattrdialog.h
|
||||
qgsdisplayangle.h
|
||||
qgsannotationwidget.h
|
||||
qgsattributeactiondialog.h
|
||||
qgsattributedialog.h
|
||||
@ -160,6 +161,8 @@ SET (QGIS_APP_MOC_HDRS
|
||||
qgsmaptooladdring.h
|
||||
qgsmaptoolmovefeature.h
|
||||
qgsmaptoolnodetool.h
|
||||
qgsmaptoolreshape.h
|
||||
qgsmaptoolrotatepointsymbols.h
|
||||
qgsmaptoolselect.h
|
||||
qgsmaptooladdvertex.h
|
||||
qgsmaptooldeletering.h
|
||||
|
@ -28,6 +28,8 @@ class QMenu;
|
||||
|
||||
class QgsAttributeTableView: public QTableView
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
QgsAttributeTableView( QWidget* parent = NULL );
|
||||
virtual ~QgsAttributeTableView();
|
||||
|
@ -211,7 +211,6 @@ void QgsComposerManager::show_clicked()
|
||||
raise();
|
||||
activateWindow();
|
||||
}
|
||||
}
|
||||
#endif //0
|
||||
}
|
||||
|
||||
|
@ -21,6 +21,8 @@
|
||||
/**A class that displays results of angle measurements with the proper unit*/
|
||||
class QgsDisplayAngle: public QDialog, private Ui::QgsDisplayAngleBase
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
QgsDisplayAngle( QWidget * parent = 0, Qt::WindowFlags f = 0 );
|
||||
~QgsDisplayAngle();
|
||||
|
@ -22,6 +22,8 @@
|
||||
/**A map tool that draws a line and splits the features cut by the line*/
|
||||
class QgsMapToolReshape: public QgsMapToolCapture
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
QgsMapToolReshape( QgsMapCanvas* canvas );
|
||||
virtual ~QgsMapToolReshape();
|
||||
|
@ -24,6 +24,8 @@ class QgsPointRotationItem;
|
||||
/**A class that allows to interactively manipulate the value of the rotation field(s) for point layers*/
|
||||
class QgsMapToolRotatePointSymbols: public QgsMapToolEdit
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
QgsMapToolRotatePointSymbols( QgsMapCanvas* canvas );
|
||||
~QgsMapToolRotatePointSymbols();
|
||||
|
@ -71,6 +71,7 @@ symbology-ng/qgsvectorgradientcolorrampv2dialog.h
|
||||
symbology-ng/qgsvectorrandomcolorrampv2dialog.h
|
||||
symbology-ng/qgsvectorcolorbrewercolorrampv2dialog.h
|
||||
symbology-ng/characterwidget.h
|
||||
symbology-ng/qgspenstylecombobox.h
|
||||
|
||||
qgsattributeeditor.h
|
||||
qgscomposerview.h
|
||||
|
@ -20,7 +20,6 @@
|
||||
|
||||
#include <ui_qgscredentialdialog.h>
|
||||
#include <qgisgui.h>
|
||||
#include "qgscredentialdialog.h"
|
||||
#include "qgscredentials.h"
|
||||
|
||||
#include <QString>
|
||||
|
@ -6,6 +6,8 @@
|
||||
|
||||
class GUI_EXPORT QgsPenStyleComboBox : public QComboBox
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
QgsPenStyleComboBox( QWidget* parent = NULL );
|
||||
|
||||
@ -20,6 +22,8 @@ class GUI_EXPORT QgsPenStyleComboBox : public QComboBox
|
||||
|
||||
class GUI_EXPORT QgsPenJoinStyleComboBox : public QComboBox
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
QgsPenJoinStyleComboBox( QWidget* parent = NULL );
|
||||
|
||||
@ -30,6 +34,8 @@ class GUI_EXPORT QgsPenJoinStyleComboBox : public QComboBox
|
||||
|
||||
class GUI_EXPORT QgsPenCapStyleComboBox : public QComboBox
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
QgsPenCapStyleComboBox( QWidget* parent = NULL );
|
||||
|
||||
|
@ -28,8 +28,6 @@
|
||||
#ifndef EVISDATABASECONNECTION_H
|
||||
#define EVISDATABASECONNECTION_H
|
||||
|
||||
#include "evisquerydefinition.h"
|
||||
|
||||
#include <QStringList>
|
||||
#include <QtSql/QSqlDatabase>
|
||||
#include <QtSql/QSqlQuery>
|
||||
|
@ -43,6 +43,7 @@
|
||||
#include <QMessageBox>
|
||||
#include <QSettings>
|
||||
#include <QToolBar>
|
||||
#include <QDebug>
|
||||
|
||||
extern "C"
|
||||
{
|
||||
@ -116,7 +117,6 @@ QWidget *QgsGrassEditAttributeTableItemDelegate::createEditor( QWidget *parent,
|
||||
return editor;
|
||||
}
|
||||
|
||||
#include<QDebug>
|
||||
void QgsGrassEditAttributeTableItemDelegate::setEditorData( QWidget *editor,
|
||||
const QModelIndex &index ) const
|
||||
{
|
||||
@ -894,8 +894,8 @@ int QgsGrassEdit::lineSymbFromMap( int line )
|
||||
|
||||
/* Count areas on both sides */
|
||||
nareas = 0;
|
||||
if ( left > 0 || (left < 0 && mProvider->isleArea(-left) > 0 ) ) nareas++;
|
||||
if ( right > 0 || (right < 0 && mProvider->isleArea(-right) > 0 ) ) nareas++;
|
||||
if ( left > 0 || ( left < 0 && mProvider->isleArea( -left ) > 0 ) ) nareas++;
|
||||
if ( right > 0 || ( right < 0 && mProvider->isleArea( -right ) > 0 ) ) nareas++;
|
||||
if ( nareas == 0 ) return SYMB_BOUNDARY_0;
|
||||
else if ( nareas == 1 ) return SYMB_BOUNDARY_1;
|
||||
else return SYMB_BOUNDARY_2;
|
||||
|
@ -24,8 +24,8 @@ INCLUDE_DIRECTORIES (
|
||||
${GEOS_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
|
||||
ADD_LIBRARY (qgisgrass SHARED ${GRASS_LIB_SRCS})
|
||||
QT4_WRAP_CPP(GRASS_MOC_SRCS qgsgrassprovider.h)
|
||||
ADD_LIBRARY (qgisgrass SHARED ${GRASS_LIB_SRCS} ${GRASS_MOC_SRCS})
|
||||
|
||||
SET_TARGET_PROPERTIES(qgisgrass PROPERTIES VERSION ${COMPLETE_VERSION} SOVERSION ${COMPLETE_VERSION})
|
||||
|
||||
|
@ -110,6 +110,8 @@ struct GMAP
|
||||
*/
|
||||
class GRASS_EXPORT QgsGrassProvider : public QgsVectorDataProvider
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
|
||||
QgsGrassProvider( QString uri = QString() );
|
||||
@ -282,7 +284,7 @@ class GRASS_EXPORT QgsGrassProvider : public QgsVectorDataProvider
|
||||
|
||||
/** Get isle area
|
||||
* @param isle number
|
||||
* @return area number
|
||||
* @return area number
|
||||
*/
|
||||
int isleArea( int isle );
|
||||
|
||||
|
@ -7,7 +7,8 @@ INCLUDE_DIRECTORIES(
|
||||
${GEOS_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
ADD_LIBRARY(memoryprovider MODULE ${MEMORY_SRCS})
|
||||
QT4_WRAP_CPP(MEMORY_MOC_SRCS qgsmemoryprovider.h)
|
||||
ADD_LIBRARY(memoryprovider MODULE ${MEMORY_SRCS} ${MEMORY_MOC_SRCS})
|
||||
|
||||
TARGET_LINK_LIBRARIES(memoryprovider
|
||||
qgis_core
|
||||
|
@ -22,6 +22,8 @@ class QgsSpatialIndex;
|
||||
|
||||
class QgsMemoryProvider : public QgsVectorDataProvider
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
QgsMemoryProvider( QString uri = QString() );
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user