mistercrunch commented on issue #13442:
URL: https://github.com/apache/superset/issues/13442#issuecomment-2644109401

   One more thing, is a hybrid of jinja + metadata-database might be possible 
too. Idea here would be to use/abuse the key/value store we currently have in 
the database (one large table with K/Vs that we already use for various 
things), meaning the jinja macro would use the k/v table to do a quick database 
lookup. The key could be something like `f"{i18n_string_id}_{locale}"` and 
value would be the translated string for that locale.
   
   Ideally the "string id" would be something short, not the `en` full string, 
which means potentially doing a fallback to `en` if the required locale isn't 
defined, so potentially 2 db lookups per string.
   
   The implication here is a fair amount of database I/O, meaning loading up a 
dashboard with a dozen translated chart titles would have to do as many 
database lookups. Strings could be memoized on the web server to prevent some 
of the I/O and would increase the app memory footprint by as many bytes as 
you'd want to cache.


-- 
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