Using the 'gettext' as oppose to '_', which is not defined in these

files.
This commit is contained in:
Ashesh Vashi 2020-04-08 12:30:12 +05:30
parent 7f0847b95d
commit a84a62def8
3 changed files with 7 additions and 5 deletions

View File

@ -560,7 +560,7 @@ class CastView(PGChildNodeView):
if len(res['rows']) == 0:
return gone(
_("Could not find the specified cast on the server.")
gettext("Could not find the specified cast on the server.")
)
old_data = res['rows'][0]
@ -663,13 +663,13 @@ class CastView(PGChildNodeView):
status, res = self.conn.execute_scalar(sql)
if not status:
return internal_server_error(
_("Could not generate reversed engineered SQL for the "
gettext("Could not generate reversed engineered SQL for the "
"cast.\n\n{0}").format(res)
)
if res is None:
return gone(
_("Could not generate reversed engineered SQL for the "
gettext("Could not generate reversed engineered SQL for the "
"cast node.\n")
)

View File

@ -475,7 +475,7 @@ class ExtensionView(PGChildNodeView):
return internal_server_error(errormsg=res)
if len(res['rows']) == 0:
return gone(
_("Could not find the extension on the server.")
gettext("Could not find the extension on the server.")
)
result = res['rows'][0]

View File

@ -705,7 +705,9 @@ class ForeignDataWrapperView(PGChildNodeView):
return internal_server_error(errormsg=res)
if len(res['rows']) == 0:
return gone(
_("Could not find the foreign data wrapper on the server.")
gettext(
"Could not find the foreign data wrapper on the server."
)
)
is_valid_options = False