Slot dates and times can only be shown in US English
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 38/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- node.js, typescript
調査の方向性
Start with src/lib/slot-label.ts and trace its callers listed in the issue, then inspect the other formatting sites in src/lib/magic-compose/fit-text.ts, src/lib/format-duration.ts, and the connected-apps page. Add locale-focused unit tests for unchanged English output and Swedish formatting, including a date-only value under a non-UTC TZ; run tests/e2e/time-format.spec.ts unchanged. Done means the listed checks pass; the Dockerfile ICU change requires owner handling.
索引モデルが issue の本文から書いたものです。
説明
Needs your OK: this lets slot dates and times be formatted for any language. English output stays exactly the same. Swap pipeline:proposed for pipeline:ready to have it built.
What happens
src/lib/slot-label.ts formats every slot date with toLocaleDateString('en-US', …) ("Sat, May 3") and every time on a hand-written 12-hour clock ("18:30" → "6:30 PM"). A Swedish reader expects "lör 3 maj" and "18:30".
The same functions run on the server (public page, Responses tab, emails), in the browser (Build tab) and in the worker (reminders). Services call them too: summarizeSlotValues names the slot for the edit and cancelled pages from src/services/commitments.ts.
Three other places format on their own:
src/app/app/(chrome)/settings/connected-apps/page.tsxusesen-GBdates.src/lib/magic-compose/fit-text.tsuses anen-USnumber.src/lib/format-duration.tsbuilds English plurals.
Fix, in outline
formatSlotDate(iso, locale)andformatSlotTime(hhmm, locale), withlocalerequired, so TypeScript finds every caller:renderFieldValue,slotDetails,summarizeSlotValues,formatGroupLabel,prettyHeader,WysiwygSlot, the Responses tab, the emails, and the commitment services, which takelocaleas a parameter. Every caller passes'en'for now.- No time zone can shift the output. Build the
Datefrom UTC parts and format withtimeZone: 'UTC'. - English keeps today's exact output, including the no-break space before AM/PM. Other languages use
Intl; Swedish gives "lör 3 maj" and "18:30". - The other three spots take a locale too:
Intl.NumberFormatinfit-text.ts,Intldates on the connected-apps page, and aformatDurationthat can pluralize per language. - Full ICU in the image. Add a
RUN node -eline to theDockerfilethat fails the build unlessIntl.DateTimeFormat('sv').resolvedOptions().locale === 'sv'. CI's Node isn't the image's, so CI can't check this.
Watch for
tests/e2e/time-format.spec.tspins "6:30 PM", and must pass unchanged.- The CSV export isn't a caller. It exports raw values on purpose (
src/lib/responses-csv.ts). - Hydration, later. Node's ICU and Chrome's can abbreviate differently ("lör" vs "lör."). That can't bite while everything passes
'en'; later steps format on the server where they can. - The
Dockerfilechange goes to the owner, as a high-risk file. - #319 (local times treated as UTC) is related but separate: this only changes how a stored value is printed.
Done when
- Unit tests cover English (unchanged strings) and Swedish dates and times, including a date-only value run under a non-UTC
TZ. time-format.spec.tspasses unchanged.pnpm lint && pnpm typecheck && pnpm knip && pnpm testandpnpm test:db(services change) pass.
Planned with the owner in https://claude.ai/code/session_01EFKmj716ZY3b3SwR8TV8Y2 and checked against the code on main at 35288fa. The full plan is private to the owner's account: https://claude.ai/artifact/VgQH6U2s2EVx3LX991fJi8 (a Claude session on that account can open it with the Artifact tool's read action). This is step 0.3 there.
- 主要言語
- TypeScript
- スター
- 19
- フォーク
- 4
- 平均マージ
- 21時間 41分
- マージ済み PR(30日)
- 201
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
richshaw/OpenSignup のほかの issue
-
The cookies table is cut off on a phone, hiding how long each cookie lasts対応中かも @richshaw が 1 日前に担当しました。 オープンbug pipeline:building pipeline:ux
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
richshaw/OpenSignup#749 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
A New signup description with line breaks can pass the form, then be refused as too long対応中かも @richshaw が 1 日前に担当しました。 オープンbug pipeline:building pipeline:ux
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
richshaw/OpenSignup#722 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
enhancement pipeline:proposed pipeline:ux
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
richshaw/OpenSignup#654 ·
メンテナーはふだん 1 日以内に返信
-
Magic Compose's reading screen quotes the description in a blue box that no other screen uses対応中かも @richshaw が 1 日前に担当しました。 オープンenhancement pipeline:building pipeline:ux
難易度 3/5 1〜2日 初心者へのやさしさ 75/100
richshaw/OpenSignup#751 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
enhancement pipeline:proposed pipeline:ux
難易度 3/5 1〜2日 初心者へのやさしさ 75/100
richshaw/OpenSignup#750 ·
メンテナーはふだん 1 日以内に返信
richshaw/OpenSignup の issue をすべて見る
似ている issue
-
Add: Class TV Modaオープンcheck:passed streams:add
難易度 1/5 1時間未満 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
GiganticMinecraft/seichi-playguide#183 ·
メンテナーはふだん 1 日以内に返信
-
area: core complexity: easy impact: medium
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
ueberdosis/tiptap#8668 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
longbridge/nsh#804 ·
メンテナーはふだん 1 日以内に返信