diff --git a/src/FileExtensionManager.ui b/src/FileExtensionManager.ui
index 681e8a25..691d5b5f 100644
--- a/src/FileExtensionManager.ui
+++ b/src/FileExtensionManager.ui
@@ -11,7 +11,7 @@
- Dialog
+ File Extension Manager
-
diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp
index 1601ac2b..79a65e5d 100644
--- a/src/MainWindow.cpp
+++ b/src/MainWindow.cpp
@@ -886,16 +886,36 @@ void MainWindow::deleteObject()
ui->dbTreeWidget->model()->data(ui->dbTreeWidget->currentIndex().sibling(ui->dbTreeWidget->currentIndex().row(), DbStructureModel::ColumnName), Qt::EditRole).toString());
QString type = ui->dbTreeWidget->model()->data(ui->dbTreeWidget->currentIndex().sibling(ui->dbTreeWidget->currentIndex().row(), DbStructureModel::ColumnObjectType), Qt::EditRole).toString();
+ // Due to different grammar in languages (e.g. gender or declension), each message must be given separately to translation.
+ QString message;
+ if (type == "table")
+ message = tr("Are you sure you want to delete the table '%1'?\nAll data associated with the table will be lost.");
+ else if (type == "view")
+ message = tr("Are you sure you want to delete the view '%1'?");
+ else if (type == "trigger")
+ message = tr("Are you sure you want to delete the trigger '%1'?");
+ else if (type == "index")
+ message = tr("Are you sure you want to delete the index '%1'?");
+
// Ask user if he really wants to delete that table
- if(QMessageBox::warning(this, QApplication::applicationName(), tr("Are you sure you want to delete the %1 '%2'?\nAll data associated with the %1 will be lost.").arg(type).arg(name.name()),
+ if(QMessageBox::warning(this, QApplication::applicationName(), message.arg(name.name()),
QMessageBox::Yes | QMessageBox::No, QMessageBox::No) == QMessageBox::Yes)
{
// Delete the table
QString statement = QString("DROP %1 %2;").arg(type.toUpper()).arg(name.toString());
if(!db.executeSQL(statement))
{
- QString error = tr("Error: could not delete the %1. Message from database engine:\n%2").arg(type).arg(db.lastError());
- QMessageBox::warning(this, QApplication::applicationName(), error);
+ if (type == "table")
+ message = tr("Error: could not delete the table.");
+ else if (type == "view")
+ message = tr("Error: could not delete the view.");
+ else if (type == "trigger")
+ message = tr("Error: could not delete the trigger.");
+ else if (type == "index")
+ message = tr("Error: could not delete the index.");
+
+ QString error = tr("Message from database engine:\n%1").arg(db.lastError());
+ QMessageBox::warning(this, QApplication::applicationName(), message + " " + error);
} else {
populateTable();
changeTreeSelection();
diff --git a/src/MainWindow.ui b/src/MainWindow.ui
index bb9976ef..cf84d153 100644
--- a/src/MainWindow.ui
+++ b/src/MainWindow.ui
@@ -1803,7 +1803,7 @@ You can drag SQL statements from the Schema column and drop them into the SQL ed
Save SQL file
- This button opens a saves the content of the current SQL editor tab to a file
+ This button saves the content of the current SQL editor tab to a file