Skip to content

Commit

Permalink
Fix typo issue in Error handling message (#20365)
Browse files Browse the repository at this point in the history
  • Loading branch information
codemaster08240328 authored Jun 13, 2022
1 parent c6b1523 commit ee06d3d
Show file tree
Hide file tree
Showing 31 changed files with 122 additions and 122 deletions.
8 changes: 4 additions & 4 deletions superset/reports/commands/alert.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,20 +88,20 @@ def _validate_not_null(self, rows: np.recarray) -> None:

@staticmethod
def _validate_result(rows: np.recarray) -> None:
# check if query return more then one row
# check if query return more than one row
if len(rows) > 1:
raise AlertQueryMultipleRowsError(
message=_(
"Alert query returned more then one row. %s rows returned"
"Alert query returned more than one row. %s rows returned"
% len(rows),
)
)
# check if query returned more then one column
# check if query returned more than one column
if len(rows[0]) > 2:
raise AlertQueryMultipleColumnsError(
# len is subtracted by 1 to discard pandas index column
_(
"Alert query returned more then one column. %s columns returned"
"Alert query returned more than one column. %s columns returned"
% (len(rows[0]) - 1)
)
)
Expand Down
4 changes: 2 additions & 2 deletions superset/reports/commands/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ class ReportScheduleCreationMethodUniquenessValidationError(CommandException):

class AlertQueryMultipleRowsError(CommandException):

message = _("Alert query returned more then one row.")
message = _("Alert query returned more than one row.")


class AlertValidatorConfigError(CommandException):
Expand All @@ -187,7 +187,7 @@ class AlertValidatorConfigError(CommandException):


class AlertQueryMultipleColumnsError(CommandException):
message = _("Alert query returned more then one column.")
message = _("Alert query returned more than one column.")


class AlertQueryInvalidTypeError(CommandException):
Expand Down
8 changes: 4 additions & 4 deletions superset/translations/de/LC_MESSAGES/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -279,16 +279,16 @@
"Alert query returned a non-number value.": [
"Die Alarm-Abfrage hat einen nicht-numerischen Wert zurückgegeben."
],
"Alert query returned more then one column.": [
"Alert query returned more than one column.": [
"Die Alarm-Abfrage hat mehr als eine Spalte zurückgegeben."
],
"Alert query returned more then one column. %s columns returned": [
"Alert query returned more than one column. %s columns returned": [
"Die Alarmabfrage hat mehr als eine Spalte zurückgegeben. %s Spalten zurückgegegeben"
],
"Alert query returned more then one row.": [
"Alert query returned more than one row.": [
"Die Alarm-Abfrage hat mehr als eine Zeile zurückgegeben."
],
"Alert query returned more then one row. %s rows returned": [
"Alert query returned more than one row. %s rows returned": [
"Die Alarmabfrage hat mehr als eine Zeile zurückgegeben. %s zurückgegebene Zeilen"
],
"Alert running": ["Alarm wird ausgeführt"],
Expand Down
8 changes: 4 additions & 4 deletions superset/translations/de/LC_MESSAGES/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -1028,23 +1028,23 @@ msgid "Alert query returned a non-number value."
msgstr "Die Alarm-Abfrage hat einen nicht-numerischen Wert zurückgegeben."

#: superset/reports/commands/exceptions.py:186
msgid "Alert query returned more then one column."
msgid "Alert query returned more than one column."
msgstr "Die Alarm-Abfrage hat mehr als eine Spalte zurückgegeben."

#: superset/reports/commands/alert.py:105
#, python-format
msgid "Alert query returned more then one column. %s columns returned"
msgid "Alert query returned more than one column. %s columns returned"
msgstr ""
"Die Alarmabfrage hat mehr als eine Spalte zurückgegeben. %s Spalten "
"zurückgegegeben"

#: superset/reports/commands/exceptions.py:177
msgid "Alert query returned more then one row."
msgid "Alert query returned more than one row."
msgstr "Die Alarm-Abfrage hat mehr als eine Zeile zurückgegeben."

#: superset/reports/commands/alert.py:96
#, python-format
msgid "Alert query returned more then one row. %s rows returned"
msgid "Alert query returned more than one row. %s rows returned"
msgstr ""
"Die Alarmabfrage hat mehr als eine Zeile zurückgegeben. %s zurückgegebene"
" Zeilen"
Expand Down
8 changes: 4 additions & 4 deletions superset/translations/en/LC_MESSAGES/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -455,8 +455,8 @@
"",
"Deleted %(num)d report schedules"
],
"Alert query returned more then one row. %s rows returned": [""],
"Alert query returned more then one column. %s columns returned": [""],
"Alert query returned more than one row. %s rows returned": [""],
"Alert query returned more than one column. %s columns returned": [""],
"Dashboard does not exist": [""],
"Chart does not exist": [""],
"Database is required for alerts": [""],
Expand All @@ -473,9 +473,9 @@
"Report Schedule execution got an unexpected error.": [""],
"Report Schedule is still working, refusing to re-compute.": [""],
"Report Schedule reached a working timeout.": [""],
"Alert query returned more then one row.": [""],
"Alert query returned more than one row.": [""],
"Alert validator config error.": [""],
"Alert query returned more then one column.": [""],
"Alert query returned more than one column.": [""],
"Alert query returned a non-number value.": [""],
"Alert found an error while executing a query.": [""],
"Alert fired during grace period.": [""],
Expand Down
8 changes: 4 additions & 4 deletions superset/translations/en/LC_MESSAGES/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -919,21 +919,21 @@ msgid "Alert query returned a non-number value."
msgstr ""

#: superset/reports/commands/exceptions.py:186
msgid "Alert query returned more then one column."
msgid "Alert query returned more than one column."
msgstr ""

#: superset/reports/commands/alert.py:105
#, python-format
msgid "Alert query returned more then one column. %s columns returned"
msgid "Alert query returned more than one column. %s columns returned"
msgstr ""

#: superset/reports/commands/exceptions.py:177
msgid "Alert query returned more then one row."
msgid "Alert query returned more than one row."
msgstr ""

#: superset/reports/commands/alert.py:96
#, python-format
msgid "Alert query returned more then one row. %s rows returned"
msgid "Alert query returned more than one row. %s rows returned"
msgstr ""

#: superset-frontend/src/views/CRUD/alert/components/AlertStatusIcon.tsx:75
Expand Down
8 changes: 4 additions & 4 deletions superset/translations/es/LC_MESSAGES/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -688,10 +688,10 @@
"",
"Deleted %(num)d report schedules"
],
"Alert query returned more then one row. %s rows returned": [
"Alert query returned more than one row. %s rows returned": [
"La consulta de alerta devolvió más de una fila. %s filas devueltas"
],
"Alert query returned more then one column. %s columns returned": [
"Alert query returned more than one column. %s columns returned": [
"La consulta de alerta devolvió más de una columna. %s columnas devueltas"
],
"Dashboard does not exist": ["El dashboard no existe"],
Expand Down Expand Up @@ -734,13 +734,13 @@
"Report Schedule reached a working timeout.": [
"El informe programado alcanzó el tiempo de espera máximo."
],
"Alert query returned more then one row.": [
"Alert query returned more than one row.": [
"La consulta de alerta devolvió más de una fila."
],
"Alert validator config error.": [
"Error de configuración del validador de alertas."
],
"Alert query returned more then one column.": [
"Alert query returned more than one column.": [
"La consulta de alerta devolvió más de una columna."
],
"Alert query returned a non-number value.": [
Expand Down
8 changes: 4 additions & 4 deletions superset/translations/es/LC_MESSAGES/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -967,21 +967,21 @@ msgid "Alert query returned a non-number value."
msgstr "La consulta de alerta devolvió un valor no numérico."

#: superset/reports/commands/exceptions.py:186
msgid "Alert query returned more then one column."
msgid "Alert query returned more than one column."
msgstr "La consulta de alerta devolvió más de una columna."

#: superset/reports/commands/alert.py:105
#, python-format
msgid "Alert query returned more then one column. %s columns returned"
msgid "Alert query returned more than one column. %s columns returned"
msgstr "La consulta de alerta devolvió más de una columna. %s columnas devueltas"

#: superset/reports/commands/exceptions.py:177
msgid "Alert query returned more then one row."
msgid "Alert query returned more than one row."
msgstr "La consulta de alerta devolvió más de una fila."

#: superset/reports/commands/alert.py:96
#, python-format
msgid "Alert query returned more then one row. %s rows returned"
msgid "Alert query returned more than one row. %s rows returned"
msgstr "La consulta de alerta devolvió más de una fila. %s filas devueltas"

#: superset-frontend/src/views/CRUD/alert/components/AlertStatusIcon.tsx:75
Expand Down
8 changes: 4 additions & 4 deletions superset/translations/fr/LC_MESSAGES/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -993,10 +993,10 @@
"%(num)d planifications de rapport supprimées"
],
"Value must be greater than 0": ["La valeur doit être plus grande que 0"],
"Alert query returned more then one row. %s rows returned": [
"Alert query returned more than one row. %s rows returned": [
"La requête a retourné plus d'une ligne. %s lignes retournées"
],
"Alert query returned more then one column. %s columns returned": [
"Alert query returned more than one column. %s columns returned": [
"La requête a retourné plus d'une colonne. %s colonnes retournées"
],
"Dashboard does not exist": ["Le tableau de bord n'existe pas"],
Expand Down Expand Up @@ -1051,13 +1051,13 @@
"Report Schedule reached a working timeout.": [
"La planification de rapport a atteint un timeout d'exécution."
],
"Alert query returned more then one row.": [
"Alert query returned more than one row.": [
"La requête a retourné plus d'une ligne."
],
"Alert validator config error.": [
"Erreur de configuration du validateur."
],
"Alert query returned more then one column.": [
"Alert query returned more than one column.": [
"La requête a retourné plus d'une colonne."
],
"Alert query returned a non-number value.": [
Expand Down
8 changes: 4 additions & 4 deletions superset/translations/fr/LC_MESSAGES/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -1006,21 +1006,21 @@ msgid "Alert query returned a non-number value."
msgstr "La requête a retourné une valeur non numérique."

#: superset/reports/commands/exceptions.py:186
msgid "Alert query returned more then one column."
msgid "Alert query returned more than one column."
msgstr "La requête a retourné plus d'une colonne."

#: superset/reports/commands/alert.py:105
#, python-format
msgid "Alert query returned more then one column. %s columns returned"
msgid "Alert query returned more than one column. %s columns returned"
msgstr "La requête a retourné plus d'une colonne. %s colonnes retournées"

#: superset/reports/commands/exceptions.py:177
msgid "Alert query returned more then one row."
msgid "Alert query returned more than one row."
msgstr "La requête a retourné plus d'une ligne."

#: superset/reports/commands/alert.py:96
#, python-format
msgid "Alert query returned more then one row. %s rows returned"
msgid "Alert query returned more than one row. %s rows returned"
msgstr "La requête a retourné plus d'une ligne. %s lignes retournées"

#: superset-frontend/src/views/CRUD/alert/components/AlertStatusIcon.tsx:75
Expand Down
8 changes: 4 additions & 4 deletions superset/translations/it/LC_MESSAGES/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -501,8 +501,8 @@
],
"Saved query not found.": [""],
"Deleted %(num)d report schedule": [""],
"Alert query returned more then one row. %s rows returned": [""],
"Alert query returned more then one column. %s columns returned": [""],
"Alert query returned more than one row. %s rows returned": [""],
"Alert query returned more than one column. %s columns returned": [""],
"Dashboard does not exist": [""],
"Chart does not exist": [""],
"Database is required for alerts": [""],
Expand All @@ -527,9 +527,9 @@
"Report Schedule execution got an unexpected error.": [""],
"Report Schedule is still working, refusing to re-compute.": [""],
"Report Schedule reached a working timeout.": [""],
"Alert query returned more then one row.": [""],
"Alert query returned more than one row.": [""],
"Alert validator config error.": [""],
"Alert query returned more then one column.": [""],
"Alert query returned more than one column.": [""],
"Alert query returned a non-number value.": [""],
"Alert found an error while executing a query.": [""],
"Alert fired during grace period.": [""],
Expand Down
8 changes: 4 additions & 4 deletions superset/translations/it/LC_MESSAGES/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -944,21 +944,21 @@ msgid "Alert query returned a non-number value."
msgstr ""

#: superset/reports/commands/exceptions.py:186
msgid "Alert query returned more then one column."
msgid "Alert query returned more than one column."
msgstr ""

#: superset/reports/commands/alert.py:105
#, python-format
msgid "Alert query returned more then one column. %s columns returned"
msgid "Alert query returned more than one column. %s columns returned"
msgstr ""

#: superset/reports/commands/exceptions.py:177
msgid "Alert query returned more then one row."
msgid "Alert query returned more than one row."
msgstr ""

#: superset/reports/commands/alert.py:96
#, python-format
msgid "Alert query returned more then one row. %s rows returned"
msgid "Alert query returned more than one row. %s rows returned"
msgstr ""

#: superset-frontend/src/views/CRUD/alert/components/AlertStatusIcon.tsx:75
Expand Down
8 changes: 4 additions & 4 deletions superset/translations/ja/LC_MESSAGES/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -654,10 +654,10 @@
" %(num)d 件のレポートスケジュールを削除しました"
],
"Value must be greater than 0": ["値は 0 より大きくする必要があります"],
"Alert query returned more then one row. %s rows returned": [
"Alert query returned more than one row. %s rows returned": [
"アラートクエリが複数の行を返しました。 %s 行が返されました"
],
"Alert query returned more then one column. %s columns returned": [
"Alert query returned more than one column. %s columns returned": [
"アラートクエリが複数の列を返しました。%s 列が返されました"
],
"Dashboard does not exist": ["ダッシュボードが存在しません"],
Expand Down Expand Up @@ -701,11 +701,11 @@
"Report Schedule reached a working timeout.": [
"レポートスケジュールが作業タイムアウトに達しました。"
],
"Alert query returned more then one row.": [
"Alert query returned more than one row.": [
"アラートクエリが複数の行を返しました。"
],
"Alert validator config error.": ["アラートバリデーター設定エラー。"],
"Alert query returned more then one column.": [
"Alert query returned more than one column.": [
"アラートクエリが複数の列を返しました。"
],
"Alert query returned a non-number value.": [
Expand Down
8 changes: 4 additions & 4 deletions superset/translations/ja/LC_MESSAGES/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -938,21 +938,21 @@ msgid "Alert query returned a non-number value."
msgstr "アラートクエリが数値以外の値を返しました。"

#: superset/reports/commands/exceptions.py:186
msgid "Alert query returned more then one column."
msgid "Alert query returned more than one column."
msgstr "アラートクエリが複数の列を返しました。"

#: superset/reports/commands/alert.py:105
#, python-format
msgid "Alert query returned more then one column. %s columns returned"
msgid "Alert query returned more than one column. %s columns returned"
msgstr "アラートクエリが複数の列を返しました。%s 列が返されました"

#: superset/reports/commands/exceptions.py:177
msgid "Alert query returned more then one row."
msgid "Alert query returned more than one row."
msgstr "アラートクエリが複数の行を返しました。"

#: superset/reports/commands/alert.py:96
#, python-format
msgid "Alert query returned more then one row. %s rows returned"
msgid "Alert query returned more than one row. %s rows returned"
msgstr "アラートクエリが複数の行を返しました。 %s 行が返されました"

#: superset-frontend/src/views/CRUD/alert/components/AlertStatusIcon.tsx:75
Expand Down
8 changes: 4 additions & 4 deletions superset/translations/ko/LC_MESSAGES/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -543,8 +543,8 @@
"Saved query not found.": ["저장된 쿼리를 찾을 수 없습니다."],
"Deleted %(num)d report schedule": [""],
"Value must be greater than 0": ["값은 0보다 커야합니다"],
"Alert query returned more then one row. %s rows returned": [""],
"Alert query returned more then one column. %s columns returned": [""],
"Alert query returned more than one row. %s rows returned": [""],
"Alert query returned more than one column. %s columns returned": [""],
"Dashboard does not exist": ["대시보드가 존재하지 않습니다"],
"Chart does not exist": ["차트가 존재하지 않습니다"],
"Database is required for alerts": [""],
Expand All @@ -561,9 +561,9 @@
"Report Schedule execution got an unexpected error.": [""],
"Report Schedule is still working, refusing to re-compute.": [""],
"Report Schedule reached a working timeout.": [""],
"Alert query returned more then one row.": [""],
"Alert query returned more than one row.": [""],
"Alert validator config error.": [""],
"Alert query returned more then one column.": [""],
"Alert query returned more than one column.": [""],
"Alert query returned a non-number value.": [""],
"Alert found an error while executing a query.": [""],
"A timeout occurred while executing the query.": [""],
Expand Down
Loading

0 comments on commit ee06d3d

Please sign in to comment.