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

Split public and private i18n APIs #6022

Open
wants to merge 2 commits into
base: V3/develop
Choose a base branch
from

Conversation

Jackenmen
Copy link
Member

@Jackenmen Jackenmen commented Apr 15, 2023

Description of the changes

  • Move private i18n APIs to redbot.core._i18n and name them more sensibly (set_locale, set_regional_format, and reload_locales which I've moved to redbot.core._i18n and renamed to set_global_locale, set_global_regional_format, and _reload_locales)
  • Prefix get_locale_path() with _
  • Publicize and document set_contextual_locale() and set_contextual_regional_format()
    • changed set_contextual_locale() and set_contextual_regional_format() to verify input
  • Altered the ContextVar logic to not keep a default value and instead pass the default value to context_var.get() call

Have the changes in this PR been tested?

Yes

@Jackenmen Jackenmen added Type: Enhancement Something meant to enhance existing Red features. Breaking Change Will potentially break some cogs. labels Apr 15, 2023
@github-actions github-actions bot added Category: Core - i18n This is related to the i18n core API or locale files. Category: Core - Bot Class This is related to the `redbot.core.bot.Red` class. Category: Core - Bot Commands This is related to core commands (Core and CogManagerUI cog classes). Category: Meta This is related to the repository maintenance. labels Apr 15, 2023
@Jackenmen Jackenmen force-pushed the i18n_api_changes_for_rarely_used branch from a532707 to 97cb7bc Compare April 15, 2023 20:15
@Jackenmen Jackenmen added this to the 3.5.1 milestone Apr 15, 2023
@Jackenmen Jackenmen force-pushed the i18n_api_changes_for_rarely_used branch from 97cb7bc to 0d2e131 Compare May 8, 2023 09:33
@Jackenmen Jackenmen changed the title Document and clarify publicity of rarely used i18n APIs Split public and private i18n APIs May 8, 2023
@Jackenmen Jackenmen removed the Breaking Change Will potentially break some cogs. label May 8, 2023
@Jackenmen Jackenmen modified the milestones: 3.5.3, 3.5.2, 3.6.0 May 11, 2023
@Jackenmen Jackenmen modified the milestones: 3.5.6, 3.5.7 Mar 18, 2024
@Jackenmen Jackenmen modified the milestones: 3.5.9, 3.5.10 Apr 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Core - Bot Class This is related to the `redbot.core.bot.Red` class. Category: Core - Bot Commands This is related to core commands (Core and CogManagerUI cog classes). Category: Core - i18n This is related to the i18n core API or locale files. Category: Meta This is related to the repository maintenance. Type: Enhancement Something meant to enhance existing Red features.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant