Skip to content

Commit

Permalink
Apply patch from ticket #44
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@5185 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
g_j_m committed Apr 6, 2006
1 parent 5d92175 commit 275887c
Show file tree
Hide file tree
Showing 11 changed files with 114 additions and 114 deletions.
22 changes: 11 additions & 11 deletions src/gui/qgisapp.cpp
Expand Up @@ -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();
Expand All @@ -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();

Expand Down Expand Up @@ -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);

Expand All @@ -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 );
Expand All @@ -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

Expand Down Expand Up @@ -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 *)));
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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();
Expand Down
12 changes: 6 additions & 6 deletions src/plugins/copyright_label/plugin.cpp
Expand Up @@ -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
Expand Down Expand Up @@ -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 *)),
Expand Down
20 changes: 10 additions & 10 deletions src/plugins/delimited_text/qgsdelimitedtextplugin.cpp
Expand Up @@ -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
Expand Down Expand Up @@ -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;
}
Expand Down
8 changes: 4 additions & 4 deletions src/plugins/geoprocessing/qgspggeoprocessing.cpp
Expand Up @@ -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()));

Expand Down
6 changes: 3 additions & 3 deletions src/plugins/georeferencer/plugin.cpp
Expand Up @@ -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
Expand All @@ -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;
}
Expand Down
16 changes: 8 additions & 8 deletions src/plugins/georeferencer/plugingui.cpp
Expand Up @@ -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);
}

Expand All @@ -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;
}

Expand All @@ -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;
}
}
Expand Down

0 comments on commit 275887c

Please sign in to comment.