Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a i18n interpolation component for interpolating Vue components into markdown #2429

Open
johncowen opened this issue Apr 12, 2024 · 0 comments
Labels
kind/cleanup Cleanup/refactor an existing component/code triage/accepted The issue was reviewed and is complete enough to start working on it

Comments

@johncowen
Copy link
Contributor

Description

This issue is split off from #1478

I'd like to integrate and perhaps use the <I18nT /> component, it requires extra setup so I'd like to do that so at least it available as and when we need it.


['I18nT', i18nTComponent(i18n)],

^ We have globally installed the <I18nT /> component and configured it to use our i18n strings, but...!

The <I18nT /> component has an issue were it encodes any HTML in the i18n strings safely, under the assumption that the strings will be user provided and thus guard against any HTML injection. Thing is, we specifically want it not to encode any HTML (our i18n strings support markdown which will be transformed to HTML). So as it stands now, we've installed this but we can't really use it.

I've had a brief look at the <I18nT /> component to see if the HTML encoding can be disabled, but there is no existing functionality to do this and it looks and sounds like adding support to turn this off isn't trivial. It may be easier to build something ourselves.

Where would this component be useful:

In our Zone creation pages we have two components (one for k8s and one for universal)

There is potential to just give the same component a different i18n key, and then interpolate the components into that. At the very least we would keep both components but no need to finely provide multiple i18n keys similar to zones.form.kubernetes.prerequisites.stepLabel, zones.form.kubernetes.prerequisites.step2Label, ....step3Label etc etc.

There are possibly other areas in the GUI where we would have a similar usecase.

@johncowen johncowen added triage/pending This issue will be looked at on the next triage meeting kind/feature New feature labels Apr 12, 2024
@johncowen johncowen added kind/cleanup Cleanup/refactor an existing component/code and removed kind/feature New feature labels Apr 12, 2024
@jakubdyszkiewicz jakubdyszkiewicz added triage/accepted The issue was reviewed and is complete enough to start working on it and removed triage/pending This issue will be looked at on the next triage meeting labels Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/cleanup Cleanup/refactor an existing component/code triage/accepted The issue was reviewed and is complete enough to start working on it
Projects
None yet
Development

No branches or pull requests

2 participants