Skip to content

Commit

Permalink
chore(translations): updating pot -> po -> json files (babel 2.9.1) (a…
Browse files Browse the repository at this point in the history
  • Loading branch information
rusackas committed Feb 13, 2024
1 parent 4796484 commit 91ac575
Show file tree
Hide file tree
Showing 38 changed files with 292,743 additions and 286,766 deletions.
3 changes: 2 additions & 1 deletion superset/commands/chart/delete.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ def validate(self) -> None:
if reports := ReportScheduleDAO.find_by_chart_ids(self._model_ids):
report_names = [report.name for report in reports]
raise ChartDeleteFailedReportsExistError(
_(f"There are associated alerts or reports: {','.join(report_names)}")
_("There are associated alerts or reports: %(report_names)s")
% {"report_names": ",".join(report_names)}
)
# Check ownership
for model in self._models:
Expand Down
3 changes: 2 additions & 1 deletion superset/commands/dashboard/delete.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ def validate(self) -> None:
if reports := ReportScheduleDAO.find_by_dashboard_ids(self._model_ids):
report_names = [report.name for report in reports]
raise DashboardDeleteFailedReportsExistError(
_(f"There are associated alerts or reports: {','.join(report_names)}")
_("There are associated alerts or reports: %(report_names)s")
% {"report_names": ",".join(report_names)}
)
# Check ownership
for model in self._models:
Expand Down
3 changes: 2 additions & 1 deletion superset/commands/database/delete.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ def validate(self) -> None:
if reports := ReportScheduleDAO.find_by_database_id(self._model_id):
report_names = [report.name for report in reports]
raise DatabaseDeleteFailedReportsExistError(
_(f"There are associated alerts or reports: {','.join(report_names)}")
_("There are associated alerts or reports: %(report_names)s")
% {"report_names": ",".join(report_names)}
)
# Check if there are datasets for this database
if self._model.tables:
Expand Down
10 changes: 6 additions & 4 deletions superset/commands/database/validate_sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ def validate(self) -> None:
if not validators_by_engine or spec.engine not in validators_by_engine:
raise NoValidatorConfigFoundError(
SupersetError(
message=__(f"no SQL validator is configured for {spec.engine}"),
message=__("no SQL validator is configured for %(engine)s")
% {"engine": spec.engine},
error_type=SupersetErrorType.GENERIC_DB_ENGINE_ERROR,
level=ErrorLevel.ERROR,
),
Expand All @@ -108,9 +109,10 @@ def validate(self) -> None:
raise NoValidatorFoundError(
SupersetError(
message=__(
f"No validator named {validator_name} found "
f"(configured for the {spec.engine} engine)"
),
"No validator named %(validator_name)s found "
"(configured for the %(engine)s engine)"
)
% {"validator_name": validator_name, "engine": spec.engine},
error_type=SupersetErrorType.GENERIC_DB_ENGINE_ERROR,
level=ErrorLevel.ERROR,
),
Expand Down
8 changes: 5 additions & 3 deletions superset/commands/report/alert.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,17 +96,19 @@ def _validate_result(rows: np.recarray[Any, Any]) -> None:
if len(rows) > 1:
raise AlertQueryMultipleRowsError(
message=_(
f"Alert query returned more than one row. {len(rows)} rows returned"
"Alert query returned more than one row. %(num_rows)s rows returned"
)
% {"num_rows": len(rows)}
)
# 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
_(
f"Alert query returned more than one column. "
f"{(len(rows[0]) - 1)} columns returned"
"Alert query returned more than one column. "
"%(num_columns)s columns returned"
)
% {"num_columns": len(rows[0]) - 1}
)

def _validate_operator(self, rows: np.recarray[Any, Any]) -> None:
Expand Down
10,142 changes: 4,922 additions & 5,220 deletions superset/translations/de/LC_MESSAGES/messages.json

Large diffs are not rendered by default.

Loading

0 comments on commit 91ac575

Please sign in to comment.