Cupertino localization step 10: update the flutter_localizations README#30224
Merged
xster merged 2 commits intoflutter:masterfrom May 10, 2019
Merged
Cupertino localization step 10: update the flutter_localizations README#30224xster merged 2 commits intoflutter:masterfrom
xster merged 2 commits intoflutter:masterfrom
Conversation
HansMuller
approved these changes
May 7, 2019
Contributor
HansMuller
left a comment
There was a problem hiding this comment.
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 |
| ### Translations for one locale: .arb files | ||
|
|
||
| The Material library uses | ||
| The Material and Cupertino libraries uses |
| 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 |
|
|
||
|
|
||
| ### material_en.arb Defines all of the resource IDs | ||
| ### material_en.arb and cupertino_en.arb Defines all of the resource IDs |
| 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 |
| "selectedRowCountTitleOther": "$selectedRowCount items selected", | ||
| ``` | ||
|
|
||
| When defining new resources that handles pluralizations, the "One" and |
| 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` |
| 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. |
Contributor
There was a problem hiding this comment.
classese implementation uses these Maps => class implementations use these Maps
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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?