Remove more exclamation marks from error messages.

This commit is contained in:
Alexander Lakhin 2017-11-01 15:18:07 +00:00 committed by Dave Page
parent 635d944e03
commit 23d431fb54
22 changed files with 35 additions and 35 deletions

View File

@ -493,7 +493,7 @@ class ServerNode(PGChildNodeView):
if idx == 0:
return make_json_response(
success=0,
errormsg=gettext('No parameters were changed!')
errormsg=gettext('No parameters were changed.')
)
try:
@ -1214,7 +1214,7 @@ class ServerNode(PGChildNodeView):
info=gettext('WAL replay paused'),
data={'in_recovery': True, 'wal_pause': pause}
)
return gone(errormsg=_('Please connect the server!'))
return gone(errormsg=_('Please connect the server.'))
except Exception as e:
current_app.logger.error(
'WAL replay pause/resume failed'

View File

@ -264,7 +264,7 @@ define('pgadmin.node.foreign_table', [
var errmsg = null;
if (_.isUndefined(this.get('attname')) || String(this.get('attname')).replace(/^\s+|\s+$/g, '') == '') {
errmsg = gettext('Column Name cannot be empty!');
errmsg = gettext('Column Name cannot be empty.');
this.errorModel.set('attname', errmsg);
} else {
this.errorModel.unset('attname');
@ -272,7 +272,7 @@ define('pgadmin.node.foreign_table', [
if (_.isUndefined(this.get('datatype')) || String(this.get('datatype'))
.replace(/^\s+|\s+$/g, '') == '') {
errmsg = gettext('Column Datatype cannot be empty!');
errmsg = gettext('Column Datatype cannot be empty.');
this.errorModel.set('datatype', errmsg);
} else {
this.errorModel.unset('datatype');
@ -449,13 +449,13 @@ define('pgadmin.node.foreign_table', [
errmsg;
if (_.isUndefined(this.get('conname')) || String(this.get('conname')).replace(/^\s+|\s+$/g, '') == '') {
err['conname'] = gettext('Constraint Name cannot be empty!');
err['conname'] = gettext('Constraint Name cannot be empty.');
errmsg = errmsg || err['conname'];
}
if (_.isUndefined(this.get('consrc')) || String(this.get('consrc'))
.replace(/^\s+|\s+$/g, '') == '') {
err['consrc'] = gettext('Constraint Check cannot be empty!');
err['consrc'] = gettext('Constraint Check cannot be empty.');
errmsg = errmsg || err['consrc'];
}

View File

@ -32,7 +32,7 @@ define('pgadmin.node.fts_configuration', [
if (_.isNull(token) ||
_.isUndefined(token) ||
String(token).replace(/^\s+|\s+$/g, '') == '') {
msg = gettext('Token cannot be empty!');
msg = gettext('Token cannot be empty.');
this.errorModel.set('token',msg);
return msg;
}
@ -40,7 +40,7 @@ define('pgadmin.node.fts_configuration', [
if (_.isNull(dictionary) ||
_.isUndefined(dictionary) ||
String(dictionary).replace(/^\s+|\s+$/g, '') == '') {
msg = gettext('Dictionary name cannot be empty!');
msg = gettext('Dictionary name cannot be empty.');
this.errorModel.set('dictname',msg);
return msg;
}
@ -553,7 +553,7 @@ define('pgadmin.node.fts_configuration', [
if (_.isUndefined(name) ||
_.isNull(name) ||
String(name).replace(/^\s+|\s+$/g, '') == '') {
msg = gettext('Name must be specified!');
msg = gettext('Name must be specified.');
this.errorModel.set('name', msg);
return msg;
}
@ -562,7 +562,7 @@ define('pgadmin.node.fts_configuration', [
else if (_.isUndefined(copy_config_or_parser) ||
_.isNull(copy_config_or_parser) ||
String(copy_config_or_parser).replace(/^\s+|\s+$/g, '') == '') {
msg = gettext('Select parser or configuration to copy!');
msg = gettext('Select parser or configuration to copy.');
this.errorModel.set('parser', msg);
return msg;
}
@ -571,7 +571,7 @@ define('pgadmin.node.fts_configuration', [
else if (_.isUndefined(schema) ||
_.isNull(schema) ||
String(schema).replace(/^\s+|\s+$/g, '') == '') {
msg = gettext('Schema must be selected!');
msg = gettext('Schema must be selected.');
this.errorModel.set('schema', msg);
return msg;
}

View File

@ -26,13 +26,13 @@ define('pgadmin.node.fts_dictionary', [
if (_.isUndefined(this.get('option')) ||
String(this.get('option')).replace(/^\s+|\s+$/g, '') == '') {
var msg = gettext('Option cannot be empty!');
var msg = gettext('Option cannot be empty.');
this.errorModel.set('option',msg);
return msg;
}
if (_.isUndefined(this.get('value')) ||
String(this.get('value')).replace(/^\s+|\s+$/g, '') == '') {
var msg = gettext('Value cannot be empty!');
var msg = gettext('Value cannot be empty.');
this.errorModel.set('value',msg);
return msg;
}
@ -159,21 +159,21 @@ define('pgadmin.node.fts_dictionary', [
// Validate FTS Dictionary name
if (_.isUndefined(name) || _.isNull(name) || String(name).replace(/^\s+|\s+$/g, '') == '') {
var msg = gettext('Name must be specified!');
var msg = gettext('Name must be specified.');
this.errorModel.set('name', msg);
return msg;
}
// Validate template name
else if (_.isUndefined(template) || _.isNull(template) || String(template).replace(/^\s+|\s+$/g, '') == '') {
var msg = gettext('Template must be selected!');
var msg = gettext('Template must be selected.');
this.errorModel.set('template', msg);
return msg;
}
// Validate schema
else if (_.isUndefined(schema) || _.isNull(schema) || String(schema).replace(/^\s+|\s+$/g, '') == '') {
var msg = gettext('Schema must be selected!');
var msg = gettext('Schema must be selected.');
this.errorModel.set('schema', msg);
return msg;
}

View File

@ -145,7 +145,7 @@ class PackageView(PGChildNodeView):
if not self.conn.connected():
return precondition_required(
_(
"Connection to the server has been lost!"
"Connection to the server has been lost."
)
)
self.template_path = 'package/ppas/#{0}#'.format(self.manager.version)

View File

@ -225,7 +225,7 @@ class EdbFuncView(PGChildNodeView, DataTypeReader):
if not self.conn.connected():
return precondition_required(
gettext(
"Connection to the server has been lost!"
"Connection to the server has been lost."
)
)

View File

@ -198,7 +198,7 @@ class EdbVarView(PGChildNodeView, DataTypeReader):
if not self.conn.connected():
return precondition_required(
gettext(
"Connection to the server has been lost!"
"Connection to the server has been lost."
)
)

View File

@ -198,7 +198,7 @@ class SynonymView(PGChildNodeView):
if not self.conn.connected():
return precondition_required(
gettext(
"Connection to the server has been lost!"
"Connection to the server has been lost."
)
)

View File

@ -172,7 +172,7 @@ define('pgadmin.node.check_constraint', [
errmsg;
if (_.isUndefined(this.get('consrc')) || String(this.get('consrc')).replace(/^\s+|\s+$/g, '') == '') {
err['consrc'] = gettext('Check cannot be empty!');
err['consrc'] = gettext('Check cannot be empty.');
errmsg = errmsg || err['consrc'];
}

View File

@ -232,7 +232,7 @@ class ResourceGroupView(NodeView):
if not self.conn.connected():
return precondition_required(
gettext(
"Connection to the server has been lost!"
"Connection to the server has been lost."
)
)

View File

@ -460,7 +460,7 @@ rolmembership:{
if not self.conn.connected():
return precondition_required(
_("Connection to the server has been lost!")
_("Connection to the server has been lost.")
)
ver = self.manager.version

View File

@ -121,11 +121,11 @@ class TablespaceView(PGChildNodeView):
# If DB not connected then return error to browser
if not self.conn.connected():
current_app.logger.warning(
"Connection to the server has been lost!"
"Connection to the server has been lost."
)
return precondition_required(
gettext(
"Connection to the server has been lost!"
"Connection to the server has been lost."
)
)

View File

@ -409,7 +409,7 @@ define(
isCloseable: true,
isPrivate: true,
elContainer: true,
content: '<div class="obj_properties"><div class="alert alert-info pg-panel-message">' + gettext('Please wait while we fetch information about the node from the server!') + '</div></div>',
content: '<div class="obj_properties"><div class="alert alert-info pg-panel-message">' + gettext('Please wait while we fetch information about the node from the server...') + '</div></div>',
onCreate: function(myPanel, $container) {
$container.addClass('pg-no-overflow');
},

View File

@ -94,7 +94,7 @@ blueprint = DebuggerModule(MODULE_NAME, __name__)
@blueprint.route("/", endpoint='index')
@login_required
def index():
return bad_request(errormsg=gettext("This URL cannot be called directly!"))
return bad_request(errormsg=gettext("This URL cannot be called directly."))
@blueprint.route("/js/debugger.js")

View File

@ -129,7 +129,7 @@ def check_precondition(f):
# If DB not connected then return error to browser
if not server_info['conn'].connected():
return precondition_required(
gettext("Connection to the server has been lost!")
gettext("Connection to the server has been lost.")
)
# Set template path for sql scripts

View File

@ -152,7 +152,7 @@ class IEMessage(IProcessDesc):
@blueprint.route("/")
@login_required
def index():
return bad_request(errormsg=_("This URL cannot be called directly!"))
return bad_request(errormsg=_("This URL cannot be called directly."))
@blueprint.route("/js/import_export.js")

View File

@ -147,7 +147,7 @@ class Message(IProcessDesc):
@login_required
def index():
return bad_request(
errormsg=_("This URL cannot be called directly!")
errormsg=_("This URL cannot be called directly.")
)

View File

@ -193,7 +193,7 @@ def create_restore_job(sid):
if _file is None:
return make_json_response(
success=0,
errormsg=_("File couldn't be found!")
errormsg=_("File could not be found.")
)
# Fetch the server details like hostname, port, roles etc

View File

@ -67,7 +67,7 @@ class ObjectRegistry(ABCMeta):
return (ObjectRegistry.registry[name])(**kwargs)
raise NotImplementedError(
gettext("This feature has not been implemented for object type '{0}'!").format(name)
gettext("This feature has not been implemented for object type '{0}'.").format(name)
)

View File

@ -3150,7 +3150,7 @@ define('tools.querytool', [
self.trigger(
'pgadmin-sqleditor:loading-icon:show',
gettext("Initializing the query execution!")
gettext("Initializing query execution...")
);
$("#btn-flash").prop('disabled', true);

View File

@ -362,7 +362,7 @@ class Connection(BaseConnection):
except Exception as e:
current_app.logger.exception(e)
return False, \
_("Failed to decrypt the saved password!\nError: {0}").format(
_("Failed to decrypt the saved password.\nError: {0}").format(
str(e)
)

View File

@ -32,7 +32,7 @@ class ConnectionLost(HTTPException):
def get_response(self, environ=None):
return service_unavailable(
_("Connection to the server has been lost!"),
_("Connection to the server has been lost."),
info="CONNECTION_LOST",
data={
'sid': self.sid,