Unified usage of "definition incomplete".

This commit is contained in:
Jonas Thelemann 2017-04-05 13:55:00 +01:00 committed by Dave Page
parent 37120bf199
commit ddfa934357
13 changed files with 21 additions and 21 deletions

View File

@ -546,7 +546,7 @@ class CastView(PGChildNodeView):
if 'srctyp' in data and 'trgtyp' in data: if 'srctyp' in data and 'trgtyp' in data:
sql = render_template("/".join([self.template_path, 'create.sql']), data=data, conn=self.conn) sql = render_template("/".join([self.template_path, 'create.sql']), data=data, conn=self.conn)
else: else:
return u"-- incomplete definition", None return u"-- definition incomplete", None
return sql, data['srctyp'] + "->" + data["trgtyp"] return sql, data['srctyp'] + "->" + data["trgtyp"]
@check_precondition @check_precondition

View File

@ -425,7 +425,7 @@ class CollationView(PGChildNodeView):
status=410, status=410,
success=0, success=0,
errormsg=gettext( 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"
) )
) )

View File

@ -163,7 +163,7 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
copy_coll_flag = true; copy_coll_flag = true;
} }
if (locale_flag && (lc_coll_flag || lc_coll_flag) && copy_coll_flag) { 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 err['locale'] = msg
} }
return null; return null;

View File

@ -688,7 +688,7 @@ class FtsConfigurationView(PGChildNodeView):
conn=self.conn conn=self.conn
) )
else: else:
sql = u"-- incomplete definition" sql = u"-- definition incomplete"
return sql.strip('\n'), data['name'] return sql.strip('\n'), data['name']
@check_precondition @check_precondition

View File

@ -669,7 +669,7 @@ class FtsDictionaryView(PGChildNodeView):
conn=self.conn conn=self.conn
) )
else: else:
sql = u"-- incomplete definition" sql = u"-- definition incomplete"
return sql.strip('\n'), data['name'] return sql.strip('\n'), data['name']
@check_precondition @check_precondition

View File

@ -611,7 +611,7 @@ class FtsParserView(PGChildNodeView):
conn=self.conn conn=self.conn
) )
else: else:
sql = "-- incomplete definition" sql = "-- definition incomplete"
return sql.strip('\n'), data['name'] return sql.strip('\n'), data['name']
@check_precondition @check_precondition

View File

@ -570,7 +570,7 @@ class FtsTemplateView(PGChildNodeView):
conn=self.conn conn=self.conn
) )
else: else:
sql = u"-- incomplete definition" sql = u"-- definition incomplete"
return sql.strip('\n'), data['name'] return sql.strip('\n'), data['name']
@check_precondition @check_precondition

View File

@ -1447,7 +1447,7 @@ class TableView(PGChildNodeView, DataTypeReader, VacuumSettings):
return internal_server_error(errormsg=res) return internal_server_error(errormsg=res)
# PostgreSQL truncates the table name to 63 characters. # PostgreSQL truncates the table name to 63 characters.
# Have to truncate the name as like PostgreSQL to get the proper schema id # Have to truncate the name like PostgreSQL to get the proper schema id
CONST_MAX_CHAR_COUNT = 63 CONST_MAX_CHAR_COUNT = 63
if len(data['name']) > CONST_MAX_CHAR_COUNT: if len(data['name']) > CONST_MAX_CHAR_COUNT:
data['name'] = data['name'][0:CONST_MAX_CHAR_COUNT] data['name'] = data['name'][0:CONST_MAX_CHAR_COUNT]
@ -1823,7 +1823,7 @@ class TableView(PGChildNodeView, DataTypeReader, VacuumSettings):
else: else:
sql.append( sql.append(
gettext( gettext(
'-- incomplete definition for {0} constraint'.format(index_constraints[ctype]) '-- definition incomplete for {0} constraint'.format(index_constraints[ctype])
) )
) )
if len(sql) > 0: if len(sql) > 0:
@ -1884,7 +1884,7 @@ class TableView(PGChildNodeView, DataTypeReader, VacuumSettings):
if not self.validate_constrains('foreign_key', c): if not self.validate_constrains('foreign_key', c):
sql.append( sql.append(
gettext( gettext(
'-- incomplete definition for foreign_key constraint' '-- definition incomplete for foreign_key constraint'
) )
) )
return '\n\n'.join(sql) return '\n\n'.join(sql)
@ -1915,7 +1915,7 @@ class TableView(PGChildNodeView, DataTypeReader, VacuumSettings):
if not self.validate_constrains('foreign_key', c): if not self.validate_constrains('foreign_key', c):
sql.append( sql.append(
gettext( gettext(
'-- incomplete definition for foreign_key constraint' '-- definition incomplete for foreign_key constraint'
) )
) )
return '\n\n'.join(sql) return '\n\n'.join(sql)
@ -2009,7 +2009,7 @@ class TableView(PGChildNodeView, DataTypeReader, VacuumSettings):
if not self.validate_constrains('check_constraint', c): if not self.validate_constrains('check_constraint', c):
sql.append( sql.append(
gettext( gettext(
'-- incomplete definition for check_constraint' '-- definition incomplete for check_constraint'
) )
) )
return '\n\n'.join(sql) return '\n\n'.join(sql)
@ -2085,7 +2085,7 @@ class TableView(PGChildNodeView, DataTypeReader, VacuumSettings):
if not self.validate_constrains('exclude_constraint', c): if not self.validate_constrains('exclude_constraint', c):
sql.append( sql.append(
gettext( gettext(
'-- incomplete definition for exclusion_constraint' '-- definition incomplete for exclusion_constraint'
) )
) )
return '\n\n'.join(sql) return '\n\n'.join(sql)
@ -2292,7 +2292,7 @@ class TableView(PGChildNodeView, DataTypeReader, VacuumSettings):
for arg in required_args: for arg in required_args:
if arg not in data: if arg not in data:
return gettext('-- incomplete definition') return gettext('-- definition incomplete')
# validate constraint data. # validate constraint data.
for key in ['primary_key', 'unique_constraint', 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: if key in data and len(data[key]) > 0:
for constraint in data[key]: for constraint in data[key]:
if not self.validate_constrains(key, constraint): 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 # We will convert privileges coming from client required
# in server side format # in server side format

View File

@ -801,7 +801,7 @@ class ColumnsView(PGChildNodeView, DataTypeReader):
for arg in required_args: for arg in required_args:
if arg not in data: if arg not in data:
return gettext('-- incomplete definition') return gettext('-- definition incomplete')
# We will convert privileges coming from client required # We will convert privileges coming from client required
# in server side format # in server side format

View File

@ -815,7 +815,7 @@ class IndexesView(PGChildNodeView):
err = True err = True
# Check if we have at least one column # Check if we have at least one column
if err: if err:
return gettext('-- incomplete definition') return gettext('-- definition incomplete')
# If the request for new object which do not have did # If the request for new object which do not have did
SQL = render_template("/".join([self.template_path, 'create.sql']), SQL = render_template("/".join([self.template_path, 'create.sql']),

View File

@ -869,7 +869,7 @@ class TriggerView(PGChildNodeView):
for arg in required_args: for arg in required_args:
if arg not in data: if arg not in data:
return gettext('-- incomplete definition') return gettext('-- definition incomplete')
# If the request for new object which do not have did # If the request for new object which do not have did
SQL = render_template("/".join([self.template_path, 'create.sql']), SQL = render_template("/".join([self.template_path, 'create.sql']),

View File

@ -796,7 +796,7 @@ class TablespaceView(PGChildNodeView):
for arg in required_args: for arg in required_args:
if arg not in data: if arg not in data:
return make_json_response( return make_json_response(
data=gettext("-- Incomplete definition"), data=gettext("-- definition incomplete"),
status=200 status=200
) )

View File

@ -12,7 +12,7 @@ function(_, S, pgAdmin) {
'CLICK_FOR_DETAILED_MSG': '{{ _('Click here for details.')|safe }}', 'CLICK_FOR_DETAILED_MSG': '{{ _('Click here for details.')|safe }}',
'GENERAL_CATEGORY': '{{ _("General")|safe }}', 'GENERAL_CATEGORY': '{{ _("General")|safe }}',
'SQL_TAB': '{{ _('SQL') }}', 'SQL_TAB': '{{ _('SQL') }}',
'SQL_INCOMPLETE': '{{ _('Incomplete definition') }}', 'SQL_INCOMPLETE': '{{ _('Definition incomplete') }}',
'SQL_NO_CHANGE': '{{ _('Nothing changed')|safe }}', 'SQL_NO_CHANGE': '{{ _('Nothing changed')|safe }}',
'MUST_BE_INT' : "{{ _("'%s' must be an integer.") }}", 'MUST_BE_INT' : "{{ _("'%s' must be an integer.") }}",
'MUST_BE_NUM' : "{{ _("'%s' must be a numeric.") }}", 'MUST_BE_NUM' : "{{ _("'%s' must be a numeric.") }}",