Skip to content

Commit

Permalink
Merge pull request #6908 from DelazJ/DBManagerTranslator
Browse files Browse the repository at this point in the history
Trying to make more translatable strings in DB Manager
  • Loading branch information
m-kuhn committed May 3, 2018
2 parents ddd12e2 + e2da696 commit b0d5506
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions python/plugins/db_manager/db_manager.py
Expand Up @@ -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)
Expand All @@ -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)

Expand Down
4 changes: 2 additions & 2 deletions python/plugins/db_manager/db_plugins/gpkg/plugin.py
Expand Up @@ -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
Expand Down Expand Up @@ -53,7 +53,7 @@ def typeName(self):

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

@classmethod
def providerName(self):
Expand Down
4 changes: 2 additions & 2 deletions python/plugins/db_manager/db_plugins/oracle/plugin.py
Expand Up @@ -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

Expand Down Expand Up @@ -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):
Expand Down
4 changes: 2 additions & 2 deletions python/plugins/db_manager/db_plugins/postgis/plugin.py
Expand Up @@ -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
Expand Down Expand Up @@ -56,7 +56,7 @@ def typeName(self):

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

@classmethod
def providerName(self):
Expand Down
4 changes: 2 additions & 2 deletions python/plugins/db_manager/db_plugins/spatialite/plugin.py
Expand Up @@ -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
Expand Down Expand Up @@ -52,7 +52,7 @@ def typeName(self):

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

@classmethod
def providerName(self):
Expand Down
6 changes: 3 additions & 3 deletions python/plugins/db_manager/db_plugins/vlayers/plugin.py
Expand Up @@ -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

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

0 comments on commit b0d5506

Please sign in to comment.