Skip to content
Permalink
Browse files

Apply patch from ticket #44

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@5185 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
g_j_m
g_j_m committed Apr 6, 2006
1 parent 5d92175 commit 275887c439d40f856adf28e7406c4dcc84714ead
@@ -216,10 +216,10 @@ static void setTitleBarText_( QWidget & qgisApp )
{

setupUi(this);
mSplash->showMessage("Reading settings", Qt::AlignHCenter | Qt::AlignBottom);
mSplash->showMessage(tr("Reading settings"), Qt::AlignHCenter | Qt::AlignBottom);
qApp->processEvents();
readSettings();
mSplash->showMessage("Setting up the GUI", Qt::AlignHCenter | Qt::AlignBottom);
mSplash->showMessage(tr("Setting up the GUI"), Qt::AlignHCenter | Qt::AlignBottom);
qApp->processEvents();
createActions();
createActionGroups();
@@ -234,7 +234,7 @@ static void setTitleBarText_( QWidget & qgisApp )

fileNew(); // prepare empty project

mSplash->showMessage("Checking database", Qt::AlignHCenter | Qt::AlignBottom);
mSplash->showMessage(tr("Checking database"), Qt::AlignHCenter | Qt::AlignBottom);
qApp->processEvents();
createDB();

@@ -271,7 +271,7 @@ static void setTitleBarText_( QWidget & qgisApp )
std::cout << "Plugins and providers are installed in " << plib.toLocal8Bit().data() << std::endl;
#endif
// load any plugins that were running in the last session
mSplash->showMessage("Restoring loaded plugins", Qt::AlignHCenter | Qt::AlignBottom);
mSplash->showMessage(tr("Restoring loaded plugins"), Qt::AlignHCenter | Qt::AlignBottom);
qApp->processEvents();
restoreSessionPlugins(plib);

@@ -291,7 +291,7 @@ static void setTitleBarText_( QWidget & qgisApp )
// Map composer
mComposer = new QgsComposer(this);

mSplash->showMessage("Initializing file filters", Qt::AlignHCenter | Qt::AlignBottom);
mSplash->showMessage(tr("Initializing file filters"), Qt::AlignHCenter | Qt::AlignBottom);
qApp->processEvents();
// now build vector file filter
buildSupportedVectorFileFilter_( mVectorFileFilter );
@@ -316,11 +316,11 @@ static void setTitleBarText_( QWidget & qgisApp )
// Please make sure this is the last thing the ctor does so that we can ensure teh
// widgets are all initialised before trying to restore their state.
//
mSplash->showMessage("Restoring window state", Qt::AlignHCenter | Qt::AlignBottom);
mSplash->showMessage(tr("Restoring window state"), Qt::AlignHCenter | Qt::AlignBottom);
qApp->processEvents();
restoreWindowState();

mSplash->showMessage("QGIS Ready!", Qt::AlignHCenter | Qt::AlignBottom);
mSplash->showMessage(tr("QGIS Ready!"), Qt::AlignHCenter | Qt::AlignBottom);
qApp->processEvents();
} // QgisApp ctor

@@ -670,7 +670,7 @@ void QgisApp::createMenus()
mFileMenu = menuBar()->addMenu(tr("&File"));
mFileMenu->addAction(mActionFileNew);
mFileMenu->addAction(mActionFileOpen);
mRecentProjectsMenu = mFileMenu->addMenu("&Open Recent Projects");
mRecentProjectsMenu = mFileMenu->addMenu(tr("&Open Recent Projects"));
// Connect once for the entire submenu.
connect(mRecentProjectsMenu, SIGNAL(triggered(QAction *)),
this, SLOT(openProject(QAction *)));
@@ -1366,7 +1366,7 @@ static void buildSupportedVectorFileFilter_(QString & fileFilters)

if (!driverRegistrar)
{
QMessageBox::warning(0,"OGR Driver Manager","unable to get OGRDriverManager");
QMessageBox::warning(0,tr("OGR Driver Manager"),tr("unable to get OGRDriverManager"));
return; // XXX good place to throw exception if we
} // XXX decide to do exceptions

@@ -5054,8 +5054,8 @@ void QgisApp::addRasterLayer(QString const & rasterLayerPath,
}
else
{
QMessageBox::critical(this,"Layer is not valid",
"The layer is not a valid layer and can not be added to the map");
QMessageBox::critical(this,tr("Layer is not valid"),
tr("The layer is not a valid layer and can not be added to the map"));
}

qApp->processEvents();
@@ -79,14 +79,14 @@ QgsCopyrightLabelPlugin::~QgsCopyrightLabelPlugin()
*/
void QgsCopyrightLabelPlugin::initGui()
{
QMenu *pluginMenu = qGisInterface->getPluginMenu("&Decorations");
menuId = pluginMenu->insertItem(QIcon(icon),"&CopyrightLabel", this, SLOT(run()));
QMenu *pluginMenu = qGisInterface->getPluginMenu(tr("&Decorations"));
menuId = pluginMenu->insertItem(QIcon(icon),tr("&CopyrightLabel"), this, SLOT(run()));

pluginMenu->setWhatsThis(menuId, "Creates a copyright label that is displayed on the map canvas.");
pluginMenu->setWhatsThis(menuId, tr("Creates a copyright label that is displayed on the map canvas."));

// Create the action for tool
myQActionPointer = new QAction(QIcon(icon), "Copyright Label", this);
myQActionPointer->setWhatsThis("Creates a copyright label that is displayed on the map canvas.");
myQActionPointer = new QAction(QIcon(icon), tr("Copyright Label"), this);
myQActionPointer->setWhatsThis(tr("Creates a copyright label that is displayed on the map canvas."));
// Connect the action to the run
connect(myQActionPointer, SIGNAL(activated()), this, SLOT(run()));
// This calls the renderer everytime the cnavas has drawn itself
@@ -204,7 +204,7 @@ void QgsCopyrightLabelPlugin::renderLabel(QPainter * theQPainter)
void QgsCopyrightLabelPlugin::unload()
{
// remove the GUI
qGisInterface->removePluginMenuItem("&Decorations",menuId);
qGisInterface->removePluginMenuItem(tr("&Decorations"),menuId);
qGisInterface->removeToolBarIcon(myQActionPointer);
// remove the copyright from the canvas
disconnect(qGisInterface->getMapCanvas(), SIGNAL(renderComplete(QPainter *)),
@@ -101,19 +101,19 @@ void QgsDelimitedTextPlugin::help()
*/
void QgsDelimitedTextPlugin::initGui()
{
QMenu *pluginMenu = qGisInterface->getPluginMenu("&Delimited text");
menuId = pluginMenu->insertItem(QIcon(icon),"&Add Delimited Text Layer", this, SLOT(run()));
QMenu *pluginMenu = qGisInterface->getPluginMenu(tr("&Delimited text"));
menuId = pluginMenu->insertItem(QIcon(icon),tr("&Add Delimited Text Layer"), this, SLOT(run()));

pluginMenu->setWhatsThis(menuId, "Add a delimited text file as a map layer. "
"The file must have a header row containing the field names. "
"X and Y fields are required and must contain coordinates in decimal units.");
pluginMenu->setWhatsThis(menuId, tr("Add a delimited text file as a map layer. ")+
tr("The file must have a header row containing the field names. ")+
tr("X and Y fields are required and must contain coordinates in decimal units."));

// Create the action for tool
myQActionPointer = new QAction(QIcon(icon), "Add Delimited Text Layer", this);
myQActionPointer = new QAction(QIcon(icon), tr("Add Delimited Text Layer"), this);

myQActionPointer->setWhatsThis("Add a delimited text file as a map layer. "
"The file must have a header row containing the field names. "
"X and Y fields are required and must contain coordinates in decimal units.");
myQActionPointer->setWhatsThis(tr("Add a delimited text file as a map layer. ")+
tr("The file must have a header row containing the field names. ")+
tr("X and Y fields are required and must contain coordinates in decimal units."));
// Connect the action to the run
connect(myQActionPointer, SIGNAL(activated()), this, SLOT(run()));
// Add the icon to the toolbar
@@ -154,7 +154,7 @@ void QgsDelimitedTextPlugin::drawVectorLayer(QString thePathNameQString,
void QgsDelimitedTextPlugin::unload()
{
// remove the GUI
qGisInterface->removePluginMenuItem("&Delimited text",menuId);
qGisInterface->removePluginMenuItem(tr("&Delimited text"),menuId);
qGisInterface->removeToolBarIcon(myQActionPointer);
delete myQActionPointer;
}
@@ -75,13 +75,13 @@ void QgsPgGeoprocessing::initGui()
QMenu *pluginMenu = qI->getPluginMenu(tr("&Geoprocessing"));
menuId = pluginMenu->insertItem(QIcon(icon_buffer),tr("&Buffer Features"), this, SLOT(buffer()));

pluginMenu->setWhatsThis(menuId, tr("Create a buffer for a PostgreSQL layer. "
"A new layer is created in the database with the buffered features."));
pluginMenu->setWhatsThis(menuId, tr("Create a buffer for a PostgreSQL layer. " +
tr("A new layer is created in the database with the buffered features.")));

// Create the action for tool
bufferAction = new QAction(QIcon(icon_buffer), tr("Buffer features"), this);
bufferAction->setWhatsThis(tr("Create a buffer for a PostgreSQL layer. "
"A new layer is created in the database with the buffered features."));
bufferAction->setWhatsThis(tr("Create a buffer for a PostgreSQL layer. " +
tr("A new layer is created in the database with the buffered features.")));
// Connect the action to the buffer slot
connect(bufferAction, SIGNAL(activated()), this, SLOT(buffer()));

@@ -108,13 +108,13 @@ QgsGeorefPlugin::~QgsGeorefPlugin()
void QgsGeorefPlugin::initGui()
{
// Create the action for tool
mQActionPointer = new QAction(QIcon(":/icon.png"), "&Georeferencer", this);
mQActionPointer = new QAction(QIcon(":/icon.png"), tr("&Georeferencer"), this);

// Connect the action to the run
connect(mQActionPointer, SIGNAL(activated()), this, SLOT(run()));

// add to the plugin menu
QMenu *pluginMenu = mQGisIface->getPluginMenu("&Georeferencer");
QMenu *pluginMenu = mQGisIface->getPluginMenu(tr("&Georeferencer"));
pluginMenu->addAction(mQActionPointer);

// Add to the toolbar
@@ -139,7 +139,7 @@ void QgsGeorefPlugin::unload()
{
// TODO: make it work in Qt4 way
// remove the GUI
mQGisIface->removePluginMenuItem("&Georeferencer",mMenuId);
mQGisIface->removePluginMenuItem(tr("&Georeferencer"),mMenuId);
mQGisIface->removeToolBarIcon(mQActionPointer);
delete mQActionPointer;
}
@@ -56,9 +56,9 @@ void QgsGeorefPluginGui::on_pbnSelectRaster_clicked() {
dir = ".";
QString filename =
QFileDialog::getOpenFileName(this,
"Choose a raster file",
tr("Choose a raster file"),
dir,
"Raster files (*.*)");
tr("Raster files (*.*)"));
leSelectRaster->setText(filename);
}

@@ -67,8 +67,8 @@ void QgsGeorefPluginGui::on_pbnEnterWorldCoords_clicked() {

// do we think that this is a valid raster?
if (!QgsRasterLayer::isValidRasterFileName(leSelectRaster->text())) {
QMessageBox::critical(this, "Error",
"The selected file is not a valid raster file.");
QMessageBox::critical(this, tr("Error"),
tr("The selected file is not a valid raster file."));
return;
}

@@ -94,10 +94,10 @@ void QgsGeorefPluginGui::on_pbnEnterWorldCoords_clicked() {
// check if there already is a world file
if (!worldfile.isEmpty()) {
if (QFile::exists(worldfile)) {
QMessageBox::critical(this, "Error",
"The selected file already seems to have a "
"world file! If you want to replace it with a "
"new world file, remove the old one first.");
QMessageBox::critical(this, tr("Error"),
tr("The selected file already seems to have a ")+
tr("world file! If you want to replace it with a ")+
tr("new world file, remove the old one first."));
return;
}
}

0 comments on commit 275887c

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