Document the `use-explicit-plural-values` gen-l10n option
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 82/100
- Loại issue
- Tài liệu
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Lĩnh vực
- documentation
Hướng nghiên cứu
Bắt đầu với sites/docs/src/content/ui/internationalization/index.md, đặc biệt là bảng “Configuring the l10n.yaml file” và mục “Placeholders, plurals, and selects”. Giải thích tùy chọn thay đổi việc khớp chính xác =N như thế nào, đồng thời bổ sung giá trị mặc định và tên CLI/cấu hình; làm rõ sự khác nhau giữa các giá trị tường minh và các danh mục số nhiều của locale. Công việc hoàn tất khi cả hai mục mô tả chính xác tùy chọn và các ví dụ vẫn nhất quán với thay đổi Flutter được liên kết.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Dart
- Star
- 3.1k
- Fork
- 3.5k
- Merge trung bình
- 2 ngày 1 giờ
- Pull request đã merge (30 ngày)
- 46
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của flutter/website
-
a.tut.codelab-google fix.code-sample fix.link fix.typo from.flutter-sdk p2-medium
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 65/100
flutter/website#13967 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Need dev info for running on iOSCó thể đã có người làm @poyito777 đã nhận 21 ngày trước. Đang mởfrom.page-issue p2-medium
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Missing download link on install pageCó thể đã có người làm @conooi đã nhận 20 ngày trước. Đang mởfrom.page-issue p1-high
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
flutter/website#13540 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
At step 5th in `Get to know Firebase for Flutter` codelabs, the screenshot is not synced with codeĐang mởa.tut.codelab-google p2-medium
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
flutter/website#13816 · 5 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 54/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của flutter/website
Issue tương tự
-
Needs Attention platform: android type: infrastructure umbrella
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
firebase/flutterfire#18832 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
-
Error on parameter typeĐang mởfrom.page-issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 69/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
sass/dart-sass#2888 · 2 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[a11y_assessments] Disabled CheckboxListTile shares mutable stateCó thể đã có người làm @kevmoo đã nhận 12 ngày trước. Đang mởa: accessibility fyi-design p: material_ui package team-accessibility
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày