feat: User facing text able to be easily localized for web components using plugins
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 28/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Stack tecnologico
- angular, typescript
- Ambito
- frontend, localization, tooling
Direzione di ricerca
Nell’issue non vengono indicati file di implementazione né test. Inizia tracciando il percorso di output-target e plugin di Stencil, usando l’esempio di template Angular per capire dove passerebbero le chiavi di localizzazione e il contenuto generato. Il risultato deve essere un approccio basato su plugin, deciso e testato, che supporti l’output localizzato dei web component descritto.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Prerequisites
- I have read the Contributing Guidelines.
- I agree to follow the Code of Conduct.
- I have searched for existing issues that already include this feature request, without success.
Describe the Feature Request
Allow for web components to generate html templates which contain user facing text which is able to be localized using an external library such as https://www.i18next.com/ for an example.
Describe the Use Case
I want to be generate web components as part of my design system which is easily localized by all teams regardless of the stack they are developing with. In my organization cloud products are mainly in angular for which we have built custom tooling however some teams are utilizing Vue as such it would be beneficial to be able to use common tooling across the framework's.
In out Design system documentation we would simply need to have one example of using the component rather than 1 for each language.
Describe Preferred Solution
- Allow developer to pass localization keys into components with the parameter being prefixed
<my-button data-i18n="helloWorldText" data-i18n-title="helloWorldDesc"> </my-button> - Have the output for target call the plugin if configured for each parameter containing the prefix
- Plugin return to output target location of localized content ie Properties/InnerHtml, as well as PropertyName & the Content
- Output target merges content into template for angular it would be similiar to
<button title="{{helloWorldDesc | i18next }}">{{ helloWorldTitle | i18next }}</button>
which would render out to using angular for example when using angular
<button title="The is a big Hello world to all!">Hello World!</button>
The approach means that we could pass from parent components to child components the localization keys further reducing the properties needing to be added.
Describe Alternatives
The alternative proposal would be to internalize to stencil (template rendering) the process of manipulating the template html so that it generates the necessary tags to trigger the localization but the impact is that the integration is tightly coupled.
Related Code
No response
Additional Information
No response
- Lingua principale
- TypeScript
- Stelle
- 13.2k
- Fork
- 865
- Merge medio
- 2g 16h
- PR unite (30g)
- 29
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di stenciljs/core
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
bug(mock-doc): `Element.toggleAttribute()` is missing, so components that use it fail during SSRApertatriage
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Stencil FOUC styles should use @layer to avoid cascade conflicts with React 19Forse già presa @johnjenkins l’ha presa 230 giorni fa. ApertaStencil v5
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
stenciljs/core#7016 · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 22/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di stenciljs/core
Issue simili
-
[BUG]: Duplicate preposition in heading and unformatted feedback text on Strengthen Argument pageApertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
AOSSIE-Org/DebateAI#801 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
ci: repo has no GitHub Actions workflow, so pushes and pull requests are never built or testedApertaagents area: runtime automation chore cli consistency dependencies developer-experience difficulty: easy documentation enhancement good first issue help wanted hygiene json-output priority: P3 starters tests
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
Add: BOM CineApertaapproved check:passed streams:add
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
area:claude-code-web bug has repro platform:linux platform:web
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 66/100
anthropics/claude-code#110168 ·