mistercrunch commented on issue #13442:
URL: https://github.com/apache/superset/issues/13442#issuecomment-2644062517
@Yisel-Ulloa - not currently, short of using the export/import functions and
templating strings in yaml files, and writing your own framework to substitute
strings in the metadata and duplicating each dashboard for each locale you want
to support. That solution isn't ideal for many reasons but can work to support
some of the use cases. This means that effectively you are managing one
dashboard per locale, and are on your own to provide the translation framework.
Some ideas/direction here:
- a jinja based approach around which there's already some infrastructure
that would support translation. Introducing a new JINJA macro, something like
`i18n("...some translatable string...")` might be fairly easy to implement, but
would require you to implement this macro effectively. Pretty sure it'd be
viable, but would require managing a data structure with all the translatable
strings
- a gettext-based approach, building upon the `.mo` and `.po` files we have
today. The challenge there is to enumerate / extract the strings out of the
metadata database, and would require some process to fetch the strings out of
the database, and force you to fork the .po files - that would then contain the
core strings from the app + the strings specific to your instance. That whole
approach is probably doable but would require some core work. Ideally would be
segmented away from the current `.po` `.mo` files...
- an in-database solution, allowing to store the strings and translation
within the metadata database. Personally I'm not big on this solution as it
adds a lot of complexity to the app and has perf/complexity-creep concerns.
--
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]