You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by mi...@apache.org on 2023/10/02 14:47:57 UTC
[superset] 05/05: fix(sqllab): error with lazy_gettext for tab titles (#25469)
This is an automated email from the ASF dual-hosted git repository.
michaelsmolina pushed a commit to branch 3.0
in repository https://gitbox.apache.org/repos/asf/superset.git
commit f577005ff95f7ad5331df67f2c873df25ab5b6c2
Author: ʈᵃᵢ <td...@gmail.com>
AuthorDate: Fri Sep 29 19:31:20 2023 -0700
fix(sqllab): error with lazy_gettext for tab titles (#25469)
(cherry picked from commit ddde178e3bf2d73811e3e39dbb79a9a86f1e0970)
---
superset/views/sql_lab/views.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/superset/views/sql_lab/views.py b/superset/views/sql_lab/views.py
index 0002c3f31c..7676d59ef7 100644
--- a/superset/views/sql_lab/views.py
+++ b/superset/views/sql_lab/views.py
@@ -22,6 +22,7 @@ from flask_appbuilder import expose
from flask_appbuilder.models.sqla.interface import SQLAInterface
from flask_appbuilder.security.decorators import has_access, has_access_api
from flask_babel import lazy_gettext as _
+from flask_babel import gettext as __
from sqlalchemy import and_
from superset import db
@@ -145,7 +146,7 @@ class TabStateView(BaseSupersetView):
user_id=get_user_id(),
# This is for backward compatibility
label=query_editor.get("name")
- or query_editor.get("title", _("Untitled Query")),
+ or query_editor.get("title", __("Untitled Query")),
active=True,
database_id=query_editor["dbId"],
schema=query_editor.get("schema"),