alex-poor commented on code in PR #39357:
URL: https://github.com/apache/superset/pull/39357#discussion_r3440995561


##########
superset/templates/superset/spa.html:
##########
@@ -145,6 +145,29 @@
     {% endblock %}
 
     {% block tail_js %}
+      {#
+        Expose the language pack on window BEFORE the entry bundle loads,
+        so module-level `const X = t('...')` calls across webpack-split
+        chunks all find a configured translator on first access. The
+        bootstrap div is the single source of truth; we parse it once and
+        stash the pack on a global that the translator reads lazily.
+        See upstream issue #35330.
+      #}
+      <script nonce="{{ macros.get_nonce() }}">

Review Comment:
   Thanks — I've added a comment in the template block 
([spa.html#L148](https://github.com/apache/superset/blob/fix/i18n-bootstrap-injection/superset/templates/superset/spa.html#L148))
 spelling out the rationale,



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to