-
Notifications
You must be signed in to change notification settings - Fork 0
Mwayne/skip lang detection #10
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
b0c6044 to
f342cea
Compare
f342cea to
dea184a
Compare
dea184a to
d230614
Compare
|
bugbot run |
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.
✅ Bugbot reviewed your changes and found no bugs!
|
|
||
| langs = langs.split(",") unless langs.kind_of?(Array) | ||
| langs.map { |l| l.to_s.strip }.reject(&:empty?) | ||
| end |
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.
Empty LANGUAGES value silently skips all metadata updates
The allowed_locales method returns an empty array [] when LANGUAGES is set to an empty string or languages is set to an empty array. Since empty strings are truthy in Ruby, the return nil unless langs check passes, and after processing, an empty array is returned. In the calling code, if allowed is truthy for an empty array, causing info_by_lang.select! to filter out all locales and the loop to skip all iterations. This silently prevents any localized metadata from being updated, which could be surprising if a user accidentally sets LANGUAGES="" thinking it means "no filtering."
| unless options[:edit_live] | ||
| if options[:skip_language_detection] | ||
| # Do not create/enable additional locales; use what already exists on ASC | ||
| app_store_version_localizations = version.get_app_store_version_localizations |
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.
Missing nil check for version when skip_language_detection enabled
When skip_language_detection is true, the code calls version.get_app_store_version_localizations without checking if version is nil. The fetch_edit_app_store_version method can return nil after exhausting retries. The bypassed verify_available_version_languages! method has a nil check that calls UI.user_error! with a descriptive message, but this new code path skips that protection. This could cause a NoMethodError crash instead of a proper error message. Notably, line 133 uses safe navigation app_info&.get_app_info_localizations but line 126 does not use similar nil protection for version.
Description
Testing Steps
Beta uploads
Release uploads
Note
Introduces explicit control over which locales are used/updated during uploads.
skip_language_detectionoption inoptions.rb. When set (and notedit_live),upload_metadata.rbuses existing App Store Connect localizations viaversion.get_app_store_version_localizationsandapp_info.get_app_info_localizationsinstead ofverify_available_*_languages!(no new locales are created/enabled).languagesoption (andLANGUAGESenv) inoptions.rb.build_manager.rbaddsallowed_localesand filtersupdate_localized_app_review/update_localized_build_reviewto only update locales in this list.Written by Cursor Bugbot for commit d230614. This will update automatically on new commits. Configure here.