Use "could not" consistently, instead of "couldn't" which was used in some places.

This commit is contained in:
Jonas Thelemann
2017-03-07 10:29:54 +00:00
committed by Dave Page
parent f2fc1ceba8
commit c34f5fd2d4
35 changed files with 54 additions and 54 deletions

View File

@@ -308,7 +308,7 @@ class ServerGroupView(NodeView):
group = ServerGroup.query.filter_by(user_id=current_user.id, group = ServerGroup.query.filter_by(user_id=current_user.id,
id=gid).first() id=gid).first()
if not group: if not group:
return gone(errormsg="Couldn't find the server-group!") return gone(errormsg="Could not find the server group.")
nodes = self.blueprint.generate_browser_node( nodes = self.blueprint.generate_browser_node(
"%d" % (group.id), None, "%d" % (group.id), None,

View File

@@ -274,7 +274,7 @@ class ServerNode(PGChildNodeView):
success=0, success=0,
errormsg=gettext( errormsg=gettext(
gettext( gettext(
"Couldn't find the server with id# {0}!" "Could not find the server with id# {0}."
).format(sid) ).format(sid)
) )
) )
@@ -959,7 +959,7 @@ class ServerNode(PGChildNodeView):
status=400, status=400,
success=0, success=0,
errormsg=gettext( errormsg=gettext(
"Couldn't find the required parameter(s)." "Could not find the required parameter(s)."
) )
) )

View File

@@ -128,7 +128,7 @@ class DatabaseView(PGChildNodeView):
self.manager = get_driver(PG_DEFAULT_DRIVER).connection_manager(kwargs['sid']) self.manager = get_driver(PG_DEFAULT_DRIVER).connection_manager(kwargs['sid'])
if self.manager is None: if self.manager is None:
return gone(errormsg="Couldn't find the server.") return gone(errormsg="Could not find the server.")
if action and action in ["drop"]: if action and action in ["drop"]:
self.conn = self.manager.connection() self.conn = self.manager.connection()
@@ -285,7 +285,7 @@ class DatabaseView(PGChildNodeView):
if len(res['rows']) == 0: if len(res['rows']) == 0:
return gone( return gone(
_("Couldnot find the database on the server.") _("Could not find the database on the server.")
) )
if not status: if not status:

View File

@@ -330,7 +330,7 @@ class EventTriggerView(PGChildNodeView):
if len(res['rows']) == 0: if len(res['rows']) == 0:
return gone( return gone(
gettext("Couldnot find the event trigger information.") gettext("Could not find the event trigger information.")
) )
result = res['rows'][0] result = res['rows'][0]
@@ -573,7 +573,7 @@ class EventTriggerView(PGChildNodeView):
if len(res['rows']) == 0: if len(res['rows']) == 0:
return gone( return gone(
gettext("Couldnot find the event trigger information.") gettext("Could not find the event trigger information.")
) )
old_data = res['rows'][0] old_data = res['rows'][0]

View File

@@ -229,7 +229,7 @@ class ExtensionView(PGChildNodeView):
if len(res['rows']) == 0: if len(res['rows']) == 0:
return gone( return gone(
gettext("Couldnot find the extension information.") gettext("Could not find the extension information.")
) )
return ajax_response( return ajax_response(
@@ -401,7 +401,7 @@ class ExtensionView(PGChildNodeView):
if len(res['rows']) == 0: if len(res['rows']) == 0:
return gone( return gone(
gettext("Couldnot find the extension information.") gettext("Could not find the extension information.")
) )
old_data = res['rows'][0] old_data = res['rows'][0]

View File

@@ -329,7 +329,7 @@ class ForeignServerView(PGChildNodeView):
if len(res['rows']) == 0: if len(res['rows']) == 0:
return gone( return gone(
gettext("Couldnot find the foreign server information.") gettext("Could not find the foreign server information.")
) )
if res['rows'][0]['fsrvoptions'] is not None: if res['rows'][0]['fsrvoptions'] is not None:

View File

@@ -346,7 +346,7 @@ class UserMappingView(PGChildNodeView):
if len(res['rows']) == 0: if len(res['rows']) == 0:
return gone( return gone(
gettext("Couldnot find the user mapping information.") gettext("Could not find the user mapping information.")
) )
if res['rows'][0]['umoptions'] is not None: if res['rows'][0]['umoptions'] is not None:

View File

@@ -336,7 +336,7 @@ class LanguageView(PGChildNodeView):
if len(res['rows']) == 0: if len(res['rows']) == 0:
return gone( return gone(
gettext("Couldnot find the language information.") gettext("Could not find the language information.")
) )
sql = render_template("/".join([self.template_path, 'acl.sql']), lid=lid) sql = render_template("/".join([self.template_path, 'acl.sql']), lid=lid)
@@ -561,7 +561,7 @@ class LanguageView(PGChildNodeView):
if len(res['rows']) == 0: if len(res['rows']) == 0:
return gone( return gone(
gettext("Couldnot find the language information.") gettext("Could not find the language information.")
) )
for key in ['lanacl']: for key in ['lanacl']:

View File

@@ -127,7 +127,7 @@ def check_precondition(f):
kwargs['sid'] kwargs['sid']
) )
if not self.manager: if not self.manager:
return gone(errormsg="Couldn't find the server.") return gone(errormsg="Could not find the server.")
self.conn = self.manager.connection(did=kwargs['did']) self.conn = self.manager.connection(did=kwargs['did'])
# Set the template path for the SQL scripts # Set the template path for the SQL scripts

View File

@@ -247,7 +247,7 @@ class ForeignTableView(PGChildNodeView, DataTypeReader):
status=410, status=410,
success=0, success=0,
errormsg=gettext( errormsg=gettext(
"Couldn't find the required parameter \ "Could not find the required parameter \
(%s)." % arg (%s)." % arg
) )
) )

View File

@@ -405,7 +405,7 @@ class FtsConfigurationView(PGChildNodeView):
status=410, status=410,
success=0, success=0,
errormsg=_( errormsg=_(
"Couldn't find the required parameter (%s)." % arg "Could not find the required parameter (%s)." % arg
) )
) )
@@ -853,7 +853,7 @@ class FtsConfigurationView(PGChildNodeView):
if not status: if not status:
return internal_server_error( return internal_server_error(
_( _(
"ERROR: Couldn't generate reversed engineered query for the FTS Configuration!\n{0}" "ERROR: Could not generate reversed engineered query for the FTS Configuration!\n{0}"
).format( ).format(
res res
) )
@@ -862,7 +862,7 @@ class FtsConfigurationView(PGChildNodeView):
if res is None: if res is None:
return gone( return gone(
_( _(
"ERROR: Couldn't generate reversed engineered query for FTS Configuration node!") "ERROR: Could not generate reversed engineered query for FTS Configuration node!")
) )
return ajax_response(response=res) return ajax_response(response=res)

View File

@@ -729,7 +729,7 @@ class FtsDictionaryView(PGChildNodeView):
if not status: if not status:
return internal_server_error( return internal_server_error(
_( _(
"Couldn't generate reversed engineered query for the FTS Dictionary!\n{0}").format( "Could not generate reversed engineered query for the FTS Dictionary!\n{0}").format(
res res
) )
) )
@@ -737,7 +737,7 @@ class FtsDictionaryView(PGChildNodeView):
if res is None: if res is None:
return gone( return gone(
_( _(
"Couldn't generate reversed engineered query for FTS Dictionary node!") "Could not generate reversed engineered query for FTS Dictionary node!")
) )
return ajax_response(response=res) return ajax_response(response=res)

View File

@@ -391,7 +391,7 @@ class FunctionView(PGChildNodeView, DataTypeReader):
if fnid is not None: if fnid is not None:
if len(rset['rows']) == 0: if len(rset['rows']) == 0:
return gone( return gone(
_("Couldn't find the specified %s").format(self.node_type) _("Could not find the specified %s").format(self.node_type)
) )
row = rset['rows'][0] row = rset['rows'][0]

View File

@@ -217,7 +217,7 @@ class PackageView(PGChildNodeView):
if pkgid is not None: if pkgid is not None:
if len(rset['rows']) == 0: if len(rset['rows']) == 0:
return gone( return gone(
errormsg=_("Couldn't find the package.") errormsg=_("Could not find the package.")
) )
row = rset['rows'][0] row = rset['rows'][0]

View File

@@ -283,7 +283,7 @@ class EdbFuncView(PGChildNodeView, DataTypeReader):
if edbfnid is not None: if edbfnid is not None:
if len(rset['rows']) == 0: if len(rset['rows']) == 0:
return gone( return gone(
errormsg=_("Couldn't find the function") errormsg=_("Could not find the function")
) )
row = rset['rows'][0] row = rset['rows'][0]
return make_json_response( return make_json_response(

View File

@@ -204,7 +204,7 @@ class SequenceView(PGChildNodeView):
if seid is not None: if seid is not None:
if len(rset['rows']) == 0: if len(rset['rows']) == 0:
return gone( return gone(
errormsg=_("Couldn't find the sequence.") errormsg=_("Could not find the sequence.")
) )
row = rset['rows'][0] row = rset['rows'][0]
return make_json_response( return make_json_response(
@@ -253,7 +253,7 @@ class SequenceView(PGChildNodeView):
return internal_server_error(errormsg=res) return internal_server_error(errormsg=res)
if len(res['rows']) == 0: if len(res['rows']) == 0:
return gone(_("""could not find the sequence in the database.""")) return gone(_("""Could not find the sequence in the database."""))
for row in res['rows']: for row in res['rows']:
SQL = render_template("/".join([self.template_path, 'get_def.sql']), data=row) SQL = render_template("/".join([self.template_path, 'get_def.sql']), data=row)

View File

@@ -1407,7 +1407,7 @@ class TableView(PGChildNodeView, DataTypeReader, VacuumSettings):
status=410, status=410,
success=0, success=0,
errormsg=gettext( errormsg=gettext(
"Couldn't find the required parameter (%s)." % arg "Could not find the required parameter (%s)." % arg
) )
) )

View File

@@ -281,7 +281,7 @@ class ColumnsView(PGChildNodeView, DataTypeReader):
if clid is not None: if clid is not None:
if len(rset['rows']) == 0: if len(rset['rows']) == 0:
return gone( return gone(
errormsg=gettext("Couldn't find the column.") errormsg=gettext("Could not find the column.")
) )
row = rset['rows'][0] row = rset['rows'][0]
return make_json_response( return make_json_response(
@@ -558,7 +558,7 @@ class ColumnsView(PGChildNodeView, DataTypeReader):
status=410, status=410,
success=0, success=0,
errormsg=gettext( errormsg=gettext(
"Couldn't find the required parameter (%s)." % "Could not find the required parameter (%s)." %
required_args[arg] required_args[arg]
) )
) )

View File

@@ -491,7 +491,7 @@ class CheckConstraintView(PGChildNodeView):
status=400, status=400,
success=0, success=0,
errormsg=_( errormsg=_(
"Couldn't find the required parameter (%s)." % arg "Could not find the required parameter (%s)." % arg
) )
) )

View File

@@ -538,7 +538,7 @@ class ExclusionConstraintView(PGChildNodeView):
status=400, status=400,
success=0, success=0,
errormsg=_( errormsg=_(
"Couldn't find required parameter (%s)." % str(arg) "Could not find required parameter (%s)." % str(arg)
) )
) )
elif isinstance(data[arg], list) and len(data[arg]) < 1: elif isinstance(data[arg], list) and len(data[arg]) < 1:
@@ -546,7 +546,7 @@ class ExclusionConstraintView(PGChildNodeView):
status=400, status=400,
success=0, success=0,
errormsg=_( errormsg=_(
"Couldn't find required parameter (%s)." % str(arg) "Could not find required parameter (%s)." % str(arg)
) )
) )

View File

@@ -555,7 +555,7 @@ class ForeignKeyConstraintView(PGChildNodeView):
status=400, status=400,
success=0, success=0,
errormsg=_( errormsg=_(
"Couldn't find required parameter (%s)." % str(arg) "Could not find required parameter (%s)." % str(arg)
) )
) )
elif isinstance(data[arg], list) and len(data[arg]) < 1: elif isinstance(data[arg], list) and len(data[arg]) < 1:
@@ -563,7 +563,7 @@ class ForeignKeyConstraintView(PGChildNodeView):
status=400, status=400,
success=0, success=0,
errormsg=_( errormsg=_(
"Couldn't find required parameter (%s)." % str(arg) "Could not find required parameter (%s)." % str(arg)
) )
) )

View File

@@ -562,7 +562,7 @@ class IndexConstraintView(PGChildNodeView):
status=400, status=400,
success=0, success=0,
errormsg=_( errormsg=_(
"Couldn't find at least one required parameter (%s)." % str(param) "Could not find at least one required parameter (%s)." % str(param)
) )
) )
@@ -571,7 +571,7 @@ class IndexConstraintView(PGChildNodeView):
status=400, status=400,
success=0, success=0,
errormsg=_( errormsg=_(
"Couldn't find the required parameter (%s)." % arg "Could not find the required parameter (%s)." % arg
) )
) )

View File

@@ -576,7 +576,7 @@ class IndexesView(PGChildNodeView):
err_msg = "You must provide one or more column to create index" err_msg = "You must provide one or more column to create index"
if arg not in data: if arg not in data:
err_msg = "Couldn't find the required parameter (%s)." % \ err_msg = "Could not find the required parameter (%s)." % \
required_args[arg] required_args[arg]
# Check if we have at least one column # Check if we have at least one column
if err_msg is not None: if err_msg is not None:

View File

@@ -316,7 +316,7 @@ class RuleView(PGChildNodeView):
status=410, status=410,
success=0, success=0,
errormsg=gettext( errormsg=gettext(
"Couldn't find the required parameter (%s)." % arg "Could not find the required parameter (%s)." % arg
) )
) )
try: try:

View File

@@ -613,7 +613,7 @@ class TriggerView(PGChildNodeView):
return make_json_response( return make_json_response(
status=410, status=410,
success=0, success=0,
errormsg=gettext("Couldn't find the required parameter (%s)." % \ errormsg=gettext("Could not find the required parameter (%s)." % \
required_args[arg]) required_args[arg])
) )

View File

@@ -458,7 +458,7 @@ class ViewNode(PGChildNodeView, VacuumSettings):
status=410, status=410,
success=0, success=0,
errormsg=gettext( errormsg=gettext(
"Couldn't find the required parameter (%s)." % arg "Could not find the required parameter (%s)." % arg
) )
) )
try: try:

View File

@@ -230,7 +230,7 @@ class JobScheduleView(PGChildNodeView):
if jscid is not None: if jscid is not None:
if len(result['rows']) == 0: if len(result['rows']) == 0:
return gone(errormsg="Couldn't find the specified job step.") return gone(errormsg="Could not find the specified job step.")
row = result['rows'][0] row = result['rows'][0]
return make_json_response( return make_json_response(
@@ -280,7 +280,7 @@ class JobScheduleView(PGChildNodeView):
return internal_server_error(errormsg=res) return internal_server_error(errormsg=res)
if len(res['rows']) == 0: if len(res['rows']) == 0:
return gone(errormsg="Couldn't find the specified job step.") return gone(errormsg="Could not find the specified job step.")
return ajax_response( return ajax_response(
response=res['rows'][0], response=res['rows'][0],

View File

@@ -243,7 +243,7 @@ SELECT EXISTS(
if jstid is not None: if jstid is not None:
if len(result['rows']) == 0: if len(result['rows']) == 0:
return gone(errormsg="Couldn't find the specified job step.") return gone(errormsg="Could not find the specified job step.")
row = result['rows'][0] row = result['rows'][0]
return make_json_response( return make_json_response(
@@ -297,7 +297,7 @@ SELECT EXISTS(
return internal_server_error(errormsg=res) return internal_server_error(errormsg=res)
if len(res['rows']) == 0: if len(res['rows']) == 0:
return gone(errormsg="Couldn't find the specified job step.") return gone(errormsg="Could not find the specified job step.")
return ajax_response( return ajax_response(
response=res['rows'][0], response=res['rows'][0],
@@ -392,7 +392,7 @@ SELECT EXISTS(
if len(res['rows']) == 0: if len(res['rows']) == 0:
return gone( return gone(
errormsg=gettext( errormsg=gettext(
"Couldn't find the specified job step." "Could not find the specified job step."
) )
) )
row = res['rows'][0] row = res['rows'][0]
@@ -486,7 +486,7 @@ SELECT EXISTS(
if len(res['rows']) == 0: if len(res['rows']) == 0:
return gone( return gone(
errormsg=gettext( errormsg=gettext(
"Couldn't find the specified job step." "Could not find the specified job step."
) )
) )
row = res['rows'][0] row = res['rows'][0]

View File

@@ -527,7 +527,7 @@ rolmembership:{
if len(res['rows']) == 0: if len(res['rows']) == 0:
return gone( return gone(
_("Couldn't find the role on the database server.") _("Could not find the role on the database server.")
) )
row = res['rows'][0] row = res['rows'][0]
@@ -683,7 +683,7 @@ rolmembership:{
) )
if not status: if not status:
return internal_server_error( return internal_server_error(
_("Couldn't drop the role.\n{0}").format(res) _("Could not drop the role.\n{0}").format(res)
) )
return success_return() return success_return()

View File

@@ -344,7 +344,7 @@ function($, _, S, pgAdmin, Menu, Backbone, Alertify, pgBrowser, Backform) {
} }
); );
} }
// Close the panel (if couldn't fetch properties) // Close the panel (if could not fetch properties)
if (cancelFunc) { if (cancelFunc) {
cancelFunc(); cancelFunc();
} }

View File

@@ -436,7 +436,7 @@ class BatchProcess(object):
except ValueError as e: except ValueError as e:
current_app.logger.warning( current_app.logger.warning(
_("Status for the background process '{0}' couldn't be loaded!").format( _("Status for the background process '{0}' could not be loaded.").format(
p.pid p.pid
) )
) )

View File

@@ -203,7 +203,7 @@ def create_import_export_job(sid):
id=sid).first() id=sid).first()
if server is None: if server is None:
return bad_request(errormsg=_("Couldn't find the given server")) return bad_request(errormsg=_("Could not find the given server"))
# To fetch MetaData for the server # To fetch MetaData for the server

View File

@@ -191,7 +191,7 @@ def create_maintenance_job(sid, did):
if server is None: if server is None:
return make_json_response( return make_json_response(
success=0, success=0,
errormsg=_("Couldn't find the given server") errormsg=_("Could not find the given server")
) )
# To fetch MetaData for the server # To fetch MetaData for the server

View File

@@ -1512,7 +1512,7 @@ WHERE db.oid = {0}""".format(did))
if did not in self.db_info: if did not in self.db_info:
raise Exception(gettext( raise Exception(gettext(
"Couldn't find the specified database." "Could not find the specified database."
)) ))
if database is None: if database is None:

View File

@@ -73,7 +73,7 @@ class _Preference(object):
).first() ).first()
if res is None: if res is None:
# Couldn't find in the configuration table, we will create new # Could not find in the configuration table, we will create new
# entry for it. # entry for it.
res = PrefTable(name=self.name, cid=cid) res = PrefTable(name=self.name, cid=cid)
db.session.add(res) db.session.add(res)
@@ -98,7 +98,7 @@ class _Preference(object):
pid=self.pid pid=self.pid
).filter_by(uid=current_user.id).first() ).filter_by(uid=current_user.id).first()
# Couldn't find any preference for this user, return default value. # Could not find any preference for this user, return default value.
if res is None: if res is None:
return self.default return self.default