Side cart shows "Every 2 month" for multi-interval subscriptions

オープン
#83 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
55/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
javascript

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.one and side_cart.interval.month.other.
  • The renderer picks the form from intervalCount, preferably with Intl.PluralRules for the store locale and falling back to other. It passes the translated word into frequency_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.
主要言語
JavaScript
スター
0
フォーク
1
平均マージ
4日 16時間
マージ済み PR(30日)
1

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

NextCommerceCo/spark のほかの issue

NextCommerceCo/spark の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。