Skip to content

Commit

Permalink
merge back ef0e7d0
Browse files Browse the repository at this point in the history
  • Loading branch information
tomkralidis committed Sep 3, 2014
1 parent fb5e07d commit 3eb6e7c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
24 changes: 12 additions & 12 deletions python/plugins/MetaSearch/dialogs/maindialog.py
Expand Up @@ -289,7 +289,7 @@ def delete_connection(self):

key = '/MetaSearch/%s' % current_text

msg = self.tr('Remove service %s?' % current_text)
msg = self.tr('Remove service %s?)' % current_text

result = QMessageBox.information(self, self.tr('Confirm delete'), msg,
QMessageBox.Ok | QMessageBox.Cancel)
Expand Down Expand Up @@ -323,7 +323,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('%s exists. Overwrite?') % name
res = QMessageBox.warning(self,
self.tr('Loading connections'), msg,
QMessageBox.Yes | QMessageBox.No)
Expand Down Expand Up @@ -450,12 +450,12 @@ def search(self):
except ExceptionReport, err:
QApplication.restoreOverrideCursor()
QMessageBox.warning(self, self.tr('Search error'),
self.tr('Search error: %s' % err))
self.tr('Search error: %s') % err)
return
except Exception, err:
QApplication.restoreOverrideCursor()
QMessageBox.warning(self, self.tr('Connection error'),
self.tr('Connection error: %s' % err))
self.tr('Connection error: %s') % err)
return

if self.catalog.results['matches'] == 0:
Expand All @@ -473,10 +473,10 @@ def display_results(self):

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

msg = self.tr('Showing %d - %d of %d result%s' %
(self.startfrom + 1, position,
msg = self.tr('Showing %d - %d of %d result%s') % (
self.startfrom + 1, position,
self.catalog.results['matches'],
's'[self.catalog.results['matches'] == 1:]))
's'[self.catalog.results['matches'] == 1:])

self.lblResults.setText(msg)

Expand Down Expand Up @@ -661,7 +661,7 @@ def add_to_ows(self):

# check for duplicates
if sname in keys:
msg = self.tr('Connection %s exists. Overwrite?' % sname)
msg = self.tr('Connection %s exists. Overwrite?') % sname
res = QMessageBox.warning(self, self.tr('Saving server'), msg,
QMessageBox.Yes | QMessageBox.No)
if res != QMessageBox.Yes:
Expand Down Expand Up @@ -733,7 +733,7 @@ def show_metadata(self):
except ExceptionReport, err:
QApplication.restoreOverrideCursor()
QMessageBox.warning(self, self.tr('GetRecords error'),
self.tr('Error getting response: %s' % err))
self.tr('Error getting response: %s') % err)
return

QApplication.restoreOverrideCursor()
Expand Down Expand Up @@ -802,11 +802,11 @@ def _get_csw(self):
self.catalog = CatalogueServiceWeb(self.catalog_url)
return True
except ExceptionReport, err:
msg = self.tr('Error connecting to service: %s' % err)
msg = self.tr('Error connecting to service: %s') % err
except ValueError, err:
msg = self.tr('Value Error: %s' % err)
msg = self.tr('Value Error: %s') % err
except Exception, err:
msg = self.tr('Unknown Error: %s' % err)
msg = self.tr('Unknown Error: %s') % err

QMessageBox.warning(self, self.tr('CSW Connection error'), msg)
QApplication.restoreOverrideCursor()
Expand Down
4 changes: 2 additions & 2 deletions python/plugins/MetaSearch/dialogs/manageconnectionsdialog.py
Expand Up @@ -133,7 +133,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 %s') % self.filename)
self.reject()

def load(self, items):
Expand All @@ -154,7 +154,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 %s exists. Overwrite?') % conn_name
res = QMessageBox.warning(self, self.tr('Loading Connections'),
label,
QMessageBox.Yes | QMessageBox.No)
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/MetaSearch/dialogs/newconnectiondialog.py
Expand Up @@ -66,7 +66,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 %s?') % conn_name,
QMessageBox.Ok | QMessageBox.Cancel)
if res == QMessageBox.Cancel:
return
Expand Down

0 comments on commit 3eb6e7c

Please sign in to comment.