Repository navigation
Add support for multiple/nested plurals and selects in gen_l10n tool #86906
Description
Activity
- addedin triagePresently being triaged by the triage teamPresently being triaged by the triage teama: internationalizationSupporting other languages or locales. (aka i18n)Supporting other languages or locales. (aka i18n)frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.c: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to FluttertoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.waiting for PR to land (fixed)A fix is in flightA fix is in flightand removedin triagePresently being triaged by the triage teamPresently being triaged by the triage teamframeworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.
on Jul 23, 2021 May be related: #90094
While I don't know which parts of ICU are tricky to implement, I'd consider a message in the form
Hello, {gender,select,female{Mrs}other{Mr}} {lastName}not something like an edge case. It would be really great if Flutter got support for such syntax ❤️Reacted by Jack BakerHey everyone, I know this has been a bug for awhile now, but I've written up a proposal for fixing this bug with long term maintenance and extensibility in mind. Feel free to leave any comment.
Reacted by Ahmed AshourReacted by Julien MHey everyone, I know this has been a bug for awhile now, but I've written up a proposal for fixing this bug with long term maintenance and extensibility in mind. Feel free to leave any comment.
How will we know when/if your proposal has been accepted?
Proposal has been accepted in that I've gained feedback from the team and am working on the implementation right now.
Reacted by El, Julien M and Rares VancaThis thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.- locked as resolved and limited conversation to collaborators
on Nov 19, 2022
Use case
Hi!
Internationalization of Flutter apps is getting more and more convenient thanks to the enhancements implemented during the last months. More recently, #86167 allowed to use plural and select in the middle of a string which is super useful.
However while internationalizing this app on top of this recent change, I noted a few cases for which it didn't produce the expected result:
Proposal
I would like to keep developing the l10n support to make it more powerful and reduce the risk of misuse (I personally have been surprised by the first use case).
I understand that Flutter is not intended to implement the ICU format in its entirety. I think it could improve the user experience to support these use cases though. My only references are the following, where we see that multiple plurals are being used:
I had started working on this improvement, but it requires some refactoring. I will open a PR so that it can be discussed.