Side cart shows "Every 2 month" for multi-interval subscriptions
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 55/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- javascript
- Ambito
- frontend, internationalization, localization
Direzione di ricerca
Start in assets/js/spark-cart-drawer-renderer.js around line 77 and read how locale strings populate side_cart.default.frequency_template; then inspect the locale interval labels and the cart page's frequency text for the same issue. Run the relevant tests in tests/js/ and add coverage for count 1 and 2 in English and a translated locale. Done means translated singular/plural labels are selected by locale-aware plural rules, with the stated fallback behavior.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
A subscription line in the side cart with a delivery interval above 1 reads "Every 2 month" instead of "Every 2 months". The interval word never changes for plural counts, in any language.
Where: assets/js/spark-cart-drawer-renderer.js, around line 77, fills side_cart.default.frequency_template ("Every {count} {interval}") with the platform's interval value lowercased (month, week, day). The count is never used to choose a singular or plural form.
Why not a quick fix: adding an English s when the count is above 1 corrects English but produces wrong words in de, es and fr, whose frequency_template strings are translated ("Alle", "Cada", "Tous les"). The fix needs a translated word for each interval, in singular and plural form.
Done when:
- Each locale has interval labels for day, week and month (and year if the platform sends it), each with a one and an other form, for example
side_cart.interval.month.oneandside_cart.interval.month.other. - The renderer picks the form from
intervalCount, preferably withIntl.PluralRulesfor the store locale and falling back toother. It passes the translated word intofrequency_template. - An unknown interval value falls back to the raw platform value, as today.
tests/js/covers count 1 and count 2 for at least English and one translated locale.- The cart page's frequency text is checked for the same problem and fixed the same way if affected.
- Lingua principale
- JavaScript
- Stelle
- 0
- Fork
- 1
- Merge medio
- 4g 16h
- PR unite (30g)
- 1
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun 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 NextCommerceCo/spark
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
NextCommerceCo/spark#35 ·
Tutte le issue di NextCommerceCo/spark
Issue simili
-
FEATURE REQUEST
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
linuxmint/cinnamon-spices-applets#9356 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
needs-triage Platform(Default)
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Local proof does not compare the SDK loader's data-campaign between proven and production buildsApertaenhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
NextCommerceCo/campaigns-os#819 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno