Skip to content

Commit b0d5506

Browse files
authoredMay 3, 2018
Merge pull request #6908 from DelazJ/DBManagerTranslator
Trying to make more translatable strings in DB Manager
2 parents ddd12e2 + e2da696 commit b0d5506

File tree

6 files changed

+13
-13
lines changed

6 files changed

+13
-13
lines changed
 

‎python/plugins/db_manager/db_manager.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ def setupUi(self):
393393
self.layout.addWidget(self.infoBar, 0, 0, 1, 1)
394394

395395
# create database tree
396-
self.dock = QDockWidget("Tree", self)
396+
self.dock = QDockWidget(self.tr("Tree"), self)
397397
self.dock.setObjectName("DB_Manager_DBView")
398398
self.dock.setFeatures(QDockWidget.DockWidgetMovable)
399399
self.tree = DBTree(self)
@@ -418,7 +418,7 @@ def setupUi(self):
418418
self.setMenuBar(self.menuBar)
419419

420420
# create toolbar
421-
self.toolBar = QToolBar("Default", self)
421+
self.toolBar = QToolBar(self.tr("Default"), self)
422422
self.toolBar.setObjectName("DB_Manager_ToolBar")
423423
self.addToolBar(self.toolBar)
424424

‎python/plugins/db_manager/db_plugins/gpkg/plugin.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
# this will disable the dbplugin if the connector raise an ImportError
2525
from .connector import GPKGDBConnector
2626

27-
from qgis.PyQt.QtCore import Qt, QFileInfo
27+
from qgis.PyQt.QtCore import Qt, QFileInfo, QCoreApplication
2828
from qgis.PyQt.QtGui import QIcon
2929
from qgis.PyQt.QtWidgets import QApplication, QAction, QFileDialog
3030
from qgis.core import Qgis, QgsDataSourceUri, QgsSettings
@@ -53,7 +53,7 @@ def typeName(self):
5353

5454
@classmethod
5555
def typeNameString(self):
56-
return 'GeoPackage'
56+
return QCoreApplication.translate('db_manager', 'GeoPackage')
5757

5858
@classmethod
5959
def providerName(self):

‎python/plugins/db_manager/db_plugins/oracle/plugin.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
# this will disable the dbplugin if the connector raise an ImportError
2929
from .connector import OracleDBConnector
3030

31-
from qgis.PyQt.QtCore import Qt
31+
from qgis.PyQt.QtCore import Qt, QCoreApplication
3232
from qgis.PyQt.QtGui import QIcon, QKeySequence
3333
from qgis.PyQt.QtWidgets import QAction, QApplication, QMessageBox
3434

@@ -59,7 +59,7 @@ def typeName(self):
5959

6060
@classmethod
6161
def typeNameString(self):
62-
return 'Oracle Spatial'
62+
return QCoreApplication.translate('db_manager', 'Oracle Spatial')
6363

6464
@classmethod
6565
def providerName(self):

‎python/plugins/db_manager/db_plugins/postgis/plugin.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
# this will disable the dbplugin if the connector raise an ImportError
2727
from .connector import PostGisDBConnector
2828

29-
from qgis.PyQt.QtCore import Qt, QRegExp
29+
from qgis.PyQt.QtCore import Qt, QRegExp, QCoreApplication
3030
from qgis.PyQt.QtGui import QIcon
3131
from qgis.PyQt.QtWidgets import QAction, QApplication, QMessageBox
3232
from qgis.core import Qgis, QgsSettings
@@ -56,7 +56,7 @@ def typeName(self):
5656

5757
@classmethod
5858
def typeNameString(self):
59-
return 'PostGIS'
59+
return QCoreApplication.translate('db_manager', 'PostGIS')
6060

6161
@classmethod
6262
def providerName(self):

‎python/plugins/db_manager/db_plugins/spatialite/plugin.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
# this will disable the dbplugin if the connector raise an ImportError
2525
from .connector import SpatiaLiteDBConnector
2626

27-
from qgis.PyQt.QtCore import Qt, QFileInfo
27+
from qgis.PyQt.QtCore import Qt, QFileInfo, QCoreApplication
2828
from qgis.PyQt.QtGui import QIcon
2929
from qgis.PyQt.QtWidgets import QApplication, QAction, QFileDialog
3030
from qgis.core import Qgis, QgsDataSourceUri, QgsSettings
@@ -52,7 +52,7 @@ def typeName(self):
5252

5353
@classmethod
5454
def typeNameString(self):
55-
return 'SpatiaLite'
55+
return QCoreApplication.translate('db_manager', 'SpatiaLite')
5656

5757
@classmethod
5858
def providerName(self):

‎python/plugins/db_manager/db_plugins/vlayers/plugin.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
from .connector import VLayerConnector
2424

2525
from qgis.PyQt.QtGui import QIcon
26-
from qgis.core import QgsVectorLayer, QgsProject, QgsVirtualLayerDefinition
26+
from qgis.core import QgsVectorLayer, QgsProject, QgsVirtualLayerDefinition, QCoreApplication
2727

2828
from ..plugin import DBPlugin, Database, Table, VectorTable, TableField
2929

@@ -46,7 +46,7 @@ def typeName(self):
4646

4747
@classmethod
4848
def typeNameString(self):
49-
return 'Virtual Layers'
49+
return QCoreApplication.translate('db_manager', 'Virtual Layers')
5050

5151
@classmethod
5252
def providerName(self):
@@ -58,7 +58,7 @@ def connectionSettingsKey(self):
5858

5959
@classmethod
6060
def connections(self):
61-
return [VLayerDBPlugin('QGIS layers')]
61+
return [VLayerDBPlugin(QCoreApplication.translate('db_manager', 'QGIS layers'))]
6262

6363
def databasesFactory(self, connection, uri):
6464
return FakeDatabase(connection, uri)

0 commit comments

Comments
 (0)
Please sign in to comment.