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

Fix message type inconsistency between locales #120129

Merged
merged 8 commits into from Feb 13, 2023

Conversation

thkim1011
Copy link
Contributor

@thkim1011 thkim1011 commented Feb 6, 2023

If a message does not use placeholders in some language, it will be defaulted to a getter even if it makes use of the placeholder in other languages. This ultimately breaks the code because locales extend a common base class.

I also had to fix some issue with error handling that may have been introduced with #119644 as code generation errors and syntax errors are handled slightly different, and I forgot to handle the latter case with the previous PR.

Fixes #119557.

@flutter-dashboard flutter-dashboard bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Feb 6, 2023
@AlexV525
Copy link
Member

AlexV525 commented Feb 8, 2023

Tests are complaining about differences in generated files, looks like other languages are using the English version.
image

@christopherfujino
Copy link
Member

@AlexV525 I would appreciate your review on this one

Copy link
Member

@AlexV525 AlexV525 left a comment

Choose a reason for hiding this comment

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

LGTM with messages changes

@@ -877,6 +877,7 @@ class LocalizationsGenerator {
_allMessages = _templateBundle.resourceIds.map((String id) => Message(
_templateBundle, _allBundles, id, areResourceAttributesRequired, useEscaping: useEscaping, logger: logger,
)).toList();
hadErrors = _allMessages.any((Message message) => message.hadErrors);
Copy link
Member

Choose a reason for hiding this comment

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

Can we address valid tests for handling errors?

Copy link
Member

@christopherfujino christopherfujino left a comment

Choose a reason for hiding this comment

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

LGTM

@AlexV525 AlexV525 added the autosubmit Merge PR when tree becomes green via auto submit App label Feb 11, 2023
@auto-submit auto-submit bot merged commit becb6bd into flutter:master Feb 13, 2023
@pedromassango
Copy link
Member

@christopherfujino could we promote this for hotfix on stable as it is a breaking change? 👀

@AlexV525
Copy link
Member

@christopherfujino could we promote this for hotfix on stable as it is a breaking change? 👀

Submitted #120679.

engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 14, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Feb 14, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Feb 14, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 14, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 14, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Feb 14, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Feb 15, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 15, 2023
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Feb 15, 2023
* 7fb8497b5 Roll Plugins from 02571ec to f3bc6f1 (2 revisions) (flutter/flutter#120601)

* 7c2d5b9c2 60c8532d6 Roll Fuchsia Mac SDK from NZAnfCkpbswhYplty... to 6hbPQq6ED0PkuQiKM... (flutter/engine#39587) (flutter/flutter#120602)

* 1f268f1d6 fb8840578 Roll Dart SDK from 1caf3a9ad101 to f80c5db8736a (1 revision) (flutter/engine#39588) (flutter/flutter#120606)

* 957494d9f Marks Linux_android flavors_test to be unflaky (flutter/flutter#120299)

* 0792c2795 Roll Flutter Engine from fb8840578156 to df0ffe42b33e (2 revisions) (flutter/flutter#120607)

* 7bacc25ee Remove accentColorBrightness usage (flutter/flutter#120577)

* 98576cef5 Avoid null terminating characters in strings from Utf8FromUtf16() (flutter/flutter#109729)

* 00adf9a33 roll packages (flutter/flutter#120609)

* 2df140f40 Remove references to Observatory (flutter/flutter#118577)

* a819d6156 Remove `prefer_equal_for_default_values` lint rule (flutter/flutter#120533)

* 73afc7ba3 Roll Flutter Engine from df0ffe42b33e to 97dcf3e6201e (4 revisions) (flutter/flutter#120617)

* f858302a6 Remove `brightness` from `AppBar`/`SliverAppBar`/`AppBarTheme`/`AppBarTheme.copyWith` (flutter/flutter#120575)

* 95fd821ab Force `Mac build_tests` to run on x64 bots (flutter/flutter#120620)

* ed35c80d2 d28cbf402 [Impeller] Return entity from filters instead of a snapshot (flutter/engine#39560) (flutter/flutter#120625)

* 778b3fa32 support updating dragDecices at runtime (flutter/flutter#120336)

* ddebe833b Added integration test for wide gamut support. (flutter/flutter#119657)

* becb6bd00 Fix message type inconsistency between locales (flutter/flutter#120129)

* f4495f5d3 Roll Flutter Engine from d28cbf402904 to 31a4648cbe99 (2 revisions) (flutter/flutter#120630)

* 402caec2e Fix `ListTile`'s default `iconColor` token used & update examples (flutter/flutter#120444)

* 865422da2 Force `Mac tool_integration_tests` to run on x64 bots (flutter/flutter#120634)

* 07c548c69 Apply BindingBase.checkInstance to TestDefaultBinaryMessengerBinding (flutter/flutter#116937)

* b08cc8be7 Roll Flutter Engine from 31a4648cbe99 to c4f51bc78644 (7 revisions) (flutter/flutter#120656)

* 6a94f25a9 Roll Flutter Engine from c4f51bc78644 to 17ab09d382e3 (5 revisions) (flutter/flutter#120664)

* b0edf5829 Roll Flutter Engine from 17ab09d382e3 to cbb7fc020b00 (2 revisions) (flutter/flutter#120673)

* 17b4c70ff [M3] Add customizable overflow property to Snackbar's action (flutter/flutter#120394)

* b35e4a54f Roll Plugins from f3bc6f1 to 9c312d4 (2 revisions) (flutter/flutter#120694)

* 9fd34048f f4fcb911b Roll Skia from bb7b22f3f444 to 8de7f68a3661 (1 revision) (flutter/engine#39619) (flutter/flutter#120699)

* b9b4d3e43 roll packages (flutter/flutter#120628)

* ed5bd1779 Fix tree by updating dependencies (flutter/flutter#120707)

* 480c54c37 Increase Linux docs_publish timeout (flutter/flutter#120718)

* c102bf467 [integration_test] Fix link to integration test for web section in `README.md` (flutter/flutter#103422)

* 577ad2ee8 Fix error when resetting configurations in tear down phase (flutter/flutter#114468)

* 2cfca820a Force Mac plugin_test to run on x64 bots (flutter/flutter#120714)

* fd2fd94e3 d86089252 Roll Fuchsia Mac SDK from OeUljRQOmJwgDhNOo... to EFcCpAxOuQllDqP0F... (flutter/engine#39621) (flutter/flutter#120702)

* 9d94a51b6 Move linux-x64-flutter-gtk.zip to linux-x64-debug location. (flutter/flutter#120658)

* d29668ddb Improve network resources doctor check (flutter/flutter#120417)

* 378668db4 added MaterialStateColor support to TabBarTheme.labelColor (flutter/flutter#109541)

* ba46cb8d5 Remove deprecated AppBar.color & AppBar.backwardsCompatibility (flutter/flutter#120618)

* 5a3957f3b Revert "Fix error when resetting configurations in tear down phase" (flutter/flutter#120739)

* fd01812f6 Add temporary default case to support new PointerSignalKind (flutter/flutter#120731)

* 4b8ad1b00 Temporarily disable info-based analyzer unit tests. (flutter/flutter#120753)

* 911b13784 Roll Flutter Engine from d860892528ff to 44e36c9c0d73 (20 revisions) (flutter/flutter#120761)

* 4ae5252f8 Fix license page crash (flutter/flutter#120728)

* 31c73fcfe Roll Flutter Engine from 44e36c9c0d73 to bf7d51586704 (2 revisions) (flutter/flutter#120772)

* 624445a45 Roll Flutter Engine from bf7d51586704 to ec70b5aa96be (2 revisions) (flutter/flutter#120781)

* df41e58f6 1328c4bc6 Roll Dart SDK from 0456c4011cb3 to c022d475e9d8 (1 revision) (flutter/engine#39646) (flutter/flutter#120784)
auto-submit bot pushed a commit to flutter/plugins that referenced this pull request Feb 15, 2023
* 001c495 Roll Flutter Engine from 9a40a384997d to e1d0032029e4 (6 revisions) (flutter/flutter#120414)

* 96823590e post submit only (flutter/flutter#120411)

* 5dbd28101 Use String.codeUnitAt instead of String.codeUnits[] in ParagraphBoundary (flutter/flutter#120234)

* f05a555bc Fix lerping for `NavigationRailThemeData` icon themes (flutter/flutter#120066)

* b0d04ea49 add9e11ed Fix position of BackdropFilter above PlatformView (flutter/engine#39244) (flutter/flutter#120415)

* 858f94cfa Roll Plugins from 73986f4 to 02571ec (3 revisions) (flutter/flutter#120443)

* 298c874ea Fix classes that shouldn't be extended/instantiated/mixedin (flutter/flutter#120409)

* 25c2c22d2 Delete Chrome temp cache after closing (flutter/flutter#119062)

* b2e37c659 [conductor] Tag engine versions (flutter/flutter#120419)

* 780c9a8de Remove deprecated SystemChrome.setEnabledSystemUIOverlays (flutter/flutter#119576)

* 52ab29936 Roll Flutter Engine from add9e11edb66 to 4104eb5cbc40 (14 revisions) (flutter/flutter#120470)

* 65fd924d8 [conductor] Remove CiYaml model (flutter/flutter#120458)

* d5dbcb708 Revert "Revert "[web] Move JS content to its own `.js` files (#117691)" (#120275)" (flutter/flutter#120363)

* 2f9abd20f Roll Flutter Engine from 4104eb5cbc40 to 6660300ea34f (6 revisions) (flutter/flutter#120487)

* d63c54c9c roll packages (flutter/flutter#120493)

* 941578ea9 Roll Flutter Engine from 6660300ea34f to 5e3ff1e5c9b3 (4 revisions) (flutter/flutter#120495)

* b3613c4cf f737dc868 [macOS] Add XCode marks for TextInputPlugin (flutter/engine#39550) (flutter/flutter#120501)

* 4ab2ffd58 Roll Flutter Engine from f737dc868a3e to 3ac3338489d2 (2 revisions) (flutter/flutter#120505)

* 859d57b3c 8baee2164 Roll Skia from 5230650dc096 to 70a3a194ec98 (2 revisions) (flutter/engine#39554) (flutter/flutter#120507)

* e42ab1cb0 c3dc68e0e Roll Skia from 70a3a194ec98 to 6c3097e6f833 (1 revision) (flutter/engine#39555) (flutter/flutter#120508)

* 61e059f44 Roll Flutter Engine from c3dc68e0e263 to 363355af5158 (2 revisions) (flutter/flutter#120511)

* d27de1de0 5efb42971 Roll Fuchsia Linux SDK from 482Njb1v72P7fNyj4... to MVMTNxWJaWdwPWstz... (flutter/engine#39559) (flutter/flutter#120512)

* bbf8446d9 761891200 Roll Dart SDK from 1d26a1d57edf to b1836aacc08a (1 revision) (flutter/engine#39561) (flutter/flutter#120513)

* 0346f4b18 d8e01097e Roll Fuchsia Mac SDK from 6nMZjuYXTcnD_VZQI... to FxFPRn_9rSWWAWFw0... (flutter/engine#39562) (flutter/flutter#120519)

* 0db47bdd0 Revert "Fix BottomAppBar & BottomSheet M3 shadow (#119819)" (flutter/flutter#120492)

* f04600bfb Roll Flutter Engine from d8e01097e66b to 2cba062f9f4c (2 revisions) (flutter/flutter#120538)

* 274f6cb2d Roll Flutter Engine from 2cba062f9f4c to 05d81c0f2ebe (2 revisions) (flutter/flutter#120547)

* d6ff0f2af fe56a45b4 Roll Dart SDK from c4255cea566a to 1caf3a9ad101 (1 revision) (flutter/engine#39571) (flutter/flutter#120552)

* 7295d4fe9 9a19d7eea Roll Fuchsia Linux SDK from arbaBzyUE2ok1bGl5... to 8fdyKaKQqTPpjcp-L... (flutter/engine#39572) (flutter/flutter#120554)

* 6d68eb7b8 0aa4fcbd2 Roll Skia from ec87ec6fd34f to 615965d545f4 (1 revision) (flutter/engine#39573) (flutter/flutter#120558)

* 527977b6a b7e80ad6e Roll Fuchsia Mac SDK from y35kWL0rP5Nd06lTg... to KpTOXssqVhPv2OBZi... (flutter/engine#39574) (flutter/flutter#120559)

* 238b0dbc0 Roll Flutter Engine from b7e80ad6ef51 to 1ff345ce5f63 (2 revisions) (flutter/flutter#120574)

* 3e659cf71 1eef041d4 [Impeller] Source the pipeline color attachment pixel format from RenderPass textures (flutter/engine#39556) (flutter/flutter#120576)

* 53fe8a3f9 4107a7b71 Roll Skia from 615965d545f4 to c6f1de2239fb (1 revision) (flutter/engine#39581) (flutter/flutter#120580)

* b0c24e8d3 fix a Slider theme update bug (flutter/flutter#120432)

* b33c76f01 1695b7bbc Bump github/codeql-action from 2.1.39 to 2.2.4 (flutter/engine#39584) (flutter/flutter#120588)

* ce8efb439 ede2a0a3c Roll Skia from c6f1de2239fb to d85501fa487d (1 revision) (flutter/engine#39585) (flutter/flutter#120593)

* 7fb8497b5 Roll Plugins from 02571ec to f3bc6f1 (2 revisions) (flutter/flutter#120601)

* 7c2d5b9c2 60c8532d6 Roll Fuchsia Mac SDK from NZAnfCkpbswhYplty... to 6hbPQq6ED0PkuQiKM... (flutter/engine#39587) (flutter/flutter#120602)

* 1f268f1d6 fb8840578 Roll Dart SDK from 1caf3a9ad101 to f80c5db8736a (1 revision) (flutter/engine#39588) (flutter/flutter#120606)

* 957494d9f Marks Linux_android flavors_test to be unflaky (flutter/flutter#120299)

* 0792c2795 Roll Flutter Engine from fb8840578156 to df0ffe42b33e (2 revisions) (flutter/flutter#120607)

* 7bacc25ee Remove accentColorBrightness usage (flutter/flutter#120577)

* 98576cef5 Avoid null terminating characters in strings from Utf8FromUtf16() (flutter/flutter#109729)

* 00adf9a33 roll packages (flutter/flutter#120609)

* 2df140f40 Remove references to Observatory (flutter/flutter#118577)

* a819d6156 Remove `prefer_equal_for_default_values` lint rule (flutter/flutter#120533)

* 73afc7ba3 Roll Flutter Engine from df0ffe42b33e to 97dcf3e6201e (4 revisions) (flutter/flutter#120617)

* f858302a6 Remove `brightness` from `AppBar`/`SliverAppBar`/`AppBarTheme`/`AppBarTheme.copyWith` (flutter/flutter#120575)

* 95fd821ab Force `Mac build_tests` to run on x64 bots (flutter/flutter#120620)

* ed35c80d2 d28cbf402 [Impeller] Return entity from filters instead of a snapshot (flutter/engine#39560) (flutter/flutter#120625)

* 778b3fa32 support updating dragDecices at runtime (flutter/flutter#120336)

* ddebe833b Added integration test for wide gamut support. (flutter/flutter#119657)

* becb6bd00 Fix message type inconsistency between locales (flutter/flutter#120129)

* f4495f5d3 Roll Flutter Engine from d28cbf402904 to 31a4648cbe99 (2 revisions) (flutter/flutter#120630)

* 402caec2e Fix `ListTile`'s default `iconColor` token used & update examples (flutter/flutter#120444)

* 865422da2 Force `Mac tool_integration_tests` to run on x64 bots (flutter/flutter#120634)

* 07c548c69 Apply BindingBase.checkInstance to TestDefaultBinaryMessengerBinding (flutter/flutter#116937)

* b08cc8be7 Roll Flutter Engine from 31a4648cbe99 to c4f51bc78644 (7 revisions) (flutter/flutter#120656)

* 6a94f25a9 Roll Flutter Engine from c4f51bc78644 to 17ab09d382e3 (5 revisions) (flutter/flutter#120664)

* b0edf5829 Roll Flutter Engine from 17ab09d382e3 to cbb7fc020b00 (2 revisions) (flutter/flutter#120673)

* 17b4c70ff [M3] Add customizable overflow property to Snackbar's action (flutter/flutter#120394)

* b35e4a54f Roll Plugins from f3bc6f1 to 9c312d4 (2 revisions) (flutter/flutter#120694)

* 9fd34048f f4fcb911b Roll Skia from bb7b22f3f444 to 8de7f68a3661 (1 revision) (flutter/engine#39619) (flutter/flutter#120699)

* b9b4d3e43 roll packages (flutter/flutter#120628)

* ed5bd1779 Fix tree by updating dependencies (flutter/flutter#120707)

* 480c54c37 Increase Linux docs_publish timeout (flutter/flutter#120718)

* c102bf467 [integration_test] Fix link to integration test for web section in `README.md` (flutter/flutter#103422)

* 577ad2ee8 Fix error when resetting configurations in tear down phase (flutter/flutter#114468)

* 2cfca820a Force Mac plugin_test to run on x64 bots (flutter/flutter#120714)

* fd2fd94e3 d86089252 Roll Fuchsia Mac SDK from OeUljRQOmJwgDhNOo... to EFcCpAxOuQllDqP0F... (flutter/engine#39621) (flutter/flutter#120702)

* 9d94a51b6 Move linux-x64-flutter-gtk.zip to linux-x64-debug location. (flutter/flutter#120658)

* d29668ddb Improve network resources doctor check (flutter/flutter#120417)

* 378668db4 added MaterialStateColor support to TabBarTheme.labelColor (flutter/flutter#109541)

* ba46cb8d5 Remove deprecated AppBar.color & AppBar.backwardsCompatibility (flutter/flutter#120618)

* 5a3957f3b Revert "Fix error when resetting configurations in tear down phase" (flutter/flutter#120739)

* fd01812f6 Add temporary default case to support new PointerSignalKind (flutter/flutter#120731)

* 4b8ad1b00 Temporarily disable info-based analyzer unit tests. (flutter/flutter#120753)

* 911b13784 Roll Flutter Engine from d860892528ff to 44e36c9c0d73 (20 revisions) (flutter/flutter#120761)

* 4ae5252f8 Fix license page crash (flutter/flutter#120728)

* 31c73fcfe Roll Flutter Engine from 44e36c9c0d73 to bf7d51586704 (2 revisions) (flutter/flutter#120772)

* 624445a45 Roll Flutter Engine from bf7d51586704 to ec70b5aa96be (2 revisions) (flutter/flutter#120781)

* df41e58f6 1328c4bc6 Roll Dart SDK from 0456c4011cb3 to c022d475e9d8 (1 revision) (flutter/engine#39646) (flutter/flutter#120784)
AlexV525 pushed a commit to AlexV525/flutter that referenced this pull request Feb 18, 2023
itsjustkevin pushed a commit that referenced this pull request Feb 21, 2023
(cherry picked from commit becb6bd)

Co-authored-by: Tae Hyung Kim <thkim1011@users.noreply.github.com>
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 10, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 10, 2023
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.

[gen-l10n] wrong generation when the placeholder is missing in other languages
4 participants