Skip to content
Permalink
Browse files

Merge pull request #6908 from DelazJ/DBManagerTranslator

Trying to make more translatable strings in DB Manager
  • Loading branch information
m-kuhn committed May 3, 2018
2 parents ddd12e2 + e2da696 commit b0d550628b550bf9dc68aa07fff38f5b797a2cd5
@@ -393,7 +393,7 @@ def setupUi(self):
self.layout.addWidget(self.infoBar, 0, 0, 1, 1)

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

# create toolbar
self.toolBar = QToolBar("Default", self)
self.toolBar = QToolBar(self.tr("Default"), self)
self.toolBar.setObjectName("DB_Manager_ToolBar")
self.addToolBar(self.toolBar)

@@ -24,7 +24,7 @@
# this will disable the dbplugin if the connector raise an ImportError
from .connector import GPKGDBConnector

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

@classmethod
def typeNameString(self):
return 'GeoPackage'
return QCoreApplication.translate('db_manager', 'GeoPackage')

@classmethod
def providerName(self):
@@ -28,7 +28,7 @@
# this will disable the dbplugin if the connector raise an ImportError
from .connector import OracleDBConnector

from qgis.PyQt.QtCore import Qt
from qgis.PyQt.QtCore import Qt, QCoreApplication
from qgis.PyQt.QtGui import QIcon, QKeySequence
from qgis.PyQt.QtWidgets import QAction, QApplication, QMessageBox

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

@classmethod
def typeNameString(self):
return 'Oracle Spatial'
return QCoreApplication.translate('db_manager', 'Oracle Spatial')

@classmethod
def providerName(self):
@@ -26,7 +26,7 @@
# this will disable the dbplugin if the connector raise an ImportError
from .connector import PostGisDBConnector

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

@classmethod
def typeNameString(self):
return 'PostGIS'
return QCoreApplication.translate('db_manager', 'PostGIS')

@classmethod
def providerName(self):
@@ -24,7 +24,7 @@
# this will disable the dbplugin if the connector raise an ImportError
from .connector import SpatiaLiteDBConnector

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

@classmethod
def typeNameString(self):
return 'SpatiaLite'
return QCoreApplication.translate('db_manager', 'SpatiaLite')

@classmethod
def providerName(self):
@@ -23,7 +23,7 @@
from .connector import VLayerConnector

from qgis.PyQt.QtGui import QIcon
from qgis.core import QgsVectorLayer, QgsProject, QgsVirtualLayerDefinition
from qgis.core import QgsVectorLayer, QgsProject, QgsVirtualLayerDefinition, QCoreApplication

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

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

@classmethod
def typeNameString(self):
return 'Virtual Layers'
return QCoreApplication.translate('db_manager', 'Virtual Layers')

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

@classmethod
def connections(self):
return [VLayerDBPlugin('QGIS layers')]
return [VLayerDBPlugin(QCoreApplication.translate('db_manager', 'QGIS layers'))]

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

0 comments on commit b0d5506

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