Skip to content
Permalink
Browse files

update translation strings

  • Loading branch information
jef-n committed Mar 5, 2017
1 parent 5a543e4 commit f00a87cb8ae9c76105cf68c2a34d948edcad753a
Showing with 275 additions and 288 deletions.
  1. +16 −16 python/plugins/MetaSearch/dialogs/maindialog.py
  2. +2 −2 python/plugins/MetaSearch/dialogs/manageconnectionsdialog.py
  3. +1 −1 python/plugins/MetaSearch/dialogs/newconnectiondialog.py
  4. +2 −2 python/plugins/MetaSearch/util.py
  5. +3 −3 python/plugins/db_manager/db_manager.py
  6. +1 −1 python/plugins/db_manager/db_model.py
  7. +1 −1 python/plugins/db_manager/db_plugins/__init__.py
  8. +1 −1 python/plugins/db_manager/db_plugins/gpkg/plugin.py
  9. +1 −1 python/plugins/db_manager/db_plugins/info_model.py
  10. +1 −1 python/plugins/db_manager/db_plugins/oracle/plugin.py
  11. +9 −9 python/plugins/db_manager/db_plugins/plugin.py
  12. +2 −2 python/plugins/db_manager/db_plugins/postgis/plugin.py
  13. +1 −1 python/plugins/db_manager/db_plugins/spatialite/plugin.py
  14. +1 −1 python/plugins/db_manager/dlg_export_vector.py
  15. +1 −1 python/plugins/db_manager/dlg_import_vector.py
  16. +1 −1 python/plugins/db_manager/dlg_sql_layer_window.py
  17. +2 −2 python/plugins/db_manager/dlg_sql_window.py
  18. +5 −5 python/plugins/db_manager/dlg_table_properties.py
  19. +1 −1 python/plugins/processing/algs/gdal/GdalAlgorithmDialog.py
  20. +26 −27 python/plugins/processing/algs/grass7/Grass7Algorithm.py
  21. +2 −3 python/plugins/processing/algs/grass7/Grass7AlgorithmProvider.py
  22. +1 −1 python/plugins/processing/algs/grass7/ext/r_blend_rgb.py
  23. +1 −1 python/plugins/processing/algs/grass7/ext/r_colors_stddev.py
  24. +2 −2 python/plugins/processing/algs/grass7/ext/r_reclass.py
  25. +1 −1 python/plugins/processing/algs/grass7/ext/r_rgb.py
  26. +1 −1 python/plugins/processing/algs/grass7/ext/v_lrs_segment.py
  27. +1 −1 python/plugins/processing/algs/grass7/ext/v_net_components.py
  28. +1 −1 python/plugins/processing/algs/grass7/ext/v_net_salesman.py
  29. +2 −2 python/plugins/processing/algs/qgis/EliminateSelection.py
  30. +1 −1 python/plugins/processing/algs/qgis/ExtractByAttribute.py
  31. +4 −4 python/plugins/processing/algs/qgis/FieldPyculator.py
  32. +2 −2 python/plugins/processing/algs/qgis/FieldsCalculator.py
  33. +2 −2 python/plugins/processing/algs/qgis/GeometryByExpression.py
  34. +6 −6 python/plugins/processing/algs/qgis/GeometryConvert.py
  35. +2 −2 python/plugins/processing/algs/qgis/GridLine.py
  36. +5 −4 python/plugins/processing/algs/qgis/GridPolygon.py
  37. +5 −5 python/plugins/processing/algs/qgis/Gridify.py
  38. +6 −6 python/plugins/processing/algs/qgis/HypsometricCurves.py
  39. +1 −1 python/plugins/processing/algs/qgis/ImportIntoPostGIS.py
  40. +1 −1 python/plugins/processing/algs/qgis/ImportIntoSpatialite.py
  41. +1 −1 python/plugins/processing/algs/qgis/PostGISExecuteSQL.py
  42. +2 −2 python/plugins/processing/algs/qgis/SelectByAttribute.py
  43. +1 −1 python/plugins/processing/algs/qgis/SimplifyGeometries.py
  44. +2 −2 python/plugins/processing/algs/qgis/SpatialiteExecuteSQL.py
  45. +30 −36 python/plugins/processing/algs/r/RAlgorithm.py
  46. +1 −1 python/plugins/processing/algs/r/RAlgorithmProvider.py
  47. +9 −9 python/plugins/processing/algs/saga/SagaAlgorithm.py
  48. +8 −5 python/plugins/processing/core/Processing.py
  49. +4 −4 python/plugins/processing/core/ProcessingConfig.py
  50. +6 −6 python/plugins/processing/core/outputs.py
  51. +6 −7 python/plugins/processing/core/parameters.py
  52. +3 −4 python/plugins/processing/gui/AlgorithmDialog.py
  53. +1 −1 python/plugins/processing/gui/AlgorithmExecutor.py
  54. +8 −9 python/plugins/processing/gui/BatchAlgorithmDialog.py
  55. +1 −1 python/plugins/processing/gui/BatchInputSelectionPanel.py
  56. +5 −7 python/plugins/processing/gui/BatchPanel.py
  57. +1 −1 python/plugins/processing/gui/ConfigDialog.py
  58. +3 −3 python/plugins/processing/gui/FixedTablePanel.py
  59. +3 −3 python/plugins/processing/gui/GetScriptsAndModels.py
  60. +3 −3 python/plugins/processing/gui/Help2Html.py
  61. +1 −1 python/plugins/processing/gui/HelpEditionDialog.py
  62. +2 −2 python/plugins/processing/gui/MultipleInputPanel.py
  63. +2 −2 python/plugins/processing/gui/NumberInputPanel.py
  64. +1 −1 python/plugins/processing/gui/OutputSelectionPanel.py
  65. +1 −1 python/plugins/processing/gui/ProcessingToolbox.py
  66. +1 −1 python/plugins/processing/gui/menus.py
  67. +16 −21 python/plugins/processing/modeler/ModelerAlgorithm.py
  68. +2 −2 python/plugins/processing/modeler/ModelerAlgorithmProvider.py
  69. +3 −3 python/plugins/processing/modeler/ModelerDialog.py
  70. +1 −1 python/plugins/processing/modeler/ModelerParametersDialog.py
  71. +3 −4 python/plugins/processing/preconfigured/PreconfiguredAlgorithmDialog.py
  72. +4 −4 python/plugins/processing/script/ScriptAlgorithm.py
  73. +4 −2 python/plugins/processing/tools/postgis.py
  74. +8 −8 python/utils.py
  75. +1 −1 src/app/qgsbookmarks.cpp
  76. +1 −1 src/plugins/grass/modules/r.out.vtk.qgm
  77. +1 −1 src/plugins/grass/modules/v.out.vtk.qgm
@@ -80,7 +80,7 @@ def __init__(self, iface):
self.context = StaticContext()

version = self.context.metadata.get('general', 'version')
self.setWindowTitle('MetaSearch %s' % version)
self.setWindowTitle(self.tr('MetaSearch {0}').format(version))

self.rubber_band = QgsRubberBand(self.map, True) # True = a polygon
self.rubber_band.setColor(QColor(255, 0, 0, 75))
@@ -311,7 +311,7 @@ def delete_connection(self):

key = '/MetaSearch/%s' % current_text

msg = self.tr('Remove service %s?') % current_text
msg = self.tr('Remove service {0}?').format(current_text)

result = QMessageBox.information(self, self.tr('Confirm delete'), msg,
QMessageBox.Ok | QMessageBox.Cancel)
@@ -345,7 +345,7 @@ def add_default_connections(self):
name = server.attrib.get('name')
# check for duplicates
if name in keys:
msg = self.tr('%s exists. Overwrite?') % name
msg = self.tr('{0} exists. Overwrite?').format(name)
res = QMessageBox.warning(self,
self.tr('Loading connections'), msg,
QMessageBox.Yes | QMessageBox.No)
@@ -475,12 +475,12 @@ def search(self):
except ExceptionReport as err:
QApplication.restoreOverrideCursor()
QMessageBox.warning(self, self.tr('Search error'),
self.tr('Search error: %s') % err)
self.tr('Search error: {0}').format(err))
return
except Exception as err:
QApplication.restoreOverrideCursor()
QMessageBox.warning(self, self.tr('Connection error'),
self.tr('Connection error: %s') % err)
self.tr('Connection error: {0}').format(err))
return

if self.catalog.results['matches'] == 0:
@@ -498,9 +498,9 @@ def display_results(self):

position = self.catalog.results['returned'] + self.startfrom

msg = self.tr('Showing %d - %d of %n result(s)', 'number of results',
self.catalog.results['matches']) % (self.startfrom + 1,
position)
msg = self.tr('Showing {0} - {1} of %n result(s)', 'number of results',
self.catalog.results['matches']).format(self.startfrom + 1,
position)

self.lblResults.setText(msg)

@@ -655,12 +655,12 @@ def navigate(self):
except ExceptionReport as err:
QApplication.restoreOverrideCursor()
QMessageBox.warning(self, self.tr('Search error'),
self.tr('Search error: %s') % err)
self.tr('Search error: {0}').format(err))
return
except Exception as err:
QApplication.restoreOverrideCursor()
QMessageBox.warning(self, self.tr('Connection error'),
self.tr('Connection error: %s') % err)
self.tr('Connection error: {0}').format(err))
return

QApplication.restoreOverrideCursor()
@@ -711,7 +711,7 @@ def add_to_ows(self):
# check for duplicates
if sname in keys: # duplicate found
if self.radioTitleAsk.isChecked(): # ask to overwrite
msg = self.tr('Connection %s exists. Overwrite?') % sname
msg = self.tr('Connection {0} exists. Overwrite?').format(sname)
res = QMessageBox.warning(self, self.tr('Saving server'), msg,
QMessageBox.Yes | QMessageBox.No)
if res != QMessageBox.Yes: # assign new name with serial
@@ -777,12 +777,12 @@ def show_metadata(self):
except ExceptionReport as err:
QApplication.restoreOverrideCursor()
QMessageBox.warning(self, self.tr('GetRecords error'),
self.tr('Error getting response: %s') % err)
self.tr('Error getting response: {0}').format(err))
return
except KeyError as err:
QMessageBox.warning(self,
self.tr('Record parsing error'),
'Unable to locate record identifier')
self.tr('Unable to locate record identifier'))
QApplication.restoreOverrideCursor()
return

@@ -853,11 +853,11 @@ def _get_csw(self):
timeout=self.timeout)
return True
except ExceptionReport as err:
msg = self.tr('Error connecting to service: %s') % err
msg = self.tr('Error connecting to service: {0}').format(err)
except ValueError as err:
msg = self.tr('Value Error: %s') % err
msg = self.tr('Value Error: {0}').format(err)
except Exception as err:
msg = self.tr('Unknown Error: %s') % err
msg = self.tr('Unknown Error: {0}').format(err)

QMessageBox.warning(self, self.tr('CSW Connection error'), msg)
QApplication.restoreOverrideCursor()
@@ -134,7 +134,7 @@ def save(self, connections):
with open(self.filename, 'w') as fileobj:
fileobj.write(prettify_xml(etree.tostring(doc)))
QMessageBox.information(self, self.tr('Save Connections'),
self.tr('Saved to %s') % self.filename)
self.tr('Saved to {0}').format(self.filename))
self.reject()

def load(self, items):
@@ -155,7 +155,7 @@ def load(self, items):

# check for duplicates
if conn_name in keys:
label = self.tr('File %s exists. Overwrite?') % conn_name
label = self.tr('File {0} exists. Overwrite?').format(conn_name)
res = QMessageBox.warning(self, self.tr('Loading Connections'),
label,
QMessageBox.Yes | QMessageBox.No)
@@ -73,7 +73,7 @@ def accept(self):
if all([self.conn_name_orig != conn_name,
self.settings.contains(keyurl)]):
res = QMessageBox.warning(self, self.tr('Save connection'),
self.tr('Overwrite %s?') % conn_name,
self.tr('Overwrite {0}?').format(conn_name),
QMessageBox.Ok | QMessageBox.Cancel)
if res == QMessageBox.Cancel:
return
@@ -95,10 +95,10 @@ def get_connections_from_file(parent, filename):
msg = parent.tr('Invalid CSW connections XML.')
except etree.ParseError as err:
error = 1
msg = parent.tr('Cannot parse XML file: %s' % err)
msg = parent.tr('Cannot parse XML file: {0}').format(err)
except IOError as err:
error = 1
msg = parent.tr('Cannot open file: %s' % err)
msg = parent.tr('Cannot open file: {0}').format(err)

if error == 1:
QMessageBox.information(parent, parent.tr('Loading Connections'), msg)
@@ -196,7 +196,7 @@ def runSqlWindow(self):

query = DlgSqlWindow(self.iface, db, self)
dbname = db.connection().connectionName()
tabname = self.tr("Query") + u" (%s)" % dbname
tabname = self.tr("Query ({0})").format(dbname)
index = self.tabs.addTab(query, tabname)
self.tabs.setTabIcon(index, db.connection().icon())
self.tabs.setCurrentIndex(index)
@@ -206,9 +206,9 @@ def runSqlLayerWindow(self, layer):
from .dlg_sql_layer_window import DlgSqlLayerWindow
query = DlgSqlLayerWindow(self.iface, layer, self)
lname = layer.name()
tabname = self.tr("Layer") + u" (%s)" % lname
tabname = self.tr("Layer ({0})").format(lname)
index = self.tabs.addTab(query, tabname)
#self.tabs.setTabIcon(index, db.connection().icon())
# self.tabs.setTabIcon(index, db.connection().icon())
self.tabs.setCurrentIndex(index)

def update_query_tab_name(self, index, dbname, queryname):
@@ -600,7 +600,7 @@ def importLayer(self, layerType, providerKey, layerName, uriString, parent):

if not inLayer.isValid():
# invalid layer
QMessageBox.warning(None, self.tr("Invalid layer"), self.tr("Unable to load the layer %s") % inLayer.name())
QMessageBox.warning(None, self.tr("Invalid layer"), self.tr("Unable to load the layer {0}").format(inLayer.name()))
return False

# retrieve information about the new table's db and schema
@@ -26,7 +26,7 @@ class NotSupportedDbType(Exception):

def __init__(self, dbtype):
from qgis.PyQt.QtWidgets import QApplication
self.msg = QApplication.translate("DBManagerPlugin", "%s is not supported yet" % dbtype)
self.msg = QApplication.translate("DBManagerPlugin", "{0} is not supported yet").format(dbtype)
Exception(self, self.msg)

def __str__(self):
@@ -72,7 +72,7 @@ def connect(self, parent=None):
settings.beginGroup(u"/%s/%s" % (self.connectionSettingsKey(), conn_name))

if not settings.contains("gpkgpath"): # non-existent entry?
raise InvalidDataException(u'there is no defined database connection "%s".' % conn_name)
raise InvalidDataException(self.tr(u'There is no defined database connection "{0}".').format(conn_name))

database = settings.value("gpkgpath")

@@ -106,7 +106,7 @@ def toHtml(self):
typename = self.db.connection().typeNameString()
spatial_info = HtmlContent(spatial_info)
if not spatial_info.hasContents():
spatial_info = QApplication.translate("DBManagerPlugin", '<warning> %s support not enabled!') % typename
spatial_info = QApplication.translate("DBManagerPlugin", '<warning> {0} support not enabled!').format(typename)
ret.append(HtmlSection(typename, spatial_info))

# privileges
@@ -86,7 +86,7 @@ def connect(self, parent=None):

if not settings.contains("database"): # non-existent entry?
raise InvalidDataException(
self.tr('There is no defined database connection "{}".'.format(
self.tr('There is no defined database connection "{0}".'.format(
conn_name)))

from qgis.core import QgsDataSourceUri
@@ -72,9 +72,9 @@ def __unicode__(self):
if self.query is None:
return BaseError.__unicode__(self)

msg = QApplication.translate("DBManagerPlugin", "Error:\n%s") % BaseError.__unicode__(self)
msg = QApplication.translate("DBManagerPlugin", "Error:\n{0}").format(BaseError.__unicode__(self))
if self.query:
msg += QApplication.translate("DBManagerPlugin", "\n\nQuery:\n%s") % self.query
msg += QApplication.translate("DBManagerPlugin", "\n\nQuery:\n{0}").format(self.query)
return msg


@@ -177,7 +177,7 @@ def removeActionSlot(self, item, action, parent):
try:
res = QMessageBox.question(parent, QApplication.translate("DBManagerPlugin", "hey!"),
QApplication.translate("DBManagerPlugin",
"Really remove connection to %s?") % item.connectionName(),
"Really remove connection to {0}?").format(item.connectionName()),
QMessageBox.Yes | QMessageBox.No)
if res != QMessageBox.Yes:
return
@@ -387,7 +387,7 @@ def deleteSchemaActionSlot(self, item, action, parent):
return
res = QMessageBox.question(parent, QApplication.translate("DBManagerPlugin", "hey!"),
QApplication.translate("DBManagerPlugin",
"Really delete schema %s?") % item.name,
"Really delete schema {0}?").format(item.name),
QMessageBox.Yes | QMessageBox.No)
if res != QMessageBox.Yes:
return
@@ -444,7 +444,7 @@ def deleteTableActionSlot(self, item, action, parent):
return
res = QMessageBox.question(parent, QApplication.translate("DBManagerPlugin", "hey!"),
QApplication.translate("DBManagerPlugin",
"Really delete table/view %s?") % item.name,
"Really delete table/view {0}?").format(item.name),
QMessageBox.Yes | QMessageBox.No)
if res != QMessageBox.Yes:
return
@@ -462,7 +462,7 @@ def emptyTableActionSlot(self, item, action, parent):
return
res = QMessageBox.question(parent, QApplication.translate("DBManagerPlugin", "hey!"),
QApplication.translate("DBManagerPlugin",
"Really delete all items from table %s?") % item.name,
"Really delete all items from table {0}?").format(item.name),
QMessageBox.Yes | QMessageBox.No)
if res != QMessageBox.Yes:
return
@@ -887,7 +887,7 @@ def runAction(self, action):
parts = action.split('/')
trigger_action = parts[1]

msg = QApplication.translate("DBManagerPlugin", "Do you want to %s all triggers?") % trigger_action
msg = QApplication.translate("DBManagerPlugin", "Do you want to {0} all triggers?").format(trigger_action)
QApplication.restoreOverrideCursor()
try:
if QMessageBox.question(None, QApplication.translate("DBManagerPlugin", "Table triggers"), msg,
@@ -908,7 +908,7 @@ def runAction(self, action):
trigger_name = parts[1]
trigger_action = parts[2]

msg = QApplication.translate("DBManagerPlugin", "Do you want to %s trigger %s?") % (
msg = QApplication.translate("DBManagerPlugin", "Do you want to {0} trigger {1}?").format(
trigger_action, trigger_name)
QApplication.restoreOverrideCursor()
try:
@@ -1004,7 +1004,7 @@ def runAction(self, action):
parts = action.split('/')
spatialIndex_action = parts[1]

msg = QApplication.translate("DBManagerPlugin", "Do you want to %s spatial index for field %s?") % (
msg = QApplication.translate("DBManagerPlugin", "Do you want to {0} spatial index for field {1}?").format(
spatialIndex_action, self.geomColumn)
QApplication.restoreOverrideCursor()
try:
@@ -75,7 +75,7 @@ def connect(self, parent=None):
settings.beginGroup(u"/%s/%s" % (self.connectionSettingsKey(), conn_name))

if not settings.contains("database"): # non-existent entry?
raise InvalidDataException(self.tr('There is no defined database connection "%s".') % conn_name)
raise InvalidDataException(self.tr('There is no defined database connection "{0}".').format(conn_name))

from qgis.core import QgsDataSourceUri

@@ -216,7 +216,7 @@ def runAction(self, action):
rule_name = parts[1]
rule_action = parts[2]

msg = u"Do you want to %s rule %s?" % (rule_action, rule_name)
msg = self.tr(u"Do you want to {0} rule {1}?").format(rule_action, rule_name)

QApplication.restoreOverrideCursor()

@@ -71,7 +71,7 @@ def connect(self, parent=None):
settings.beginGroup(u"/%s/%s" % (self.connectionSettingsKey(), conn_name))

if not settings.contains("sqlitepath"): # non-existent entry?
raise InvalidDataException(u'there is no defined database connection "%s".' % conn_name)
raise InvalidDataException(self.tr(u'There is no defined database connection "{0}".').format(conn_name))

database = settings.value("sqlitepath")

@@ -188,7 +188,7 @@ def accept(self):
QApplication.restoreOverrideCursor()

if ret != 0:
QMessageBox.warning(self, self.tr("Export to file"), self.tr("Error %d\n%s") % (ret, errMsg))
QMessageBox.warning(self, self.tr("Export to file"), self.tr("Error {0}\n{1}").format(ret, errMsg))
return

# create spatial index
@@ -361,7 +361,7 @@ def accept(self):
if ret != 0:
output = QgsMessageViewer()
output.setTitle(self.tr("Import to database"))
output.setMessageAsPlainText(self.tr("Error %d\n%s") % (ret, errMsg))
output.setMessageAsPlainText(self.tr("Error {0}\n{1}").format(ret, errMsg))
output.showMessage()
return

@@ -238,7 +238,7 @@ def executeSql(self):
# set the new model
model = self.db.sqlResultModel(sql, self)
self.viewResult.setModel(model)
self.lblResult.setText(self.tr("%d rows, %.1f seconds") % (model.affectedRows(), model.secs()))
self.lblResult.setText(self.tr("{0} rows, {1:.1f} seconds").format(model.affectedRows(), model.secs()))
cols = self.viewResult.model().columnNames()
for col in cols:
quotedCols.append(self.db.connector.quoteId(col))
@@ -62,7 +62,7 @@ def __init__(self, iface, db, parent=None):
self.aliasSubQuery = isinstance(db, PGDatabase) # only PostgreSQL requires subqueries to be aliases
self.setupUi(self)
self.setWindowTitle(
u"%s - %s [%s]" % (self.windowTitle(), db.connection().connectionName(), db.connection().typeNameString()))
self.tr(u"{0} - {1} [{2}]").format(self.windowTitle(), db.connection().connectionName(), db.connection().typeNameString()))

self.defaultLayerName = 'QueryLayer'

@@ -197,7 +197,7 @@ def executeSql(self):
# set the new model
model = self.db.sqlResultModel(sql, self)
self.viewResult.setModel(model)
self.lblResult.setText(self.tr("%d rows, %.1f seconds") % (model.affectedRows(), model.secs()))
self.lblResult.setText(self.tr("{0} rows, {1:.1f} seconds").format(model.affectedRows(), model.secs()))
cols = self.viewResult.model().columnNames()
for col in cols:
quotedCols.append(self.db.connector.quoteId(col))

0 comments on commit f00a87c

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