mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-09 23:15:58 -06:00
First round of string review and cleanup.
This commit is contained in:
parent
894002b06d
commit
949e536bae
@ -300,7 +300,7 @@ class ServerNode(PGChildNodeView):
|
||||
if server is None:
|
||||
return make_json_response(
|
||||
success=0,
|
||||
errormsg=gettext("Couldn't find the given server.")
|
||||
errormsg=gettext("Could not find the required server.")
|
||||
)
|
||||
|
||||
# Not all parameters can be modified, while the server is connected
|
||||
@ -436,7 +436,7 @@ class ServerNode(PGChildNodeView):
|
||||
if server is None:
|
||||
return make_json_response(
|
||||
success=0,
|
||||
errormsg=gettext("Couldn't find the given server")
|
||||
errormsg=gettext("Could not find the required server.")
|
||||
)
|
||||
|
||||
sg = ServerGroup.query.filter_by(
|
||||
@ -489,7 +489,7 @@ class ServerNode(PGChildNodeView):
|
||||
status=410,
|
||||
success=0,
|
||||
errormsg=gettext(
|
||||
"Couldn't find the required parameter (%s)." % arg
|
||||
"Could not find the required parameter (%s)." % arg
|
||||
)
|
||||
)
|
||||
|
||||
@ -559,7 +559,7 @@ class ServerNode(PGChildNodeView):
|
||||
|
||||
return make_json_response(
|
||||
info=gettext(
|
||||
"Server has no active connection for generating statistics!"
|
||||
"Server has no active connection for generating statistics."
|
||||
)
|
||||
)
|
||||
|
||||
@ -619,12 +619,12 @@ class ServerNode(PGChildNodeView):
|
||||
# Fetch Server Details
|
||||
server = Server.query.filter_by(id=sid).first()
|
||||
if server is None:
|
||||
return bad_request(gettext("Server Not Found."))
|
||||
return bad_request(gettext("Server not found."))
|
||||
|
||||
# Fetch User Details.
|
||||
user = User.query.filter_by(id=current_user.id).first()
|
||||
if user is None:
|
||||
return unauthorized(gettext("Unauthorized Request."))
|
||||
return unauthorized(gettext("Unauthorized request."))
|
||||
|
||||
data = request.form if request.form else json.loads(request.data) if \
|
||||
request.data else {}
|
||||
@ -717,7 +717,7 @@ class ServerNode(PGChildNodeView):
|
||||
%s - %s' % (server.id, server.name))
|
||||
return make_json_response(
|
||||
success=1,
|
||||
info=gettext("Server Connected."),
|
||||
info=gettext("Server connected."),
|
||||
data={
|
||||
'icon': 'icon-{0}'.format(
|
||||
manager.server_type
|
||||
@ -735,7 +735,7 @@ class ServerNode(PGChildNodeView):
|
||||
|
||||
server = Server.query.filter_by(id=sid).first()
|
||||
if server is None:
|
||||
return bad_request(gettext("Server Not Found."))
|
||||
return bad_request(gettext("Server not found."))
|
||||
|
||||
# Release Connection
|
||||
from pgadmin.utils.driver import get_driver
|
||||
@ -744,11 +744,11 @@ class ServerNode(PGChildNodeView):
|
||||
status = manager.release()
|
||||
|
||||
if not status:
|
||||
return unauthorized(gettext("Server Could Not Disconnect."))
|
||||
return unauthorized(gettext("Server could not be disconnected."))
|
||||
else:
|
||||
return make_json_response(
|
||||
success=1,
|
||||
info=gettext("Server Disconnected."),
|
||||
info=gettext("Server disconnected."),
|
||||
data={
|
||||
'icon': 'icon-server-not-connected',
|
||||
'connected': False
|
||||
|
@ -240,7 +240,7 @@ class DatabaseView(PGChildNodeView):
|
||||
status=200
|
||||
)
|
||||
|
||||
return gone(errormsg=_("Couldn't find the database in the server!"))
|
||||
return gone(errormsg=_("Could not find the database on the server."))
|
||||
|
||||
|
||||
@check_precondition(action="properties")
|
||||
@ -342,7 +342,7 @@ class DatabaseView(PGChildNodeView):
|
||||
|
||||
return make_json_response(
|
||||
success=1,
|
||||
info=_("Database Connected."),
|
||||
info=_("Database connected."),
|
||||
data={
|
||||
'icon': 'pg-icon-database',
|
||||
'connected': True
|
||||
@ -359,11 +359,11 @@ class DatabaseView(PGChildNodeView):
|
||||
status = manager.release(did=did)
|
||||
|
||||
if not status:
|
||||
return unauthorized(_("Database Could Not Disconnect."))
|
||||
return unauthorized(_("Database could not be disconnected."))
|
||||
else:
|
||||
return make_json_response(
|
||||
success=1,
|
||||
info=_("Database Disconnected."),
|
||||
info=_("Database disconnected."),
|
||||
data={
|
||||
'icon': 'icon-database-not-connected',
|
||||
'connected': False
|
||||
@ -443,7 +443,7 @@ class DatabaseView(PGChildNodeView):
|
||||
status=410,
|
||||
success=0,
|
||||
errormsg=_(
|
||||
"Couldn't find the required parameter (%s)." % arg
|
||||
"Could not find the required parameter (%s)." % arg
|
||||
)
|
||||
)
|
||||
try:
|
||||
@ -526,7 +526,7 @@ class DatabaseView(PGChildNodeView):
|
||||
|
||||
if len(rset['rows']) == 0:
|
||||
return gone(
|
||||
_("Couldn't find the database on the server!")
|
||||
_("Couldnot find the database on the server.")
|
||||
)
|
||||
|
||||
data['old_name'] = (rset['rows'][0])['name']
|
||||
@ -663,7 +663,7 @@ class DatabaseView(PGChildNodeView):
|
||||
|
||||
if len(rset['rows']) == 0:
|
||||
return False, gone(
|
||||
_("Couldn't find the database on the server!")
|
||||
_("Could not find the database on the server.")
|
||||
)
|
||||
|
||||
data['old_name'] = (rset['rows'][0])['name']
|
||||
|
@ -349,7 +349,7 @@ class CastView(PGChildNodeView):
|
||||
status=410,
|
||||
success=0,
|
||||
errormsg=gettext(
|
||||
"Couldn't find the required parameter (%s)." % arg
|
||||
"Could not find the required parameter (%s)." % arg
|
||||
)
|
||||
)
|
||||
try:
|
||||
@ -616,14 +616,14 @@ class CastView(PGChildNodeView):
|
||||
status, res = self.conn.execute_scalar(sql)
|
||||
if not status:
|
||||
return internal_server_error(
|
||||
_("ERROR: Couldn't generate reversed engineered SQL for the cast!\n{0}").format(
|
||||
_("Could not generate reversed engineered SQL for the cast.\n\n{0}").format(
|
||||
res
|
||||
)
|
||||
)
|
||||
|
||||
if res is None:
|
||||
return gone(
|
||||
_("ERROR: Couldn't generate reversed engineered SQL for the cast node!")
|
||||
_("Could not generate reversed engineered SQL for the cast node.\n")
|
||||
)
|
||||
|
||||
return ajax_response(response=res)
|
||||
|
@ -277,7 +277,7 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
|
||||
|
||||
// validate source type control
|
||||
if (_.isUndefined(srctype) || _.isNull(srctype) || String(srctype).replace(/^\s+|\s+$/g, '') == '') {
|
||||
var msg = '{{ _('Source type must be selected!') }}';
|
||||
var msg = '{{ _('Source type must be selected.') }}';
|
||||
this.errorModel.set('srctyp', msg);
|
||||
return msg;
|
||||
}
|
||||
@ -288,7 +288,7 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
|
||||
|
||||
// validate target type control
|
||||
if (_.isUndefined(trgtype) || _.isNull(trgtype) || String(trgtype).replace(/^\s+|\s+$/g, '') == '') {
|
||||
var msg = '{{ _('Target type must be selected!') }}';
|
||||
var msg = '{{ _('Target type must be selected.') }}';
|
||||
this.errorModel.set('trgtyp', msg);
|
||||
return msg;
|
||||
}
|
||||
|
@ -333,7 +333,7 @@ class EventTriggerView(PGChildNodeView):
|
||||
status=400,
|
||||
success=0,
|
||||
errormsg=gettext(
|
||||
"Couldn't find the required parameter/s %s." % err
|
||||
"Could not find the required parameter %s." % err
|
||||
)
|
||||
)
|
||||
try:
|
||||
@ -536,7 +536,7 @@ class EventTriggerView(PGChildNodeView):
|
||||
status=400,
|
||||
success=0,
|
||||
errormsg=gettext(
|
||||
"Couldn't find the required parameter/s %s." % err
|
||||
"Could not find the required parameter %s." % err
|
||||
)
|
||||
)
|
||||
sql = render_template("/".join([self.template_path, 'create.sql']), data=data)
|
||||
|
@ -18,12 +18,12 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
|
||||
|
||||
this.errorModel.clear()
|
||||
if (_.isUndefined(this.get('provider')) || String(this.get('provider')).replace(/^\s+|\s+$/g, '') == '') {
|
||||
var msg = '{{ _('Provider can not be empty!') }}';
|
||||
var msg = '{{ _('Provider cannot be empty.') }}';
|
||||
this.errorModel.set('provider',msg);
|
||||
return msg;
|
||||
}
|
||||
if (_.isUndefined(this.get('securitylabel')) || String(this.get('securitylabel')).replace(/^\s+|\s+$/g, '') == '') {
|
||||
var msg = '{{ _('Security Label can not be empty!') }}';
|
||||
var msg = '{{ _('Security Label cannot be empty.') }}';
|
||||
this.errorModel.set('securitylabel',msg);
|
||||
return msg;
|
||||
}
|
||||
@ -158,33 +158,33 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
|
||||
|
||||
if (_.isUndefined(this.get('name'))
|
||||
|| String(this.get('name')).replace(/^\s+|\s+$/g, '') == '') {
|
||||
msg = '{{ _('Event trigger name can not be empty!') }}';
|
||||
msg = '{{ _('Event trigger name cannot be empty.') }}';
|
||||
this.errorModel.set('name', msg);
|
||||
return msg;
|
||||
}
|
||||
|
||||
if (_.isUndefined(this.get('eventowner'))
|
||||
|| String(this.get('eventowner')).replace(/^\s+|\s+$/g, '') == '') {
|
||||
msg = '{{ _('Event trigger owner can not be empty!') }}';
|
||||
msg = '{{ _('Event trigger owner cannot be empty.') }}';
|
||||
this.errorModel.set('eventowner', msg);
|
||||
return msg;
|
||||
}
|
||||
|
||||
if (_.isUndefined(this.get('enabled'))) {
|
||||
msg = '{{ _('Event trigger enabled status can not be empty!') }}';
|
||||
msg = '{{ _('Event trigger enabled status cannot be empty.') }}';
|
||||
this.errorModel.set('enabled', msg);
|
||||
return msg;
|
||||
}
|
||||
|
||||
if (_.isUndefined(this.get('eventfunname'))
|
||||
|| String(this.get('eventfunname')).replace(/^\s+|\s+$/g, '') == '') {
|
||||
msg = '{{ _('Event trigger function can not be empty!') }}';
|
||||
msg = '{{ _('Event trigger function cannot be empty.') }}';
|
||||
this.errorModel.set('eventfunname', msg);
|
||||
return msg;
|
||||
}
|
||||
|
||||
if (_.isUndefined(this.get('eventname'))) {
|
||||
msg = '{{ _('Event trigger event can not be empty!') }}';
|
||||
msg = '{{ _('Event trigger event cannot be empty.') }}';
|
||||
this.errorModel.set('eventname', msg);
|
||||
return msg;
|
||||
}
|
||||
|
@ -220,7 +220,7 @@ class ExtensionView(PGChildNodeView):
|
||||
status=410,
|
||||
success=0,
|
||||
errormsg=gettext(
|
||||
"Couldn't find the required parameter (%s)." % arg
|
||||
"Could not find the required parameter (%s)." % arg
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -237,7 +237,7 @@ function($, _, S, pgAdmin, pgBrowser) {
|
||||
name = this.get('name');
|
||||
if (_.isUndefined(name) || _.isNull(name) ||
|
||||
String(name).replace(/^\s+|\s+$/g, '') == '') {
|
||||
err['name'] = '{{ _('Name can not be empty!') }}';
|
||||
err['name'] = '{{ _('Name cannot be empty.') }}';
|
||||
errmsg = errmsg || err['name'];
|
||||
this.errorModel.set('name', errmsg);
|
||||
return errmsg;
|
||||
|
@ -357,7 +357,7 @@ class ForeignDataWrapperView(PGChildNodeView):
|
||||
status=410,
|
||||
success=0,
|
||||
errormsg=gettext(
|
||||
"Couldn't find the required parameter (%s)." % arg
|
||||
"Could not find the required parameter (%s)." % arg
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -358,7 +358,7 @@ class ForeignServerView(PGChildNodeView):
|
||||
status=410,
|
||||
success=0,
|
||||
errormsg=gettext(
|
||||
"Couldn't find the required parameter (%s)." % arg
|
||||
"Could not find the required parameter (%s)." % arg
|
||||
)
|
||||
)
|
||||
try:
|
||||
|
@ -165,7 +165,7 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
|
||||
|
||||
if (_.isUndefined(name) || _.isNull(name) ||
|
||||
String(name).replace(/^\s+|\s+$/g, '') == '') {
|
||||
var msg = '{{ _('Name can not be empty!') }}';
|
||||
var msg = '{{ _('Name cannot be empty.') }}';
|
||||
this.errorModel.set('name', msg);
|
||||
return msg;
|
||||
} else {
|
||||
|
@ -366,7 +366,7 @@ class UserMappingView(PGChildNodeView):
|
||||
status=410,
|
||||
success=0,
|
||||
errormsg=gettext(
|
||||
"Couldn't find the required parameter (%s)." % arg
|
||||
"Could not find the required parameter (%s)." % arg
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -142,7 +142,7 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
|
||||
|
||||
if (_.isUndefined(name) || _.isNull(name) ||
|
||||
String(name).replace(/^\s+|\s+$/g, '') == '') {
|
||||
var msg = '{{ _('Name can not be empty!') }}';
|
||||
var msg = '{{ _('Name cannot be empty.') }}';
|
||||
this.errorModel.set('name', msg);
|
||||
return msg;
|
||||
} else {
|
||||
|
@ -165,7 +165,7 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
|
||||
|
||||
if (_.isUndefined(name) || _.isNull(name) ||
|
||||
String(name).replace(/^\s+|\s+$/g, '') == '') {
|
||||
var msg = '{{ _('Name can not be empty!') }}';
|
||||
var msg = '{{ _('Name cannot be empty.') }}';
|
||||
this.errorModel.set('name', msg);
|
||||
return msg;
|
||||
} else {
|
||||
|
@ -188,7 +188,7 @@ define(
|
||||
|
||||
if (_.isUndefined(name) || _.isNull(name) ||
|
||||
String(name).replace(/^\s+|\s+$/g, '') == '') {
|
||||
var msg = '{{ _('Name can not be empty!') }}';
|
||||
var msg = '{{ _('Name cannot be empty.') }}';
|
||||
this.errorModel.set('name', msg);
|
||||
return msg;
|
||||
} else {
|
||||
|
@ -501,7 +501,7 @@ It may have been removed by another user.
|
||||
status=410,
|
||||
success=0,
|
||||
errormsg=gettext(
|
||||
"Couldn't find the required parameter (%s)." %
|
||||
"Could not find the required parameter (%s)." %
|
||||
required_args[arg]
|
||||
)
|
||||
)
|
||||
@ -718,7 +718,7 @@ It may have been removed by another user.
|
||||
|
||||
for arg in required_args:
|
||||
if arg not in data:
|
||||
return " -- " + gettext("definition incomplete")
|
||||
return " -- " + gettext("Definition incomplete.")
|
||||
|
||||
# Privileges
|
||||
self.format_request_acls(data, specific=['nspacl'])
|
||||
|
@ -389,7 +389,7 @@ class CollationView(PGChildNodeView):
|
||||
status=410,
|
||||
success=0,
|
||||
errormsg=gettext(
|
||||
"Couldn't find the required parameter (%s)." % arg
|
||||
"Could not find the required parameter (%s)." % arg
|
||||
)
|
||||
)
|
||||
if self._check_definition(data):
|
||||
@ -397,8 +397,7 @@ class CollationView(PGChildNodeView):
|
||||
status=410,
|
||||
success=0,
|
||||
errormsg=gettext(
|
||||
"Incomplete definition, Please provide Locale \
|
||||
OR Copy collation OR LC_TYPE/LC_COLLATE"
|
||||
"Incomplete definition. Please provide Locale OR Copy Collation OR LC_TYPE/LC_COLLATE"
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -153,7 +153,7 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
|
||||
|
||||
if (_.has(changedAttrs,data.name) && _.isUndefined(this.get('name'))
|
||||
|| String(this.get('name')).replace(/^\s+|\s+$/g, '') == '') {
|
||||
msg = '{{ _('Name can not be empty!') }}';
|
||||
msg = '{{ _('Name cannot be empty.') }}';
|
||||
this.errorModel.set('name', msg);
|
||||
}
|
||||
if (_.has(changedAttrs,data.locale) && (_.isUndefined(this.get('locale'))
|
||||
|
@ -204,8 +204,7 @@ class DomainView(PGChildNodeView, DataTypeReader):
|
||||
status=410,
|
||||
success=0,
|
||||
errormsg=gettext(
|
||||
"Couldn't find the required parameter \
|
||||
(%s)." % arg
|
||||
"Could not find the required parameter (%s)." % arg
|
||||
)
|
||||
)
|
||||
|
||||
@ -358,8 +357,7 @@ class DomainView(PGChildNodeView, DataTypeReader):
|
||||
if len(res['rows']) == 0:
|
||||
return gone(gettext("""
|
||||
Could not find the domain in the database.
|
||||
It may have been removed by another user or
|
||||
shifted to the another schema.
|
||||
It may have been removed by another user or moved to another schema.
|
||||
"""))
|
||||
|
||||
data = res['rows'][0]
|
||||
|
@ -208,8 +208,7 @@ class DomainConstraintView(PGChildNodeView):
|
||||
status=410,
|
||||
success=0,
|
||||
errormsg=gettext(
|
||||
"Couldn't find the required parameter \
|
||||
(%s)." % arg
|
||||
"Could not find the required parameter (%s)." % arg
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -79,7 +79,7 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
|
||||
'string', group: '{{ _('Definition') }}', mode: ['properties',
|
||||
'create', 'edit'], disabled: function(m) { return !m.isNew(); }
|
||||
},{
|
||||
id: 'connoinherit', label: '{{ _('No Inherit') }}', type:
|
||||
id: 'connoinherit', label: '{{ _('No inherit') }}', type:
|
||||
'switch', cell: 'boolean', group: '{{ _('Definition') }}', mode:
|
||||
['properties', 'create', 'edit'], disabled: 'isDisabled',
|
||||
visible: false
|
||||
@ -106,12 +106,12 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
|
||||
errmsg;
|
||||
|
||||
if (_.isUndefined(this.get('name')) || String(this.get('name')).replace(/^\s+|\s+$/g, '') == '') {
|
||||
err['name'] = '{{ _('Name can not be empty!') }}';
|
||||
err['name'] = '{{ _('Name cannot be empty.') }}';
|
||||
errmsg = errmsg || err['name'];
|
||||
}
|
||||
|
||||
if (_.isUndefined(this.get('consrc')) || String(this.get('consrc')).replace(/^\s+|\s+$/g, '') == '') {
|
||||
err['consrc'] = '{{ _('Check can not be empty!') }}';
|
||||
err['consrc'] = '{{ _('Check cannot be empty.') }}';
|
||||
errmsg = errmsg || err['consrc'];
|
||||
}
|
||||
|
||||
|
@ -308,12 +308,12 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
|
||||
seclabels = this.get('seclabels');
|
||||
|
||||
if (_.isUndefined(this.get('name')) || String(this.get('name')).replace(/^\s+|\s+$/g, '') == '') {
|
||||
err['name'] = '{{ _('Name can not be empty!') }}';
|
||||
err['name'] = '{{ _('Name cannot be empty.') }}';
|
||||
errmsg = errmsg || err['name'];
|
||||
}
|
||||
|
||||
if (_.isUndefined(this.get('basetype')) || String(this.get('basetype')).replace(/^\s+|\s+$/g, '') == '') {
|
||||
err['basetype'] = '{{ _('Base Type can not be empty!') }}';
|
||||
err['basetype'] = '{{ _('Base Type cannot be empty.') }}';
|
||||
errmsg = errmsg || err['basetype'];
|
||||
}
|
||||
|
||||
|
@ -415,7 +415,7 @@ class FtsDictionaryView(PGChildNodeView):
|
||||
status=410,
|
||||
success=0,
|
||||
errormsg=_(
|
||||
"Couldn't find the required parameter (%s)." % arg
|
||||
"Could not find the required parameter (%s)." % arg
|
||||
)
|
||||
)
|
||||
try:
|
||||
@ -760,7 +760,7 @@ class FtsDictionaryView(PGChildNodeView):
|
||||
if not status:
|
||||
return internal_server_error(
|
||||
_(
|
||||
"ERROR: Couldn't generate reversed engineered query for the FTS Dictionary!\n{0}").format(
|
||||
"Couldn't generate reversed engineered query for the FTS Dictionary!\n{0}").format(
|
||||
res
|
||||
)
|
||||
)
|
||||
@ -768,7 +768,7 @@ class FtsDictionaryView(PGChildNodeView):
|
||||
if res is None:
|
||||
return gone(
|
||||
_(
|
||||
"ERROR: Couldn't generate reversed engineered query for FTS Dictionary node!")
|
||||
"Couldn't generate reversed engineered query for FTS Dictionary node!")
|
||||
)
|
||||
|
||||
return ajax_response(response=res)
|
||||
|
@ -350,7 +350,7 @@ class FtsParserView(PGChildNodeView):
|
||||
status=410,
|
||||
success=0,
|
||||
errormsg=_(
|
||||
"Couldn't find the required parameter (%s)." % arg
|
||||
"Could not find the required parameter (%s)." % arg
|
||||
)
|
||||
)
|
||||
try:
|
||||
@ -486,9 +486,7 @@ class FtsParserView(PGChildNodeView):
|
||||
return internal_server_error(errormsg=res)
|
||||
|
||||
if len(res['rows']) == 0:
|
||||
return gone(_("""
|
||||
Could not find the FTS Parser node.
|
||||
"""))
|
||||
return gone(_("Could not find the FTS Parser node."))
|
||||
|
||||
# Drop fts Parser
|
||||
result = res['rows'][0]
|
||||
@ -568,9 +566,7 @@ class FtsParserView(PGChildNodeView):
|
||||
return internal_server_error(errormsg=res)
|
||||
|
||||
if len(res['rows']) == 0:
|
||||
return gone(_("""
|
||||
Could not find the FTS Parser node.
|
||||
"""))
|
||||
return gone(_("Could not find the FTS Parser node."))
|
||||
|
||||
old_data = res['rows'][0]
|
||||
|
||||
@ -798,16 +794,14 @@ class FtsParserView(PGChildNodeView):
|
||||
if not status:
|
||||
return internal_server_error(
|
||||
_(
|
||||
"ERROR: Couldn't generate reversed engineered \
|
||||
query for the FTS Parser!\n{0}"
|
||||
"Could not generate reversed engineered query for the FTS Parser.\n{0}"
|
||||
).format(res)
|
||||
)
|
||||
|
||||
if res is None:
|
||||
return gone(
|
||||
_(
|
||||
"ERROR: Couldn't generate reversed engineered \
|
||||
query for FTS Parser node!"
|
||||
"Could not generate reversed engineered query for FTS Parser node"
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -139,7 +139,7 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
|
||||
if (_.isUndefined(name) ||
|
||||
_.isNull(name) ||
|
||||
String(name).replace(/^\s+|\s+$/g, '') == '') {
|
||||
var msg = '{{ _('Name must be specified!') }}';
|
||||
var msg = '{{ _('Name must be specified.') }}';
|
||||
this.errorModel.set('name', msg);
|
||||
return msg;
|
||||
}
|
||||
@ -148,7 +148,7 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
|
||||
else if (_.isUndefined(start) ||
|
||||
_.isNull(start) ||
|
||||
String(start).replace(/^\s+|\s+$/g, '') == '') {
|
||||
var msg = '{{ _('Start function must be selected!') }}';
|
||||
var msg = '{{ _('Start function must be selected.') }}';
|
||||
this.errorModel.set('prsstart', msg);
|
||||
return msg;
|
||||
}
|
||||
@ -157,7 +157,7 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
|
||||
else if (_.isUndefined(token) ||
|
||||
_.isNull(token) ||
|
||||
String(token).replace(/^\s+|\s+$/g, '') == '') {
|
||||
var msg = '{{ _('Get next token function must be selected!') }}';
|
||||
var msg = '{{ _('Get next token function must be selected.') }}';
|
||||
this.errorModel.set('prstoken', msg);
|
||||
return msg;
|
||||
}
|
||||
@ -166,7 +166,7 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
|
||||
else if (_.isUndefined(end) ||
|
||||
_.isNull(end) ||
|
||||
String(end).replace(/^\s+|\s+$/g, '') == '') {
|
||||
var msg = '{{ _('End function must be selected!') }}';
|
||||
var msg = '{{ _('End function must be selected.') }}';
|
||||
this.errorModel.set('prsend', msg);
|
||||
return msg;
|
||||
}
|
||||
@ -175,7 +175,7 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
|
||||
else if (_.isUndefined(lextype) ||
|
||||
_.isNull(lextype) ||
|
||||
String(lextype).replace(/^\s+|\s+$/g, '') == '') {
|
||||
var msg = '{{ _('Lextype function must be selected!') }}';
|
||||
var msg = '{{ _('Lextype function must be selected.') }}';
|
||||
this.errorModel.set('prslextype', msg);
|
||||
return msg;
|
||||
}
|
||||
@ -184,7 +184,7 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
|
||||
else if (_.isUndefined(schema) ||
|
||||
_.isNull(schema) ||
|
||||
String(schema).replace(/^\s+|\s+$/g, '') == '') {
|
||||
var msg = '{{ _('Schema must be selected!') }}';
|
||||
var msg = '{{ _('Schema must be selected.') }}';
|
||||
this.errorModel.set('schema', msg);
|
||||
return msg;
|
||||
}
|
||||
|
@ -327,7 +327,7 @@ class FtsTemplateView(PGChildNodeView):
|
||||
status=410,
|
||||
success=0,
|
||||
errormsg=gettext(
|
||||
"Couldn't find the required parameter (%s)." % arg
|
||||
"Could not find the required parameter (%s)." % arg
|
||||
)
|
||||
)
|
||||
try:
|
||||
@ -662,7 +662,7 @@ class FtsTemplateView(PGChildNodeView):
|
||||
if not status:
|
||||
return internal_server_error(
|
||||
_(
|
||||
"ERROR: Couldn't generate reversed engineered Query for the FTS Template!\n{0}").format(
|
||||
"Could not generate reversed engineered Query for the FTS Template.\n{0}").format(
|
||||
res
|
||||
)
|
||||
)
|
||||
@ -670,7 +670,7 @@ class FtsTemplateView(PGChildNodeView):
|
||||
if res is None:
|
||||
return gone(
|
||||
_(
|
||||
"ERROR: Couldn't generate reversed engineered Query for FTS Template node!")
|
||||
"Could not generate reversed engineered Query for FTS Template node.")
|
||||
)
|
||||
|
||||
return ajax_response(response=res)
|
||||
|
@ -107,21 +107,21 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
|
||||
|
||||
// Validate fts template name
|
||||
if (_.isUndefined(name) || _.isNull(name) || String(name).replace(/^\s+|\s+$/g, '') == '') {
|
||||
var msg = '{{ _('Name must be specified!') }}';
|
||||
var msg = '{{ _('Name must be specified.') }}';
|
||||
this.errorModel.set('name', msg);
|
||||
return msg;
|
||||
}
|
||||
|
||||
// Validate lexize function control
|
||||
else if (_.isUndefined(lexize) || _.isNull(lexize) || String(lexize).replace(/^\s+|\s+$/g, '') == '') {
|
||||
var msg = '{{ _('Lexize function must be selected!') }}';
|
||||
var msg = '{{ _('Lexize function must be selected.') }}';
|
||||
this.errorModel.set('tmpllexize', msg);
|
||||
return msg;
|
||||
}
|
||||
|
||||
// Validate schema for fts template
|
||||
else if (_.isUndefined(schema) || _.isNull(schema) || String(schema).replace(/^\s+|\s+$/g, '') == '') {
|
||||
var msg = '{{ _('Schema must be selected!') }}';
|
||||
var msg = '{{ _('Schema must be selected.') }}';
|
||||
this.errorModel.set('schema', msg);
|
||||
return msg;
|
||||
}
|
||||
|
@ -255,8 +255,7 @@ class FunctionView(PGChildNodeView, DataTypeReader):
|
||||
status=410,
|
||||
success=0,
|
||||
errormsg=gettext(
|
||||
"Couldn't find the required parameter \
|
||||
(%s)." % arg
|
||||
"Could not find the required parameter (%s)." % arg
|
||||
)
|
||||
)
|
||||
|
||||
@ -792,7 +791,7 @@ class FunctionView(PGChildNodeView, DataTypeReader):
|
||||
|
||||
return make_json_response(
|
||||
success=1,
|
||||
info=gettext("Function Dropped."),
|
||||
info=gettext("Function dropped."),
|
||||
data={
|
||||
'id': fnid,
|
||||
'scid': scid,
|
||||
@ -1108,9 +1107,8 @@ class FunctionView(PGChildNodeView, DataTypeReader):
|
||||
|
||||
if len(res['rows']) == 0:
|
||||
return gone(gettext("""
|
||||
Could not find the function in the database.
|
||||
It may have been removed by another user or
|
||||
created/shifted to the another schema.
|
||||
Could not find the function in the database.\n
|
||||
It may have been removed by another user or moved to another schema.
|
||||
"""))
|
||||
|
||||
resp_data = res['rows'][0]
|
||||
|
@ -347,45 +347,45 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
|
||||
seclabels = this.get('seclabels');
|
||||
|
||||
if (_.isUndefined(this.get('name')) || String(this.get('name')).replace(/^\s+|\s+$/g, '') == '') {
|
||||
err['name'] = '{{ _('Name can not be empty!') }}';
|
||||
err['name'] = '{{ _('Name cannot be empty.') }}';
|
||||
errmsg = errmsg || err['name'];
|
||||
}
|
||||
|
||||
if (_.isUndefined(this.get('funcowner')) || String(this.get('funcowner')).replace(/^\s+|\s+$/g, '') == '') {
|
||||
err['funcowner'] = '{{ _('Owner can not be empty!') }}';
|
||||
err['funcowner'] = '{{ _('Owner cannot be empty.') }}';
|
||||
errmsg = errmsg || err['funcowner'];
|
||||
}
|
||||
|
||||
if (_.isUndefined(this.get('pronamespace')) || String(this.get('pronamespace')).replace(/^\s+|\s+$/g, '') == '') {
|
||||
err['pronamespace'] = '{{ _('Schema can not be empty!') }}';
|
||||
err['pronamespace'] = '{{ _('Schema cannot be empty.') }}';
|
||||
errmsg = errmsg || err['pronamespace'];
|
||||
}
|
||||
|
||||
if (_.isUndefined(this.get('prorettypename')) || String(this.get('prorettypename')).replace(/^\s+|\s+$/g, '') == '') {
|
||||
err['prorettypename'] = '{{ _('Return Type can not be empty!') }}';
|
||||
err['prorettypename'] = '{{ _('Return Type cannot be empty.') }}';
|
||||
errmsg = errmsg || err['prorettypename'];
|
||||
}
|
||||
|
||||
if (_.isUndefined(this.get('lanname')) || String(this.get('lanname')).replace(/^\s+|\s+$/g, '') == '') {
|
||||
err['lanname'] = '{{ _('Language can not be empty!') }}';
|
||||
err['lanname'] = '{{ _('Language cannot be empty.') }}';
|
||||
errmsg = errmsg || err['lanname'];
|
||||
}
|
||||
|
||||
if (String(this.get('lanname')) == 'c') {
|
||||
if (_.isUndefined(this.get('probin')) || String(this.get('probin'))
|
||||
.replace(/^\s+|\s+$/g, '') == '') {
|
||||
err['probin'] = '{{ _('Object File can not be empty!') }}';
|
||||
err['probin'] = '{{ _('Object File cannot be empty.') }}';
|
||||
errmsg = errmsg || err['probin'];
|
||||
}
|
||||
|
||||
if (_.isUndefined(this.get('prosrc_c')) || String(this.get('prosrc_c')).replace(/^\s+|\s+$/g, '') == '') {
|
||||
err['prosrc_c'] = '{{ _('Link Symbol can not be empty!') }}';
|
||||
err['prosrc_c'] = '{{ _('Link Symbol cannot be empty.') }}';
|
||||
errmsg = errmsg || err['prosrc_c'];
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (_.isUndefined(this.get('prosrc')) || String(this.get('prosrc')).replace(/^\s+|\s+$/g, '') == '') {
|
||||
err['prosrc'] = '{{ _('Code can not be empty!') }}';
|
||||
err['prosrc'] = '{{ _('Code cannot be empty.') }}';
|
||||
errmsg = errmsg || err['prosrc'];
|
||||
}
|
||||
}
|
||||
|
@ -127,22 +127,22 @@ function($, _, S, pgAdmin, pgBrowser, alertify, Function) {
|
||||
seclabels = this.get('seclabels');
|
||||
|
||||
if (_.isUndefined(this.get('name')) || String(this.get('name')).replace(/^\s+|\s+$/g, '') == '') {
|
||||
err['name'] = '{{ _('Name can not be empty!') }}';
|
||||
err['name'] = '{{ _('Name cannot be empty.') }}';
|
||||
errmsg = errmsg || err['name'];
|
||||
}
|
||||
|
||||
if (_.isUndefined(this.get('pronamespace')) || String(this.get('pronamespace')).replace(/^\s+|\s+$/g, '') == '') {
|
||||
err['pronamespace'] = '{{ _('Schema can not be empty!') }}';
|
||||
err['pronamespace'] = '{{ _('Schema cannot be empty.') }}';
|
||||
errmsg = errmsg || err['pronamespace'];
|
||||
}
|
||||
|
||||
if (_.isUndefined(this.get('lanname')) || String(this.get('lanname')).replace(/^\s+|\s+$/g, '') == '') {
|
||||
err['lanname'] = '{{ _('Language can not be empty!') }}';
|
||||
err['lanname'] = '{{ _('Language cannot be empty.') }}';
|
||||
errmsg = errmsg || err['lanname'];
|
||||
}
|
||||
|
||||
if (_.isUndefined(this.get('prosrc')) || String(this.get('prosrc')).replace(/^\s+|\s+$/g, '') == '') {
|
||||
err['prosrc'] = '{{ _('Code can not be empty!') }}';
|
||||
err['prosrc'] = '{{ _('Code cannot be empty.') }}';
|
||||
errmsg = errmsg || err['prosrc'];
|
||||
}
|
||||
|
||||
|
@ -303,7 +303,7 @@ class SequenceView(PGChildNodeView):
|
||||
status=400,
|
||||
success=0,
|
||||
errormsg=_(
|
||||
"Couldn't find the required parameter (%s)." % arg
|
||||
"Could not find the required parameter (%s)." % arg
|
||||
)
|
||||
)
|
||||
try:
|
||||
@ -479,7 +479,7 @@ class SequenceView(PGChildNodeView):
|
||||
status=400,
|
||||
success=0,
|
||||
errormsg=_(
|
||||
"Couldn't find the required parameter (%s)." % arg
|
||||
"Could not find the required parameter (%s)." % arg
|
||||
)
|
||||
)
|
||||
try:
|
||||
|
@ -230,21 +230,21 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
|
||||
|
||||
if (_.isUndefined(this.get('name'))
|
||||
|| String(this.get('name')).replace(/^\s+|\s+$/g, '') == '') {
|
||||
msg = '{{ _('Sequence name can not be empty!') }}';
|
||||
msg = '{{ _('Name cannot be empty.') }}';
|
||||
this.errorModel.set('name', msg);
|
||||
return msg;
|
||||
}
|
||||
|
||||
if (_.isUndefined(this.get('seqowner'))
|
||||
|| String(this.get('seqowner')).replace(/^\s+|\s+$/g, '') == '') {
|
||||
msg = '{{ _('Sequence owner can not be empty!') }}';
|
||||
msg = '{{ _('Owner can not be empty.') }}';
|
||||
this.errorModel.set('seqowner', msg);
|
||||
return msg;
|
||||
}
|
||||
|
||||
if (_.isUndefined(this.get('schema'))
|
||||
|| String(this.get('schema')).replace(/^\s+|\s+$/g, '') == '') {
|
||||
msg = '{{ _('Sequence schema can not be empty!') }}';
|
||||
msg = '{{ _('Schema cannot be empty.') }}';
|
||||
this.errorModel.set('schema', msg);
|
||||
return msg;
|
||||
}
|
||||
|
@ -190,13 +190,13 @@ function($, _, S, pgAdmin, pgBrowser, Backform, alertify) {
|
||||
if (_.isUndefined(this.get('name')) ||
|
||||
_.isNull(this.get('name')) ||
|
||||
String(this.get('name')).replace(/^\s+|\s+$/g, '') == '') {
|
||||
errmsg = '{{ _('Name can not be empty.')}}';
|
||||
errmsg = '{{ _('Name cannot be empty.')}}';
|
||||
this.errorModel.set('name', errmsg);
|
||||
return errmsg;
|
||||
} else if (_.isUndefined(this.get('namespaceowner')) ||
|
||||
_.isNull(this.get('namespaceowner')) ||
|
||||
String(this.get('namespaceowner')).replace(/^\s+|\s+$/g, '') == '') {
|
||||
errmsg = '{{ _('Owner can not be empty.')}}';
|
||||
errmsg = '{{ _('Owner cannot be empty.')}}';
|
||||
this.errorModel.set('namespaceowner', errmsg);
|
||||
return errmsg;
|
||||
}
|
||||
|
@ -791,7 +791,7 @@ class TypeView(PGChildNodeView, DataTypeReader):
|
||||
status=410,
|
||||
success=0,
|
||||
errormsg=gettext(
|
||||
"Couldn't find the required parameter (%s)." %
|
||||
"Could not find the required parameter (%s)." %
|
||||
required_args[arg]
|
||||
)
|
||||
)
|
||||
@ -803,7 +803,7 @@ class TypeView(PGChildNodeView, DataTypeReader):
|
||||
status=410,
|
||||
success=0,
|
||||
errormsg=gettext(
|
||||
'Composite types requires at least two members'
|
||||
'Composite types require at least two members.'
|
||||
)
|
||||
)
|
||||
# If type is enum then check if it has minimum one label
|
||||
@ -813,7 +813,7 @@ class TypeView(PGChildNodeView, DataTypeReader):
|
||||
status=410,
|
||||
success=0,
|
||||
errormsg=gettext(
|
||||
'Enumeration types requires at least one label'
|
||||
'Enumeration types require at least one label.'
|
||||
)
|
||||
)
|
||||
# If type is range then check if subtype is defined or not
|
||||
@ -823,7 +823,7 @@ class TypeView(PGChildNodeView, DataTypeReader):
|
||||
status=410,
|
||||
success=0,
|
||||
errormsg=gettext(
|
||||
'Subtype must be defined for range types'
|
||||
'Subtype must be defined for range types.'
|
||||
)
|
||||
)
|
||||
# If type is external then check if input/output
|
||||
@ -835,8 +835,7 @@ class TypeView(PGChildNodeView, DataTypeReader):
|
||||
status=410,
|
||||
success=0,
|
||||
errormsg=gettext(
|
||||
'External types require both Input & \
|
||||
Output conversion function.'
|
||||
'External types require both Input and Output conversion functions.'
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -737,35 +737,35 @@ function($, _, S, pgAdmin, pgBrowser, alertify, Backgrid) {
|
||||
if (_.has(changedAttrs, 'name') &&
|
||||
(_.isUndefined(this.get('name'))
|
||||
|| String(this.get('name')).replace(/^\s+|\s+$/g, '') == '')) {
|
||||
msg = '{{ _('Name can not be empty!') }}';
|
||||
msg = '{{ _('Name cannot be empty.') }}';
|
||||
this.errorModel.set('name', msg);
|
||||
} else if (_.has(changedAttrs, 'schema') &&
|
||||
(_.isUndefined(this.get('schema'))
|
||||
|| String(this.get('schema')).replace(/^\s+|\s+$/g, '') == '')) {
|
||||
msg = '{{ _('Schema can not be empty!') }}';
|
||||
msg = '{{ _('Schema cannot be empty.') }}';
|
||||
this.errorModel.set('schema', msg);
|
||||
} else if (_.has(changedAttrs, 'typtype') &&
|
||||
(_.isUndefined(this.get('typtype'))
|
||||
|| String(this.get('name')).replace(/^\s+|\s+$/g, '') == '')) {
|
||||
msg = '{{ _('Type can not be empty!') }}';
|
||||
msg = '{{ _('Type can not be empty.') }}';
|
||||
this.errorModel.set('typtype', msg);
|
||||
} else if (this.get('typtype') == 'r' &&
|
||||
_.has(changedAttrs, 'typname')
|
||||
&& (_.isUndefined(this.get('typname'))
|
||||
|| String(this.get('typname')).replace(/^\s+|\s+$/g, '') == '')) {
|
||||
msg = '{{ _('Subtype Name can not be empty!') }}';
|
||||
msg = '{{ _('Subtype name cannot be empty.') }}';
|
||||
this.errorModel.set('typname', msg);
|
||||
} else if (this.get('typtype') == 'x' &&
|
||||
_.has(changedAttrs, 'typinput')
|
||||
&& (_.isUndefined(this.get('typinput'))
|
||||
|| String(this.get('typinput')).replace(/^\s+|\s+$/g, '') == '')) {
|
||||
msg = '{{ _('Input function can not be empty!') }}';
|
||||
msg = '{{ _('Input function can not be empty.') }}';
|
||||
this.errorModel.set('typinput', msg);
|
||||
} else if (this.get('typtype') == 'x' &&
|
||||
_.has(changedAttrs, 'typoutput')
|
||||
&& (_.isUndefined(this.get('typoutput'))
|
||||
|| String(this.get('typoutput')).replace(/^\s+|\s+$/g, '') == '')) {
|
||||
msg = '{{ _('Output function can not be empty!') }}';
|
||||
msg = '{{ _('Output function can not be empty.') }}';
|
||||
this.errorModel.set('typoutput', msg);
|
||||
}
|
||||
return null;
|
||||
|
@ -277,15 +277,15 @@ function($, _, S, pgAdmin, pgBrowser, Alertify) {
|
||||
disabled: function(m) { return !m.isNew(); }, url: 'get_ctypes',
|
||||
control: 'node-ajax-options', cache_level: 'server'
|
||||
},{
|
||||
id: 'datctype', label: '{{ _('Character Type') }}',
|
||||
id: 'datctype', label: '{{ _('Character type') }}',
|
||||
editable: false, type: 'text', group: 'Definition',
|
||||
disabled: function(m) { return !m.isNew(); }, url: 'get_ctypes',
|
||||
control: 'node-ajax-options', cache_level: 'server'
|
||||
},{
|
||||
id: 'datconnlimit', label: '{{ _('Connection Limit') }}',
|
||||
id: 'datconnlimit', label: '{{ _('Connection limit') }}',
|
||||
editable: false, type: 'int', group: 'Definition', min: -1
|
||||
},{
|
||||
id: 'datallowconn', label: '{{ _('Allow Connections?') }}',
|
||||
id: 'datallowconn', label: '{{ _('Allow connections?') }}',
|
||||
editable: false, type: 'switch', group: 'Definition',
|
||||
mode: ['properties'], disabled: true,
|
||||
options: {
|
||||
@ -350,7 +350,7 @@ function($, _, S, pgAdmin, pgBrowser, Alertify) {
|
||||
var name = this.get('name');
|
||||
if (_.isUndefined(name) || _.isNull(name) ||
|
||||
String(name).replace(/^\s+|\s+$/g, '') == '') {
|
||||
var msg = '{{ _('Database name cannot be empty!') }}';
|
||||
var msg = '{{ _('Name cannot be empty.') }}';
|
||||
this.errorModel.set('name', msg);
|
||||
return msg;
|
||||
} else {
|
||||
@ -372,7 +372,7 @@ function($, _, S, pgAdmin, pgBrowser, Alertify) {
|
||||
Alertify.pgNotifier('error', xhr, error, function(msg) {
|
||||
setTimeout(function() {
|
||||
Alertify.dlgServerPass(
|
||||
'{{ _('Connect to Database') }}',
|
||||
'{{ _('Connect to database') }}',
|
||||
msg, _model, _data, _tree, _item
|
||||
).resizeTo();
|
||||
}, 100);
|
||||
|
@ -314,7 +314,7 @@ class ResourceGroupView(NodeView):
|
||||
status=410,
|
||||
success=0,
|
||||
errormsg=gettext(
|
||||
"Couldn't find the required parameter (%s)." % arg
|
||||
"Could not find the required parameter (%s)." % arg
|
||||
)
|
||||
)
|
||||
try:
|
||||
|
@ -69,13 +69,13 @@ define(
|
||||
|
||||
// Defining schema for the resource group node
|
||||
schema: [{
|
||||
id: 'name', label: '{{ _('Group Name') }}', cell: 'string',
|
||||
id: 'name', label: '{{ _('Name') }}', cell: 'string',
|
||||
type: 'text',
|
||||
},{
|
||||
id: 'cpu_rate_limit', label:'{{ _('CPU Rate Limit (%%)') }}', cell: 'string',
|
||||
id: 'cpu_rate_limit', label:'{{ _('CPU rate limit (%%)') }}', cell: 'string',
|
||||
type: 'numeric', min:0, max:16777216
|
||||
},{
|
||||
id: 'dirty_rate_limit', label:'{{ _('Dirty Rate Limit (KB)') }}', cell: 'string',
|
||||
id: 'dirty_rate_limit', label:'{{ _('Dirty rate limit (KB)') }}', cell: 'string',
|
||||
type: 'numeric', min:0, max:16777216
|
||||
}],
|
||||
|
||||
@ -93,7 +93,7 @@ define(
|
||||
var name = this.get('name');
|
||||
if (_.isUndefined(name) || _.isNull(name) ||
|
||||
String(name).replace(/^\s+|\s+$/g, '') == '') {
|
||||
var msg = '{{ _('Group Name can not be empty!') }}';
|
||||
var msg = '{{ _('Name cannot be empty.') }}';
|
||||
this.errorModel.set('name', msg);
|
||||
return msg;
|
||||
} else {
|
||||
@ -109,7 +109,7 @@ define(
|
||||
var cpu_rate_limit = this.get('cpu_rate_limit');
|
||||
if (_.isUndefined(cpu_rate_limit) || _.isNull(cpu_rate_limit) ||
|
||||
String(cpu_rate_limit).replace(/^\s+|\s+$/g, '') == '') {
|
||||
var msg = '{{ _('CPU Rate Limit can not be empty!') }}';
|
||||
var msg = '{{ _('CPU rate limit cannot be empty.') }}';
|
||||
this.errorModel.set('cpu_rate_limit', msg);
|
||||
return msg;
|
||||
} else {
|
||||
@ -125,7 +125,7 @@ define(
|
||||
var dirty_rate_limit = this.get('dirty_rate_limit');
|
||||
if (_.isUndefined(dirty_rate_limit) || _.isNull(dirty_rate_limit) ||
|
||||
String(dirty_rate_limit).replace(/^\s+|\s+$/g, '') == '') {
|
||||
var msg = '{{ _('Dirty Rate Limit can not be empty!') }}';
|
||||
var msg = '{{ _('Dirty rate limit cannot be empty.') }}';
|
||||
this.errorModel.set('dirty_rate_limit', msg);
|
||||
return msg;
|
||||
} else {
|
||||
|
@ -130,7 +130,7 @@ class RoleView(PGChildNodeView):
|
||||
if u'rid' not in kwargs or kwargs['rid'] == -1:
|
||||
if u'rolname' not in data:
|
||||
return precondition_required(
|
||||
_("Name is not provided!")
|
||||
_("Name must be specified.")
|
||||
)
|
||||
|
||||
if u'rolconnlimit' in data:
|
||||
@ -138,7 +138,7 @@ class RoleView(PGChildNodeView):
|
||||
data[u'rolconnlimit'] = int(data[u'rolconnlimit'])
|
||||
if type(data[u'rolconnlimit']) != int or data[u'rolconnlimit'] < -1:
|
||||
return precondition_required(
|
||||
_("Connection limit must be an integer value or equals to -1!")
|
||||
_("Connection limit must be an integer value or equal to -1.")
|
||||
)
|
||||
|
||||
if u'rolmembership' in data:
|
||||
@ -462,16 +462,16 @@ rolmembership:{
|
||||
fetch_name = True
|
||||
if action == 'drop':
|
||||
forbidden_msg = _(
|
||||
"The current user does not have permission to drop the role!"
|
||||
"The current user does not have permission to drop the role."
|
||||
)
|
||||
else:
|
||||
forbidden_msg = _(
|
||||
"The current user does not have permission to update the role!"
|
||||
"The current user does not have permission to update the role."
|
||||
)
|
||||
elif action == 'create':
|
||||
check_permission = True
|
||||
forbidden_msg = _(
|
||||
"The current user does not have permission to create the role!"
|
||||
"The current user does not have permission to create the role."
|
||||
)
|
||||
elif (action == 'msql' and
|
||||
'rid' in kwargs and kwargs['rid'] != -1):
|
||||
@ -500,13 +500,13 @@ rolmembership:{
|
||||
if not status:
|
||||
return internal_server_error(
|
||||
_(
|
||||
"ERROR: fetching the role information!\n{0}"
|
||||
"Error retrieving the role information.\n{0}"
|
||||
).format(res)
|
||||
)
|
||||
|
||||
if len(res['rows']) == 0:
|
||||
return gone(
|
||||
_("Couldn't find the specific role in the database server!")
|
||||
_("Couldn't find the role on the database server.")
|
||||
)
|
||||
|
||||
row = res['rows'][0]
|
||||
@ -531,7 +531,7 @@ rolmembership:{
|
||||
if not status:
|
||||
return internal_server_error(
|
||||
_(
|
||||
"Error fetching the roles from the database server!\n{0}"
|
||||
"Error retrieving roles from the database server.\n{0}"
|
||||
).format(res)
|
||||
)
|
||||
|
||||
@ -552,7 +552,7 @@ rolmembership:{
|
||||
if not status:
|
||||
return internal_server_error(
|
||||
_(
|
||||
"Error fetching the roles information from the database server!\n{0}"
|
||||
"Error fetching role information from the database server.\n{0}"
|
||||
).format(rset)
|
||||
)
|
||||
|
||||
@ -586,7 +586,7 @@ rolmembership:{
|
||||
if not status:
|
||||
return internal_server_error(
|
||||
_(
|
||||
"Error fetching the roles information from the database server!\n{0}"
|
||||
"Error fetching role information from the database server.\n{0}"
|
||||
).format(rset)
|
||||
)
|
||||
|
||||
@ -602,7 +602,7 @@ rolmembership:{
|
||||
status=200
|
||||
)
|
||||
|
||||
return gone(_("Couldn't find the role information!"))
|
||||
return gone(_("Could not find the role information."))
|
||||
|
||||
def transform(self, rset):
|
||||
for row in rset['rows']:
|
||||
@ -643,13 +643,13 @@ rolmembership:{
|
||||
if not status:
|
||||
return internal_server_error(
|
||||
_(
|
||||
"Error fetching the roles from the database server!\n{0}"
|
||||
"Error retrieving roles from the database server.\n{0}"
|
||||
).format(res)
|
||||
)
|
||||
|
||||
self.transform(res)
|
||||
if len(res['rows']) == 0:
|
||||
return gone(_("Couldn't find the role information!"))
|
||||
return gone(_("Could not find the role information."))
|
||||
|
||||
return ajax_response(
|
||||
response=res['rows'][0],
|
||||
@ -664,7 +664,7 @@ rolmembership:{
|
||||
)
|
||||
if not status:
|
||||
return internal_server_error(
|
||||
_("ERROR: Couldn't drop the user!\n{0}").format(res)
|
||||
_("Couldn't drop the role.\n{0}").format(res)
|
||||
)
|
||||
|
||||
return success_return()
|
||||
@ -680,14 +680,14 @@ rolmembership:{
|
||||
|
||||
if not status:
|
||||
return internal_server_error(
|
||||
_("ERROR: Couldn't generate reversed engineered Query for the role/user!\n{0}").format(
|
||||
_("Could not generate reversed engineered Query for the role.\n{0}").format(
|
||||
res
|
||||
)
|
||||
)
|
||||
|
||||
if res is None:
|
||||
return gone(
|
||||
_("ERROR: Couldn't generate reversed engineered Query for the role/user!")
|
||||
_("Could not generate reversed engineered Query for the role.")
|
||||
)
|
||||
|
||||
return ajax_response(response=res)
|
||||
@ -707,7 +707,7 @@ rolmembership:{
|
||||
|
||||
if not status:
|
||||
return internal_server_error(
|
||||
_("ERROR: Couldn't create the role!\n{0}").format(msg)
|
||||
_("Could not create the role.\n{0}").format(msg)
|
||||
)
|
||||
|
||||
status, rid = self.conn.execute_scalar(
|
||||
@ -717,7 +717,7 @@ rolmembership:{
|
||||
|
||||
if not status:
|
||||
return internal_server_error(
|
||||
_("ERROR: Couldn't fetch the role information!\n{0}").format(msg)
|
||||
_("Could not retrieve the role information.\n{0}").format(msg)
|
||||
)
|
||||
|
||||
|
||||
@ -730,7 +730,7 @@ rolmembership:{
|
||||
if not status:
|
||||
return internal_server_error(
|
||||
_(
|
||||
"Error fetching the roles information from the database server!\n{0}"
|
||||
"Error fetching role information from the database server.\n{0}"
|
||||
).format(rset)
|
||||
)
|
||||
for row in rset['rows']:
|
||||
@ -743,7 +743,7 @@ rolmembership:{
|
||||
)
|
||||
)
|
||||
|
||||
return gone(_("Couldn't find the role information!"))
|
||||
return gone(_("Could not find the role information."))
|
||||
|
||||
@check_precondition(action='update')
|
||||
@validate_request
|
||||
@ -765,7 +765,7 @@ rolmembership:{
|
||||
|
||||
if not status:
|
||||
return internal_server_error(
|
||||
_("ERROR: Couldn't create the role!\n{0}").format(msg)
|
||||
_("Could not create the role.\n{0}").format(msg)
|
||||
)
|
||||
|
||||
status, rset = self.conn.execute_dict(
|
||||
@ -777,7 +777,7 @@ rolmembership:{
|
||||
if not status:
|
||||
return internal_server_error(
|
||||
_(
|
||||
"Error fetching the roles information from the database server!\n{0}"
|
||||
"Error fetching role information from the database server.\n{0}"
|
||||
).format(rset)
|
||||
)
|
||||
|
||||
@ -792,7 +792,7 @@ rolmembership:{
|
||||
)
|
||||
)
|
||||
|
||||
return gone(_("Couldn't find the role information!"))
|
||||
return gone(_("Could not find the role information."))
|
||||
|
||||
@check_precondition(action='msql')
|
||||
@validate_request
|
||||
@ -979,7 +979,7 @@ rolmembership:{
|
||||
if not status:
|
||||
return internal_server_error(
|
||||
_(
|
||||
"Error fetching the variable information for the given role!\n{0}"
|
||||
"Error retrieving variable information for the role.\n{0}"
|
||||
).format(rset)
|
||||
)
|
||||
|
||||
@ -1011,7 +1011,7 @@ FROM
|
||||
if not status:
|
||||
return internal_server_error(
|
||||
_(
|
||||
"Error fetching the variable options for role!\n{0}"
|
||||
"Error retrieving the variable options for the role.\n{0}"
|
||||
).format(res)
|
||||
)
|
||||
return make_json_response(
|
||||
|
@ -237,7 +237,7 @@ function($, _, S, pgAdmin, pgBrowser, alertify, Backform) {
|
||||
$(e.target).find(':selected').each(function() {
|
||||
});
|
||||
});
|
||||
var msg = '{{ _('Selection of checkbox represents the permission to give grant to other roles.') }}';
|
||||
var msg = '{{ _('Select the checkbox for roles to include WITH ADMIN OPTION.') }}';
|
||||
|
||||
this.$el.find('div.note').html("<span>NOTE:<br/>" + msg + "</span>");
|
||||
|
||||
@ -483,7 +483,7 @@ function($, _, S, pgAdmin, pgBrowser, alertify, Backform) {
|
||||
seclabels = this.get('seclabels');
|
||||
|
||||
if (_.isUndefined(this.get('rolname')) || String(this.get('rolname')).replace(/^\s+|\s+$/g, '') == '') {
|
||||
err['name'] = '{{ _('Name can not be empty!') }}';
|
||||
err['name'] = '{{ _('Name cannot be empty.') }}';
|
||||
errmsg = errmsg || err['name'];
|
||||
}
|
||||
|
||||
|
@ -255,7 +255,7 @@ class TablespaceView(PGChildNodeView):
|
||||
status=410,
|
||||
success=0,
|
||||
errormsg=gettext(
|
||||
"Couldn't find the required parameter (%s)." %
|
||||
"Could not find the required parameter (%s)." %
|
||||
required_args[arg]
|
||||
)
|
||||
)
|
||||
@ -365,7 +365,7 @@ class TablespaceView(PGChildNodeView):
|
||||
|
||||
if len(rset['rows']) != 1:
|
||||
return gone(
|
||||
errormsg=gettext("Couldn't the tablespace in the server!")
|
||||
errormsg=gettext("Could not find the tablespace on the server.")
|
||||
)
|
||||
|
||||
# drop tablespace
|
||||
|
@ -161,12 +161,12 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
|
||||
if (_.has(changedAttrs, 'name') &&
|
||||
(_.isUndefined(this.get('name'))
|
||||
|| String(this.get('name')).replace(/^\s+|\s+$/g, '') == '')) {
|
||||
msg = '{{ _('Name can not be empty!') }}';
|
||||
msg = '{{ _('Name cannot be empty.') }}';
|
||||
this.errorModel.set('name', msg);
|
||||
} else if (_.has(changedAttrs, 'spclocation') &&
|
||||
(_.isUndefined(this.get('spclocation'))
|
||||
|| String(this.get('spclocation')).replace(/^\s+|\s+$/g, '') == '')) {
|
||||
msg = '{{ _('Location can not be empty!') }}';
|
||||
msg = '{{ _('Location cannot be empty.') }}';
|
||||
this.errorModel.set('spclocation', msg);
|
||||
} else {
|
||||
this.errorModel.unset('name');
|
||||
|
@ -42,9 +42,9 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
|
||||
}]);
|
||||
|
||||
pgBrowser.messages['PRIV_GRANTEE_NOT_SPECIFIED'] =
|
||||
'{{ _('Please select the grantee from the list!') }}';
|
||||
'{{ _('A grantee must be selected.') }}';
|
||||
pgBrowser.messages['NO_PRIV_SELECTED'] =
|
||||
'{{ _('Please select at least one privilege to grant!') }}';
|
||||
'{{ _('At least one privilege should be selected.') }}';
|
||||
},
|
||||
is_not_connected: function(node) {
|
||||
return (node && node.connected != true);
|
||||
@ -227,15 +227,15 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
|
||||
errmsg;
|
||||
|
||||
if (!this.isNew() && 'id' in this.sessAttrs) {
|
||||
err['id'] = '{{ _('Id can not be changed!') }}';;
|
||||
err['id'] = '{{ _('The ID can not be changed.') }}';;
|
||||
errmsg = err['id'];
|
||||
}
|
||||
if (_.isUndefined(this.get('name')) || String(this.get('name')).replace(/^\s+|\s+$/g, '') == '') {
|
||||
err['name'] = '{{ _('A server name must be specified.') }}';
|
||||
err['name'] = '{{ _('Name must be specified.') }}';
|
||||
errmsg = errmsg || err['name'];
|
||||
}
|
||||
if (_.isUndefined(this.get('host')) || this.get('host') == null || String(this.get('host')).replace(/^\s+|\s+$/g, '') == '') {
|
||||
err['host'] = '{{ _('A hostname or address must be specified.') }}';
|
||||
err['host'] = '{{ _('Hostname or address must be specified.') }}';
|
||||
errmsg = errmsg || err['host'];
|
||||
}
|
||||
|
||||
|
@ -42,10 +42,10 @@ function($, _, pgAdmin, Backbone) {
|
||||
],
|
||||
validate: function(attrs, options) {
|
||||
if (!this.isNew() && 'id' in this.changed) {
|
||||
return '{{ _('Id can not be changed!') }}';
|
||||
return '{{ _('The ID cannot be changed.') }}';
|
||||
}
|
||||
if (String(this.name).replace(/^\s+|\s+$/g, '') == '') {
|
||||
return '{{ _('Name can be empty!') }}';
|
||||
return '{{ _('Name cannot be empty.') }}';
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@ -65,7 +65,7 @@ function($, _, pgAdmin, Backbone) {
|
||||
var tree = pgAdmin.Browser.tree;
|
||||
var alert = alertify.prompt(
|
||||
'{{ _('Add a server group') }}',
|
||||
'{{ _('Enter a name for the new server group') }}',
|
||||
'{{ _('Enter a name for the new server group.') }}',
|
||||
function(evt, value) {
|
||||
$.post("{{ url_for('browser.index') }}server-group/obj/", { name: value })
|
||||
.done(function(data) {
|
||||
@ -124,7 +124,7 @@ function($, _, pgAdmin, Backbone) {
|
||||
var tree = pgAdmin.Browser.tree;
|
||||
alertify.prompt(
|
||||
'{{ _('Rename server group') }}',
|
||||
'{{ _('Enter a new name for the server group') }}',
|
||||
'{{ _('Enter a new name for the server group.') }}',
|
||||
tree.getLabel(item),
|
||||
function(evt, value) {
|
||||
var d = tree.itemData(item);
|
||||
|
@ -102,7 +102,7 @@ function($, _, S, pgAdmin, Backbone, Alertify, Backform) {
|
||||
Alertify.pgNotifier(
|
||||
error, jqxhr,
|
||||
S(
|
||||
"{{ _("Error fetching the properties - %%s!") }}"
|
||||
"{{ _("Error retrieving the properties - %%s.") }}"
|
||||
).sprintf(message).value()
|
||||
);
|
||||
});
|
||||
|
@ -9,18 +9,18 @@ function(_, S, pgAdmin) {
|
||||
|
||||
pgBrowser.messages = {
|
||||
'SERVER_LOST': '{{ _('Connection to the server has been lost!') }}',
|
||||
'CLICK_FOR_DETAILED_MSG': '%s<br><br>' + '{{ _('Click here for details!')|safe }}',
|
||||
'CLICK_FOR_DETAILED_MSG': '%s<br><br>' + '{{ _('Click here for details.')|safe }}',
|
||||
'GENERAL_CATEGORY': '{{ _("General")|safe }}',
|
||||
'SQL_TAB': '{{ _('SQL') }}',
|
||||
'SQL_NO_CHANGE': '-- ' + '{{ _('Nothing changed')|safe }}',
|
||||
'MUST_BE_INT' : "{{ _("'%%s' must be an integer.")|safe }}",
|
||||
'MUST_BE_NUM' : "{{ _("'%%s' must be a numeric.")|safe }}",
|
||||
'MUST_GR_EQ' : "{{ _("'%%s' must be greater than or equals to %%d.")|safe }}",
|
||||
'MUST_LESS_EQ' : "{{ _("'%%s' must be less than or equals to %%d.")|safe }}",
|
||||
'MUST_GR_EQ' : "{{ _("'%%s' must be greater than or equal to %%d.")|safe }}",
|
||||
'MUST_LESS_EQ' : "{{ _("'%%s' must be less than or equal to %%d.")|safe }}",
|
||||
'STATISTICS_LABEL': "{{ _("Statistics") }}",
|
||||
'STATISTICS_VALUE_LABEL': "{{ _("Value") }}",
|
||||
'NODE_HAS_NO_SQL': "{{ _("No SQL could be generated for the selected object.") }}",
|
||||
'NODE_HAS_NO_STATISTICS': "{{ _("No statistics are available for the selected object!") }}",
|
||||
'NODE_HAS_NO_STATISTICS': "{{ _("No statistics are available for the selected object.") }}",
|
||||
'TRUE': "{{ _("True") }}",
|
||||
'FALSE': "{{ _("False") }}",
|
||||
'NOTE_CTRL_LABEL': "{{ _("Note") }}",
|
||||
|
@ -213,7 +213,7 @@ function($, _, S, pgAdmin, Menu, Backbone, Alertify, pgBrowser, Backform) {
|
||||
Alertify.pgNotifier(
|
||||
error, jqxhr,
|
||||
S(
|
||||
"{{ _("Error fetching the properties - %%s!") }}"
|
||||
"{{ _("Error retrieving the properties - %%s.") }}"
|
||||
).sprintf(message).value()
|
||||
);
|
||||
});
|
||||
@ -367,7 +367,7 @@ function($, _, S, pgAdmin, Menu, Backbone, Alertify, pgBrowser, Backform) {
|
||||
if (mode) {
|
||||
var msg = '{{ _('Are you sure want to stop editing the properties of the %%s - "%%s"?') }}';
|
||||
if (args.action == 'edit') {
|
||||
msg = '{{ _('Are you sure want to reset the current changes and reopen the panel for %%s - "%%s"?') }}';
|
||||
msg = '{{ _('Are you sure want to reset the current changes and re-open the panel for %%s - "%%s"?') }}';
|
||||
}
|
||||
|
||||
Alertify.confirm(
|
||||
@ -697,7 +697,7 @@ function($, _, S, pgAdmin, Menu, Backbone, Alertify, pgBrowser, Backform) {
|
||||
});
|
||||
buttons.push({
|
||||
label: '', type: 'help',
|
||||
tooltip: '{{ _("Help on the SQL for this object type") }}',
|
||||
tooltip: '{{ _("SQL help for this object type.") }}',
|
||||
extraClasses: ['btn-default'],
|
||||
icon: 'fa fa-lg fa-info',
|
||||
disabled: (that.sqlAlterHelp == '' && that.sqlCreateHelp == '') ? true : false,
|
||||
@ -822,7 +822,7 @@ function($, _, S, pgAdmin, Menu, Backbone, Alertify, pgBrowser, Backform) {
|
||||
// Create proper buttons
|
||||
createButtons([{
|
||||
label: '', type: 'help',
|
||||
tooltip: '{{ _("SQL info for this object type") }}',
|
||||
tooltip: '{{ _("SQL help for this object type.") }}',
|
||||
extraClasses: ['btn-default'],
|
||||
icon: 'fa fa-lg fa-info',
|
||||
disabled: that.sqlCreateHelp == '' ? true : false,
|
||||
@ -833,7 +833,7 @@ function($, _, S, pgAdmin, Menu, Backbone, Alertify, pgBrowser, Backform) {
|
||||
}
|
||||
},{
|
||||
label: '{{ _("Save") }}', type: 'save',
|
||||
tooltip: '{{ _("Save this object") }}',
|
||||
tooltip: '{{ _("Save this object.") }}',
|
||||
extraClasses: ['btn-primary'],
|
||||
icon: 'fa fa-lg fa-save',
|
||||
disabled: true,
|
||||
@ -864,7 +864,7 @@ function($, _, S, pgAdmin, Menu, Backbone, Alertify, pgBrowser, Backform) {
|
||||
}
|
||||
},{
|
||||
label: '{{ _('Cancel') }}', type: 'cancel',
|
||||
tooltip: '{{ _("Cancel changes this object") }}',
|
||||
tooltip: '{{ _("Cancel changes to this object.") }}',
|
||||
extraClasses: ['btn-danger'],
|
||||
icon: 'fa fa-lg fa-close',
|
||||
disabled: false,
|
||||
@ -877,7 +877,7 @@ function($, _, S, pgAdmin, Menu, Backbone, Alertify, pgBrowser, Backform) {
|
||||
}
|
||||
},{
|
||||
label: '{{ _('Reset') }}', type: 'reset',
|
||||
tooltip: '{{ _("Reset the fields on this dialogue") }}',
|
||||
tooltip: '{{ _("Reset the fields on this dialog.") }}',
|
||||
extraClasses: ['btn-warning'],
|
||||
icon: 'fa fa-lg fa-recycle',
|
||||
disabled: true,
|
||||
|
@ -194,7 +194,7 @@ class NodeView(with_metaclass(MethodViewType, View)):
|
||||
meth = 'get'
|
||||
|
||||
assert self.cmd in self.operations, \
|
||||
"Unimplemented Command ({0}) for {1}".format(
|
||||
"Unimplemented command ({0}) for {1}".format(
|
||||
self.cmd,
|
||||
str(self.__class__.__name__)
|
||||
)
|
||||
@ -291,7 +291,7 @@ class PGChildNodeView(NodeView):
|
||||
|
||||
if 'sid' not in kwargs:
|
||||
return precondition_required(
|
||||
gettext('Required properties are missing!')
|
||||
gettext('Required properties are missing.')
|
||||
)
|
||||
|
||||
from pgadmin.utils.driver import get_driver
|
||||
@ -308,7 +308,7 @@ class PGChildNodeView(NodeView):
|
||||
if not conn.connected():
|
||||
return precondition_required(
|
||||
gettext(
|
||||
"Connection has been lost with the server!"
|
||||
"Connection to the server has been lost."
|
||||
)
|
||||
)
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -22,4 +22,4 @@ blueprint = PgAdminModule(MODULE_NAME, __name__)
|
||||
@blueprint.route("/")
|
||||
def index():
|
||||
"""Calling tools index URL directly is not allowed."""
|
||||
return bad_request(gettext('This URL can not be requested directly!'))
|
||||
return bad_request(gettext('This URL cannot be requested directly.'))
|
||||
|
@ -50,7 +50,7 @@ blueprint = DataGridModule(MODULE_NAME, __name__, static_url_path='/static')
|
||||
@blueprint.route("/")
|
||||
@login_required
|
||||
def index():
|
||||
return bad_request(errormsg=gettext('User can not call this URL directly'))
|
||||
return bad_request(errormsg=gettext('This URL cannot be requested directly.'))
|
||||
|
||||
|
||||
@blueprint.route("/css/datagrid.css")
|
||||
|
@ -171,7 +171,7 @@ def init_function(node_type, sid, did, scid, fid):
|
||||
if user['is_superuser']:
|
||||
status_in, rid_pre = conn.execute_scalar("SHOW shared_preload_libraries")
|
||||
if not status_in:
|
||||
return internal_server_error(gettext("ERROR: Couldn't fetch debugger plugin information"))
|
||||
return internal_server_error(gettext("Could not fetch debugger plugin information."))
|
||||
|
||||
# Need to check if plugin is really loaded or not with "plugin_debugger" string
|
||||
if rid_pre:
|
||||
@ -180,8 +180,8 @@ def init_function(node_type, sid, did, scid, fid):
|
||||
|
||||
status_in, rid_tar = conn.execute_scalar("SELECT count(*) FROM pg_proc WHERE proname = 'pldbg_get_target_info'")
|
||||
if not status_in:
|
||||
current_app.logger.debug("ERROR: Couldn't fetch debugger target information")
|
||||
return internal_server_error(gettext("ERROR: Couldn't fetch debugger target information"))
|
||||
current_app.logger.debug("Could not fetch debugger target information.")
|
||||
return internal_server_error(gettext("Could not fetch debugger target information."))
|
||||
|
||||
if rid_tar == 0:
|
||||
ret_status = False
|
||||
@ -190,8 +190,8 @@ def init_function(node_type, sid, did, scid, fid):
|
||||
|
||||
# Return the response that function can not be debug...
|
||||
if not ret_status:
|
||||
current_app.logger.debug("Error: Function/Procedure can not be debug")
|
||||
return internal_server_error(gettext("ERROR: Function/Procedure cannot be debugged."))
|
||||
current_app.logger.debug(".Function/Procedure can not be debugged.")
|
||||
return internal_server_error(gettext("Function/Procedure cannot be debugged."))
|
||||
|
||||
# Store the function information in session variable
|
||||
if 'funcData' not in session:
|
||||
|
@ -63,7 +63,7 @@ define([
|
||||
errmsg,
|
||||
node = this.get('objects').toJSON();
|
||||
if (_.isEmpty(node)) {
|
||||
err['selected'] = '{{ _("Please select any database object type") }}';
|
||||
err['selected'] = '{{ _("Please select any database object type.") }}';
|
||||
errmsg = errmsg || err['selected'];
|
||||
this.errorModel.set('selected', errmsg);
|
||||
return errmsg;
|
||||
|
@ -72,7 +72,7 @@ blueprint = SqlEditorModule(MODULE_NAME, __name__, static_url_path='/static')
|
||||
@blueprint.route('/')
|
||||
@login_required
|
||||
def index():
|
||||
return bad_request(errormsg=gettext('User can not call this url directly'))
|
||||
return bad_request(errormsg=gettext('This URL cannot be requested directly.'))
|
||||
|
||||
|
||||
def update_session_grid_transaction(trans_id, data):
|
||||
|
@ -239,7 +239,7 @@ class SQLFilter(object):
|
||||
result = None
|
||||
|
||||
if row_filter is None or row_filter == '':
|
||||
return False, gettext('Filter string is empty!')
|
||||
return False, gettext('Filter string is empty.')
|
||||
|
||||
manager = get_driver(PG_DEFAULT_DRIVER).connection_manager(self.sid)
|
||||
conn = manager.connection(did=self.did)
|
||||
@ -300,7 +300,7 @@ class GridCommand(BaseCommand, SQLFilter):
|
||||
return None, None
|
||||
|
||||
def save(self, changed_data):
|
||||
return forbidden(errmsg=gettext("Not allowed to save the data for the selected object!"))
|
||||
return forbidden(errmsg=gettext("Data cannot be saved for the current object."))
|
||||
|
||||
def get_limit(self):
|
||||
"""
|
||||
|
@ -722,7 +722,7 @@ define(
|
||||
|
||||
self.trigger(
|
||||
'pgadmin-sqleditor:loading-icon:show',
|
||||
'{{ _('Initializing the query execution!') }}'
|
||||
'{{ _('Initializing query execution.') }}'
|
||||
);
|
||||
|
||||
$.ajax({
|
||||
@ -772,7 +772,7 @@ define(
|
||||
error: function(e) {
|
||||
if (e.readyState == 0) {
|
||||
self.update_msg_history(false,
|
||||
'{{ _('Not connected to server Or connection with the server has been closed.') }}'
|
||||
'{{ _('Not connected to the server or the connection to the server has been closed.') }}'
|
||||
);
|
||||
return;
|
||||
}
|
||||
@ -803,7 +803,7 @@ define(
|
||||
if (res.data.status === 'Success') {
|
||||
self.trigger(
|
||||
'pgadmin-sqleditor:loading-icon:message',
|
||||
'{{ _('Loading the data from the database server, and rendering into the grid...') }}'
|
||||
'{{ _('Loading data from the database server and rendering...') }}'
|
||||
);
|
||||
|
||||
self.query_end_time = new Date();
|
||||
@ -853,7 +853,7 @@ define(
|
||||
|
||||
if (e.readyState == 0) {
|
||||
self.update_msg_history(false,
|
||||
'{{ _('Not connected to server Or connection with the server has been closed.') }}'
|
||||
'{{ _('Not connected to the server or the connection to the server has been closed.') }}'
|
||||
);
|
||||
return;
|
||||
}
|
||||
@ -912,7 +912,7 @@ define(
|
||||
|
||||
self.trigger(
|
||||
'pgadmin-sqleditor:loading-icon:message',
|
||||
'{{ _('Loading the data from the database server, and rendering into the grid...') }}',
|
||||
'{{ _('Loading data from the database server and rendering...') }}',
|
||||
self
|
||||
);
|
||||
|
||||
@ -1034,7 +1034,7 @@ define(
|
||||
|
||||
self.trigger(
|
||||
'pgadmin-sqleditor:loading-icon:message',
|
||||
'{{ _('Fetching the information about the columns returned...') }}'
|
||||
'{{ _('Retrieving information about the columns returned...') }}'
|
||||
);
|
||||
|
||||
// Make ajax call to fetch the pg types to map numeric data type
|
||||
@ -1319,7 +1319,7 @@ define(
|
||||
model.attributes[key] === undefined) {
|
||||
alertify.alert(
|
||||
'Save Error',
|
||||
'{{ _('Primary key columns can not be null.') }}'
|
||||
'{{ _('Primary key columns cannot be null.') }}'
|
||||
);
|
||||
save_data = false;
|
||||
|
||||
@ -1379,7 +1379,7 @@ define(
|
||||
error: function(e) {
|
||||
if (e.readyState == 0) {
|
||||
self.update_msg_history(false,
|
||||
'{{ _('Not connected to server Or connection with the server has been closed.') }}'
|
||||
'{{ _('Not connected to the server or the connection to the server has been closed.') }}'
|
||||
);
|
||||
return;
|
||||
}
|
||||
@ -1431,7 +1431,7 @@ define(
|
||||
error: function(e) {
|
||||
if (e.readyState == 0) {
|
||||
alertify.alert('Get Filter Error',
|
||||
'{{ _('Not connected to server or connection with the server has been closed.') }}'
|
||||
'{{ _('Not connected to the server or the connection to the server has been closed.') }}'
|
||||
);
|
||||
return;
|
||||
}
|
||||
@ -1477,7 +1477,7 @@ define(
|
||||
error: function(e) {
|
||||
if (e.readyState == 0) {
|
||||
alertify.alert('Filter By Selection Error',
|
||||
'{{ _('Not connected to server or connection with the server has been closed.') }}'
|
||||
'{{ _('Not connected to the server or the connection to the server has been closed.') }}'
|
||||
);
|
||||
return;
|
||||
}
|
||||
@ -1523,7 +1523,7 @@ define(
|
||||
error: function(e) {
|
||||
if (e.readyState == 0) {
|
||||
alertify.alert('Filter Exclude Selection Error',
|
||||
'{{ _('Not connected to server or connection with the server has been closed.') }}'
|
||||
'{{ _('Not connected to the server or the connection to the server has been closed.') }}'
|
||||
);
|
||||
return;
|
||||
}
|
||||
@ -1559,7 +1559,7 @@ define(
|
||||
error: function(e) {
|
||||
if (e.readyState == 0) {
|
||||
alertify.alert('Remove Filter Error',
|
||||
'{{ _('Not connected to server or connection with the server has been closed.') }}'
|
||||
'{{ _('Not connected to the server or the connection to the server has been closed.') }}'
|
||||
);
|
||||
return;
|
||||
}
|
||||
@ -1600,7 +1600,7 @@ define(
|
||||
error: function(e) {
|
||||
if (e.readyState == 0) {
|
||||
alertify.alert('Apply Filter Error',
|
||||
'{{ _('Not connected to server or connection with the server has been closed.') }}'
|
||||
'{{ _('Not connected to the server or the connection to the server has been closed.') }}'
|
||||
);
|
||||
return;
|
||||
}
|
||||
@ -1675,7 +1675,7 @@ define(
|
||||
error: function(e) {
|
||||
if (e.readyState == 0) {
|
||||
alertify.alert('Change limit Error',
|
||||
'{{ _('Not connected to server or connection with the server has been closed.') }}'
|
||||
'{{ _('Not connected to the server or the connection to the server has been closed.') }}'
|
||||
);
|
||||
return;
|
||||
}
|
||||
@ -1707,7 +1707,7 @@ define(
|
||||
|
||||
self.trigger(
|
||||
'pgadmin-sqleditor:loading-icon:show',
|
||||
'{{ _('Initializing the query execution!') }}'
|
||||
'{{ _('Initializing query execution.') }}'
|
||||
);
|
||||
|
||||
/* If code is selected in the code mirror then execute
|
||||
@ -1771,7 +1771,7 @@ define(
|
||||
|
||||
if (e.readyState == 0) {
|
||||
self.update_msg_history(false,
|
||||
'{{ _('Not connected to server Or connection with the server has been closed.') }}'
|
||||
'{{ _('Not connected to the server or the connection to the server has been closed.') }}'
|
||||
);
|
||||
return;
|
||||
}
|
||||
@ -1870,7 +1870,7 @@ define(
|
||||
|
||||
if (e.readyState == 0) {
|
||||
alertify.alert('Cancel Query Error',
|
||||
'{{ _('Not connected to server Or connection with the server has been closed.') }}'
|
||||
'{{ _('Not connected to the server or the connection to the server has been closed.') }}'
|
||||
);
|
||||
return;
|
||||
}
|
||||
@ -1933,7 +1933,7 @@ define(
|
||||
error: function(e) {
|
||||
if (e.readyState == 0) {
|
||||
alertify.alert('Get Object Name Error',
|
||||
'{{ _('Not connected to server Or connection with the server has been closed.') }}'
|
||||
'{{ _('Not connected to the server or the connection to the server has been closed.') }}'
|
||||
);
|
||||
return;
|
||||
}
|
||||
@ -1984,7 +1984,7 @@ define(
|
||||
error: function(e) {
|
||||
if (e.readyState == 0) {
|
||||
alertify.alert('Auto Rollback Error',
|
||||
'{{ _('Not connected to server or connection with the server has been closed.') }}'
|
||||
'{{ _('Not connected to the server or the connection to the server has been closed.') }}'
|
||||
);
|
||||
return;
|
||||
}
|
||||
@ -2024,7 +2024,7 @@ define(
|
||||
error: function(e) {
|
||||
if (e.readyState == 0) {
|
||||
alertify.alert('Auto Commit Error',
|
||||
'{{ _('Not connected to server Or connection with the server has been closed.') }}'
|
||||
'{{ _('Not connected to the server or the connection to the server has been closed.') }}'
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
@ -116,7 +116,7 @@ def gone(errormsg=''):
|
||||
)
|
||||
|
||||
|
||||
def not_implemented(errormsg=_('It is not implemented!')):
|
||||
def not_implemented(errormsg=_('Not implemented.')):
|
||||
"""Create a response with HTTP status code 501 - Not Implemented."""
|
||||
return make_json_response(
|
||||
status=501,
|
||||
|
@ -186,7 +186,7 @@ class Connection(BaseConnection):
|
||||
user = User.query.filter_by(id=current_user.id).first()
|
||||
|
||||
if user is None:
|
||||
return False, gettext("Unauthorized Request.")
|
||||
return False, gettext("Unauthorized request.")
|
||||
|
||||
try:
|
||||
password = decrypt(encpass, user.password)
|
||||
@ -365,12 +365,12 @@ Connection to database server (#{server_id}) for the connection - '{conn_id}' ha
|
||||
if not status:
|
||||
errmsg = gettext(
|
||||
"""
|
||||
Attempt to reconnect has failed with the below error:
|
||||
Attempt to reconnect failed with the error:
|
||||
{0}""".format(errmsg)
|
||||
)
|
||||
|
||||
if not status:
|
||||
msg = gettext("Connection was lost!\n{0}").format(errmsg)
|
||||
msg = gettext("Connection lost.\n{0}").format(errmsg)
|
||||
current_app.logger.error(errmsg)
|
||||
|
||||
return False, msg
|
||||
@ -399,7 +399,7 @@ Attempting to reconnect to the database server (#{server_id}) for the connection
|
||||
msg = gettext(
|
||||
"""
|
||||
Connection for server#{0} with database "{1}" was lost.
|
||||
Attempt to reconnect it failed with the below error:
|
||||
Attempt to reconnect it failed with the error:
|
||||
{2}"""
|
||||
).format(self.driver.server_id, self.database, cur)
|
||||
current_app.logger.error(msg)
|
||||
@ -677,7 +677,7 @@ Failed to execute query (execute_void) for the server #{server_id} - {conn_id}
|
||||
user = User.query.filter_by(id=current_user.id).first()
|
||||
|
||||
if user is None:
|
||||
return False, gettext("Unauthorized Request.")
|
||||
return False, gettext("Unauthorized request.")
|
||||
|
||||
password = decrypt(password, user.password).decode()
|
||||
|
||||
@ -698,7 +698,7 @@ Failed to execute query (execute_void) for the server #{server_id} - {conn_id}
|
||||
current_app.logger.error(
|
||||
gettext(
|
||||
"""
|
||||
Failed to reset the connection of the server due to following error:
|
||||
Failed to reset the connection to the server due to following error:
|
||||
{0}"""
|
||||
).Format(msg)
|
||||
)
|
||||
@ -885,7 +885,7 @@ Failed to reset the connection of the server due to following error:
|
||||
# Fetch Logged in User Details.
|
||||
user = User.query.filter_by(id=current_user.id).first()
|
||||
if user is None:
|
||||
return False, gettext("Unauthorized Request.")
|
||||
return False, gettext("Unauthorized request.")
|
||||
|
||||
password = decrypt(password, user.password).decode()
|
||||
|
||||
@ -1069,23 +1069,23 @@ class ServerManager(object):
|
||||
def MajorVersion(self):
|
||||
if self.sversion is not None:
|
||||
return int(self.sversion / 10000)
|
||||
raise Exception("Information is not available!")
|
||||
raise Exception("Information is not available.")
|
||||
|
||||
def MinorVersion(self):
|
||||
if self.sversion:
|
||||
return int(int(self.sversion / 100) % 100)
|
||||
raise Exception("Information is not available!")
|
||||
raise Exception("Information is not available.")
|
||||
|
||||
def PatchVersion(self):
|
||||
if self.sversion:
|
||||
return int(int(self.sversion / 100) / 100)
|
||||
raise Exception("Information is not available!")
|
||||
raise Exception("Information is not available.")
|
||||
|
||||
def connection(
|
||||
self, database=None, conn_id=None, auto_reconnect=True, did=None
|
||||
):
|
||||
msg_active_conn = gettext(
|
||||
"Server has no active connection, please connect it first!"
|
||||
"Server has no active connection. Please connect to the server."
|
||||
)
|
||||
|
||||
if database is None:
|
||||
@ -1114,7 +1114,7 @@ WHERE db.oid = {0}""".format(did))
|
||||
|
||||
if did not in self.db_info:
|
||||
raise Exception(gettext(
|
||||
"Couldn't find the database!"
|
||||
"Couldn't find the specified database."
|
||||
))
|
||||
|
||||
if database is None:
|
||||
|
@ -71,7 +71,7 @@ class DriverRegistry(ABCMeta):
|
||||
return DriverRegistry.drivers[name]
|
||||
|
||||
raise NotImplementedError(
|
||||
gettext("Driver - '{0}' has not been implemented!").format(name)
|
||||
gettext("Driver '{0}' has not been implemented.").format(name)
|
||||
)
|
||||
|
||||
@classmethod
|
||||
|
@ -144,31 +144,31 @@ class _Preference(object):
|
||||
if self._type == 'boolean' or self._type == 'switch' or \
|
||||
self._type == 'node':
|
||||
if type(value) != bool:
|
||||
return False, gettext("Invalid value for boolean type!")
|
||||
return False, gettext("Invalid value for a boolean option.")
|
||||
elif self._type == 'integer':
|
||||
value = int(value)
|
||||
if type(value) != int:
|
||||
return False, gettext("Invalid value for integer type!")
|
||||
return False, gettext("Invalid value for an integer option.")
|
||||
elif self._type == 'numeric':
|
||||
value = float(value)
|
||||
t = type(value)
|
||||
if t != float and t != int and t != decimal.Decimal:
|
||||
return False, gettext("Invalid value for numeric type!")
|
||||
return False, gettext("Invalid value for a numeric option.")
|
||||
elif self._type == 'date':
|
||||
try:
|
||||
value = dateutil_parser.parse(value).date()
|
||||
except Exception as e:
|
||||
current_app.logger.exeception(e)
|
||||
return False, gettext("Invalid value for date type!")
|
||||
return False, gettext("Invalid value for a date option.")
|
||||
elif self._type == 'datetime':
|
||||
try:
|
||||
value = dateutil_parser.parse(value)
|
||||
except Exception as e:
|
||||
current_app.logger.exeception(e)
|
||||
return False, gettext("Invalid value for datetime type!")
|
||||
return False, gettext("Invalid value for a datetime option.")
|
||||
elif self._type == 'options':
|
||||
if value not in self.options:
|
||||
return False, gettext("Invalid value for options type!")
|
||||
return False, gettext("Invalid value for an options option.")
|
||||
|
||||
pref = UserPrefTable.query.filter_by(
|
||||
pid=self.pid
|
||||
@ -486,13 +486,13 @@ Did you forget to register it?"""
|
||||
# Can't find the reference for it in the configuration database,
|
||||
# create on for it.
|
||||
if module is None:
|
||||
return False, gettext("Couldn't find the specified module.")
|
||||
return False, gettext("Could not fine the specified module.")
|
||||
|
||||
m = cls.modules[module.name]
|
||||
|
||||
if m is None:
|
||||
return False, gettext(
|
||||
"Module '{0}' is no longer in use!"
|
||||
"Module '{0}' is no longer in use."
|
||||
).format(module.name)
|
||||
|
||||
category = None
|
||||
@ -519,7 +519,7 @@ Did you forget to register it?"""
|
||||
|
||||
if preference is None:
|
||||
return False, gettext(
|
||||
"Couldn't find the given preference!"
|
||||
"Could not find the specified preference."
|
||||
)
|
||||
|
||||
try:
|
||||
|
Loading…
Reference in New Issue
Block a user