feature request getPathWithoutLocale

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

メンテナーはふだん 1 日以内に返信

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

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
38/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
typescript
領域
localization

調査の方向性

まず、サーバー側のH3ルーターユーティリティと既存のロケール解析を探し、次に /fr/landings や /en_US/landings のようなパスをどのように扱うべきかを確認してください。要求されたロケール接頭辞付きの例に対して getPathWithoutLocale ユーティリティが一貫して /landings を返し、その他の記載されたパス形式を維持できれば作業完了です。

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

説明

feature status: proposal
Clear and concise description of the problem

need write regexp
like this \/\S{0,2}\/?landings\/?(.+)? - is simple en/fr (but is en_US?)

http://localhost:3010/davos
http://localhost:3010/landings/davos
http://localhost:3010/landings
http://localhost:3010/landings/
http://localhost:3010/fr/landings/davos
http://localhost:3010/fr/landings
http://localhost:3010/fr/landings/
Suggested solution

it would be convenient to parse h3 routers on the server for example function: getPathWithoutLocale

http://localhost:3010/fr/landings -> /landings
http://localhost:3010/en_US/landings -> /landings
Alternative

No response

Additional context

No response

Validations
主要言語
TypeScript
スター
17
フォーク
1
平均マージ
4時間 4分
マージ済み PR(30日)
51

環境構築

はじめの一歩

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

intlify/utils のほかの issue

intlify/utils の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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