Nomenclature changes:

1. Rename "Properties..." context menu option of object to "Edit Object...".
2. Rename "Browser" tree to "Object Explorer". #4734
This commit is contained in:
Aditya Toshniwal
2023-03-28 22:20:14 +05:30
committed by GitHub
parent 05f3efbc97
commit 9924fae378
47 changed files with 80 additions and 84 deletions
@@ -47,10 +47,10 @@ def register_browser_preferences(self):
self.preference.register(
'display', 'browser_tree_state_save_interval',
gettext("Browser tree state saving interval"), 'integer',
gettext("Object explorer tree state saving interval"), 'integer',
30, category_label=PREF_LABEL_DISPLAY,
help_str=gettext(
'Browser tree state saving interval in seconds. '
'Object explorer state saving interval in seconds. '
'Use -1 to disable the tree saving mechanism.'
)
)
@@ -139,7 +139,7 @@ def register_browser_preferences(self):
self.preference.register(
'keyboard_shortcuts',
'browser_tree',
gettext('Browser tree'),
gettext('Object Explorer'),
'keyboardshortcut',
{
'alt': True,
@@ -425,7 +425,7 @@ def register_browser_preferences(self):
self.preference.register(
'keyboard_shortcuts',
'sub_menu_refresh',
gettext('Refresh browser tree'),
gettext('Refresh object explorer'),
'keyboardshortcut',
{
'alt': False,
@@ -768,7 +768,7 @@
}
},
{
"name": "Error while updating the new compound trigger id in browser tree",
"name": "Error while updating the new compound trigger id in object explorer",
"url": "/browser/compound_trigger/obj/",
"is_positive_test": false,
"mocking_required": true,
@@ -143,7 +143,7 @@ export default class DatabaseSchema extends BaseUISchema {
id: 'is_template', label: gettext('Template?'),
type: 'switch', group: gettext('Definition'),
mode: ['properties', 'edit', 'create'], readonly: function(state) {return (state.is_sys_obj); },
helpMessage: gettext('Note: When the preferences setting \'show template databases\' is set to false, then template databases won\'t be displayed in the browser tree.'),
helpMessage: gettext('Note: When the preferences setting \'show template databases\' is set to false, then template databases won\'t be displayed in the object explorer.'),
helpMessageMode: ['edit', 'create'],
},{
id: 'datallowconn', label: gettext('Allow connections?'),
@@ -79,14 +79,14 @@ define('pgadmin.node.server', [
applies: ['tools', 'context'], callback: 'reload_configuration',
category: 'reload', priority: 10, label: gettext('Reload Configuration'),
enable : 'enable_reload_config',data: {
data_disabled: gettext('Please select a server from the browser tree to reload the configuration files.'),
data_disabled: gettext('Please select a server from the object explorer to reload the configuration files.'),
},
},{
name: 'restore_point', node: 'server', module: this,
applies: ['tools', 'context'], callback: 'restore_point',
category: 'restore', priority: 7, label: gettext('Add Named Restore Point...'),
enable : 'is_applicable',data: {
data_disabled: gettext('Please select any server from the browser tree to Add Named Restore Point.'),
data_disabled: gettext('Please select any server from the object explorer to Add Named Restore Point.'),
},
},{
name: 'change_password', node: 'server', module: this,
+1 -1
View File
@@ -197,7 +197,7 @@ define('pgadmin.browser', [
// Panel to keep the left hand browser tree
'browser': new pgAdmin.Browser.Panel({
name: 'browser',
title: gettext('Browser'),
title: gettext('Object Explorer'),
showTitle: true,
isCloseable: false,
isPrivate: true,
+1 -1
View File
@@ -123,7 +123,7 @@ define('pgadmin.browser.node', [
applies: ['object', 'context'],
callback: 'show_obj_properties',
priority: 999,
label: gettext('Properties...'),
label: gettext('Edit Object...'),
data: {
'action': 'edit',
},
@@ -338,7 +338,7 @@ export default function PreferencesComponent({ ...props }) {
function addNote(node, subNode, nodeData, preferencesData, note = '') {
// Check and add the note for the element.
if (subNode.label == gettext('Nodes') && node.label == gettext('Browser')) {
note = [gettext('This settings is to Show/Hide nodes in the browser tree.')].join('');
note = [gettext('This settings is to Show/Hide nodes in the object explorer.')].join('');
} if(nodeData.name == 'keyboard_shortcuts') {
note = gettext('The Accesskey here is %s.', getBrowserAccesskey().join(' + '));
} else {
@@ -561,8 +561,8 @@ export default function PreferencesComponent({ ...props }) {
if (pref.name == 'hide_shared_server') {
Notify.confirm(
gettext('Browser tree refresh required'),
gettext('A browser tree refresh is required. Do you wish to refresh the tree?'),
gettext('Object explorer tree refresh required'),
gettext('The object explorer tree refresh is required. Do you wish to refresh the tree?'),
function () {
pgAdmin.Browser.tree.destroy({
success: function () {
+1 -1
View File
@@ -997,7 +997,7 @@ function SchemaPropertiesView({
data-test="help" onClick={()=>props.onHelp(true, false)} icon={<InfoIcon />} disabled={props.disableSqlHelp}
title="SQL help for this object type." className={classes.buttonMargin} />
<PgIconButton data-test="edit"
onClick={props.onEdit} icon={<EditIcon />} title="Edit the object" />
onClick={props.onEdit} icon={<EditIcon />} title={gettext('Edit object...')} />
</Box>
<Box className={clsx(classes.form, classes.formProperties)}>
<Box>
+1 -1
View File
@@ -50,7 +50,7 @@ export function retrieveAncestorOfTypeServer(pgBrowser, item, errorAlertTitle) {
if (serverInformation === null) {
Notify.alert(
gettext(errorAlertTitle),
gettext('Please select server or child node from the browser tree.')
gettext('Please select server or child node from the object explorer.')
);
}
+5 -5
View File
@@ -65,7 +65,7 @@ define([
icon: 'fa fa-save',
enable: menuUtils.menuEnabledServer,
data: {
data_disabled: gettext('Please select any server from the browser tree to take Backup of global objects.'),
data_disabled: gettext('Please select any server from the object explorer to take Backup of global objects.'),
},
}, {
name: 'backup_server',
@@ -77,7 +77,7 @@ define([
icon: 'fa fa-save',
enable: menuUtils.menuEnabledServer,
data: {
data_disabled: gettext('Please select any server from the browser tree to take Server Backup.'),
data_disabled: gettext('Please select any server from the object explorer to take Server Backup.'),
},
}, {
name: 'backup_global_ctx',
@@ -90,7 +90,7 @@ define([
icon: 'fa fa-save',
enable: menuUtils.menuEnabledServer,
data: {
data_disabled: gettext('Please select any database or schema or table from the browser tree to take Backup.'),
data_disabled: gettext('Please select any database or schema or table from the object explorer to take Backup.'),
},
}, {
name: 'backup_server_ctx',
@@ -103,7 +103,7 @@ define([
icon: 'fa fa-save',
enable: menuUtils.menuEnabledServer,
data: {
data_disabled: gettext('Please select any server from the browser tree to take Server Backup.'),
data_disabled: gettext('Please select any server from the object explorer to take Server Backup.'),
},
}, {
name: 'backup_object',
@@ -117,7 +117,7 @@ define([
null, pgBrowser.tree, menuUtils.backupSupportedNodes
),
data: {
data_disabled: gettext('Please select any database or schema or table from the browser tree to take Backup.'),
data_disabled: gettext('Please select any database or schema or table from the object explorer to take Backup.'),
},
}];
@@ -40,8 +40,6 @@ class GrantWizardModule(PgAdminModule):
It is a wizard which inherits PgAdminModule
class and define methods to load its own
javascript file.
LABEL = gettext('Browser')
"""
def get_own_stylesheets(self):
@@ -48,7 +48,7 @@ define([
null, pgBrowser.tree, menuUtils.supportedNodes
),
data: {
data_disabled: gettext('Please select any database, schema or schema objects from the browser tree to access Grant Wizard Tool.'),
data_disabled: gettext('Please select any database, schema or schema objects from the object explorer to access Grant Wizard Tool.'),
},
}];
@@ -51,7 +51,7 @@ define([
null, pgBrowser.tree, ['table']
),
data: {
data_disabled: gettext('Please select any table from the browser tree to Import/Export data.'),
data_disabled: gettext('Please select any table from the object explorer to Import/Export data.'),
},
}]);
},
@@ -152,9 +152,9 @@ export default function ImportExportServers({onClose}) {
} else if (selectionFormData.imp_exp == 'i') {
setSummaryText(gettext('The following servers will be imported. Click the Finish button to complete the import process.'));
if (selectionFormData.replace_servers) {
setNoteText(gettext('All existing server groups and servers will be removed before the servers above are imported. On a successful import process, the browser tree will be refreshed.'));
setNoteText(gettext('All existing server groups and servers will be removed before the servers above are imported. On a successful import process, the object explorer will be refreshed.'));
} else {
setNoteText(gettext('On a successful import process, the browser tree will be refreshed.'));
setNoteText(gettext('On a successful import process, the object explorer will be refreshed.'));
}
}
}
@@ -267,4 +267,4 @@ export default function ImportExportServers({onClose}) {
}
ImportExportServers.propTypes = {
onClose: PropTypes.func
};
};
@@ -50,7 +50,7 @@ define([
null, pgBrowser.tree, menuUtils.maintenanceSupportedNodes
),
data: {
data_disabled: gettext('Please select any database from the browser tree to do Maintenance.'),
data_disabled: gettext('Please select any database from the object explorer to do Maintenance.'),
},
}];
@@ -68,7 +68,7 @@ define([
null, pgBrowser.tree, menuUtils.maintenanceSupportedNodes
),
data: {
data_disabled: gettext('Please select any database from the browser tree to do Maintenance.'),
data_disabled: gettext('Please select any database from the object explorer to do Maintenance.'),
},
});
}
@@ -48,7 +48,7 @@ define('tools.restore', [
null, pgBrowser.tree, menuUtils.restoreSupportedNodes
),
data: {
data_disabled: gettext('Please select any schema or table from the browser tree to Restore data.'),
data_disabled: gettext('Please select any schema or table from the object explorer to Restore data.'),
},
}];
@@ -134,7 +134,7 @@ const columns = [
formatter: TypePathFormatter,
},{
key: 'path',
name: gettext('Browser path'),
name: gettext('Object path'),
sortable: false,
formatter: TypePathFormatter,
}
@@ -48,7 +48,7 @@ export default class SearchObjectModule {
label: gettext('Search Objects...'),
below: true,
data: {
data_disabled: gettext('Please select a database from the browser tree to search the database objects.'),
data_disabled: gettext('Please select a database from the object explorer to search the database objects.'),
},
}];
@@ -106,4 +106,4 @@ pgAdmin.Tools.SearchObjects = SearchObjectModule.getInstance();
module.exports = {
SearchObjects: pgAdmin.Tools.SearchObjects,
};
};
@@ -125,7 +125,7 @@ export default class SQLEditor {
label: gettext('Query Tool'),
data:{
applies: 'tools',
data_disabled: gettext('Please select a database from the browser tree to access Query Tool.'),
data_disabled: gettext('Please select a database from the object explorer to access Query Tool.'),
},
}];
@@ -324,8 +324,8 @@ function UserManagementDialog({onClose}) {
if (changeData['refreshBrowserTree']) {
// Confirmation dialog to refresh the browser tree.
Notify.confirm(
gettext('Browser tree refresh required'),
gettext('The ownership of the shared server was changed or the shared server was deleted, so a browser tree refresh is required. Do you wish to refresh the tree?'),
gettext('Object explorer tree refresh required'),
gettext('The ownership of the shared server was changed or the shared server was deleted, so the object explorer tree refresh is required. Do you wish to refresh the tree?'),
function () {
pgAdmin.Browser.tree.destroy();
},
@@ -121,7 +121,7 @@ class CheckForXssFeatureTest(BaseFeatureTest):
def _check_xss_in_browser_tree(self):
print(
"\n\tChecking the Browser tree for XSS vulnerabilities",
"\n\tChecking the browser tree for XSS vulnerabilities",
file=sys.stderr, end=""
)
# Fetch the inner html & check for escaped characters
@@ -71,9 +71,9 @@ class CheckRoleMembershipControlFeatureTest(BaseFeatureTest):
def _check_role_membership_control(self):
self.page.driver.find_element(
By.CSS_SELECTOR, NavMenuLocators.object_menu_css).click()
property_object = self.wait.until(EC.visibility_of_element_located(
(By.CSS_SELECTOR, NavMenuLocators.properties_obj_css)))
property_object.click()
edit_object = self.wait.until(EC.visibility_of_element_located(
(By.CSS_SELECTOR, NavMenuLocators.edit_obj_css)))
edit_object.click()
membership_tab = WebDriverWait(self.page.driver, 4).until(
EC.presence_of_element_located((
By.XPATH, "//span[normalize-space(text())='Membership']")))
+2 -2
View File
@@ -8,7 +8,7 @@
class BrowserToolBarLocators():
"""This will contains element locators for browser tool bar"""
"""This will contains element locators for browser tree tool bar"""
open_query_tool_button_css = \
".wcFrameButton[aria-label='Query Tool']:not(.disabled)"
@@ -40,7 +40,7 @@ class NavMenuLocators:
object_menu_css = "button[data-label='Object']"
properties_obj_css = "li[data-label='Properties...']"
edit_obj_css = "li[data-label='Edit Object...']"
backup_obj_css = "li[data-label='Backup...']"