Skip to content
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

l10n tool improvements, stocks app refresh #44313

Merged
merged 3 commits into from Nov 7, 2019

Conversation

shihaohong
Copy link
Contributor

@shihaohong shihaohong commented Nov 7, 2019

Description

Adds a help flag, as well as help messages to the gen_l10n.dart tool. This also refreshes the stocks app to reflect the new changes to the tool, while fixing a typo in the regenerate.md tutorial.

~/dev/flutter$ dart ${FLUTTER}/dev/tools/localization/gen_l10n.dart --help
--help                        Print this help message.
--arb-dir                     The directory where all localization files should reside. For example, the template and translated arb files should be located here. Also, the generated output messages Dart files for each locale and the generated localizations classes will be created here.
                              (defaults to "lib/l10n")

--template-arb-file           The template arb file that will be used as the basis for generating the Dart localization and messages files.
                              (defaults to "app_en.arb")

--output-localization-file    The filename for the output localization and localizations delegate classes.
                              (defaults to "app_localizations.dart")

--output-class                The Dart class name to use for the output localization and localizations delegate classes.
                              (defaults to "AppLocalizations")

Issues

Related to #41437

@shihaohong shihaohong added the a: internationalization Supporting other languages or locales. (aka i18n) label Nov 7, 2019
@fluttergithubbot fluttergithubbot added d: examples Sample code and demos team Infra upgrades, team productivity, code health, technical debt. See also team: labels. labels Nov 7, 2019
@fluttergithubbot
Copy link
Contributor

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie.

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

Copy link
Contributor

@HansMuller HansMuller left a comment

Choose a reason for hiding this comment

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

LGTM

///
/// ```
/// dependencies:
/// # rest of dependencies
Copy link
Contributor

Choose a reason for hiding this comment

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

Including "rest of dependencies" twice doesn't look right. Maybe just include the second one.

/// dependencies:
/// # rest of dependencies
///
/// flutter_localizations:
Copy link
Contributor

Choose a reason for hiding this comment

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

Since developers will likely cut-and-paste this, maybe include a comment. For example:

///   # Internationalization support. 
///   flutter_localizations:
///     sdk: flutter
...

Actually, when there's a gen_l10n doc to point at, the comment should include a link.

@shihaohong shihaohong merged commit b883624 into flutter:master Nov 7, 2019
@shihaohong shihaohong deleted the l10n-tool-improvements branch November 7, 2019 02:52
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a: internationalization Supporting other languages or locales. (aka i18n) d: examples Sample code and demos team Infra upgrades, team productivity, code health, technical debt. See also team: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants