[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>
This commit is contained in:
Draper 2020-01-12 23:20:31 +00:00 committed by Michael H
parent 9f027cc3e0
commit a984971774
3 changed files with 6 additions and 5 deletions

View File

@ -0,0 +1 @@
Fixes the messages for playlists.

View File

@ -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,
),
)

View File

@ -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")