Various string improvements and fixes.

pull/6/head
Alexander Lakhin 2017-11-01 12:58:19 +00:00 committed by Dave Page
parent 714a429879
commit 9be1364d1a
21 changed files with 40 additions and 40 deletions

View File

@ -252,7 +252,7 @@ define('pgadmin.node.language', [
var handler_func = this.get('lanproc'); var handler_func = this.get('lanproc');
if (_.isUndefined(handler_func) || _.isNull(handler_func) || if (_.isUndefined(handler_func) || _.isNull(handler_func) ||
String(handler_func).replace(/^\s+|\s+$/g, '') == '') { String(handler_func).replace(/^\s+|\s+$/g, '') == '') {
var msg = gettext('Handler Function cannot be empty'); var msg = gettext('Handler Function cannot be empty.');
this.errorModel.set('lanproc', msg); this.errorModel.set('lanproc', msg);
return msg; return msg;
} else { } else {

View File

@ -430,7 +430,7 @@ class CollationView(PGChildNodeView):
status=410, status=410,
success=0, success=0,
errormsg=gettext( errormsg=gettext(
"Definition incomplete. Please provide Locale OR Copy Collation OR LC_TYPE/LC_COLLATE" "Definition incomplete. Please provide Locale OR Copy Collation OR LC_TYPE/LC_COLLATE."
) )
) )

View File

@ -164,8 +164,8 @@ define('pgadmin.node.collation', [
|| String(this.get('copy_collation')).replace(/^\s+|\s+$/g, '') == '')) { || String(this.get('copy_collation')).replace(/^\s+|\s+$/g, '') == '')) {
copy_coll_flag = true; copy_coll_flag = true;
} }
if (locale_flag && (lc_coll_flag || lc_coll_flag) && copy_coll_flag) { if (locale_flag && (lc_coll_flag || lc_type_flag) && copy_coll_flag) {
msg = gettext('Definition incomplete, Please provide Locale OR Copy collation OR LC_TYPE/LC_COLLATE!'); msg = gettext('Definition incomplete. Please provide Locale OR Copy Collation OR LC_TYPE/LC_COLLATE.');
err['locale'] = msg err['locale'] = msg
} }
return null; return null;

View File

@ -862,7 +862,7 @@ class FtsConfigurationView(PGChildNodeView):
if not status: if not status:
return internal_server_error( return internal_server_error(
_( _(
"ERROR: Could not generate reversed engineered query for the FTS Configuration!\n{0}" "Could not generate reversed engineered query for the FTS Configuration.\n{0}"
).format( ).format(
res res
) )
@ -871,7 +871,7 @@ class FtsConfigurationView(PGChildNodeView):
if res is None: if res is None:
return gone( return gone(
_( _(
"ERROR: Could not generate reversed engineered query for FTS Configuration node!") "Could not generate reversed engineered query for FTS Configuration node.")
) )
return ajax_response(response=res) return ajax_response(response=res)

View File

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

View File

@ -453,7 +453,7 @@ class PackageView(PGChildNodeView):
return make_json_response( return make_json_response(
success=1, success=1,
info=_("Packge dropped"), info=_("Package dropped"),
data={ data={
'id': pkgid, 'id': pkgid,
'scid': scid, 'scid': scid,

View File

@ -188,7 +188,7 @@ define('pgadmin.node.sequence', [
editable: false, type: 'collection', canAdd: true, canDelete: true, editable: false, type: 'collection', canAdd: true, canDelete: true,
control: 'unique-col-collection', control: 'unique-col-collection',
},{ },{
id: 'securities', label: gettext('Securitiy Labels'), canAdd: true, id: 'securities', label: gettext('Security Labels'), canAdd: true,
model: pgBrowser.SecLabelModel, editable: false, model: pgBrowser.SecLabelModel, editable: false,
type: 'collection', canEdit: false, group: 'security', type: 'collection', canEdit: false, group: 'security',
mode: ['edit', 'create'], canDelete: true, mode: ['edit', 'create'], canDelete: true,

View File

@ -623,7 +623,7 @@ class CheckConstraintView(PGChildNodeView):
return make_json_response( return make_json_response(
success=1, success=1,
info=_("Check Constraint dropped."), info=_("Check constraint dropped."),
data={ data={
'id': tid, 'id': tid,
'scid': scid, 'scid': scid,

View File

@ -255,7 +255,7 @@ function(gettext, url_for, $, _, S, pgAdmin, pgBrowser, Backform, alertify) {
alertify.confirm( alertify.confirm(
gettext('Reset statistics'), gettext('Reset statistics'),
S(gettext('Are you sure you want to reset the statistics for table %s?')).sprintf(d._label).value(), S(gettext('Are you sure you want to reset the statistics for table "%s"?')).sprintf(d._label).value(),
function (e) { function (e) {
if (e) { if (e) {
var data = d; var data = d;
@ -733,7 +733,7 @@ function(gettext, url_for, $, _, S, pgAdmin, pgBrowser, Backform, alertify) {
if (!_.isUndefined(tbl_name) && if (!_.isUndefined(tbl_name) &&
tbl_name !== '' && column_collection.length !== 0) { tbl_name !== '' && column_collection.length !== 0) {
var msg = gettext('Changing of type table will clear columns collection'); var msg = gettext('Changing of table type will clear columns collection.');
alertify.confirm(msg, function (e) { alertify.confirm(msg, function (e) {
if (e) { if (e) {
// User clicks Ok, lets clear columns collection // User clicks Ok, lets clear columns collection
@ -975,7 +975,7 @@ function(gettext, url_for, $, _, S, pgAdmin, pgBrowser, Backform, alertify) {
},{ },{
id: 'partition_note', label: gettext('Partition'), id: 'partition_note', label: gettext('Partition'),
type: 'note', group: 'partition', type: 'note', group: 'partition',
text: gettext('Above control will be used to Create/Attach/Detach partitions.<br>' + text: gettext('The control above is used to Create/Attach/Detach partitions.<br>' +
'<ul><li>Create Mode: User will be able to create N number of partitions. Mode switch control is disabled in this scenario.</li>' + '<ul><li>Create Mode: User will be able to create N number of partitions. Mode switch control is disabled in this scenario.</li>' +
'<li>Edit Mode: User will be able to create/attach/detach N number of partitions. ' + '<li>Edit Mode: User will be able to create/attach/detach N number of partitions. ' +
'In attach mode there will be list of suitable tables to be attached.</li></ul>'), 'In attach mode there will be list of suitable tables to be attached.</li></ul>'),

View File

@ -219,7 +219,7 @@ define('pgadmin.node.table', [
alertify.confirm( alertify.confirm(
gettext('Reset statistics'), gettext('Reset statistics'),
S(gettext('Are you sure you want to reset the statistics for table %s?')).sprintf(d._label).value(), S(gettext('Are you sure you want to reset the statistics for table "%s"?')).sprintf(d._label).value(),
function (e) { function (e) {
if (e) { if (e) {
var data = d; var data = d;

View File

@ -77,8 +77,8 @@ function(url_for, gettext, r, $, _, pgAdmin, Backbone, Backgrid, Flotr,
} else { } else {
title = gettext('Terminate Session?'); title = gettext('Terminate Session?');
txtConfirm = gettext('Are you sure you wish to terminate the session?'); txtConfirm = gettext('Are you sure you wish to terminate the session?');
txtSuccess = gettext('Session terminateed successfully.') txtSuccess = gettext('Session terminated successfully.')
txtError = gettext('An error occurred whilst terminateing the active query.') txtError = gettext('An error occurred whilst terminating the active query.')
action_url = terminate_session_url + self.model.get('pid') action_url = terminate_session_url + self.model.get('pid')
} }

View File

@ -8,7 +8,7 @@
<img src="{{ url_for('dashboard.static', filename='img/welcome_logo.png') }}" alt="pgAdmin 4"> <img src="{{ url_for('dashboard.static', filename='img/welcome_logo.png') }}" alt="pgAdmin 4">
<h4>{{ _('Feature rich') }} | {{ _('Maximises PostgreSQL') }} | {{ _('Open Source') }} </h4> <h4>{{ _('Feature rich') }} | {{ _('Maximises PostgreSQL') }} | {{ _('Open Source') }} </h4>
<p> <p>
{{ _('pgAdmin is an open source administration and management tool for the PostgreSQL database. The tools include a graphical administration interface, an SQL query tool, a procedural code debugger and much more. The tool is designed to answer the needs of developers, DBAs and system administrators alike.') }} {{ _('pgAdmin is an Open Source administration and management tool for the PostgreSQL database. It includes a graphical administration interface, an SQL query tool, a procedural code debugger and much more. The tool is designed to answer the needs of developers, DBAs and system administrators alike.') }}
</p> </p>
</div> </div>
</div> </div>

View File

@ -1464,11 +1464,11 @@
}); });
} else { } else {
this.sqlCtrl.clearHistory(); this.sqlCtrl.clearHistory();
this.sqlCtrl.setValue('-- ' + gettext('Definition incomplete')); this.sqlCtrl.setValue('-- ' + gettext('Definition incomplete.'));
} }
} else { } else {
this.sqlCtrl.clearHistory(); this.sqlCtrl.clearHistory();
this.sqlCtrl.setValue('-- ' + gettext('Nothing changed')); this.sqlCtrl.setValue('-- ' + gettext('Nothing changed.'));
} }
this.sqlCtrl.refresh.apply(this.sqlCtrl); this.sqlCtrl.refresh.apply(this.sqlCtrl);
} }

View File

@ -121,7 +121,7 @@ class SqlEditorModule(PgAdminModule):
'The length of time to display the query info notifier after ' 'The length of time to display the query info notifier after '
'execution has completed. A value of -1 disables the notifier ' 'execution has completed. A value of -1 disables the notifier '
'and a value of 0 displays it until clicked. Values greater ' 'and a value of 0 displays it until clicked. Values greater '
'than 1 display the notifier for the number of seconds ' 'than 0 display the notifier for the number of seconds '
'specified.' 'specified.'
) )
) )

View File

@ -2227,12 +2227,12 @@ define('tools.querytool', [
} else { } else {
$("#btn-save").prop('disabled', true); $("#btn-save").prop('disabled', true);
} }
alertify.success(gettext("Row(s) deleted")); alertify.success(gettext("Row(s) deleted."));
} else { } else {
// There are other data to needs to be updated on server // There are other data to needs to be updated on server
if(is_updated) { if(is_updated) {
alertify.alert(gettext("Operation failed"), alertify.alert(gettext("Operation failed"),
gettext("There are unsaved changes in grid, Please save them first to avoid inconsistency in data") gettext("There are unsaved changes in the grid. Please save them first to avoid data inconsistencies.")
); );
return; return;
} }
@ -3439,13 +3439,13 @@ define('tools.querytool', [
success: function (res) { success: function (res) {
if (res.success == undefined || !res.success) { if (res.success == undefined || !res.success) {
alertify.alert('Explain options error', alertify.alert('Explain options error',
gettext("Error occurred while setting verbose option in explain") gettext("Error occurred while setting verbose option in explain.")
); );
} }
}, },
error: function (e) { error: function (e) {
alertify.alert('Explain options error', alertify.alert('Explain options error',
gettext("Error occurred while setting verbose option in explain") gettext("Error occurred while setting verbose option in explain.")
); );
return; return;
} }
@ -3477,13 +3477,13 @@ define('tools.querytool', [
success: function (res) { success: function (res) {
if (res.success == undefined || !res.success) { if (res.success == undefined || !res.success) {
alertify.alert('Explain options error', alertify.alert('Explain options error',
gettext("Error occurred while setting costs option in explain") gettext("Error occurred while setting costs option in explain.")
); );
} }
}, },
error: function (e) { error: function (e) {
alertify.alert('Explain options error', alertify.alert('Explain options error',
gettext("Error occurred while setting costs option in explain") gettext("Error occurred while setting costs option in explain.")
); );
} }
}); });
@ -3514,13 +3514,13 @@ define('tools.querytool', [
success: function (res) { success: function (res) {
if (res.success == undefined || !res.success) { if (res.success == undefined || !res.success) {
alertify.alert('Explain options error', alertify.alert('Explain options error',
gettext("Error occurred while setting buffers option in explain") gettext("Error occurred while setting buffers option in explain.")
); );
} }
}, },
error: function (e) { error: function (e) {
alertify.alert('Explain options error', alertify.alert('Explain options error',
gettext("Error occurred while setting buffers option in explain") gettext("Error occurred while setting buffers option in explain.")
); );
} }
}); });
@ -3550,13 +3550,13 @@ define('tools.querytool', [
success: function (res) { success: function (res) {
if (res.success == undefined || !res.success) { if (res.success == undefined || !res.success) {
alertify.alert('Explain options error', alertify.alert('Explain options error',
gettext("Error occurred while setting timing option in explain") gettext("Error occurred while setting timing option in explain.")
); );
} }
}, },
error: function (e) { error: function (e) {
alertify.alert('Explain options error', alertify.alert('Explain options error',
gettext("Error occurred while setting timing option in explain") gettext("Error occurred while setting timing option in explain.")
); );
} }
}); });
@ -3654,7 +3654,7 @@ define('tools.querytool', [
error: function (e) { error: function (e) {
updateUI(); updateUI();
alertify.alert('Get Preferences error', alertify.alert('Get Preferences error',
gettext("Error occurred while getting query tool options ") gettext("Error occurred while getting query tool options.")
); );
} }
}); });

View File

@ -282,7 +282,7 @@ def delete(uid):
return make_json_response( return make_json_response(
success=1, success=1,
info=_("User Deleted."), info=_("User deleted."),
data={} data={}
) )
except Exception as e: except Exception as e:

View File

@ -547,7 +547,7 @@ class Preferences(object):
# Can't find the reference for it in the configuration database, # Can't find the reference for it in the configuration database,
# create on for it. # create on for it.
if module is None: if module is None:
return False, gettext("Could not fine the specified module.") return False, gettext("Could not find the specified module.")
m = cls.modules[module.name] m = cls.modules[module.name]