-
Notifications
You must be signed in to change notification settings - Fork 29.8k
[ Tool / l10n ] Fix issue where localization generator assumed current directory was the target project #175881
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
Conversation
…t directory was the target project When running `flutter pub get` from the root of a Pub workspace, localizations are generated for each subproject. However, we were trying to write the untranslated messages file relative to the current directory, not the target project's directory. This change updates the logic for determining the output location of the untranslated messages file to include the target project root. Fixes #174205
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request addresses an issue where the localization generator was incorrectly using the current working directory instead of the target project's directory to resolve file paths. The fix involves making the projectPathString a required, non-nullable parameter in the LocalizationsGenerator, which ensures that all paths are correctly resolved relative to the project root. The changes are well-implemented, improving code robustness by removing nullability, and include a valuable regression test. I have one minor suggestion to enhance the robustness of the new test.
packages/flutter_tools/test/general.shard/generate_localizations_test.dart
Outdated
Show resolved
Hide resolved
|
autosubmit label was removed for flutter/flutter/175881, because The base commit of the PR is older than 7 days and can not be merged. Please merge the latest changes from the main into this branch and resubmit the PR. |
|
autosubmit label was removed for flutter/flutter/175881, because - The status or check suite Mac plugin_test_android_variants has failed. Please fix the issues identified (or deflake) before re-applying this label. |
…d current directory was the target project (flutter/flutter#175881)
flutter/flutter@7811e89...65aca36 2025-10-02 engine-flutter-autoroll@skia.org Roll Skia from 257c1f94afaa to 05c1f5803415 (4 revisions) (flutter/flutter#176402) 2025-10-02 bkonyi@google.com [ Widget Preview ] Fix resolution for workspace "hosted" dependencies (flutter/flutter#176358) 2025-10-02 engine-flutter-autoroll@skia.org Roll Skia from b5d8ae8d3410 to 257c1f94afaa (6 revisions) (flutter/flutter#176389) 2025-10-02 flar@google.com Delete Skia-specific performance overlay implementation (flutter/flutter#176364) 2025-10-02 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from 1Ai6VL4vb_GdGnWhg... to Vnoygds8HtDUvGLCK... (flutter/flutter#176381) 2025-10-01 bkonyi@google.com [ Widget Preview ] Persist "Filter by Selected File" toggle (flutter/flutter#176289) 2025-10-01 engine-flutter-autoroll@skia.org Roll Skia from c44a36470d07 to b5d8ae8d3410 (5 revisions) (flutter/flutter#176367) 2025-10-01 47866232+chunhtai@users.noreply.github.com Reapply "Update the AccessibilityPlugin::Announce method to account f… (flutter/flutter#176107) 2025-10-01 engine-flutter-autoroll@skia.org Roll Dart SDK from 8ffec1435cf3 to 4f90a06328cb (3 revisions) (flutter/flutter#176369) 2025-10-01 bkonyi@google.com [ Tool / l10n ] Fix issue where localization generator assumed current directory was the target project (flutter/flutter#175881) 2025-10-01 ahmedsameha1@gmail.com Make sure that a DateRangePickerDialog doesn't crash in 0x0 environments (flutter/flutter#173754) 2025-10-01 ahmedsameha1@gmail.com Make sure that a DrawerButton doesn't crash in 0x0 environment (flutter/flutter#172948) 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 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 To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
…t directory was the target project (flutter#175881) When running `flutter pub get` from the root of a Pub workspace, localizations are generated for each subproject. However, we were trying to write the untranslated messages file relative to the current directory, not the target project's directory. This change updates the logic for determining the output location of the untranslated messages file to include the target project root. Fixes flutter#174205
…d current directory was the target project (flutter/flutter#175881)
…t directory was the target project (flutter#175881) When running `flutter pub get` from the root of a Pub workspace, localizations are generated for each subproject. However, we were trying to write the untranslated messages file relative to the current directory, not the target project's directory. This change updates the logic for determining the output location of the untranslated messages file to include the target project root. Fixes flutter#174205
When running
flutter pub getfrom the root of a Pub workspace, localizations are generated for each subproject. However, we were trying to write the untranslated messages file relative to the current directory, not the target project's directory.This change updates the logic for determining the output location of the untranslated messages file to include the target project root.
Fixes #174205