-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Cupertino localization step 10: update the flutter_localizations README #30224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
HansMuller
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with some small fixes
| linked with the rest of flutter_localizations package. | ||
| strings) used by the Material and Cupertino libraries. The | ||
| `generated_material_localizations.dart` and | ||
| `generated_cupertino_localizations.dart` files combines all of the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
combines => combine
| ### Translations for one locale: .arb files | ||
|
|
||
| The Material library uses | ||
| The Material and Cupertino libraries uses |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uses => use
| The material library only depends on a small subset of the ARB format. | ||
| Each .arb file contains a single JSON table that maps from resource | ||
| IDs to localized values. | ||
| The Material and Cupertino libraries only depends on a small subset |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
depends => depend
|
|
||
|
|
||
| ### material_en.arb Defines all of the resource IDs | ||
| ### material_en.arb and cupertino_en.arb Defines all of the resource IDs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Defines => Define
| A few of material translations contain `$variable` tokens. The | ||
| material library replaces these tokens with values at run-time. For | ||
| example: | ||
| Material and Cupertino libraries replaces these tokens with values at |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
replaces => replace
| "selectedRowCountTitleOther": "$selectedRowCount items selected", | ||
| ``` | ||
|
|
||
| When defining new resources that handles pluralizations, the "One" and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
handles => handle
| If you look at the comment at the top of `localizations.dart` you'll | ||
| see that it was manually generated using a `dev/tools/localization` app called | ||
| `gen_localizations`. | ||
| If you look at the comment at the top of `generated_material_localizations.dart` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
top of => top of the
| values. | ||
| .arb files into a single `Map` per library that has entries for each .arb | ||
| file's locale. The `MaterialLocalizations` and `CupertinoLocalizations` | ||
| classese implementation uses these Maps to implement the methods that lookup localized resource values. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
classese implementation uses these Maps => class implementations use these Maps
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤦🏻♀️
Description
Update the README.md
Related Issues
#13452
Tests
I added the following tests:
Replace this with a list of the tests that you added as part of this PR. A change in behaviour with no test covering it
will likely get reverted accidentally sooner or later. PRs must include tests for all changed/updated/fixed behaviors. See Test Coverage.
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]). This will ensure a smooth and quick review process.///).flutter analyze --flutter-repo) does not report any problems on my PR.Breaking Change
Does your PR require Flutter developers to manually update their apps to accommodate your change?