Added missing gettext.
parent
c86a3d64fc
commit
7648bd9646
|
@ -62,12 +62,13 @@ BROWSER_STATIC = 'browser.static'
|
|||
JQUERY_ACIPLUGIN = 'jquery.aciplugin'
|
||||
BROWSER_INDEX = 'browser.index'
|
||||
PGADMIN_BROWSER = 'pgAdmin.Browser'
|
||||
PASS_ERROR_MSG = 'Your password has not been changed.'
|
||||
SMTP_SOCKET_ERROR = 'SMTP Socket error: {error}\n {pass_error}'.format(
|
||||
PASS_ERROR_MSG = gettext('Your password has not been changed.')
|
||||
SMTP_SOCKET_ERROR = gettext(
|
||||
'SMTP Socket error: {error}\n {pass_error}').format(
|
||||
error={}, pass_error=PASS_ERROR_MSG)
|
||||
SMTP_ERROR = gettext('SMTP error: {error}\n {pass_error}').format(
|
||||
error={}, pass_error=PASS_ERROR_MSG)
|
||||
SMTP_ERROR = 'SMTP error: {error}\n {pass_error}'.format(
|
||||
error={}, pass_error=PASS_ERROR_MSG)
|
||||
PASS_ERROR = 'Error: {error}\n {pass_error}'.format(
|
||||
PASS_ERROR = gettext('Error: {error}\n {pass_error}').format(
|
||||
error={}, pass_error=PASS_ERROR_MSG)
|
||||
|
||||
|
||||
|
|
|
@ -264,7 +264,7 @@ define('pgadmin.node.domain', [
|
|||
},{
|
||||
id: 'typdefault', label: gettext('Default'), cell: 'string',
|
||||
type: 'text', group: gettext('Definition'),
|
||||
placeholder: 'Enter an expression or a value.',
|
||||
placeholder: gettext('Enter an expression or a value.'),
|
||||
},{
|
||||
id: 'typnotnull', label: gettext('Not NULL?'), cell: 'boolean',
|
||||
type: 'switch', group: gettext('Definition'),
|
||||
|
|
|
@ -203,7 +203,7 @@ define('pgadmin.node.foreign_table', [
|
|||
},{
|
||||
id: 'typdefault', label: gettext('Default'), type: 'text',
|
||||
cell: 'string', min_version: 90300, group: gettext('Definition'),
|
||||
placeholder: 'Enter an expression or a value.',
|
||||
placeholder: gettext('Enter an expression or a value.'),
|
||||
cellHeaderClasses: 'width_percent_10',
|
||||
editable: function(m) {
|
||||
if(!(_.isUndefined(m.get('inheritedid'))
|
||||
|
|
|
@ -40,7 +40,7 @@ define('pgadmin.node.column', [
|
|||
type: 'text', disabled: false, node: 'column',
|
||||
options: [['n_distinct', 'n_distinct'],
|
||||
['n_distinct_inherited','n_distinct_inherited']],
|
||||
select2: {placeholder: 'Select variable'},
|
||||
select2: {placeholder: gettext('Select variable')},
|
||||
cellHeaderClasses:'width_percent_50',
|
||||
},{
|
||||
id: 'value', label: gettext('Value'),
|
||||
|
@ -483,7 +483,7 @@ define('pgadmin.node.column', [
|
|||
id: 'attstorage', label: gettext('Storage'), group: gettext('Definition'),
|
||||
type: 'text', mode: ['properties', 'edit'],
|
||||
cell: 'string', disabled: 'inSchemaWithColumnCheck', first_empty: true,
|
||||
control: 'select2', select2: { placeholder: 'Select storage',
|
||||
control: 'select2', select2: { placeholder: gettext('Select storage'),
|
||||
allowClear: false,
|
||||
width: '100%',
|
||||
},
|
||||
|
@ -575,7 +575,7 @@ define('pgadmin.node.column', [
|
|||
}, {
|
||||
id: 'attidentity', label: gettext('Identity'), control: 'select2',
|
||||
cell: 'select2',
|
||||
select2: {placeholder: 'Select identity', allowClear: false, width: '100%'},
|
||||
select2: {placeholder: gettext('Select identity'), allowClear: false, width: '100%'},
|
||||
min_version: 100000, group: gettext('Constraints'),
|
||||
'options': [
|
||||
{label: gettext('ALWAYS'), value: 'a'},
|
||||
|
|
|
@ -358,7 +358,7 @@ define('pgadmin.node.exclusion_constraint', [
|
|||
},
|
||||
select2: {
|
||||
allowClear: false, width: 'style',
|
||||
placeholder: 'Select column',
|
||||
placeholder: gettext('Select column'),
|
||||
}, first_empty: !self.model.isNew(),
|
||||
readonly: function() {
|
||||
return !_.isUndefined(self.model.get('oid'));
|
||||
|
|
|
@ -164,7 +164,7 @@ define('pgadmin.node.foreign_key', [
|
|||
id: 'references', label:'', type: 'text', cache_level: 'server',
|
||||
select2: {
|
||||
allowClear: false, width: 'style',
|
||||
placeholder: 'Select foreign table',
|
||||
placeholder: gettext('Select foreign table'),
|
||||
}, first_empty: true,
|
||||
control: Backform.NodeListByNameControl.extend({
|
||||
formatter: Backform.ControlFormatter,
|
||||
|
|
|
@ -123,7 +123,7 @@ define('pgadmin.node.row_security_policy', [
|
|||
},
|
||||
{
|
||||
id: 'rls_expression_key_note', label: gettext('RLS policy expression'),
|
||||
type: 'note', group: 'Commands', mode: ['create', 'edit'],
|
||||
type: 'note', group: gettext('Commands'), mode: ['create', 'edit'],
|
||||
text: [
|
||||
'<ul><li>',
|
||||
'<strong>', gettext('Using: '), '</strong>',
|
||||
|
|
|
@ -344,11 +344,11 @@ define('pgadmin.node.type', [
|
|||
select2: { allowClear: false },
|
||||
options: function() {
|
||||
return [
|
||||
{label: 'Composite', value: 'c'},
|
||||
{label: 'Enumeration', value: 'e'},
|
||||
{label: 'External', value: 'b'},
|
||||
{label: 'Range', value: 'r'},
|
||||
{label: 'Shell', value: 'p'},
|
||||
{label: gettext('Composite'), value: 'c'},
|
||||
{label: gettext('Enumeration'), value: 'e'},
|
||||
{label: gettext('External'), value: 'b'},
|
||||
{label: gettext('Range'), value: 'r'},
|
||||
{label: gettext('Shell'), value: 'p'},
|
||||
];
|
||||
},
|
||||
// If create mode then by default open composite type
|
||||
|
|
|
@ -111,7 +111,7 @@ define([
|
|||
<div class="custom-control custom-checkbox custom-checkbox-no-label">
|
||||
<input tabindex="-1" type="checkbox" class="custom-control-input" id="${id}" />
|
||||
<label class="custom-control-label" for="${id}">
|
||||
<span class="sr-only">Select All<span>
|
||||
<span class="sr-only">` + gettext('Select All') + `<span>
|
||||
</label>
|
||||
</div>
|
||||
`);
|
||||
|
|
|
@ -101,7 +101,7 @@ define('tools.querytool', [
|
|||
this.set_server_version(opts.server_ver);
|
||||
this.trigger('pgadmin-sqleditor:view:initialised');
|
||||
this.connection_list = [
|
||||
{'server_group': null,'server': null, 'database': null, 'user': null, 'role': null, 'title': '<New Connection>'},
|
||||
{'server_group': null,'server': null, 'database': null, 'user': null, 'role': null, 'title': '<' + gettext('New Connection') + '>'},
|
||||
];
|
||||
},
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
##########################################################################
|
||||
|
||||
"""Definition of constants for SQLEditor."""
|
||||
from flask_babelex import gettext
|
||||
|
||||
# Async Constants
|
||||
ASYNC_OK = 1
|
||||
|
@ -24,9 +25,9 @@ TX_STATUS_INERROR = 3
|
|||
|
||||
# Connection status codes mapping
|
||||
CONNECTION_STATUS_MESSAGE_MAPPING = dict({
|
||||
0: 'The session is idle and there is no current transaction.',
|
||||
1: 'A command is currently in progress.',
|
||||
2: 'The session is idle in a valid transaction block.',
|
||||
3: 'The session is idle in a failed transaction block.',
|
||||
4: 'The connection with the server is bad.'
|
||||
0: gettext('The session is idle and there is no current transaction.'),
|
||||
1: gettext('A command is currently in progress.'),
|
||||
2: gettext('The session is idle in a valid transaction block.'),
|
||||
3: gettext('The session is idle in a failed transaction block.'),
|
||||
4: gettext('The connection with the server is bad.')
|
||||
})
|
||||
|
|
|
@ -739,9 +739,9 @@ def register_query_tool_preferences(self):
|
|||
self.keyword_case = self.preference.register(
|
||||
'editor', 'keyword_case',
|
||||
gettext("Keyword case"), 'radioModern', 'upper',
|
||||
options=[{'label': 'Upper case', 'value': 'upper'},
|
||||
{'label': 'Lower case', 'value': 'lower'},
|
||||
{'label': 'Capitalized', 'value': 'capitalize'}],
|
||||
options=[{'label': gettext('Upper case'), 'value': 'upper'},
|
||||
{'label': gettext('Lower case'), 'value': 'lower'},
|
||||
{'label': gettext('Capitalized'), 'value': 'capitalize'}],
|
||||
category_label=PREF_LABEL_SQL_FORMATTING,
|
||||
help_str=gettext(
|
||||
'Convert keywords to upper, lower, or capitalized casing.'
|
||||
|
@ -751,9 +751,9 @@ def register_query_tool_preferences(self):
|
|||
self.identifier_case = self.preference.register(
|
||||
'editor', 'identifier_case',
|
||||
gettext("Identifier case"), 'radioModern', 'upper',
|
||||
options=[{'label': 'Upper case', 'value': 'upper'},
|
||||
{'label': 'Lower case', 'value': 'lower'},
|
||||
{'label': 'Capitalized', 'value': 'capitalize'}],
|
||||
options=[{'label': gettext('Upper case'), 'value': 'upper'},
|
||||
{'label': gettext('Lower case'), 'value': 'lower'},
|
||||
{'label': gettext('Capitalized'), 'value': 'capitalize'}],
|
||||
category_label=PREF_LABEL_SQL_FORMATTING,
|
||||
help_str=gettext(
|
||||
'Convert identifiers to upper, lower, or capitalized casing.'
|
||||
|
|
Loading…
Reference in New Issue