Skip to content

Commit 3da32c0

Browse files
committed
do not translate geometry types, change dbmanager translation context names (fix #6837)
1 parent 7a62127 commit 3da32c0

18 files changed

+182
-141
lines changed

python/plugins/db_manager/dlg_add_geometry_column.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@
2929
from .dlg_db_error import DlgDbError
3030
from .db_plugins.plugin import TableField
3131

32-
from .ui.ui_DlgAddGeometryColumn import Ui_DlgAddGeometryColumn
32+
from .ui.ui_DlgAddGeometryColumn import Ui_DbManagerDlgAddGeometryColumn as Ui_Dialog
3333

34-
class DlgAddGeometryColumn(QDialog, Ui_DlgAddGeometryColumn):
34+
class DlgAddGeometryColumn(QDialog, Ui_Dialog):
3535

3636
GEOM_TYPES = ["POINT", "LINESTRING", "POLYGON", "MULTIPOINT", "MULTILINESTRING", "MULTIPOLYGON", "GEOMETRYCOLLECTION"]
3737

python/plugins/db_manager/dlg_create_constraint.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,9 @@
2929
from .dlg_db_error import DlgDbError
3030
from .db_plugins.plugin import TableConstraint
3131

32-
from .ui.ui_DlgCreateConstraint import Ui_DlgCreateConstraint
33-
34-
class DlgCreateConstraint(QDialog, Ui_DlgCreateConstraint):
32+
from .ui.ui_DlgCreateConstraint import Ui_DbManagerDlgCreateConstraint as Ui_Dialog
3533

34+
class DlgCreateConstraint(QDialog, Ui_Dialog):
3635
def __init__(self, parent=None, table=None, db=None):
3736
QDialog.__init__(self, parent)
3837
self.table = table

python/plugins/db_manager/dlg_create_index.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,9 @@
2929
from .dlg_db_error import DlgDbError
3030
from .db_plugins.plugin import TableIndex
3131

32-
from .ui.ui_DlgCreateIndex import Ui_DlgCreateIndex
33-
34-
35-
class DlgCreateIndex(QDialog, Ui_DlgCreateIndex):
32+
from .ui.ui_DlgCreateIndex import Ui_DbManagerDlgCreateIndex as Ui_Dialog
3633

34+
class DlgCreateIndex(QDialog, Ui_Dialog):
3735
def __init__(self, parent=None, table=None, db=None):
3836
QDialog.__init__(self, parent)
3937
self.table = table

python/plugins/db_manager/dlg_create_table.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
from .db_plugins.plugin import DbError, ConnectionError
3030
from .dlg_db_error import DlgDbError
3131

32-
from .ui.ui_DlgCreateTable import Ui_DlgCreateTable
32+
from .ui.ui_DlgCreateTable import Ui_DbManagerDlgCreateTable as Ui_Dialog
3333

3434

3535
class TableFieldsDelegate(QItemDelegate):
@@ -79,8 +79,7 @@ def setModelData(self, editor, model, index):
7979
self.emit(SIGNAL("columnNameChanged()"))
8080

8181

82-
class DlgCreateTable(QDialog, Ui_DlgCreateTable):
83-
82+
class DlgCreateTable(QDialog, Ui_Dialog):
8483
GEOM_TYPES = ["POINT", "LINESTRING", "POLYGON", "MULTIPOINT", "MULTILINESTRING", "MULTIPOLYGON", "GEOMETRYCOLLECTION"]
8584

8685
def __init__(self, item, parent=None):

python/plugins/db_manager/dlg_db_error.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@
2525
from PyQt4.QtCore import *
2626
from PyQt4.QtGui import *
2727

28-
from .ui.ui_DlgDbError import Ui_DlgDbError
28+
from .ui.ui_DlgDbError import Ui_DbManagerDlgDbError as Ui_Dialog
2929
from .db_plugins.plugin import DbError
3030

31-
class DlgDbError(QDialog, Ui_DlgDbError):
31+
class DlgDbError(QDialog, Ui_Dialog):
3232
def __init__(self, e, parent=None):
3333
QDialog.__init__(self, parent)
3434
self.setupUi(self)

python/plugins/db_manager/dlg_export_vector.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@
2828
import qgis.core
2929
from qgis.utils import iface
3030

31-
from .ui.ui_DlgExportVector import Ui_DlgExportVector
31+
from .ui.ui_DlgExportVector import Ui_DbManagerDlgExportVector as Ui_Dialog
3232

33-
class DlgExportVector(QDialog, Ui_DlgExportVector):
33+
class DlgExportVector(QDialog, Ui_Dialog):
3434

3535
def __init__(self, inLayer, inDb, parent=None):
3636
QDialog.__init__(self, parent)

python/plugins/db_manager/dlg_field_properties.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,9 @@
2929

3030
from .db_plugins.plugin import TableField
3131

32-
from .ui.ui_DlgFieldProperties import Ui_DlgFieldProperties
33-
34-
class DlgFieldProperties(QDialog, Ui_DlgFieldProperties):
32+
from .ui.ui_DlgFieldProperties import Ui_DbManagerDlgFieldProperties as Ui_Dialog
3533

34+
class DlgFieldProperties(QDialog, Ui_Dialog):
3635
def __init__(self, parent=None, fld=None, table=None, db=None):
3736
QDialog.__init__(self, parent)
3837
self.fld = fld

python/plugins/db_manager/dlg_import_vector.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@
2828
import qgis.core
2929
from qgis.utils import iface
3030

31-
from .ui.ui_DlgImportVector import Ui_DlgImportVector
31+
from .ui.ui_DlgImportVector import Ui_DbManagerDlgImportVector as Ui_Dialog
3232

33-
class DlgImportVector(QDialog, Ui_DlgImportVector):
33+
class DlgImportVector(QDialog, ):
3434

3535
HAS_INPUT_MODE, ASK_FOR_INPUT_MODE = range(2)
3636

python/plugins/db_manager/dlg_sql_window.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@
2828
from .db_plugins.plugin import BaseError
2929
from .dlg_db_error import DlgDbError
3030

31-
from .ui.ui_DlgSqlWindow import Ui_DlgSqlWindow
31+
from .ui.ui_DlgSqlWindow import Ui_DbManagerDlgSqlWindow as Ui_Dialog
3232

3333
from .highlighter import SqlHighlighter
3434
from .completer import SqlCompleter
3535

36-
class DlgSqlWindow(QDialog, Ui_DlgSqlWindow):
36+
class DlgSqlWindow(QDialog, Ui_Dialog):
3737

3838
def __init__(self, iface, db, parent=None):
3939
QDialog.__init__(self, parent)

python/plugins/db_manager/dlg_table_properties.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,9 @@
3434
from .dlg_create_constraint import DlgCreateConstraint
3535
from .dlg_create_index import DlgCreateIndex
3636

37-
from .ui.ui_DlgTableProperties import Ui_DlgTableProperties
38-
39-
class DlgTableProperties(QDialog, Ui_DlgTableProperties):
37+
from .ui.ui_DlgTableProperties import Ui_DbManagerDlgTableProperties as Ui_Dialog
4038

39+
class DlgTableProperties(QDialog, Ui_Dialog):
4140
def __init__(self, table, parent=None):
4241
QDialog.__init__(self, parent)
4342
self.table = table

python/plugins/db_manager/ui/DlgAddGeometryColumn.ui

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<ui version="4.0">
3-
<class>DlgAddGeometryColumn</class>
4-
<widget class="QDialog" name="DlgAddGeometryColumn">
3+
<class>DbManagerDlgAddGeometryColumn</class>
4+
<widget class="QDialog" name="DbManagerDlgAddGeometryColumn">
55
<property name="geometry">
66
<rect>
77
<x>0</x>
@@ -11,7 +11,7 @@
1111
</rect>
1212
</property>
1313
<property name="windowTitle">
14-
<string>Dialog</string>
14+
<string>Add geometry column</string>
1515
</property>
1616
<layout class="QGridLayout" name="gridLayout">
1717
<item row="0" column="0">
@@ -27,7 +27,7 @@
2727
<item row="0" column="1" colspan="2">
2828
<widget class="QLineEdit" name="editName">
2929
<property name="text">
30-
<string>geom</string>
30+
<string notr="true">geom</string>
3131
</property>
3232
</widget>
3333
</item>
@@ -45,37 +45,37 @@
4545
<widget class="QComboBox" name="cboType">
4646
<item>
4747
<property name="text">
48-
<string>POINT</string>
48+
<string notr="true">POINT</string>
4949
</property>
5050
</item>
5151
<item>
5252
<property name="text">
53-
<string>LINESTRING</string>
53+
<string notr="true">LINESTRING</string>
5454
</property>
5555
</item>
5656
<item>
5757
<property name="text">
58-
<string>POLYGON</string>
58+
<string notr="true">POLYGON</string>
5959
</property>
6060
</item>
6161
<item>
6262
<property name="text">
63-
<string>MULTIPOINT</string>
63+
<string notr="true">MULTIPOINT</string>
6464
</property>
6565
</item>
6666
<item>
6767
<property name="text">
68-
<string>MULTILINESTRING</string>
68+
<string notr="true">MULTILINESTRING</string>
6969
</property>
7070
</item>
7171
<item>
7272
<property name="text">
73-
<string>MULTIPOLYGON</string>
73+
<string notr="true">MULTIPOLYGON</string>
7474
</property>
7575
</item>
7676
<item>
7777
<property name="text">
78-
<string>GEOMETRYCOLLECTION</string>
78+
<string notr="true">GEOMETRYCOLLECTION</string>
7979
</property>
8080
</item>
8181
</widget>
@@ -126,7 +126,7 @@
126126
<item row="3" column="1">
127127
<widget class="QLineEdit" name="editSrid">
128128
<property name="text">
129-
<string>-1</string>
129+
<string notr="true">-1</string>
130130
</property>
131131
</widget>
132132
</item>
@@ -154,7 +154,7 @@
154154
<connection>
155155
<sender>buttonBox</sender>
156156
<signal>rejected()</signal>
157-
<receiver>DlgAddGeometryColumn</receiver>
157+
<receiver>DbManagerDlgAddGeometryColumn</receiver>
158158
<slot>reject()</slot>
159159
<hints>
160160
<hint type="sourcelabel">

python/plugins/db_manager/ui/DlgCreateConstraint.ui

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<ui version="4.0">
3-
<class>DlgCreateConstraint</class>
4-
<widget class="QDialog" name="DlgCreateConstraint">
3+
<class>DbManagerDlgCreateConstraint</class>
4+
<widget class="QDialog" name="DbManagerDlgCreateConstraint">
55
<property name="geometry">
66
<rect>
77
<x>0</x>
@@ -65,7 +65,7 @@
6565
<connection>
6666
<sender>buttonBox</sender>
6767
<signal>rejected()</signal>
68-
<receiver>DlgCreateConstraint</receiver>
68+
<receiver>DbManagerDlgCreateConstraint</receiver>
6969
<slot>reject()</slot>
7070
<hints>
7171
<hint type="sourcelabel">

python/plugins/db_manager/ui/DlgCreateIndex.ui

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<ui version="4.0">
3-
<class>DlgCreateIndex</class>
4-
<widget class="QDialog" name="DlgCreateIndex">
3+
<class>DbManagerDlgCreateIndex</class>
4+
<widget class="QDialog" name="DbManagerDlgCreateIndex">
55
<property name="geometry">
66
<rect>
77
<x>0</x>
@@ -32,7 +32,11 @@
3232
</widget>
3333
</item>
3434
<item row="1" column="1">
35-
<widget class="QLineEdit" name="editName"/>
35+
<widget class="QLineEdit" name="editName">
36+
<property name="text">
37+
<string notr="true"/>
38+
</property>
39+
</widget>
3640
</item>
3741
<item row="2" column="0" colspan="2">
3842
<widget class="QDialogButtonBox" name="buttonBox">
@@ -56,7 +60,7 @@
5660
<connection>
5761
<sender>buttonBox</sender>
5862
<signal>rejected()</signal>
59-
<receiver>DlgCreateIndex</receiver>
63+
<receiver>DbManagerDlgCreateIndex</receiver>
6064
<slot>reject()</slot>
6165
<hints>
6266
<hint type="sourcelabel">

python/plugins/db_manager/ui/DlgCreateTable.ui

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<ui version="4.0">
3-
<class>DlgCreateTable</class>
4-
<widget class="QDialog" name="DlgCreateTable">
3+
<class>DbManagerDlgCreateTable</class>
4+
<widget class="QDialog" name="DbManagerDlgCreateTable">
55
<property name="geometry">
66
<rect>
77
<x>0</x>
@@ -40,7 +40,11 @@
4040
</widget>
4141
</item>
4242
<item row="1" column="2">
43-
<widget class="QLineEdit" name="editName"/>
43+
<widget class="QLineEdit" name="editName">
44+
<property name="text">
45+
<string notr="true"/>
46+
</property>
47+
</widget>
4448
</item>
4549
</layout>
4650
</item>
@@ -126,37 +130,37 @@
126130
<widget class="QComboBox" name="cboGeomType">
127131
<item>
128132
<property name="text">
129-
<string>POINT</string>
133+
<string notr="true">POINT</string>
130134
</property>
131135
</item>
132136
<item>
133137
<property name="text">
134-
<string>LINESTRING</string>
138+
<string notr="true">LINESTRING</string>
135139
</property>
136140
</item>
137141
<item>
138142
<property name="text">
139-
<string>POLYGON</string>
143+
<string notr="true">POLYGON</string>
140144
</property>
141145
</item>
142146
<item>
143147
<property name="text">
144-
<string>MULTIPOINT</string>
148+
<string notr="true">MULTIPOINT</string>
145149
</property>
146150
</item>
147151
<item>
148152
<property name="text">
149-
<string>MULTILINESTRING</string>
153+
<string notr="true">MULTILINESTRING</string>
150154
</property>
151155
</item>
152156
<item>
153157
<property name="text">
154-
<string>MULTIPOLYGON</string>
158+
<string notr="true">MULTIPOLYGON</string>
155159
</property>
156160
</item>
157161
<item>
158162
<property name="text">
159-
<string>GEOMETRYCOLLECTION</string>
163+
<string notr="true">GEOMETRYCOLLECTION</string>
160164
</property>
161165
</item>
162166
</widget>
@@ -174,7 +178,7 @@
174178
<item row="1" column="1">
175179
<widget class="QLineEdit" name="editGeomColumn">
176180
<property name="text">
177-
<string>geom</string>
181+
<string notr="true">geom</string>
178182
</property>
179183
</widget>
180184
</item>
@@ -224,7 +228,7 @@
224228
<item row="3" column="1">
225229
<widget class="QLineEdit" name="editGeomSrid">
226230
<property name="text">
227-
<string>-1</string>
231+
<string notr="true">-1</string>
228232
</property>
229233
</widget>
230234
</item>
@@ -278,7 +282,7 @@
278282
<connection>
279283
<sender>buttonBox</sender>
280284
<signal>rejected()</signal>
281-
<receiver>DlgCreateTable</receiver>
285+
<receiver>DbManagerDlgCreateTable</receiver>
282286
<slot>reject()</slot>
283287
<hints>
284288
<hint type="sourcelabel">

0 commit comments

Comments
 (0)