From a98497177474288f2a02f78795c3383ad258077e Mon Sep 17 00:00:00 2001 From: Draper <27962761+Drapersniper@users.noreply.github.com> Date: Sun, 12 Jan 2020 23:20:31 +0000 Subject: [PATCH] [3.2.3][Audio] Fixes some Playlists strings (#3347) * chore Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com> * chore Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com> --- changelog.d/audio/3344.enhance.1.rst | 1 + redbot/cogs/audio/audio.py | 4 ++-- redbot/cogs/audio/utils.py | 6 +++--- 3 files changed, 6 insertions(+), 5 deletions(-) create mode 100644 changelog.d/audio/3344.enhance.1.rst diff --git a/changelog.d/audio/3344.enhance.1.rst b/changelog.d/audio/3344.enhance.1.rst new file mode 100644 index 000000000..124a7b894 --- /dev/null +++ b/changelog.d/audio/3344.enhance.1.rst @@ -0,0 +1 @@ +Fixes the messages for playlists. \ No newline at end of file diff --git a/redbot/cogs/audio/audio.py b/redbot/cogs/audio/audio.py index e47317403..67607f090 100644 --- a/redbot/cogs/audio/audio.py +++ b/redbot/cogs/audio/audio.py @@ -4290,8 +4290,8 @@ class Audio(commands.Cog): ).format( name=from_playlist.name, from_id=from_playlist.id, - from_scope=humanize_scope(from_scope, ctx=from_scope_name, the=True), - to_scope=humanize_scope(to_scope, ctx=to_scope_name, the=True), + from_scope=humanize_scope(from_scope, ctx=from_scope_name), + to_scope=humanize_scope(to_scope, ctx=to_scope_name), to_id=to_playlist.id, ), ) diff --git a/redbot/cogs/audio/utils.py b/redbot/cogs/audio/utils.py index e44abab2e..2886f4996 100644 --- a/redbot/cogs/audio/utils.py +++ b/redbot/cogs/audio/utils.py @@ -521,8 +521,8 @@ class PlaylistScope(Enum): def humanize_scope(scope, ctx=None, the=None): if scope == PlaylistScope.GLOBAL.value: - return _("the ") if the else "" + _("Global") + return (_("the ") if the else "") + _("Global") elif scope == PlaylistScope.GUILD.value: - return ctx.name if ctx else _("the ") if the else "" + _("Server") + return ctx.name if ctx else (_("the ") if the else "") + _("Server") elif scope == PlaylistScope.USER.value: - return str(ctx) if ctx else _("the ") if the else "" + _("User") + return str(ctx) if ctx else (_("the ") if the else "") + _("User")