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

Add Message.isPlural, Message.getCountPlaceholder() to gen_l10n_types #50132

Merged
merged 2 commits into from Feb 5, 2020

Conversation

HansMuller
Copy link
Contributor

@HansMuller HansMuller commented Feb 4, 2020

Moved the code for detecting plural messages into the Message class.

The existing tests cover the change.

@fluttergithubbot fluttergithubbot added the team Infra upgrades, team productivity, code health, technical debt. See also team: labels. label Feb 4, 2020
@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.

@HansMuller HansMuller added the a: internationalization Supporting other languages or locales. (aka i18n) label Feb 4, 2020
Copy link
Contributor

@shihaohong shihaohong left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -673,7 +681,7 @@ class LocalizationsGenerator {
}

final Message message = Message(bundle, key);
if (pluralValueRE.hasMatch(message.value))
if (message.isPlural)
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we can remove line 357 static RegExp _pluralRE..., since it's not being used anywhere else

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oops, thanks for catching that!

@HansMuller HansMuller merged commit c3e0f2d into flutter:master Feb 5, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 1, 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) 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