Document the `use-explicit-plural-values` gen-l10n option
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 82/100
- issue の種類
- ドキュメント
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
調査の方向性
まず sites/docs/src/content/ui/internationalization/index.md を確認します。特に「Configuring the l10n.yaml file」の表と「Placeholders, plurals, and selects」のセクションを対象にします。このオプションによって =N の完全一致がどのように変わるかを説明し、デフォルト値と CLI/設定名を追加してください。また、明示的な値とロケールの複数形カテゴリの違いを明確にしてください。両方のセクションでこのオプションが正確に説明され、例がリンク先の Flutter の変更と一貫していれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Related code pull request or issue
https://github.com/flutter/flutter/pull/194816
Feature summary
flutter/flutter#194816 adds an opt-in use-explicit-plural-values option to flutter gen-l10n (l10n.yaml and --use-explicit-plural-values).
Today, gen-l10n maps the explicit plural values =0, =1 and =2 to the plural categories zero, one and two. In many locales those categories cover more than the exact number, so =1{1 item} is also shown for 21, 31 and 101 in Ukrainian, and for 0 in French. With the option enabled, explicit values match only that exact number and take precedence over the categories, as specified by ICU. Any non-negative integer can be used (=3, =10), and =1 and one can be used in the same message. The option defaults to false.
Type of documentation needed
- New conceptual page or guide
- Update to an existing guide on docs.flutter.dev
- Cookbook recipe or practical code sample
- CLI or tooling documentation
- Platform support or integration guide
- Breaking change migration guide
Code snippet or usage example
// l10n.yaml
// use-explicit-plural-values: true
//
// app_uk.arb
// "items": "{count, plural, =0{Немає елементів} =1{Рівно один елемент} one{{count} елемент} few{{count} елементи} many{{count} елементів} other{{count} елемента}}"
//
// Generated code:
String _temp0 = count == 0
? 'Немає елементів'
: count == 1
? 'Рівно один елемент'
: intl.Intl.pluralLogic(
count,
locale: localeName,
other: '$count елемента',
one: '$count елемент',
few: '$count елементи',
many: '$count елементів',
);
Additional context or resources
Pages to update in sites/docs/src/content/ui/internationalization/index.md:
- The "Configuring the l10n.yaml file" table: add a
[no-]use-explicit-plural-valuesrow, for example: "Whether explicit plural cases such as=1match only that exact value and take precedence over plural categories such asone, as specified by ICU. When false (the default),=0,=1and=2are treated aszero,oneandtwo." - The "Placeholders, plurals, and selects" section currently presents
=0,=1and=2alongsidefewandmanyas if they were the same kind of case. It would help to explain the difference between explicit values (=N, exact match) and plural categories (zero,one,two,few,many,other, chosen by the locale's plural rules), and mention the new option.
Volunteer to help write this documentation
- Draft the documentation PR on docs.flutter.dev.
- 主要言語
- Dart
- スター
- 3.1k
- フォーク
- 3.5k
- 平均マージ
- 2日 1時間
- マージ済み PR(30日)
- 46
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
flutter/website のほかの issue
-
a.tut.codelab-google fix.code-sample fix.link fix.typo from.flutter-sdk p2-medium
難易度 1/5 1時間未満 初心者へのやさしさ 65/100
flutter/website#13967 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
Need dev info for running on iOS対応中かも @poyito777 が 22 日前に担当しました。 オープンfrom.page-issue p2-medium
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
Missing download link on install page対応中かも @conooi が 21 日前に担当しました。 オープンfrom.page-issue p1-high
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
flutter/website#13540 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
At step 5th in `Get to know Firebase for Flutter` codelabs, the screenshot is not synced with codeオープンa.tut.codelab-google p2-medium
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
flutter/website#13816 · コメント 5 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 54/100
メンテナーはふだん 1 日以内に返信
flutter/website の issue をすべて見る
似ている issue
-
Standalone dash flashes as its own RSVP step (e.g. Russian dialogue)対応中かも @bezig01 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
daniel-pimenta-cc/ledor#53 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
-
Iteration Counterオープンenhancement firebase
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
brysonddelozier/scribbles#24 ·
-
bug good first issue P2-Medium
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
basictech01/uniun#305 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
daohoangson/flutter_widget_from_html#1657 ·
メンテナーはふだん 3 日以内に返信