Hello Dave,
01.11.2017 16:05, Dave Page wrote:
Hi
On Wed, Nov 1, 2017 at 9:12 AM, Alexander Lakhin <exclus...@gmail.com
<mailto:exclus...@gmail.com>> wrote:
I did - albeit with a couple of additional tweaks.
Thanks!
No, I don't think there are reasons to have exclamation marks. pgAdmin
shouldn't ever be surprised :-). Seriously though, I think messages
should lack emotion like that.
Then please consider applying the next patch (attached),
Best regards,
------
Alexander Lakhin
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
diff --git a/web/pgadmin/browser/server_groups/servers/__init__.py b/web/pgadmin/browser/server_groups/servers/__init__.py
index d3342b9..6d972ee 100644
--- a/web/pgadmin/browser/server_groups/servers/__init__.py
+++ b/web/pgadmin/browser/server_groups/servers/__init__.py
@@ -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'
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/static/js/foreign_table.js b/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/static/js/foreign_table.js
index cbb6cdf..4d9a9f6 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/static/js/foreign_table.js
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/static/js/foreign_table.js
@@ -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'];
}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/static/js/fts_configuration.js b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/static/js/fts_configuration.js
index 911fc2e..9dd1033 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/static/js/fts_configuration.js
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/static/js/fts_configuration.js
@@ -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;
}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/static/js/fts_dictionary.js b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/static/js/fts_dictionary.js
index 04649bc..2192ef3 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/static/js/fts_dictionary.js
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/static/js/fts_dictionary.js
@@ -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;
}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/__init__.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/__init__.py
index 3f46b9a..6aadef1 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/__init__.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/__init__.py
@@ -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)
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/__init__.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/__init__.py
index 42187b0..870641c 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/__init__.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/__init__.py
@@ -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."
)
)
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbvars/__init__.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbvars/__init__.py
index 7a41194..eb53c56 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbvars/__init__.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbvars/__init__.py
@@ -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."
)
)
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/__init__.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/__init__.py
index e49ab43..e93c3eb 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/__init__.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/__init__.py
@@ -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."
)
)
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/check_constraint/static/js/check_constraint.js b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/check_constraint/static/js/check_constraint.js
index 3c54abf..3bc1ef1 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/check_constraint/static/js/check_constraint.js
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/check_constraint/static/js/check_constraint.js
@@ -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'];
}
diff --git a/web/pgadmin/browser/server_groups/servers/resource_groups/__init__.py b/web/pgadmin/browser/server_groups/servers/resource_groups/__init__.py
index 55eaa53..5e2b305 100644
--- a/web/pgadmin/browser/server_groups/servers/resource_groups/__init__.py
+++ b/web/pgadmin/browser/server_groups/servers/resource_groups/__init__.py
@@ -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."
)
)
diff --git a/web/pgadmin/browser/server_groups/servers/roles/__init__.py b/web/pgadmin/browser/server_groups/servers/roles/__init__.py
index a89229e..57a8115 100644
--- a/web/pgadmin/browser/server_groups/servers/roles/__init__.py
+++ b/web/pgadmin/browser/server_groups/servers/roles/__init__.py
@@ -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
diff --git a/web/pgadmin/browser/server_groups/servers/tablespaces/__init__.py b/web/pgadmin/browser/server_groups/servers/tablespaces/__init__.py
index dd49045..850a875 100644
--- a/web/pgadmin/browser/server_groups/servers/tablespaces/__init__.py
+++ b/web/pgadmin/browser/server_groups/servers/tablespaces/__init__.py
@@ -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."
)
)
diff --git a/web/pgadmin/browser/static/js/node.js b/web/pgadmin/browser/static/js/node.js
index 5d05fde..979abe4 100644
--- a/web/pgadmin/browser/static/js/node.js
+++ b/web/pgadmin/browser/static/js/node.js
@@ -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');
},
diff --git a/web/pgadmin/tools/debugger/__init__.py b/web/pgadmin/tools/debugger/__init__.py
index 46c6fd8..544ed96 100644
--- a/web/pgadmin/tools/debugger/__init__.py
+++ b/web/pgadmin/tools/debugger/__init__.py
@@ -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")
diff --git a/web/pgadmin/tools/grant_wizard/__init__.py b/web/pgadmin/tools/grant_wizard/__init__.py
index 488a7e2..f38efb8 100644
--- a/web/pgadmin/tools/grant_wizard/__init__.py
+++ b/web/pgadmin/tools/grant_wizard/__init__.py
@@ -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
diff --git a/web/pgadmin/tools/import_export/__init__.py b/web/pgadmin/tools/import_export/__init__.py
index 931e86f..13865b9 100644
--- a/web/pgadmin/tools/import_export/__init__.py
+++ b/web/pgadmin/tools/import_export/__init__.py
@@ -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")
diff --git a/web/pgadmin/tools/maintenance/__init__.py b/web/pgadmin/tools/maintenance/__init__.py
index 6c62b83..1f85fbb 100644
--- a/web/pgadmin/tools/maintenance/__init__.py
+++ b/web/pgadmin/tools/maintenance/__init__.py
@@ -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.")
)
diff --git a/web/pgadmin/tools/restore/__init__.py b/web/pgadmin/tools/restore/__init__.py
index d34d282..a46fbe5 100644
--- a/web/pgadmin/tools/restore/__init__.py
+++ b/web/pgadmin/tools/restore/__init__.py
@@ -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 couldn't be found.")
)
# Fetch the server details like hostname, port, roles etc
diff --git a/web/pgadmin/tools/sqleditor/command.py b/web/pgadmin/tools/sqleditor/command.py
index 360de52..d09bf2b 100644
--- a/web/pgadmin/tools/sqleditor/command.py
+++ b/web/pgadmin/tools/sqleditor/command.py
@@ -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)
)
diff --git a/web/pgadmin/tools/sqleditor/static/js/sqleditor.js b/web/pgadmin/tools/sqleditor/static/js/sqleditor.js
index 2ea9db9..242b70b 100644
--- a/web/pgadmin/tools/sqleditor/static/js/sqleditor.js
+++ b/web/pgadmin/tools/sqleditor/static/js/sqleditor.js
@@ -3150,7 +3150,7 @@ define('tools.querytool', [
self.trigger(
'pgadmin-sqleditor:loading-icon:show',
- gettext("Initializing the query execution!")
+ gettext("Initializing the query execution...")
);
$("#btn-flash").prop('disabled', true);
diff --git a/web/pgadmin/utils/driver/psycopg2/__init__.py b/web/pgadmin/utils/driver/psycopg2/__init__.py
index a8d9e5e..eabe3b0 100644
--- a/web/pgadmin/utils/driver/psycopg2/__init__.py
+++ b/web/pgadmin/utils/driver/psycopg2/__init__.py
@@ -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)
)
diff --git a/web/pgadmin/utils/exception.py b/web/pgadmin/utils/exception.py
index 77d59da..dab0d09 100644
--- a/web/pgadmin/utils/exception.py
+++ b/web/pgadmin/utils/exception.py
@@ -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,