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

[REQUEST] Command localization #511

Closed
1 task
i0bs opened this issue Feb 12, 2022 · 1 comment · Fixed by #686
Closed
1 task

[REQUEST] Command localization #511

i0bs opened this issue Feb 12, 2022 · 1 comment · Fixed by #686
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request priority This Issue/PR must be resolved first before accepting any others

Comments

@i0bs
Copy link
Contributor

i0bs commented Feb 12, 2022

What is the feature you're proposing?
With the name_localizations and description_localizations fields for an ApplictionCommand object currently being exposed from the Web API and Gateway event data, it would be nice in terms of user experience for bot developers to be able to specify the translated locale of their commands when a user has their locale set to a specific language and/or region.

This would be the suggested implementation:

@bot.command(
    name="hello",
    description="how are you?",
    name_localizations=interactions.Locale(
        interactions.Locale.GERMANY="hallo"
    )
    description_localizations=interactions.Locale(
        interactions.Locale.GERMANY="geht's dir?"
    )
)
async def command(ctx):
    ...

The new suggested data model, interactions.Locale would be a str, Enum metaclassed object with names representing the official Discord locale list.

Additional Information

  • My feature request is related to an existing Issue.
    • Issue (if referenceable):
@i0bs i0bs added documentation Improvements or additions to documentation enhancement New feature or request labels Feb 12, 2022
@i0bs i0bs self-assigned this Feb 12, 2022
@EdVraz EdVraz self-assigned this Feb 14, 2022
@EdVraz EdVraz mentioned this issue Feb 14, 2022
8 tasks
@i0bs
Copy link
Contributor Author

i0bs commented Mar 10, 2022

Closed beta testing has now begun for command localization. Because of this, we'll be raising the priority status on this.

@i0bs i0bs added the priority This Issue/PR must be resolved first before accepting any others label Mar 10, 2022
@FayeDel FayeDel linked a pull request Mar 29, 2022 that will close this issue
8 tasks
@EdVraz EdVraz closed this as completed Apr 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request priority This Issue/PR must be resolved first before accepting any others
Projects
Status: Complete
Development

Successfully merging a pull request may close this issue.

2 participants