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

@ -325,7 +325,7 @@ class ForeignDataWrapperView(PGChildNodeView):
if len(res['rows']) == 0:
return gone(
gettext("Couldnot find the foreign data wrapper information.")
gettext("Could not find the foreign data wrapper information.")
)
if res['rows'][0]['fdwoptions'] is not None:
@ -568,7 +568,7 @@ class ForeignDataWrapperView(PGChildNodeView):
if len(res['rows']) == 0:
return gone(
gettext("Couldnot find the foreign data wrapper information.")
gettext("Could not find the foreign data wrapper information.")
)
if res['rows'][0]['fdwoptions'] is not None:

View File

@ -252,7 +252,7 @@ define('pgadmin.node.language', [
var handler_func = this.get('lanproc');
if (_.isUndefined(handler_func) || _.isNull(handler_func) ||
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);
return msg;
} else {

View File

@ -430,7 +430,7 @@ class CollationView(PGChildNodeView):
status=410,
success=0,
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, '') == '')) {
copy_coll_flag = true;
}
if (locale_flag && (lc_coll_flag || lc_coll_flag) && copy_coll_flag) {
msg = gettext('Definition incomplete, Please provide Locale OR Copy collation OR LC_TYPE/LC_COLLATE!');
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.');
err['locale'] = msg
}
return null;

View File

@ -862,7 +862,7 @@ class FtsConfigurationView(PGChildNodeView):
if not status:
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(
res
)
@ -871,7 +871,7 @@ class FtsConfigurationView(PGChildNodeView):
if res is None:
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)

View File

@ -392,7 +392,7 @@ class FunctionView(PGChildNodeView, DataTypeReader):
if fnid is not None:
if len(rset['rows']) == 0:
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]

View File

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

View File

@ -188,7 +188,7 @@ define('pgadmin.node.sequence', [
editable: false, type: 'collection', canAdd: true, canDelete: true,
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,
type: 'collection', canEdit: false, group: 'security',
mode: ['edit', 'create'], canDelete: true,

View File

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

View File

@ -255,7 +255,7 @@ function(gettext, url_for, $, _, S, pgAdmin, pgBrowser, Backform, alertify) {
alertify.confirm(
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) {
if (e) {
var data = d;
@ -733,7 +733,7 @@ function(gettext, url_for, $, _, S, pgAdmin, pgBrowser, Backform, alertify) {
if (!_.isUndefined(tbl_name) &&
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) {
if (e) {
// User clicks Ok, lets clear columns collection
@ -975,9 +975,9 @@ function(gettext, url_for, $, _, S, pgAdmin, pgBrowser, Backform, alertify) {
},{
id: 'partition_note', label: gettext('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>' +
'<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>'),
visible: function(m) {
if(!_.isUndefined(m.node_info) && !_.isUndefined(m.node_info.server)

View File

@ -219,7 +219,7 @@ define('pgadmin.node.table', [
alertify.confirm(
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) {
if (e) {
var data = d;

View File

@ -217,9 +217,9 @@ define('pgadmin.node.type', [
else if (this.get('is_precision')
&& !_.isUndefined(this.get('precision'))) {
if (this.get('precision') < this.get('min_val'))
errmsg = gettext('Scale should not be less than %(value)s', {value: this.get('min_val')});
errmsg = gettext('Scale should not be less than %(value)s', {value: this.get('min_val')});
if (this.get('precision') > this.get('max_val'))
errmsg = gettext('Scale should not be greater than %(value)s', {value: this.get('max_val')});
errmsg = gettext('Scale should not be greater than %(value)s', {value: this.get('max_val')});
// If we have any error set then throw it to user
if(errmsg) {
this.errorModel.set('precision', errmsg)

View File

@ -168,7 +168,7 @@ define('pgadmin.node.tablespace', [
alertify.dialog('move_objects_dlg' ,function factory() {
return {
main: function() {
var title = gettext('Move objects to another tablespace ');
var title = gettext('Move objects to another tablespace');
this.set('title', title);
},
build: function() {

View File

@ -77,8 +77,8 @@ function(url_for, gettext, r, $, _, pgAdmin, Backbone, Backgrid, Flotr,
} else {
title = gettext('Terminate Session?');
txtConfirm = gettext('Are you sure you wish to terminate the session?');
txtSuccess = gettext('Session terminateed successfully.')
txtError = gettext('An error occurred whilst terminateing the active query.')
txtSuccess = gettext('Session terminated successfully.')
txtError = gettext('An error occurred whilst terminating the active query.')
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">
<h4>{{ _('Feature rich') }} | {{ _('Maximises PostgreSQL') }} | {{ _('Open Source') }} </h4>
<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>
</div>
</div>

View File

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

View File

@ -1000,7 +1000,7 @@ define([
page_title: _('Final (Review Selection) (step 3 of 3)'),
show_description: _('The SQL below will be executed on the ' +
'database server to grant the selected privileges. ' +
'Please click on <b>Finish</b> to complete the process. '),
'Please click on <b>Finish</b> to complete the process.'),
model: newModel,
view: new(function() {

View File

@ -121,7 +121,7 @@ class SqlEditorModule(PgAdminModule):
'The length of time to display the query info notifier after '
'execution has completed. A value of -1 disables the notifier '
'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.'
)
)

View File

@ -2227,12 +2227,12 @@ define('tools.querytool', [
} else {
$("#btn-save").prop('disabled', true);
}
alertify.success(gettext("Row(s) deleted"));
alertify.success(gettext("Row(s) deleted."));
} else {
// There are other data to needs to be updated on server
if(is_updated) {
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;
}
@ -3439,13 +3439,13 @@ define('tools.querytool', [
success: function (res) {
if (res.success == undefined || !res.success) {
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) {
alertify.alert('Explain options error',
gettext("Error occurred while setting verbose option in explain")
gettext("Error occurred while setting verbose option in explain.")
);
return;
}
@ -3477,13 +3477,13 @@ define('tools.querytool', [
success: function (res) {
if (res.success == undefined || !res.success) {
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) {
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) {
if (res.success == undefined || !res.success) {
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) {
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) {
if (res.success == undefined || !res.success) {
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) {
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) {
updateUI();
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(
success=1,
info=_("User Deleted."),
info=_("User deleted."),
data={}
)
except Exception as e:

View File

@ -547,7 +547,7 @@ class Preferences(object):
# Can't find the reference for it in the configuration database,
# create on for it.
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]