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 localization support for hybrid group fallback #9514

Merged
merged 4 commits into from
Aug 24, 2023

Conversation

thegamecracks
Copy link
Contributor

@thegamecracks thegamecracks commented Aug 1, 2023

Summary

This PR fixes localization support for the HybridGroup's fallback command and allows the fallback= parameter to accept a locale_str instance.

Cause

It appears the original implementation did not change the HybridAppCommand._name_locale attribute, causing the fallback command to mistakenly use the parent group's name localizations. It also bypassed the app_commands.Command constructor which would have prevented auto_locale_strings=True from localizing the fallback name had the previous bug been fixed.

Checklist

  • If code changes were made then they have been tested.
    • I have updated the documentation to reflect the changes.
  • This PR fixes an issue.
  • This PR adds something new (e.g. new method or parameters).
  • This PR is a breaking change (e.g. methods or parameters removed/renamed)
  • This PR is not a code change (e.g. documentation, README, ...)

@thegamecracks thegamecracks changed the title Add locale_str support for hybrid group fallback Fix localization support for hybrid group fallback Aug 1, 2023
@thegamecracks thegamecracks marked this pull request as draft August 3, 2023 14:34
@thegamecracks thegamecracks marked this pull request as ready for review August 3, 2023 14:44
@Rapptz Rapptz merged commit c7f6e95 into Rapptz:master Aug 24, 2023
8 checks passed
@thegamecracks thegamecracks deleted the fallback-locale-str branch September 9, 2023 02:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants