Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[flutter_tools] Generate Localizations on flutter run for web #110526

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

Merged
merged 3 commits into from
Aug 31, 2022

Conversation

thkim1011
Copy link
Contributor

@thkim1011 thkim1011 commented Aug 29, 2022

Currently, when flutter run is run for web and synthetic-package: false, we don't generate localizations. They do, however, get generated when hot reloaded. This only happens on web AFAIK and this PR should fix the issue.

Reason why this doesn't affect web when synthetic-package is true is because of this line.

Also added tests that break when l10n generation does not happen on resident_runner.run().

@flutter-dashboard
Copy link

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 on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on Discord!).

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

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

@flutter-dashboard flutter-dashboard bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Aug 29, 2022
Copy link
Member

@jonahwilliams jonahwilliams left a comment

Choose a reason for hiding this comment

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

If this is important enough to fix, then it is important enough to test. There should be a roughly equivalent test in resident_runner_test.dart that covers the non-web case. That could be adjusted to work for the web runner as well

Copy link
Member

@jonahwilliams jonahwilliams left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for adding tests!

@thkim1011 thkim1011 added the autosubmit Merge PR when tree becomes green via auto submit App label Aug 31, 2022
@auto-submit auto-submit bot merged commit 0508a1d into flutter:master Aug 31, 2022
@thkim1011 thkim1011 deleted the tae/gen-l10n-issue-web branch August 31, 2022 20:14
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Sep 1, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Sep 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autosubmit Merge PR when tree becomes green via auto submit App tool Affects the "flutter" command-line tool. See also t: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants