mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-20 18:06:08 -05:00
[Core] Guild scoped I18n (#3896)
* Guild I18n Never again! * Finish off guild scoped i18n * Black formatting * Added guild only flags. * Fix missing import. * Added listing of guild i18n settings * Added API support * Added API support... properly! * Added API support... for realsies! * Auto-translate create_cases instances You're welcome cog creators! Jack talked me into this! * Fix get_regional_format to actually return properly * Cleanup `set showsettings` * Style pass * Update redbot/core/core_commands.py Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com> * Update redbot/core/events.py Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com> * Update redbot/core/core_commands.py Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com> * Fix missing import * Improve caching * Removal of unneeded function * Fix some naming * IDFK anymore... * Reformat * Update redbot/core/settings_caches.py Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com> * Update redbot/core/settings_caches.py Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com> * Update redbot/core/settings_caches.py Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com> * Remove line number * Fix global sets * Set contextual locale manually where needed * Reports cog is wonderful... * Update redbot/core/core_commands.py Co-authored-by: Draper <27962761+Drapersniper@users.noreply.github.com> * Set contextual locale manually where needed in Mutes cog * s Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com> Co-authored-by: Draper <27962761+Drapersniper@users.noreply.github.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import discord
|
||||
from redbot.core.bot import Red
|
||||
from redbot.core import checks, commands, Config
|
||||
from redbot.core.i18n import cog_i18n, Translator
|
||||
from redbot.core.i18n import cog_i18n, Translator, set_contextual_locales_from_guild
|
||||
from redbot.core.utils._internal_utils import send_to_owners_with_prefix_replaced
|
||||
from redbot.core.utils.chat_formatting import escape, pagify
|
||||
|
||||
@@ -714,6 +714,9 @@ class Streams(commands.Cog):
|
||||
ignore_reruns = await self.config.guild(channel.guild).ignore_reruns()
|
||||
if ignore_reruns and is_rerun:
|
||||
continue
|
||||
|
||||
await set_contextual_locales_from_guild(self.bot, channel.guild)
|
||||
|
||||
mention_str, edited_roles = await self._get_mention_str(
|
||||
channel.guild, channel
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user