Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(translations): updating pot -> po -> json files (babel 2.9.1) #26773

Merged
merged 8 commits into from
Feb 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading