Skip to content

Cupertino localization step 10: update the flutter_localizations README - #30224

Merged
xster merged 2 commits into
flutter:masterfrom
xster:arb-doc
May 10, 2019
Merged

xster merged 2 commits into
flutter:masterfrom
xster:arb-doc

Conversation

@xster

@xster xster commented Mar 29, 2019 •

Copy link
Copy Markdown
Member

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.

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I signed the CLA.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I updated/added relevant documentation (doc comments with ///).
  • All existing and new tests are passing.
  • The analyzer (flutter analyze --flutter-repo) does not report any problems on my PR.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Does your PR require Flutter developers to manually update their apps to accommodate your change?

  • Yes, this is a breaking change (Please read Handling breaking changes). Replace this with a link to the e-mail where you asked for input on this proposed change.
  • No, this is not a breaking change.

@xster
xster requested a review from HansMuller March 29, 2019 23:03
@goderbauer goderbauer added framework flutter/packages/flutter repository. See also f: labels. p: cupertino_ui cupertino_ui package in flutter/packages labels Mar 30, 2019

@HansMuller HansMuller left a comment

Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown
Contributor

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`

Copy link
Copy Markdown
Contributor

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.

Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤦🏻‍♀️

@xster
xster merged commit 1ac813a into flutter:master May 10, 2019
@xster
xster deleted the arb-doc branch May 10, 2019 06:17
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Aug 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

framework flutter/packages/flutter repository. See also f: labels. p: cupertino_ui cupertino_ui package in flutter/packages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants