Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Document the `use-explicit-plural-values` gen-l10n option

オープン 初心者向け
#13,993 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

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

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
82/100
issue の種類
ドキュメント
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
dart, flutter
領域
documentation

調査の方向性

まず sites/docs/src/content/ui/internationalization/index.md を確認します。特に「Configuring the l10n.yaml file」の表と「Placeholders, plurals, and selects」のセクションを対象にします。このオプションによって =N の完全一致がどのように変わるかを説明し、デフォルト値と CLI/設定名を追加してください。また、明示的な値とロケールの複数形カテゴリの違いを明確にしてください。両方のセクションでこのオプションが正確に説明され、例がリンク先の Flutter の変更と一貫していれば完了です。

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

説明

act.await-dev-pr d.enhancement e0-minutes p2-medium t.cli-tools t.i18n t.l10n
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-values row, for example: "Whether explicit plural cases such as =1 match only that exact value and take precedence over plural categories such as one, as specified by ICU. When false (the default), =0, =1 and =2 are treated as zero, one and two."
  • The "Placeholders, plurals, and selects" section currently presents =0, =1 and =2 alongside few and many as 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

環境構築

はじめの一歩

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

flutter/website のほかの issue

flutter/website の issue をすべて見る

似ている issue

Dart の issue をもっと見る

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

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