mirror of
https://github.com/apache/superset.git
synced 2026-04-21 00:54:44 +00:00
chore: Localization of several charts and elements (#22150)
Co-authored-by: ashumeiko <ashumeiko@ashumeiko.com>
This commit is contained in:
@@ -17,6 +17,8 @@
|
||||
import logging
|
||||
from typing import Any, Dict
|
||||
|
||||
from flask_babel import lazy_gettext as _
|
||||
|
||||
from superset.charts.commands.exceptions import (
|
||||
ChartDataCacheLoadError,
|
||||
ChartDataQueryFailedError,
|
||||
@@ -49,7 +51,9 @@ class ChartDataCommand(BaseCommand):
|
||||
# TODO: QueryContext should support SIP-40 style errors
|
||||
for query in payload["queries"]:
|
||||
if query.get("error"):
|
||||
raise ChartDataQueryFailedError(f"Error: {query['error']}")
|
||||
raise ChartDataQueryFailedError(
|
||||
_("Error: %(error)s", error=query["error"])
|
||||
)
|
||||
|
||||
return_value = {
|
||||
"query_context": self._query_context,
|
||||
|
||||
Reference in New Issue
Block a user