Skip to content
Permalink
Browse files

merge back ef0e7d0

  • Loading branch information
tomkralidis committed Sep 3, 2014
1 parent fb5e07d commit 3eb6e7ca3f34c9a23b9c521894ba1445a3417611
@@ -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)
@@ -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)
@@ -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:
@@ -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)
@@ -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:
@@ -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()
@@ -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()
@@ -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):
@@ -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)
@@ -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

0 comments on commit 3eb6e7c

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