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): fix translations order #28031

Merged
merged 5 commits into from
Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from 4 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
4 changes: 2 additions & 2 deletions superset/sql_parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -765,8 +765,8 @@ def _extract_tables_from_sql(self) -> set[Table]:
SupersetError(
error_type=SupersetErrorType.QUERY_SECURITY_ACCESS_ERROR,
message=__(
f"You may have an error in your SQL statement. {message}"
),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if @john-bodley knows a good way to lint against this. According to GPT, we can write a custom pylint checker, but it seems like that would be a first for this codebase. Something off the shelf to prevent this would be nice.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rusackas we have custom (WIP) Pylint checkers. I guess one would need to add one to check whether there's an f-string being used within a translation __(...).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, could you point me to where those live, @john-bodley, and I'll try to GPT us out of this issue?

"You may have an error in your SQL statement. {message}"
).format(message=message),
level=ErrorLevel.ERROR,
)
) from ex
Expand Down
Loading
Loading