diff --git a/docs/en_US/release_notes_6_9.rst b/docs/en_US/release_notes_6_9.rst
index 1a54431ea..179f636cd 100644
--- a/docs/en_US/release_notes_6_9.rst
+++ b/docs/en_US/release_notes_6_9.rst
@@ -2,7 +2,7 @@
Version 6.9
************
-Release date: 2022-05-05
+Release date: 2022-05-06
This release contains a number of bug fixes and new features since the release of pgAdmin4 6.8.
diff --git a/web/pgadmin/browser/server_groups/servers/databases/casts/__init__.py b/web/pgadmin/browser/server_groups/servers/databases/casts/__init__.py
index 346de04ec..6d8a9fb04 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/casts/__init__.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/casts/__init__.py
@@ -614,7 +614,7 @@ class CastView(PGChildNodeView, SchemaDiffObjectCompare):
data=data, conn=self.conn
)
else:
- return "-- definition incomplete", None
+ return gettext("-- definition incomplete"), None
return sql, data['srctyp'] + "->" + data["trgtyp"]
@check_precondition
diff --git a/web/pgadmin/browser/server_groups/servers/databases/casts/static/js/cast.ui.js b/web/pgadmin/browser/server_groups/servers/databases/casts/static/js/cast.ui.js
index ddbfaa608..e81d74401 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/casts/static/js/cast.ui.js
+++ b/web/pgadmin/browser/server_groups/servers/databases/casts/static/js/cast.ui.js
@@ -143,11 +143,11 @@ export default class CastSchema extends BaseUISchema {
{
id: 'castcontext', label: gettext('Context'), readonly: true,
options:[{
- label: 'IMPLICIT', value: 'IMPLICIT',
+ label: gettext('IMPLICIT'), value: 'IMPLICIT',
},{
- label: 'EXPLICIT', value: 'EXPLICIT',
+ label: gettext('EXPLICIT'), value: 'EXPLICIT',
},{
- label: 'ASSIGNMENT', value: 'ASSIGNMENT',
+ label: gettext('ASSIGNMENT'), value: 'ASSIGNMENT',
}], type: 'select', group: gettext('Definition'),
mode:['properties', 'edit'],
controlProps: {
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/__init__.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/__init__.py
index 81058cae0..823eb377b 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/__init__.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/__init__.py
@@ -683,10 +683,10 @@ class CollationView(PGChildNodeView, SchemaDiffObjectCompare):
for arg in required_args:
if arg not in data:
- return "-- missing definition"
+ return gettext("-- missing definition")
if self._check_definition(data):
- return "-- missing definition"
+ return gettext("-- missing definition")
SQL = render_template("/".join([self.template_path,
self._CREATE_SQL]),
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/__init__.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/__init__.py
index cc08f6ec0..e5fd7fea7 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/__init__.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/__init__.py
@@ -655,7 +655,7 @@ class SynonymView(PGChildNodeView, SchemaDiffObjectCompare):
for arg in required_args:
if arg not in data:
- return "-- missing definition"
+ return gettext("-- missing definition")
name = data['name']
SQL = render_template("/".join([self.template_path,
diff --git a/web/pgadmin/misc/cloud/static/js/CloudWizard.jsx b/web/pgadmin/misc/cloud/static/js/CloudWizard.jsx
index 8da047d6f..cc4b7daad 100644
--- a/web/pgadmin/misc/cloud/static/js/CloudWizard.jsx
+++ b/web/pgadmin/misc/cloud/static/js/CloudWizard.jsx
@@ -57,7 +57,8 @@ const useStyles = makeStyles(() =>
export default function CloudWizard({ nodeInfo, nodeData }) {
const classes = useStyles();
- var steps = ['Cloud Provider', 'Credentials', 'Instance Specification', 'Database Details', 'Review'];
+ var steps = [gettext('Cloud Provider'), gettext('Credentials'),
+ gettext('Instance Specification'), gettext('Database Details'), gettext('Review')];
const [currentStep, setCurrentStep] = React.useState('');
const [selectionVal, setCloudSelection] = React.useState('');
const [errMsg, setErrMsg] = React.useState('');
diff --git a/web/pgadmin/misc/cloud/utils/__init__.py b/web/pgadmin/misc/cloud/utils/__init__.py
index a74e392be..abaa92283 100644
--- a/web/pgadmin/misc/cloud/utils/__init__.py
+++ b/web/pgadmin/misc/cloud/utils/__init__.py
@@ -13,6 +13,7 @@ from flask_security import current_user
from pgadmin.misc.bgprocess.processes import IProcessDesc
from pgadmin.utils import html
from pgadmin.model import db, Server
+from flask_babel import gettext
def get_my_ip():
@@ -74,8 +75,8 @@ class CloudProcessDesc(IProcessDesc):
@property
def message(self):
- return "Deployment on {0} is started for instance {1}.".format(
- self.provider, self.instance_name)
+ return gettext("Deployment on {0} is started for instance {1}.".format(
+ self.provider, self.instance_name))
def details(self, cmd, args):
res = '
' + self.message
@@ -88,4 +89,4 @@ class CloudProcessDesc(IProcessDesc):
@property
def type_desc(self):
- return "Cloud Deployment"
+ return gettext("Cloud Deployment")
diff --git a/web/pgadmin/tools/grant_wizard/static/js/GrantWizard.jsx b/web/pgadmin/tools/grant_wizard/static/js/GrantWizard.jsx
index 2bf300b9c..b253c067c 100644
--- a/web/pgadmin/tools/grant_wizard/static/js/GrantWizard.jsx
+++ b/web/pgadmin/tools/grant_wizard/static/js/GrantWizard.jsx
@@ -113,7 +113,7 @@ export default function GrantWizard({ sid, did, nodeInfo, nodeData }) {
isVisible: false
}
];
- var steps = ['Object Selection', 'Privilege Selection', 'Review'];
+ var steps = [gettext('Object Selection'), gettext('Privilege Selection'), gettext('Review')];
const [selectedObject, setSelectedObject] = React.useState([]);
const [selectedAcl, setSelectedAcl] = React.useState({});
const [msqlData, setSQL] = React.useState('');
diff --git a/web/pgadmin/tools/import_export_servers/static/js/ImportExportServers.jsx b/web/pgadmin/tools/import_export_servers/static/js/ImportExportServers.jsx
index 9367d56c0..bc86944fc 100644
--- a/web/pgadmin/tools/import_export_servers/static/js/ImportExportServers.jsx
+++ b/web/pgadmin/tools/import_export_servers/static/js/ImportExportServers.jsx
@@ -57,7 +57,7 @@ export default function ImportExportServers() {
const classes = useStyles();
const tableClasses = commonTableStyles();
- var steps = ['Import/Export', 'Database Servers', 'Summary'];
+ var steps = [gettext('Import/Export'), gettext('Database Servers'), gettext('Summary')];
const [loaderText, setLoaderText] = React.useState('');
const [errMsg, setErrMsg] = React.useState('');
const [selectionFormData, setSelectionFormData] = React.useState({});
diff --git a/web/pgadmin/tools/sqleditor/static/js/components/QueryToolComponent.jsx b/web/pgadmin/tools/sqleditor/static/js/components/QueryToolComponent.jsx
index 9895b3a87..96aa1c1ee 100644
--- a/web/pgadmin/tools/sqleditor/static/js/components/QueryToolComponent.jsx
+++ b/web/pgadmin/tools/sqleditor/static/js/components/QueryToolComponent.jsx
@@ -160,7 +160,7 @@ export default function QueryToolComponent({params, pgWindow, pgAdmin, selectedN
{
tabs: [
LayoutHelper.getPanel({id: PANELS.QUERY, title: gettext('Query'), content: }),
- LayoutHelper.getPanel({id: PANELS.HISTORY, title: 'Query History', content: ,
+ LayoutHelper.getPanel({id: PANELS.HISTORY, title: gettext('Query History'), content: ,
cached: undefined}),
],
},
@@ -187,13 +187,13 @@ export default function QueryToolComponent({params, pgWindow, pgAdmin, selectedN
{
tabs: [
LayoutHelper.getPanel({
- id: PANELS.DATA_OUTPUT, title: 'Data output', content: ,
+ id: PANELS.DATA_OUTPUT, title: gettext('Data output'), content: ,
}),
LayoutHelper.getPanel({
- id: PANELS.MESSAGES, title:'Messages', content: ,
+ id: PANELS.MESSAGES, title: gettext('Messages'), content: ,
}),
LayoutHelper.getPanel({
- id: PANELS.NOTIFICATIONS, title:'Notifications', content: ,
+ id: PANELS.NOTIFICATIONS, title: gettext('Notifications'), content: ,
}),
],
}
diff --git a/web/pgadmin/tools/sqleditor/static/js/components/sections/ResultSet.jsx b/web/pgadmin/tools/sqleditor/static/js/components/sections/ResultSet.jsx
index 1167ce2b3..e434ecf61 100644
--- a/web/pgadmin/tools/sqleditor/static/js/components/sections/ResultSet.jsx
+++ b/web/pgadmin/tools/sqleditor/static/js/components/sections/ResultSet.jsx
@@ -765,7 +765,7 @@ export function ResultSet() {
}
LayoutHelper.openTab(queryToolCtx.docker, {
id: PANELS.EXPLAIN,
- title:'Explain',
+ title:gettext('Explain'),
content: ,
closable: true,
}, PANELS.MESSAGES, 'after-tab', true);
@@ -1147,7 +1147,7 @@ export function ResultSet() {
let selRowsData = selectedRows.size === 0 ? rows : rows.filter((r)=>selectedRows.has(rowKeyGetter(r)));
LayoutHelper.openTab(queryToolCtx.docker, {
id: PANELS.GEOMETRY,
- title:'Geometry Viewer',
+ title:gettext('Geometry Viewer'),
content: ,
closable: true,
}, PANELS.MESSAGES, 'after-tab', true);
diff --git a/web/pgadmin/tools/sqleditor/static/js/components/sections/StatusBar.jsx b/web/pgadmin/tools/sqleditor/static/js/components/sections/StatusBar.jsx
index 446075cd9..2fb459591 100644
--- a/web/pgadmin/tools/sqleditor/static/js/components/sections/StatusBar.jsx
+++ b/web/pgadmin/tools/sqleditor/static/js/components/sections/StatusBar.jsx
@@ -59,7 +59,7 @@ export function StatusBar() {
});
eventBus.registerListener(QUERY_TOOL_EVENTS.EXECUTION_END, ()=>{
pauseTimer();
- setLastTaskText('Query complete');
+ setLastTaskText(gettext('Query complete'));
});
eventBus.registerListener(QUERY_TOOL_EVENTS.TASK_START, (taskText, startTime)=>{
resetTimer();
diff --git a/web/pgadmin/utils/__init__.py b/web/pgadmin/utils/__init__.py
index d38e239b7..5f184f35b 100644
--- a/web/pgadmin/utils/__init__.py
+++ b/web/pgadmin/utils/__init__.py
@@ -483,8 +483,8 @@ def dump_database_servers(output_file, selected_servers,
err_msg = error_str.format(e.strerror)
return _handle_error(err_msg, from_setup)
- msg = "Configuration for %s servers dumped to %s" % \
- (servers_dumped, output_file.name)
+ msg = gettext("Configuration for %s servers dumped to %s" %
+ (servers_dumped, output_file.name))
print(msg)
return True, msg
@@ -500,7 +500,7 @@ def validate_json_data(data, is_admin):
skip_servers = []
# Loop through the servers...
if "Servers" not in data:
- return "'Servers' attribute not found in the specified file."
+ return gettext("'Servers' attribute not found in the specified file.")
for server in data["Servers"]:
obj = data["Servers"][server]
@@ -514,13 +514,13 @@ def validate_json_data(data, is_admin):
def check_attrib(attrib):
if attrib not in obj:
- return ("'%s' attribute not found for server '%s'" %
- (attrib, server))
+ return gettext("'%s' attribute not found for server '%s'" %
+ (attrib, server))
return None
def check_is_integer(value):
if not isinstance(value, int):
- return "Port must be integer for server '%s'" % server
+ return gettext("Port must be integer for server '%s'" % server)
return None
for attrib in ("Group", "Name"):
@@ -547,8 +547,8 @@ def validate_json_data(data, is_admin):
if "Host" not in obj and "HostAddr" not in obj and not \
is_service_attrib_available:
- return ("'Host', 'HostAddr' or 'Service' attribute "
- "not found for server '%s'" % server)
+ return gettext("'Host', 'HostAddr' or 'Service' attribute not "
+ "found for server '%s'" % server)
for server in skip_servers:
del data["Servers"][server]
@@ -581,11 +581,11 @@ def load_database_servers(input_file, selected_servers,
with open(file_path) as f:
data = json.load(f)
except json.decoder.JSONDecodeError as e:
- return _handle_error("Error parsing input file %s: %s" %
- (file_path, e), from_setup)
+ return _handle_error(gettext("Error parsing input file %s: %s" %
+ (file_path, e)), from_setup)
except Exception as e:
- return _handle_error("Error reading input file %s: [%d] %s" %
- (file_path, e.errno, e.strerror), from_setup)
+ return _handle_error(gettext("Error reading input file %s: [%d] %s" %
+ (file_path, e.errno, e.strerror)), from_setup)
f.close()
@@ -623,8 +623,8 @@ def load_database_servers(input_file, selected_servers,
if from_setup:
print(ADD_SERVERS_MSG % (groups_added, servers_added))
return _handle_error(
- "Error creating server group '%s': %s" %
- (new_group.name, e), from_setup)
+ gettext("Error creating server group '%s': %s" %
+ (new_group.name, e)), from_setup)
group_id = new_group.id
groups_added = groups_added + 1
@@ -695,8 +695,8 @@ def load_database_servers(input_file, selected_servers,
except Exception as e:
if from_setup:
print(ADD_SERVERS_MSG % (groups_added, servers_added))
- return _handle_error("Error creating server '%s': %s" %
- (new_server.name, e), from_setup)
+ return _handle_error(gettext("Error creating server '%s': %s" %
+ (new_server.name, e)), from_setup)
servers_added = servers_added + 1
@@ -732,8 +732,9 @@ def clear_database_servers(load_user=current_user, from_setup=False):
try:
db.session.commit()
except Exception as e:
- error_msg = "Error clearing server configuration with error (%s)" % \
- str(e)
+ error_msg = \
+ gettext("Error clearing server configuration with error (%s)" %
+ str(e))
if from_setup:
print(error_msg)
sys.exit(1)