mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Unified usage of "definition incomplete".
This commit is contained in:
parent
37120bf199
commit
ddfa934357
@ -546,7 +546,7 @@ class CastView(PGChildNodeView):
|
||||
if 'srctyp' in data and 'trgtyp' in data:
|
||||
sql = render_template("/".join([self.template_path, 'create.sql']), data=data, conn=self.conn)
|
||||
else:
|
||||
return u"-- incomplete definition", None
|
||||
return u"-- definition incomplete", None
|
||||
return sql, data['srctyp'] + "->" + data["trgtyp"]
|
||||
|
||||
@check_precondition
|
||||
|
@ -425,7 +425,7 @@ class CollationView(PGChildNodeView):
|
||||
status=410,
|
||||
success=0,
|
||||
errormsg=gettext(
|
||||
"Incomplete definition. Please provide locale OR copy collation OR LC_TYPE/LC_COLLATE!"
|
||||
"Definition incomplete. Please provide Locale OR Copy Collation OR LC_TYPE/LC_COLLATE"
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -163,7 +163,7 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
|
||||
copy_coll_flag = true;
|
||||
}
|
||||
if (locale_flag && (lc_coll_flag || lc_coll_flag) && copy_coll_flag) {
|
||||
msg = '{{ _('Incomplete definition. Please provide locale OR copy collation OR LC_TYPE/LC_COLLATE!') }}';
|
||||
msg = '{{ _('Definition incomplete, Please provide Locale OR Copy collation OR LC_TYPE/LC_COLLATE!') }}';
|
||||
err['locale'] = msg
|
||||
}
|
||||
return null;
|
||||
|
@ -688,7 +688,7 @@ class FtsConfigurationView(PGChildNodeView):
|
||||
conn=self.conn
|
||||
)
|
||||
else:
|
||||
sql = u"-- incomplete definition"
|
||||
sql = u"-- definition incomplete"
|
||||
return sql.strip('\n'), data['name']
|
||||
|
||||
@check_precondition
|
||||
|
@ -669,7 +669,7 @@ class FtsDictionaryView(PGChildNodeView):
|
||||
conn=self.conn
|
||||
)
|
||||
else:
|
||||
sql = u"-- incomplete definition"
|
||||
sql = u"-- definition incomplete"
|
||||
return sql.strip('\n'), data['name']
|
||||
|
||||
@check_precondition
|
||||
|
@ -611,7 +611,7 @@ class FtsParserView(PGChildNodeView):
|
||||
conn=self.conn
|
||||
)
|
||||
else:
|
||||
sql = "-- incomplete definition"
|
||||
sql = "-- definition incomplete"
|
||||
return sql.strip('\n'), data['name']
|
||||
|
||||
@check_precondition
|
||||
|
@ -570,7 +570,7 @@ class FtsTemplateView(PGChildNodeView):
|
||||
conn=self.conn
|
||||
)
|
||||
else:
|
||||
sql = u"-- incomplete definition"
|
||||
sql = u"-- definition incomplete"
|
||||
return sql.strip('\n'), data['name']
|
||||
|
||||
@check_precondition
|
||||
|
@ -1447,8 +1447,8 @@ class TableView(PGChildNodeView, DataTypeReader, VacuumSettings):
|
||||
return internal_server_error(errormsg=res)
|
||||
|
||||
# PostgreSQL truncates the table name to 63 characters.
|
||||
# Have to truncate the name as like PostgreSQL to get the proper schema id
|
||||
CONST_MAX_CHAR_COUNT = 63
|
||||
# Have to truncate the name like PostgreSQL to get the proper schema id
|
||||
CONST_MAX_CHAR_COUNT = 63
|
||||
if len(data['name']) > CONST_MAX_CHAR_COUNT:
|
||||
data['name'] = data['name'][0:CONST_MAX_CHAR_COUNT]
|
||||
|
||||
@ -1823,7 +1823,7 @@ class TableView(PGChildNodeView, DataTypeReader, VacuumSettings):
|
||||
else:
|
||||
sql.append(
|
||||
gettext(
|
||||
'-- incomplete definition for {0} constraint'.format(index_constraints[ctype])
|
||||
'-- definition incomplete for {0} constraint'.format(index_constraints[ctype])
|
||||
)
|
||||
)
|
||||
if len(sql) > 0:
|
||||
@ -1884,7 +1884,7 @@ class TableView(PGChildNodeView, DataTypeReader, VacuumSettings):
|
||||
if not self.validate_constrains('foreign_key', c):
|
||||
sql.append(
|
||||
gettext(
|
||||
'-- incomplete definition for foreign_key constraint'
|
||||
'-- definition incomplete for foreign_key constraint'
|
||||
)
|
||||
)
|
||||
return '\n\n'.join(sql)
|
||||
@ -1915,7 +1915,7 @@ class TableView(PGChildNodeView, DataTypeReader, VacuumSettings):
|
||||
if not self.validate_constrains('foreign_key', c):
|
||||
sql.append(
|
||||
gettext(
|
||||
'-- incomplete definition for foreign_key constraint'
|
||||
'-- definition incomplete for foreign_key constraint'
|
||||
)
|
||||
)
|
||||
return '\n\n'.join(sql)
|
||||
@ -2009,7 +2009,7 @@ class TableView(PGChildNodeView, DataTypeReader, VacuumSettings):
|
||||
if not self.validate_constrains('check_constraint', c):
|
||||
sql.append(
|
||||
gettext(
|
||||
'-- incomplete definition for check_constraint'
|
||||
'-- definition incomplete for check_constraint'
|
||||
)
|
||||
)
|
||||
return '\n\n'.join(sql)
|
||||
@ -2085,7 +2085,7 @@ class TableView(PGChildNodeView, DataTypeReader, VacuumSettings):
|
||||
if not self.validate_constrains('exclude_constraint', c):
|
||||
sql.append(
|
||||
gettext(
|
||||
'-- incomplete definition for exclusion_constraint'
|
||||
'-- definition incomplete for exclusion_constraint'
|
||||
)
|
||||
)
|
||||
return '\n\n'.join(sql)
|
||||
@ -2292,7 +2292,7 @@ class TableView(PGChildNodeView, DataTypeReader, VacuumSettings):
|
||||
|
||||
for arg in required_args:
|
||||
if arg not in data:
|
||||
return gettext('-- incomplete definition')
|
||||
return gettext('-- definition incomplete')
|
||||
|
||||
# validate constraint data.
|
||||
for key in ['primary_key', 'unique_constraint',
|
||||
@ -2301,7 +2301,7 @@ class TableView(PGChildNodeView, DataTypeReader, VacuumSettings):
|
||||
if key in data and len(data[key]) > 0:
|
||||
for constraint in data[key]:
|
||||
if not self.validate_constrains(key, constraint):
|
||||
return gettext('-- incomplete definition for {0}'.format(key))
|
||||
return gettext('-- definition incomplete for {0}'.format(key))
|
||||
|
||||
# We will convert privileges coming from client required
|
||||
# in server side format
|
||||
|
@ -801,7 +801,7 @@ class ColumnsView(PGChildNodeView, DataTypeReader):
|
||||
|
||||
for arg in required_args:
|
||||
if arg not in data:
|
||||
return gettext('-- incomplete definition')
|
||||
return gettext('-- definition incomplete')
|
||||
|
||||
# We will convert privileges coming from client required
|
||||
# in server side format
|
||||
|
@ -815,7 +815,7 @@ class IndexesView(PGChildNodeView):
|
||||
err = True
|
||||
# Check if we have at least one column
|
||||
if err:
|
||||
return gettext('-- incomplete definition')
|
||||
return gettext('-- definition incomplete')
|
||||
|
||||
# If the request for new object which do not have did
|
||||
SQL = render_template("/".join([self.template_path, 'create.sql']),
|
||||
|
@ -869,7 +869,7 @@ class TriggerView(PGChildNodeView):
|
||||
|
||||
for arg in required_args:
|
||||
if arg not in data:
|
||||
return gettext('-- incomplete definition')
|
||||
return gettext('-- definition incomplete')
|
||||
|
||||
# If the request for new object which do not have did
|
||||
SQL = render_template("/".join([self.template_path, 'create.sql']),
|
||||
|
@ -796,7 +796,7 @@ class TablespaceView(PGChildNodeView):
|
||||
for arg in required_args:
|
||||
if arg not in data:
|
||||
return make_json_response(
|
||||
data=gettext("-- Incomplete definition"),
|
||||
data=gettext("-- definition incomplete"),
|
||||
status=200
|
||||
)
|
||||
|
||||
|
@ -12,7 +12,7 @@ function(_, S, pgAdmin) {
|
||||
'CLICK_FOR_DETAILED_MSG': '{{ _('Click here for details.')|safe }}',
|
||||
'GENERAL_CATEGORY': '{{ _("General")|safe }}',
|
||||
'SQL_TAB': '{{ _('SQL') }}',
|
||||
'SQL_INCOMPLETE': '{{ _('Incomplete definition') }}',
|
||||
'SQL_INCOMPLETE': '{{ _('Definition incomplete') }}',
|
||||
'SQL_NO_CHANGE': '{{ _('Nothing changed')|safe }}',
|
||||
'MUST_BE_INT' : "{{ _("'%s' must be an integer.") }}",
|
||||
'MUST_BE_NUM' : "{{ _("'%s' must be a numeric.") }}",
|
||||
|
Loading…
Reference in New Issue
Block a user