This repository was archived by the owner on Nov 13, 2026. It is now read-only.
Repository navigation
refactor: localize audit-log reasons and the remaining user-facing strings - #124
Merged
Merged
Conversation
…rings
Moved to localization/en.l10n.json:
- moderation audit-log reasons: mod.kick.reason, mod.ban.reason,
mod.unban.reason, mod.unban.case_reason, mod.unmute.reason
(Case._audit_reason renders them with the moderator);
- level reward reasons (level_reward.*) and the leaderboard's unknown-user
fallback (level_unknown_user);
- ticket category name and channel/category reasons (ticket.strings.*);
- the snapshot restore failure DM (snapshot.restore_failed);
- AutoMod case reasons now use the existing automod.reasons.* keys instead
of f"[AutoMod] {feature.title()} rule violation".
Fix: mod.mute.reason ("Muted by {moderator.name}") was rendered with only
mute=..., so the audit log showed the literal placeholder.
Kept as they are: the error handler's messages (by request), the config
CLI (temporary) and the owner-only admin commands' output.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Moved to
localization/en.l10n.jsonmod.kick.reason,mod.ban.reason,mod.unban.reason,mod.unban.case_reason,mod.unmute.reasonlevel_reward.reason,level_reward.replace_reasonlevel_unknown_userticket.strings.*snapshot.restore_failedautomod.reasons.<feature>keys, replacingf"[AutoMod] {feature.title()} rule violation"Case reasons go through the new
Case._audit_reason(key), which renders the key withmoderatorandcase.Fix
mod.mute.reasonis"Muted by {moderator.name}", but it was rendered with onlymute=…, so the audit log showed the literal{moderator.name}.Left as they are
core/bot.py, as you asked.cogs/config.py,config_subcommands/), because it's temporary.admin.pyoutput: developer commands, not user-facing.ticket.buttons.*when the message is sent.Tests
tests/test_audit_reasons.pychecks that the moderation reasons name the moderator.ruff format --check,ruff check,ty checkandpytestall pass (371 passed).🤖 Generated with Claude Code