Title format is not configurable
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 42/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- javascript
- 領域
- frontend, localization
調査の方向性
まず src/relative-time-element.ts の、issue でリンクされているタイトルのフォーマット処理から始め、既存のフォーマットオプションと関連するテストを確認します。タイトルのフォーマットでスタイル設定を再利用する方法、または独立したルールを受け入れる方法を定義して実装します。その際、ブラウザーのローカルタイムゾーンでのフォーマットを維持します。タイトルが要求されたローカライズ形式をサポートすれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Hello, and thanks for this custom element!
I am starting to use <relative-time> in an app that supports multiple languages and users are in different countries. I started with the basics and just set the datetime attribute and inner text.
I noticed the automatic title always had short months. I tried to change it by setting formatStyle="long" and month="long" to no avail. Inspecting the source I found that titles use a fixed format:
Thanks to the comment in the code above, I was able to temporarily solve for my use case by rendering the title from the server side, but that meant giving up showing the time in the timezone of the browser.
Would you consider re-using the style settings when formatting the title or provide a specific formatting rule for the title, independent from the inner text?
PS: Related, but less important, it would also be useful to add some text around the date, like title="Updated at {formatted-date-here}" (where the string "Updated at" is rendered in the correct locale on the server).
Thanks again!
- 主要言語
- JavaScript
- スター
- 4k
- フォーク
- 194
- 平均マージ
- 4日 10時間
- マージ済み PR(30日)
- 5
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
github/relative-time-element のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
github/relative-time-element#383 · コメント 1 件 ·
-
Inconsistent use of "yesterday"再び着手できるかも @ayushman1210 が 331 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
github/relative-time-element#313 · コメント 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
github/relative-time-element#307 ·
-
Astro Supportオープン
難易度 4/5 3〜5日 初心者へのやさしさ 30/100
github/relative-time-element#306 · コメント 2 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
github/relative-time-element#293 · コメント 2 件 · リアクション 5 件 ·
github/relative-time-element の issue をすべて見る
似ている issue
-
documentation v2
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
modelcontextprotocol/servers#5170 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
SwiftKickMobile/skai#84 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
Billionmail/BillionMail#389 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
Uniswap/tokenlists-org#3331 ·
-
beginner-friendly category:finding-titles community enhancement first-timers-only good first issue hacktoberfest help wanted low hanging fruit micro-contribution type: task up-for-grabs
難易度 1/5 1〜3時間 初心者へのやさしさ 85/100
Berserk-hub150/skillhawk#227 · コメント 1 件 ·
メンテナーはふだん 8 日以内に返信