Update AppLocalizations iOS localization docs to match current Xcode UI#188675
Update AppLocalizations iOS localization docs to match current Xcode UI#188675MajidAli2006 wants to merge 1 commit into
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
There was a problem hiding this comment.
Code Review
This pull request updates the iOS localization instructions in stock_strings.dart, gallery_localizations.dart, and gen_l10n_templates.dart to guide users through configuring supported languages via the Xcode project settings instead of editing the Info.plist file directly. Feedback on these changes suggests referencing ios/Runner.xcworkspace instead of ios/Runner.xcodeproj to prevent potential build issues with CocoaPods dependencies.
| /// | ||
| /// Next, select the Information Property List item, select Add Item from the | ||
| /// Editor menu, then select Localizations from the pop-up menu. | ||
| /// 1. Open your project's `ios/Runner.xcodeproj` Xcode file. |
There was a problem hiding this comment.
The official Flutter documentation (https://docs.flutter.dev/ui/internationalization#localizing-for-ios-updating-the-ios-app-bundle) recommends opening ios/Runner.xcworkspace rather than ios/Runner.xcodeproj. Opening the .xcodeproj file directly in a Flutter project that uses plugins can cause build issues in Xcode because CocoaPods dependencies are only integrated via the workspace (.xcworkspace). Please update this step to reference ios/Runner.xcworkspace to align with the official documentation and standard Flutter practices.
| /// 1. Open your project's `ios/Runner.xcodeproj` Xcode file. | |
| /// 1. Open your project's ios/Runner.xcworkspace Xcode workspace. |
References
- Documentation should be useful and accurate, explaining the why and the how correctly. (link)
There was a problem hiding this comment.
Thanks for the review! This is intentional and I'd like to keep ios/Runner.xcodeproj here.
This change is specifically aligning the doc with the official Flutter documentation that issue #184916 cited — Localizing for iOS: Updating the iOS app bundle. Step 1 there reads verbatim: "Open your project's ios/Runner.xcodeproj Xcode file."
The .xcworkspace guidance applies when building/running an app with plugins (CocoaPods integrates via the workspace). This section is about adding App Store localization metadata in the project editor (Info tab → Localizations), which Apple/Flutter document via the .xcodeproj project file. So switching to .xcworkspace would re-introduce exactly the wording this PR set out to correct. Keeping .xcodeproj to match the authoritative docs.
| /// | ||
| /// Next, select the Information Property List item, select Add Item from the | ||
| /// Editor menu, then select Localizations from the pop-up menu. | ||
| /// 1. Open your project's `ios/Runner.xcodeproj` Xcode file. |
There was a problem hiding this comment.
The official Flutter documentation (https://docs.flutter.dev/ui/internationalization#localizing-for-ios-updating-the-ios-app-bundle) recommends opening ios/Runner.xcworkspace rather than ios/Runner.xcodeproj. Opening the .xcodeproj file directly in a Flutter project that uses plugins can cause build issues in Xcode because CocoaPods dependencies are only integrated via the workspace (.xcworkspace). Please update this step to reference ios/Runner.xcworkspace to align with the official documentation and standard Flutter practices.
| /// 1. Open your project's `ios/Runner.xcodeproj` Xcode file. | |
| /// 1. Open your project's ios/Runner.xcworkspace Xcode workspace. |
References
- Documentation should be useful and accurate, explaining the why and the how correctly. (link)
| /// | ||
| /// Next, select the Information Property List item, select Add Item from the | ||
| /// Editor menu, then select Localizations from the pop-up menu. | ||
| /// 1. Open your project's `ios/Runner.xcodeproj` Xcode file. |
There was a problem hiding this comment.
The official Flutter documentation (https://docs.flutter.dev/ui/internationalization#localizing-for-ios-updating-the-ios-app-bundle) recommends opening ios/Runner.xcworkspace rather than ios/Runner.xcodeproj. Opening the .xcodeproj file directly in a Flutter project that uses plugins can cause build issues in Xcode because CocoaPods dependencies are only integrated via the workspace (.xcworkspace). Please update this step to reference ios/Runner.xcworkspace to align with the official documentation and standard Flutter practices.
| /// 1. Open your project's `ios/Runner.xcodeproj` Xcode file. | |
| /// 1. Open your project's ios/Runner.xcworkspace Xcode workspace. |
References
- Documentation should be useful and accurate, explaining the why and the how correctly. (link)
|
@googlebot I signed it! |
1 similar comment
|
@googlebot I signed it! |
|
An existing Git SHA, To re-trigger presubmits after closing or re-opeing a PR, or pushing a HEAD commit (i.e. with |
13635cf to
c0397cd
Compare
The generated `AppLocalizations` dartdoc described the deprecated Info.plist/xcworkspace workflow for declaring supported iOS locales. Update the gen_l10n template and its checked-in generated outputs to match the current `ios/Runner.xcodeproj` → Info tab → Localizations steps documented at docs.flutter.dev. Fixes flutter#184916
c0397cd to
95af9d2
Compare
Description
The generated
AppLocalizationsdartdoc (produced by thegen_l10ntemplate) described the deprecated workflow for declaring supported iOS locales — editingInfo.plistvia theios/Runner.xcworkspaceworkspace and the Information Property List editor.This updates the documentation to match the current workflow documented on docs.flutter.dev — Localizing for iOS: Updating the iOS app bundle:
ios/Runner.xcodeprojRunnerproject under Projects in the Project Navigator+) button to add supported languages/regionsThe same doc block is updated in the template and in its two checked-in generated outputs so the regeneration check stays consistent:
packages/flutter_tools/lib/src/localizations/gen_l10n_templates.dart(template)dev/benchmarks/test_apps/stocks/lib/i18n/stock_strings.dart(generated)dev/integration_tests/new_gallery/lib/gallery_localizations.dart(generated)Related Issues
Fixes #184916
Tests
Documentation-only change (dartdoc comments); no behavioral change, so no new tests are added.
Pre-launch Checklist
///).