Skip to content

Conversation

@benthillerkus
Copy link
Contributor

This fixes #163627 by trying to the infer the type of a placeholder on both the template messages and their localised versions.

This way, if the placeholder is being referenced in the localisation, but the type is omitted in both the template and the localisation, the check for if the template and the localisation have the same type will not fail anymore.

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@github-actions github-actions bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Feb 20, 2025
@flutter-dashboard
Copy link

This pull request executed golden file tests, but it has not been updated in a while (20+ days). Test results from Gold expire after as many days, so this pull request will need to be updated with a fresh commit in order to get results from Gold.

For more guidance, visit Writing a golden file test for package:flutter.

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

@bkonyi bkonyi self-requested a review March 24, 2025 13:57
@bkonyi
Copy link
Contributor

bkonyi commented Mar 24, 2025

Thanks for the PR @benthillerkus! My apologies for the delay, I was out for a few weeks. I think this looks good to me, but I need to brush up on my l10n details before I feel confident approving. I'll get back to you today or tomorrow.

Copy link
Contributor

@bkonyi bkonyi left a comment

Choose a reason for hiding this comment

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

Looks good to me overall! Just a few comments to address and then I'll approve.

Thanks for being patient!

},
);

testWithoutContext('translations can copy the placeholder definitions for plurals', () {
Copy link
Contributor

Choose a reason for hiding this comment

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

How does this test behave without your above patch? Do we expect for an exception to be thrown? It might be worth leaving a comment what the failure would look like with a reference to #163627 to make it clear that this is a regression test.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Like so?

Copy link
Contributor

Choose a reason for hiding this comment

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

Perfect! Thanks!

@bkonyi bkonyi requested a review from jyameo March 28, 2025 16:46
Copy link
Contributor

@bkonyi bkonyi 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 the contribution!

@jyameo, can you rubber stamp this as well? 😄

@bkonyi
Copy link
Contributor

bkonyi commented Mar 28, 2025

@benthillerkus I think you need to run dart format on [packages/flutter_tools/test/general.shard/generate_localizations_test.dart](https://github.com/flutter/flutter/pull/163690/files/c3e909168900643a5869316c11bd0378f3c3ce4a#diff-fbe84336fde1c1d4c9e791531332cdc1dcfbb1dbcf8aef7b9e353812dbccc495) to get the analyzer check passing.

Copy link
Contributor

@jyameo jyameo left a comment

Choose a reason for hiding this comment

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

LGTM!

@benthillerkus
Copy link
Contributor Author

@bkonyi Hey, what needs to happen for this to get merged?

@bkonyi bkonyi added the autosubmit Merge PR when tree becomes green via auto submit App label Mar 31, 2025
@auto-submit auto-submit bot added this pull request to the merge queue Mar 31, 2025
Merged via the queue into flutter:master with commit 0cc606c Mar 31, 2025
137 checks passed
@flutter-dashboard flutter-dashboard bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Mar 31, 2025
@bkonyi bkonyi added the cp: stable cherry pick this pull request to stable release candidate branch label Apr 1, 2025
flutteractionsbot pushed a commit to flutteractionsbot/flutter that referenced this pull request Apr 1, 2025
flutter#163690)

<!--
Thanks for filing a pull request!
Reviewers are typically assigned within a week of filing a request.
To learn more about code review, see our documentation on Tree Hygiene:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
-->

This fixes flutter#163627 by trying to
the infer the type of a placeholder on both the template messages and
their localised versions.

This way, if the placeholder is being referenced in the localisation,
but the type is omitted in both the template and the localisation, the
check for if the template and the localisation have the same type will
not fail anymore.

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md

---------

Co-authored-by: Ben Konyi <bkonyi@google.com>
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 1, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 1, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 1, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 1, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 2, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 2, 2025
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Apr 2, 2025
Roll Flutter from 05b5e79 to a0b1b32 (37 revisions)

flutter/flutter@05b5e79...a0b1b32

2025-04-01 engine-flutter-autoroll@skia.org Roll Dart SDK from b4d374ec59ec to 4e1f02bc704f (2 revisions) (flutter/flutter#166342)
2025-04-01 15619084+vashworth@users.noreply.github.com Trim any text before osascript JSON response (flutter/flutter#166296)
2025-04-01 benthillerkus@gmail.com [Gen-l10n] Add `Message.resourceId` and `locale` to all `L10nException` error messages (flutter/flutter#163654)
2025-04-01 me@nils.re Add `--ignore-timeouts` flag for `flutter test` command (flutter/flutter#164437)
2025-04-01 stuartmorgan@google.com Update TESTOWNERS username (flutter/flutter#166191)
2025-04-01 engine-flutter-autoroll@skia.org Roll Skia from 4b07443e6071 to 52cbb917fffd (4 revisions) (flutter/flutter#166329)
2025-04-01 engine-flutter-autoroll@skia.org Roll Dart SDK from 6b07a09cbd2d to b4d374ec59ec (2 revisions) (flutter/flutter#166321)
2025-04-01 737941+loic-sharma@users.noreply.github.com [tool] Improve using project files in build targets (flutter/flutter#166211)
2025-04-01 robert.ancell@canonical.com Rename FlRenderer to FlCompositorOpenGL (flutter/flutter#166037)
2025-04-01 kevmoo@users.noreply.github.com [engine, web_ui] Fix instances of library_private_types_in_public_api (flutter/flutter#166156)
2025-04-01 engine-flutter-autoroll@skia.org Roll Dart SDK from 509faa921c95 to 6b07a09cbd2d (1 revision) (flutter/flutter#166301)
2025-04-01 jonahwilliams@google.com [Impeller] small cpu perf for text contents. (flutter/flutter#166199)
2025-04-01 jonahwilliams@google.com [android_engine_test] disable old HC mode tests. (flutter/flutter#166293)
2025-04-01 30870216+gaaclarke@users.noreply.github.com [impeller] fixes diagonal antialiased lines (flutter/flutter#166298)
2025-04-01 engine-flutter-autoroll@skia.org Roll Skia from 5f262bd2cbb4 to 4b07443e6071 (10 revisions) (flutter/flutter#166299)
2025-03-31 flar@google.com [Impeller] Directly tessellate conics to linear path segments (flutter/flutter#166165)
2025-03-31 737941+loic-sharma@users.noreply.github.com [tool] Don't write the .flutter-plugins-dependencies file if it is unchanged (flutter/flutter#166164)
2025-03-31 34871572+gmackall@users.noreply.github.com Move `.cxx` directory out of `android/app` (flutter/flutter#166277)
2025-03-31 4nahom@gmail.com Fix typo in carousel.dart (flutter/flutter#164727)
2025-03-31 engine-flutter-autoroll@skia.org Roll Dart SDK from c5fa06710bb6 to 509faa921c95 (1 revision) (flutter/flutter#166283)
2025-03-31 conner@emerssso.com Public nodes needing paint or layout (flutter/flutter#166148)
2025-03-31 benthillerkus@gmail.com [Gen-l10n] Infer placeholder types on both templates and localizations (flutter/flutter#163690)
2025-03-31 koji.wakamiya@gmail.com [Engine][iOS] Cancel animation when recieved `UIKeyboardWillHideNotification` with duration 0.0 (flutter/flutter#164884)
2025-03-31 51209748+gbbosak@users.noreply.github.com [fuchsia] Remove explicit LogSink and InspectSink routing and use dictionaries instead (flutter/flutter#162780)
2025-03-31 jessiewong401@gmail.com Updated to latest AVD to Support Android 16 (API 36) (flutter/flutter#165926)
2025-03-31 34465683+rkishan516@users.noreply.github.com Feat: Add brightnessOf method for theme (flutter/flutter#163733)
2025-03-31 fluttergithubbot@gmail.com Marks Linux_mokey new_gallery__crane_perf to be flaky (flutter/flutter#165964)
2025-03-31 bkonyi@google.com [ Tool ] Correctly select entrypoint target for web build from positional argument list (flutter/flutter#166260)
2025-03-31 jonahwilliams@google.com [Impeller] remove validation warning ignores. (flutter/flutter#166205)
2025-03-31 jonahwilliams@google.com [Impeller] handle shader ordering bug on macOS. (flutter/flutter#165937)
2025-03-31 737941+loic-sharma@users.noreply.github.com Fix CODEOWNERS for the iOS review team (flutter/flutter#166178)
2025-03-31 bkonyi@google.com Remove `<meta content="IE=Edge" http-equiv="X-UA-Compatible">` (flutter/flutter#166252)
2025-03-31 engine-flutter-autoroll@skia.org Roll Dart SDK from b9c35e05feb5 to c5fa06710bb6 (1 revision) (flutter/flutter#166251)
2025-03-31 engine-flutter-autoroll@skia.org Roll Skia from 418c68ea5ccb to 5f262bd2cbb4 (2 revisions) (flutter/flutter#166244)
2025-03-31 engine-flutter-autoroll@skia.org Roll Skia from b6a3bbd1d153 to 418c68ea5ccb (1 revision) (flutter/flutter#166236)
2025-03-31 jonahwilliams@google.com [Impeller] fix min filter for GL external textures. (flutter/flutter#166224)
2025-03-31 engine-flutter-autoroll@skia.org Roll Skia from 10f4cf9a817d to b6a3bbd1d153 (13 revisions) (flutter/flutter#166231)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC bmparr@google.com,stuartmorgan@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

...
masterromuald pushed a commit to masterromuald/packages that referenced this pull request Apr 3, 2025
Roll Flutter from 05b5e79 to a0b1b32 (37 revisions)

flutter/flutter@05b5e79...a0b1b32

2025-04-01 engine-flutter-autoroll@skia.org Roll Dart SDK from b4d374ec59ec to 4e1f02bc704f (2 revisions) (flutter/flutter#166342)
2025-04-01 15619084+vashworth@users.noreply.github.com Trim any text before osascript JSON response (flutter/flutter#166296)
2025-04-01 benthillerkus@gmail.com [Gen-l10n] Add `Message.resourceId` and `locale` to all `L10nException` error messages (flutter/flutter#163654)
2025-04-01 me@nils.re Add `--ignore-timeouts` flag for `flutter test` command (flutter/flutter#164437)
2025-04-01 stuartmorgan@google.com Update TESTOWNERS username (flutter/flutter#166191)
2025-04-01 engine-flutter-autoroll@skia.org Roll Skia from 4b07443e6071 to 52cbb917fffd (4 revisions) (flutter/flutter#166329)
2025-04-01 engine-flutter-autoroll@skia.org Roll Dart SDK from 6b07a09cbd2d to b4d374ec59ec (2 revisions) (flutter/flutter#166321)
2025-04-01 737941+loic-sharma@users.noreply.github.com [tool] Improve using project files in build targets (flutter/flutter#166211)
2025-04-01 robert.ancell@canonical.com Rename FlRenderer to FlCompositorOpenGL (flutter/flutter#166037)
2025-04-01 kevmoo@users.noreply.github.com [engine, web_ui] Fix instances of library_private_types_in_public_api (flutter/flutter#166156)
2025-04-01 engine-flutter-autoroll@skia.org Roll Dart SDK from 509faa921c95 to 6b07a09cbd2d (1 revision) (flutter/flutter#166301)
2025-04-01 jonahwilliams@google.com [Impeller] small cpu perf for text contents. (flutter/flutter#166199)
2025-04-01 jonahwilliams@google.com [android_engine_test] disable old HC mode tests. (flutter/flutter#166293)
2025-04-01 30870216+gaaclarke@users.noreply.github.com [impeller] fixes diagonal antialiased lines (flutter/flutter#166298)
2025-04-01 engine-flutter-autoroll@skia.org Roll Skia from 5f262bd2cbb4 to 4b07443e6071 (10 revisions) (flutter/flutter#166299)
2025-03-31 flar@google.com [Impeller] Directly tessellate conics to linear path segments (flutter/flutter#166165)
2025-03-31 737941+loic-sharma@users.noreply.github.com [tool] Don't write the .flutter-plugins-dependencies file if it is unchanged (flutter/flutter#166164)
2025-03-31 34871572+gmackall@users.noreply.github.com Move `.cxx` directory out of `android/app` (flutter/flutter#166277)
2025-03-31 4nahom@gmail.com Fix typo in carousel.dart (flutter/flutter#164727)
2025-03-31 engine-flutter-autoroll@skia.org Roll Dart SDK from c5fa06710bb6 to 509faa921c95 (1 revision) (flutter/flutter#166283)
2025-03-31 conner@emerssso.com Public nodes needing paint or layout (flutter/flutter#166148)
2025-03-31 benthillerkus@gmail.com [Gen-l10n] Infer placeholder types on both templates and localizations (flutter/flutter#163690)
2025-03-31 koji.wakamiya@gmail.com [Engine][iOS] Cancel animation when recieved `UIKeyboardWillHideNotification` with duration 0.0 (flutter/flutter#164884)
2025-03-31 51209748+gbbosak@users.noreply.github.com [fuchsia] Remove explicit LogSink and InspectSink routing and use dictionaries instead (flutter/flutter#162780)
2025-03-31 jessiewong401@gmail.com Updated to latest AVD to Support Android 16 (API 36) (flutter/flutter#165926)
2025-03-31 34465683+rkishan516@users.noreply.github.com Feat: Add brightnessOf method for theme (flutter/flutter#163733)
2025-03-31 fluttergithubbot@gmail.com Marks Linux_mokey new_gallery__crane_perf to be flaky (flutter/flutter#165964)
2025-03-31 bkonyi@google.com [ Tool ] Correctly select entrypoint target for web build from positional argument list (flutter/flutter#166260)
2025-03-31 jonahwilliams@google.com [Impeller] remove validation warning ignores. (flutter/flutter#166205)
2025-03-31 jonahwilliams@google.com [Impeller] handle shader ordering bug on macOS. (flutter/flutter#165937)
2025-03-31 737941+loic-sharma@users.noreply.github.com Fix CODEOWNERS for the iOS review team (flutter/flutter#166178)
2025-03-31 bkonyi@google.com Remove `<meta content="IE=Edge" http-equiv="X-UA-Compatible">` (flutter/flutter#166252)
2025-03-31 engine-flutter-autoroll@skia.org Roll Dart SDK from b9c35e05feb5 to c5fa06710bb6 (1 revision) (flutter/flutter#166251)
2025-03-31 engine-flutter-autoroll@skia.org Roll Skia from 418c68ea5ccb to 5f262bd2cbb4 (2 revisions) (flutter/flutter#166244)
2025-03-31 engine-flutter-autoroll@skia.org Roll Skia from b6a3bbd1d153 to 418c68ea5ccb (1 revision) (flutter/flutter#166236)
2025-03-31 jonahwilliams@google.com [Impeller] fix min filter for GL external textures. (flutter/flutter#166224)
2025-03-31 engine-flutter-autoroll@skia.org Roll Skia from 10f4cf9a817d to b6a3bbd1d153 (13 revisions) (flutter/flutter#166231)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC bmparr@google.com,stuartmorgan@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

...
CodixNinja pushed a commit to CodixNinja/packages that referenced this pull request May 15, 2025
Roll Flutter from 05b5e7910544 to a0b1b3253416 (37 revisions)

flutter/flutter@05b5e79...a0b1b32

2025-04-01 engine-flutter-autoroll@skia.org Roll Dart SDK from b4d374ec59ec to 4e1f02bc704f (2 revisions) (flutter/flutter#166342)
2025-04-01 15619084+vashworth@users.noreply.github.com Trim any text before osascript JSON response (flutter/flutter#166296)
2025-04-01 benthillerkus@gmail.com [Gen-l10n] Add `Message.resourceId` and `locale` to all `L10nException` error messages (flutter/flutter#163654)
2025-04-01 me@nils.re Add `--ignore-timeouts` flag for `flutter test` command (flutter/flutter#164437)
2025-04-01 stuartmorgan@google.com Update TESTOWNERS username (flutter/flutter#166191)
2025-04-01 engine-flutter-autoroll@skia.org Roll Skia from 4b07443e6071 to 52cbb917fffd (4 revisions) (flutter/flutter#166329)
2025-04-01 engine-flutter-autoroll@skia.org Roll Dart SDK from 6b07a09cbd2d to b4d374ec59ec (2 revisions) (flutter/flutter#166321)
2025-04-01 737941+loic-sharma@users.noreply.github.com [tool] Improve using project files in build targets (flutter/flutter#166211)
2025-04-01 robert.ancell@canonical.com Rename FlRenderer to FlCompositorOpenGL (flutter/flutter#166037)
2025-04-01 kevmoo@users.noreply.github.com [engine, web_ui] Fix instances of library_private_types_in_public_api (flutter/flutter#166156)
2025-04-01 engine-flutter-autoroll@skia.org Roll Dart SDK from 509faa921c95 to 6b07a09cbd2d (1 revision) (flutter/flutter#166301)
2025-04-01 jonahwilliams@google.com [Impeller] small cpu perf for text contents. (flutter/flutter#166199)
2025-04-01 jonahwilliams@google.com [android_engine_test] disable old HC mode tests. (flutter/flutter#166293)
2025-04-01 30870216+gaaclarke@users.noreply.github.com [impeller] fixes diagonal antialiased lines (flutter/flutter#166298)
2025-04-01 engine-flutter-autoroll@skia.org Roll Skia from 5f262bd2cbb4 to 4b07443e6071 (10 revisions) (flutter/flutter#166299)
2025-03-31 flar@google.com [Impeller] Directly tessellate conics to linear path segments (flutter/flutter#166165)
2025-03-31 737941+loic-sharma@users.noreply.github.com [tool] Don't write the .flutter-plugins-dependencies file if it is unchanged (flutter/flutter#166164)
2025-03-31 34871572+gmackall@users.noreply.github.com Move `.cxx` directory out of `android/app` (flutter/flutter#166277)
2025-03-31 4nahom@gmail.com Fix typo in carousel.dart (flutter/flutter#164727)
2025-03-31 engine-flutter-autoroll@skia.org Roll Dart SDK from c5fa06710bb6 to 509faa921c95 (1 revision) (flutter/flutter#166283)
2025-03-31 conner@emerssso.com Public nodes needing paint or layout (flutter/flutter#166148)
2025-03-31 benthillerkus@gmail.com [Gen-l10n] Infer placeholder types on both templates and localizations (flutter/flutter#163690)
2025-03-31 koji.wakamiya@gmail.com [Engine][iOS] Cancel animation when recieved `UIKeyboardWillHideNotification` with duration 0.0 (flutter/flutter#164884)
2025-03-31 51209748+gbbosak@users.noreply.github.com [fuchsia] Remove explicit LogSink and InspectSink routing and use dictionaries instead (flutter/flutter#162780)
2025-03-31 jessiewong401@gmail.com Updated to latest AVD to Support Android 16 (API 36) (flutter/flutter#165926)
2025-03-31 34465683+rkishan516@users.noreply.github.com Feat: Add brightnessOf method for theme (flutter/flutter#163733)
2025-03-31 fluttergithubbot@gmail.com Marks Linux_mokey new_gallery__crane_perf to be flaky (flutter/flutter#165964)
2025-03-31 bkonyi@google.com [ Tool ] Correctly select entrypoint target for web build from positional argument list (flutter/flutter#166260)
2025-03-31 jonahwilliams@google.com [Impeller] remove validation warning ignores. (flutter/flutter#166205)
2025-03-31 jonahwilliams@google.com [Impeller] handle shader ordering bug on macOS. (flutter/flutter#165937)
2025-03-31 737941+loic-sharma@users.noreply.github.com Fix CODEOWNERS for the iOS review team (flutter/flutter#166178)
2025-03-31 bkonyi@google.com Remove `<meta content="IE=Edge" http-equiv="X-UA-Compatible">` (flutter/flutter#166252)
2025-03-31 engine-flutter-autoroll@skia.org Roll Dart SDK from b9c35e05feb5 to c5fa06710bb6 (1 revision) (flutter/flutter#166251)
2025-03-31 engine-flutter-autoroll@skia.org Roll Skia from 418c68ea5ccb to 5f262bd2cbb4 (2 revisions) (flutter/flutter#166244)
2025-03-31 engine-flutter-autoroll@skia.org Roll Skia from b6a3bbd1d153 to 418c68ea5ccb (1 revision) (flutter/flutter#166236)
2025-03-31 jonahwilliams@google.com [Impeller] fix min filter for GL external textures. (flutter/flutter#166224)
2025-03-31 engine-flutter-autoroll@skia.org Roll Skia from 10f4cf9a817d to b6a3bbd1d153 (13 revisions) (flutter/flutter#166231)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC bmparr@google.com,stuartmorgan@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

...
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 20, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 20, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 21, 2025
androidseb pushed a commit to androidseb/packages that referenced this pull request Jun 8, 2025
Roll Flutter from 05b5e79 to a0b1b32 (37 revisions)

flutter/flutter@05b5e79...a0b1b32

2025-04-01 engine-flutter-autoroll@skia.org Roll Dart SDK from b4d374ec59ec to 4e1f02bc704f (2 revisions) (flutter/flutter#166342)
2025-04-01 15619084+vashworth@users.noreply.github.com Trim any text before osascript JSON response (flutter/flutter#166296)
2025-04-01 benthillerkus@gmail.com [Gen-l10n] Add `Message.resourceId` and `locale` to all `L10nException` error messages (flutter/flutter#163654)
2025-04-01 me@nils.re Add `--ignore-timeouts` flag for `flutter test` command (flutter/flutter#164437)
2025-04-01 stuartmorgan@google.com Update TESTOWNERS username (flutter/flutter#166191)
2025-04-01 engine-flutter-autoroll@skia.org Roll Skia from 4b07443e6071 to 52cbb917fffd (4 revisions) (flutter/flutter#166329)
2025-04-01 engine-flutter-autoroll@skia.org Roll Dart SDK from 6b07a09cbd2d to b4d374ec59ec (2 revisions) (flutter/flutter#166321)
2025-04-01 737941+loic-sharma@users.noreply.github.com [tool] Improve using project files in build targets (flutter/flutter#166211)
2025-04-01 robert.ancell@canonical.com Rename FlRenderer to FlCompositorOpenGL (flutter/flutter#166037)
2025-04-01 kevmoo@users.noreply.github.com [engine, web_ui] Fix instances of library_private_types_in_public_api (flutter/flutter#166156)
2025-04-01 engine-flutter-autoroll@skia.org Roll Dart SDK from 509faa921c95 to 6b07a09cbd2d (1 revision) (flutter/flutter#166301)
2025-04-01 jonahwilliams@google.com [Impeller] small cpu perf for text contents. (flutter/flutter#166199)
2025-04-01 jonahwilliams@google.com [android_engine_test] disable old HC mode tests. (flutter/flutter#166293)
2025-04-01 30870216+gaaclarke@users.noreply.github.com [impeller] fixes diagonal antialiased lines (flutter/flutter#166298)
2025-04-01 engine-flutter-autoroll@skia.org Roll Skia from 5f262bd2cbb4 to 4b07443e6071 (10 revisions) (flutter/flutter#166299)
2025-03-31 flar@google.com [Impeller] Directly tessellate conics to linear path segments (flutter/flutter#166165)
2025-03-31 737941+loic-sharma@users.noreply.github.com [tool] Don't write the .flutter-plugins-dependencies file if it is unchanged (flutter/flutter#166164)
2025-03-31 34871572+gmackall@users.noreply.github.com Move `.cxx` directory out of `android/app` (flutter/flutter#166277)
2025-03-31 4nahom@gmail.com Fix typo in carousel.dart (flutter/flutter#164727)
2025-03-31 engine-flutter-autoroll@skia.org Roll Dart SDK from c5fa06710bb6 to 509faa921c95 (1 revision) (flutter/flutter#166283)
2025-03-31 conner@emerssso.com Public nodes needing paint or layout (flutter/flutter#166148)
2025-03-31 benthillerkus@gmail.com [Gen-l10n] Infer placeholder types on both templates and localizations (flutter/flutter#163690)
2025-03-31 koji.wakamiya@gmail.com [Engine][iOS] Cancel animation when recieved `UIKeyboardWillHideNotification` with duration 0.0 (flutter/flutter#164884)
2025-03-31 51209748+gbbosak@users.noreply.github.com [fuchsia] Remove explicit LogSink and InspectSink routing and use dictionaries instead (flutter/flutter#162780)
2025-03-31 jessiewong401@gmail.com Updated to latest AVD to Support Android 16 (API 36) (flutter/flutter#165926)
2025-03-31 34465683+rkishan516@users.noreply.github.com Feat: Add brightnessOf method for theme (flutter/flutter#163733)
2025-03-31 fluttergithubbot@gmail.com Marks Linux_mokey new_gallery__crane_perf to be flaky (flutter/flutter#165964)
2025-03-31 bkonyi@google.com [ Tool ] Correctly select entrypoint target for web build from positional argument list (flutter/flutter#166260)
2025-03-31 jonahwilliams@google.com [Impeller] remove validation warning ignores. (flutter/flutter#166205)
2025-03-31 jonahwilliams@google.com [Impeller] handle shader ordering bug on macOS. (flutter/flutter#165937)
2025-03-31 737941+loic-sharma@users.noreply.github.com Fix CODEOWNERS for the iOS review team (flutter/flutter#166178)
2025-03-31 bkonyi@google.com Remove `<meta content="IE=Edge" http-equiv="X-UA-Compatible">` (flutter/flutter#166252)
2025-03-31 engine-flutter-autoroll@skia.org Roll Dart SDK from b9c35e05feb5 to c5fa06710bb6 (1 revision) (flutter/flutter#166251)
2025-03-31 engine-flutter-autoroll@skia.org Roll Skia from 418c68ea5ccb to 5f262bd2cbb4 (2 revisions) (flutter/flutter#166244)
2025-03-31 engine-flutter-autoroll@skia.org Roll Skia from b6a3bbd1d153 to 418c68ea5ccb (1 revision) (flutter/flutter#166236)
2025-03-31 jonahwilliams@google.com [Impeller] fix min filter for GL external textures. (flutter/flutter#166224)
2025-03-31 engine-flutter-autoroll@skia.org Roll Skia from 10f4cf9a817d to b6a3bbd1d153 (13 revisions) (flutter/flutter#166231)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC bmparr@google.com,stuartmorgan@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

...
zhangyuang pushed a commit to zhangyuang/flutter-fork that referenced this pull request Jun 9, 2025
flutter#163690)

<!--
Thanks for filing a pull request!
Reviewers are typically assigned within a week of filing a request.
To learn more about code review, see our documentation on Tree Hygiene:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
-->

This fixes flutter#163627 by trying to
the infer the type of a placeholder on both the template messages and
their localised versions.

This way, if the placeholder is being referenced in the localisation,
but the type is omitted in both the template and the localisation, the
check for if the template and the localisation have the same type will
not fail anymore.

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md

---------

Co-authored-by: Ben Konyi <bkonyi@google.com>
FMorschel pushed a commit to FMorschel/packages that referenced this pull request Jun 9, 2025
Roll Flutter from 05b5e79 to a0b1b32 (37 revisions)

flutter/flutter@05b5e79...a0b1b32

2025-04-01 engine-flutter-autoroll@skia.org Roll Dart SDK from b4d374ec59ec to 4e1f02bc704f (2 revisions) (flutter/flutter#166342)
2025-04-01 15619084+vashworth@users.noreply.github.com Trim any text before osascript JSON response (flutter/flutter#166296)
2025-04-01 benthillerkus@gmail.com [Gen-l10n] Add `Message.resourceId` and `locale` to all `L10nException` error messages (flutter/flutter#163654)
2025-04-01 me@nils.re Add `--ignore-timeouts` flag for `flutter test` command (flutter/flutter#164437)
2025-04-01 stuartmorgan@google.com Update TESTOWNERS username (flutter/flutter#166191)
2025-04-01 engine-flutter-autoroll@skia.org Roll Skia from 4b07443e6071 to 52cbb917fffd (4 revisions) (flutter/flutter#166329)
2025-04-01 engine-flutter-autoroll@skia.org Roll Dart SDK from 6b07a09cbd2d to b4d374ec59ec (2 revisions) (flutter/flutter#166321)
2025-04-01 737941+loic-sharma@users.noreply.github.com [tool] Improve using project files in build targets (flutter/flutter#166211)
2025-04-01 robert.ancell@canonical.com Rename FlRenderer to FlCompositorOpenGL (flutter/flutter#166037)
2025-04-01 kevmoo@users.noreply.github.com [engine, web_ui] Fix instances of library_private_types_in_public_api (flutter/flutter#166156)
2025-04-01 engine-flutter-autoroll@skia.org Roll Dart SDK from 509faa921c95 to 6b07a09cbd2d (1 revision) (flutter/flutter#166301)
2025-04-01 jonahwilliams@google.com [Impeller] small cpu perf for text contents. (flutter/flutter#166199)
2025-04-01 jonahwilliams@google.com [android_engine_test] disable old HC mode tests. (flutter/flutter#166293)
2025-04-01 30870216+gaaclarke@users.noreply.github.com [impeller] fixes diagonal antialiased lines (flutter/flutter#166298)
2025-04-01 engine-flutter-autoroll@skia.org Roll Skia from 5f262bd2cbb4 to 4b07443e6071 (10 revisions) (flutter/flutter#166299)
2025-03-31 flar@google.com [Impeller] Directly tessellate conics to linear path segments (flutter/flutter#166165)
2025-03-31 737941+loic-sharma@users.noreply.github.com [tool] Don't write the .flutter-plugins-dependencies file if it is unchanged (flutter/flutter#166164)
2025-03-31 34871572+gmackall@users.noreply.github.com Move `.cxx` directory out of `android/app` (flutter/flutter#166277)
2025-03-31 4nahom@gmail.com Fix typo in carousel.dart (flutter/flutter#164727)
2025-03-31 engine-flutter-autoroll@skia.org Roll Dart SDK from c5fa06710bb6 to 509faa921c95 (1 revision) (flutter/flutter#166283)
2025-03-31 conner@emerssso.com Public nodes needing paint or layout (flutter/flutter#166148)
2025-03-31 benthillerkus@gmail.com [Gen-l10n] Infer placeholder types on both templates and localizations (flutter/flutter#163690)
2025-03-31 koji.wakamiya@gmail.com [Engine][iOS] Cancel animation when recieved `UIKeyboardWillHideNotification` with duration 0.0 (flutter/flutter#164884)
2025-03-31 51209748+gbbosak@users.noreply.github.com [fuchsia] Remove explicit LogSink and InspectSink routing and use dictionaries instead (flutter/flutter#162780)
2025-03-31 jessiewong401@gmail.com Updated to latest AVD to Support Android 16 (API 36) (flutter/flutter#165926)
2025-03-31 34465683+rkishan516@users.noreply.github.com Feat: Add brightnessOf method for theme (flutter/flutter#163733)
2025-03-31 fluttergithubbot@gmail.com Marks Linux_mokey new_gallery__crane_perf to be flaky (flutter/flutter#165964)
2025-03-31 bkonyi@google.com [ Tool ] Correctly select entrypoint target for web build from positional argument list (flutter/flutter#166260)
2025-03-31 jonahwilliams@google.com [Impeller] remove validation warning ignores. (flutter/flutter#166205)
2025-03-31 jonahwilliams@google.com [Impeller] handle shader ordering bug on macOS. (flutter/flutter#165937)
2025-03-31 737941+loic-sharma@users.noreply.github.com Fix CODEOWNERS for the iOS review team (flutter/flutter#166178)
2025-03-31 bkonyi@google.com Remove `<meta content="IE=Edge" http-equiv="X-UA-Compatible">` (flutter/flutter#166252)
2025-03-31 engine-flutter-autoroll@skia.org Roll Dart SDK from b9c35e05feb5 to c5fa06710bb6 (1 revision) (flutter/flutter#166251)
2025-03-31 engine-flutter-autoroll@skia.org Roll Skia from 418c68ea5ccb to 5f262bd2cbb4 (2 revisions) (flutter/flutter#166244)
2025-03-31 engine-flutter-autoroll@skia.org Roll Skia from b6a3bbd1d153 to 418c68ea5ccb (1 revision) (flutter/flutter#166236)
2025-03-31 jonahwilliams@google.com [Impeller] fix min filter for GL external textures. (flutter/flutter#166224)
2025-03-31 engine-flutter-autoroll@skia.org Roll Skia from 10f4cf9a817d to b6a3bbd1d153 (13 revisions) (flutter/flutter#166231)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC bmparr@google.com,stuartmorgan@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

...
Ortes pushed a commit to Ortes/packages that referenced this pull request Jun 25, 2025
Roll Flutter from 05b5e79 to a0b1b32 (37 revisions)

flutter/flutter@05b5e79...a0b1b32

2025-04-01 engine-flutter-autoroll@skia.org Roll Dart SDK from b4d374ec59ec to 4e1f02bc704f (2 revisions) (flutter/flutter#166342)
2025-04-01 15619084+vashworth@users.noreply.github.com Trim any text before osascript JSON response (flutter/flutter#166296)
2025-04-01 benthillerkus@gmail.com [Gen-l10n] Add `Message.resourceId` and `locale` to all `L10nException` error messages (flutter/flutter#163654)
2025-04-01 me@nils.re Add `--ignore-timeouts` flag for `flutter test` command (flutter/flutter#164437)
2025-04-01 stuartmorgan@google.com Update TESTOWNERS username (flutter/flutter#166191)
2025-04-01 engine-flutter-autoroll@skia.org Roll Skia from 4b07443e6071 to 52cbb917fffd (4 revisions) (flutter/flutter#166329)
2025-04-01 engine-flutter-autoroll@skia.org Roll Dart SDK from 6b07a09cbd2d to b4d374ec59ec (2 revisions) (flutter/flutter#166321)
2025-04-01 737941+loic-sharma@users.noreply.github.com [tool] Improve using project files in build targets (flutter/flutter#166211)
2025-04-01 robert.ancell@canonical.com Rename FlRenderer to FlCompositorOpenGL (flutter/flutter#166037)
2025-04-01 kevmoo@users.noreply.github.com [engine, web_ui] Fix instances of library_private_types_in_public_api (flutter/flutter#166156)
2025-04-01 engine-flutter-autoroll@skia.org Roll Dart SDK from 509faa921c95 to 6b07a09cbd2d (1 revision) (flutter/flutter#166301)
2025-04-01 jonahwilliams@google.com [Impeller] small cpu perf for text contents. (flutter/flutter#166199)
2025-04-01 jonahwilliams@google.com [android_engine_test] disable old HC mode tests. (flutter/flutter#166293)
2025-04-01 30870216+gaaclarke@users.noreply.github.com [impeller] fixes diagonal antialiased lines (flutter/flutter#166298)
2025-04-01 engine-flutter-autoroll@skia.org Roll Skia from 5f262bd2cbb4 to 4b07443e6071 (10 revisions) (flutter/flutter#166299)
2025-03-31 flar@google.com [Impeller] Directly tessellate conics to linear path segments (flutter/flutter#166165)
2025-03-31 737941+loic-sharma@users.noreply.github.com [tool] Don't write the .flutter-plugins-dependencies file if it is unchanged (flutter/flutter#166164)
2025-03-31 34871572+gmackall@users.noreply.github.com Move `.cxx` directory out of `android/app` (flutter/flutter#166277)
2025-03-31 4nahom@gmail.com Fix typo in carousel.dart (flutter/flutter#164727)
2025-03-31 engine-flutter-autoroll@skia.org Roll Dart SDK from c5fa06710bb6 to 509faa921c95 (1 revision) (flutter/flutter#166283)
2025-03-31 conner@emerssso.com Public nodes needing paint or layout (flutter/flutter#166148)
2025-03-31 benthillerkus@gmail.com [Gen-l10n] Infer placeholder types on both templates and localizations (flutter/flutter#163690)
2025-03-31 koji.wakamiya@gmail.com [Engine][iOS] Cancel animation when recieved `UIKeyboardWillHideNotification` with duration 0.0 (flutter/flutter#164884)
2025-03-31 51209748+gbbosak@users.noreply.github.com [fuchsia] Remove explicit LogSink and InspectSink routing and use dictionaries instead (flutter/flutter#162780)
2025-03-31 jessiewong401@gmail.com Updated to latest AVD to Support Android 16 (API 36) (flutter/flutter#165926)
2025-03-31 34465683+rkishan516@users.noreply.github.com Feat: Add brightnessOf method for theme (flutter/flutter#163733)
2025-03-31 fluttergithubbot@gmail.com Marks Linux_mokey new_gallery__crane_perf to be flaky (flutter/flutter#165964)
2025-03-31 bkonyi@google.com [ Tool ] Correctly select entrypoint target for web build from positional argument list (flutter/flutter#166260)
2025-03-31 jonahwilliams@google.com [Impeller] remove validation warning ignores. (flutter/flutter#166205)
2025-03-31 jonahwilliams@google.com [Impeller] handle shader ordering bug on macOS. (flutter/flutter#165937)
2025-03-31 737941+loic-sharma@users.noreply.github.com Fix CODEOWNERS for the iOS review team (flutter/flutter#166178)
2025-03-31 bkonyi@google.com Remove `<meta content="IE=Edge" http-equiv="X-UA-Compatible">` (flutter/flutter#166252)
2025-03-31 engine-flutter-autoroll@skia.org Roll Dart SDK from b9c35e05feb5 to c5fa06710bb6 (1 revision) (flutter/flutter#166251)
2025-03-31 engine-flutter-autoroll@skia.org Roll Skia from 418c68ea5ccb to 5f262bd2cbb4 (2 revisions) (flutter/flutter#166244)
2025-03-31 engine-flutter-autoroll@skia.org Roll Skia from b6a3bbd1d153 to 418c68ea5ccb (1 revision) (flutter/flutter#166236)
2025-03-31 jonahwilliams@google.com [Impeller] fix min filter for GL external textures. (flutter/flutter#166224)
2025-03-31 engine-flutter-autoroll@skia.org Roll Skia from 10f4cf9a817d to b6a3bbd1d153 (13 revisions) (flutter/flutter#166231)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC bmparr@google.com,stuartmorgan@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

...
romanejaquez pushed a commit to romanejaquez/flutter that referenced this pull request Aug 14, 2025
flutter#163690)

<!--
Thanks for filing a pull request!
Reviewers are typically assigned within a week of filing a request.
To learn more about code review, see our documentation on Tree Hygiene:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
-->

This fixes flutter#163627 by trying to
the infer the type of a placeholder on both the template messages and
their localised versions.

This way, if the placeholder is being referenced in the localisation,
but the type is omitted in both the template and the localisation, the
check for if the template and the localisation have the same type will
not fail anymore.

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md

---------

Co-authored-by: Ben Konyi <bkonyi@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cp: stable cherry pick this pull request to stable release candidate branch tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flutter Internationalization Error related to placeholder types

3 participants