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