Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Trying to make Providers labels translatable
in DB Manager tree
  • Loading branch information
DelazJ committed May 1, 2018
1 parent f1aaa14 commit 394aaba
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
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 394aaba

Please sign in to comment.