Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion web/pgadmin/authenticate/mfa/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ def _mfa_registration_view(

if form_data[mfa.name] == 'SETUP':
if supported_mfa['registered'] is True:
flash(_("'{}' is already registered'").format(mfa.label),
flash(_("'{}' is already registered.").format(mfa.label),
MessageType.SUCCESS)
return None

Expand Down
35 changes: 17 additions & 18 deletions web/pgadmin/browser/register_browser_preferences.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ def register_browser_preferences(self):
gettext("Hide shared servers?"), 'boolean', False,
category_label=gettext('Display'),
help_str=gettext(
'If set to True, then all shared servers will be '
'hidden from browser tree'
'If set to True, all shared servers will be '
'hidden from the browser tree.'
)
)

Expand All @@ -75,8 +75,8 @@ def register_browser_preferences(self):
gettext("Confirm on close or refresh?"), 'boolean',
True, category_label=PREF_LABEL_DISPLAY,
help_str=gettext(
'Confirm closure or refresh of the browser or browser tab is '
'intended before proceeding.'
'Confirm that closure or refresh of the browser or browser tab '
'is intended before proceeding.'
)
)

Expand Down Expand Up @@ -114,7 +114,7 @@ def register_browser_preferences(self):
min_val=1, max_val=9999,
help_str=gettext(
'The maximum number of history rows to show on '
'the Statistics tab for pgAgent jobs'
'the Statistics tab for pgAgent jobs.'
)
)

Expand Down Expand Up @@ -410,8 +410,8 @@ def register_browser_preferences(self):
gettext("Dynamic tab size"), 'boolean', False,
category_label=PREF_LABEL_TABS_SETTINGS,
help_str=gettext(
'If set to True, the tabs will take full size as per the title, '
'it will also applicable for already opened tabs')
'If set to True, the tabs will take full size as per the title. '
'This will also apply to already opened tabs.')
)

self.qt_tab_title = self.preference.register(
Expand All @@ -422,8 +422,7 @@ def register_browser_preferences(self):
help_str=gettext(
'Supported placeholders are %DATABASE%, %USERNAME%, and %SERVER%. '
'Users can provide any string with or without placeholders of'
' their choice. The blank title will be revert back to the'
' default title with placeholders.'
' their choice. A blank title will revert to the default.'
)
)

Expand All @@ -435,8 +434,8 @@ def register_browser_preferences(self):
help_str=gettext(
'Supported placeholders are %SCHEMA%, %TABLE%, %DATABASE%, '
'%USERNAME%, and %SERVER%. Users can provide any string with or '
'without placeholders of their choice. The blank title will be '
'revert back to the default title with placeholders.'
'without placeholders of their choice. A blank title will revert '
'to the default.'
)
)

Expand All @@ -448,8 +447,8 @@ def register_browser_preferences(self):
help_str=gettext(
'Supported placeholders are %FUNCTION%, %ARGS%, %SCHEMA% and'
' %DATABASE%. Users can provide any string with or '
'without placeholders of their choice. The blank title will be'
' revert back to the default title with placeholders.'
'without placeholders of their choice. A blank title will revert '
'to the default.'
)
)

Expand All @@ -470,9 +469,9 @@ def register_browser_preferences(self):
category_label=PREF_LABEL_OPTIONS,
options=open_new_tab_options,
help_str=gettext(
'Select Query Tool, Debugger, Schema Diff, ERD Tool '
'or PSQL Tool from the drop-down to set '
'open in new browser tab for that particular module.'
'Select Query Tool, Debugger, Schema Diff, ERD Tool, '
'or PSQL Tool from the drop-down to open that module '
'in a new browser tab.'
),
control_props={
'multiple': True, 'allowClear': False,
Expand All @@ -493,8 +492,8 @@ def register_browser_preferences(self):
help_str=gettext(
'Supported placeholders are %DATABASE%, %USERNAME%, '
'and %SERVER%. Users can provide any string with or without'
' placeholders of their choice. The blank title will be revert'
' back to the default title with placeholders.'
' placeholders of their choice. A blank title will revert '
'to the default.'
)
)

Expand Down
6 changes: 3 additions & 3 deletions web/pgadmin/browser/register_editor_preferences.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,8 +330,8 @@ def register_editor_preferences(self):
gettext("Expression Width"), 'integer', 50,
category_label=PREF_LABEL_SQL_FORMATTING,
help_str=gettext(
'maximum number of characters in parenthesized expressions to be '
'kept on single line.'
'Maximum number of characters in parenthesized expressions to be '
'kept on a single line.'
)
)

Expand All @@ -355,7 +355,7 @@ def register_editor_preferences(self):
category_label=PREF_LABEL_SQL_FORMATTING,
help_str=gettext(
'Decides how many empty lines to leave between SQL statements. '
'If zero it puts no new line.'
'A value of zero means no empty lines are added.'
)
)

Expand Down
14 changes: 7 additions & 7 deletions web/pgadmin/browser/server_groups/servers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -945,8 +945,8 @@ def _server_modify_disallowed_when_connected(
if arg in data:
return forbidden(
errmsg=gettext(
"'{0}' is not allowed to modify, "
"when server is connected."
"'{0}' cannot be modified "
"when the server is connected."
).format(disp_lbl[arg])
)

Expand Down Expand Up @@ -1968,7 +1968,7 @@ def wal_replay(self, sid, pause=True):
info=msg,
data={'in_recovery': True, 'wal_pause': pause}
)
return gone(errormsg=gettext('Please connect the server.'))
return gone(errormsg=gettext('Please connect to the server.'))
except Exception as e:
current_app.logger.error(
'WAL replay pause/resume failed'
Expand Down Expand Up @@ -2026,7 +2026,7 @@ def check_pgpass(self, gid, sid):
conn = manager.connection()
if not conn.connected():
return gone(
errormsg=gettext('Please connect the server.')
errormsg=gettext('Please connect to the server.')
)

if (not server.password or not manager.password) and \
Expand All @@ -2042,7 +2042,7 @@ def check_pgpass(self, gid, sid):
)
except Exception as e:
current_app.logger.error(
'Cannot able to fetch pgpass status'
'Unable to fetch pgpass status'
)
return internal_server_error(errormsg=str(e))

Expand Down Expand Up @@ -2147,7 +2147,7 @@ def clear_saved_password(self, gid, sid):

return make_json_response(
success=1,
info=gettext("The saved password cleared successfully."),
info=gettext("The saved password was cleared successfully."),
data={'is_password_saved': False}
)

Expand Down Expand Up @@ -2179,7 +2179,7 @@ def clear_sshtunnel_password(self, gid, sid):

return make_json_response(
success=1,
info=gettext("The saved password cleared successfully."),
info=gettext("The saved password was cleared successfully."),
data={'is_tunnel_password_saved': False}
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -713,12 +713,12 @@ def sql(self, gid, sid, did, cid, json_resp=True):
status, res = self.conn.execute_scalar(sql)
if not status:
return internal_server_error(gettext(
"Could not generate reversed engineered SQL for the cast."
"Could not generate reverse-engineered SQL for the cast."
) + "\n\n{0}".format(res))

if res is None:
return gone(gettext(
"Could not generate reversed engineered SQL for the "
"Could not generate reverse-engineered SQL for the "
"cast node."
))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -942,15 +942,15 @@ def sql(self, gid, sid, did, scid, cfgid, **kwargs):
if not status:
return internal_server_error(
_(
"Could not generate reversed engineered query for the "
"Could not generate reverse-engineered query for the "
"FTS Configuration.\n{0}"
).format(res)
)

if res is None:
return gone(
_(
"Could not generate reversed engineered query for "
"Could not generate reverse-engineered query for "
"FTS Configuration node.")
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -883,15 +883,15 @@ def sql(self, gid, sid, did, scid, pid, **kwargs):
if not status:
return internal_server_error(
_(
"Could not generate reversed engineered query for the "
"Could not generate reverse-engineered query for the "
"FTS Parser.\n{0}"
).format(res)
)

if res is None:
return gone(
_(
"Could not generate reversed engineered query for "
"Could not generate reverse-engineered query for "
"FTS Parser node."
)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -755,14 +755,14 @@ def sql(self, gid, sid, did, scid, tid, **kwargs):
if not status:
return internal_server_error(
gettext(
"Could not generate reversed engineered query for the "
"Could not generate reverse-engineered query for the "
"FTS Template.\n{0}").format(res)
)

if res is None:
return gone(
gettext(
"Could not generate reversed engineered query for "
"Could not generate reverse-engineered query for "
"FTS Template node.")
)

Expand Down
4 changes: 2 additions & 2 deletions web/pgadmin/browser/server_groups/servers/roles/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -904,15 +904,15 @@ def sql(self, gid, sid, rid):

if not status:
return internal_server_error(
_("Could not generate reversed engineered query for the "
_("Could not generate reverse-engineered query for the "
"role.\n{0}").format(
res
)
)

if res is None or (len(res) == 0):
return gone(
_("Could not generate reversed engineered query for the role.")
_("Could not generate reverse-engineered query for the role.")
)

return ajax_response(response=res.strip('\n'))
Expand Down
14 changes: 6 additions & 8 deletions web/pgadmin/dashboard/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,8 @@ def register_preferences(self):

self.cpu_stats_refresh = self.dashboard_preference.register(
'dashboards', 'cpu_stats_refresh',
gettext(
"Percentage of CPU time used by different process \
modes statistics refresh rate"
), 'integer', 5, min_val=1, max_val=999999,
gettext("CPU usage by process mode refresh rate"),
'integer', 5, min_val=1, max_val=999999,
category_label=PREF_LABEL_REFRESH_RATES,
help_str=help_string
)
Expand Down Expand Up @@ -198,16 +196,16 @@ def register_preferences(self):
gettext("Use different data point styles?"), 'boolean', False,
category_label=PREF_LABEL_DISPLAY,
help_str=gettext('If set to True, data points will be visible '
'in a different style on each graph lines.')
'in a different style on each graph line.')
)

self.graph_mouse_track = self.graphs_preference.register(
'graphs', 'graph_mouse_track',
gettext("Show mouse hover tooltip?"), 'boolean', True,
category_label=PREF_LABEL_DISPLAY,
help_str=gettext('If set to True, tooltip will appear on mouse '
'hover on the graph lines giving the data point '
'details')
help_str=gettext('If set to True, a tooltip will appear on mouse '
'hover on the graph lines showing the data point '
'details.')
)

self.graph_line_border_width = self.graphs_preference.register(
Expand Down
6 changes: 3 additions & 3 deletions web/pgadmin/misc/bgprocess/processes.py
Original file line number Diff line number Diff line change
Expand Up @@ -693,8 +693,8 @@ def update_process_info(p):

except ValueError as e:
current_app.logger.warning(
_("Status for the background process '{0}' could "
"not be loaded.").format(p.pid)
_("Could not load status for background process "
"'{0}'.").format(p.pid)
)
current_app.logger.exception(e)
return False, False
Expand Down Expand Up @@ -902,7 +902,7 @@ def stop_process(_pid):
p.process_state = PROCESS_TERMINATED
except psutil.Error as e:
current_app.logger.warning(
_("Unable to kill the background process '{0}'").format(
_("Unable to kill the background process '{0}'.").format(
p.utility_pid)
)
current_app.logger.exception(e)
Expand Down
4 changes: 2 additions & 2 deletions web/pgadmin/tools/debugger/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ def register_preferences(self):
self.preference.register(
'keyboard_shortcuts',
'switch_panel',
gettext('Switch Panel'),
gettext('Switch panel'),
'keyboardshortcut',
{
'alt': True,
Expand Down Expand Up @@ -1658,7 +1658,7 @@ def deposit_parameter_value(trans_id):
if result['rows'][0]['pldbg_deposit_value']:
info = gettext('Value deposited successfully')
else:
info = gettext('Error while setting the value')
info = gettext('Error setting the value')
return make_json_response(
data={
'status': status,
Expand Down
6 changes: 3 additions & 3 deletions web/pgadmin/tools/import_export/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ def create_import_export_job(sid):
id=sid).first()

if server is None:
return bad_request(errormsg=_("Could not find the given server"))
return bad_request(errormsg=_("Could not find the specified server."))

# To fetch MetaData for the server
from pgadmin.utils.driver import get_driver
Expand Down Expand Up @@ -333,13 +333,13 @@ def create_import_export_job(sid):
return bad_request(errormsg=str(e))

if not _file:
return bad_request(errormsg=_('Please specify a valid file'))
return bad_request(errormsg=_('Please specify a valid file.'))
elif IS_WIN:
_file = _file.replace('\\', '/')

data['filename'] = _file
else:
return bad_request(errormsg=_('Please specify a valid file'))
return bad_request(errormsg=_('Please specify a valid file.'))

# Get required and other columns list
cols = _get_formatted_column_list(data, 'columns', driver, conn)
Expand Down
2 changes: 1 addition & 1 deletion web/pgadmin/tools/maintenance/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def create_maintenance_job(sid, did):
if server is None:
return make_json_response(
success=0,
errormsg=_("Could not find the given server")
errormsg=_("Could not find the specified server.")
)

# To fetch MetaData for the server
Expand Down
4 changes: 2 additions & 2 deletions web/pgadmin/tools/psql/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -431,8 +431,8 @@ def enter_key_press(data):
sio.emit('pty-output',
{
'result': gettext(
'Connection terminated, To create new '
'connection please open another psql'
'Connection terminated. To create a new '
'connection, please open another psql'
' tool.'),
'error': True},
namespace='/pty', room=request.sid)
Expand Down
Loading
Loading