[i18n/Streams] Change strings mentioning commands to use {command} variable (#3938)

* hopefully all strings in streams.py

* black streams.py

* don't touch docstrings

* uniformity is good

* thx draper

Co-authored-by: Draper <27962761+Drapersniper@users.noreply.github.com>

* aaaaaaaaaaaaaaaaaaaaaa

* translate more

* sure, joining some strings for jack

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>

* more strings to join

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>

* yup... I missed this

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>

* jaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaack blaaaaaaaaaaaaaaaaaaaaaack

Co-authored-by: Draper <27962761+Drapersniper@users.noreply.github.com>
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
This commit is contained in:
Dav 2020-06-21 18:38:31 +00:00 committed by GitHub
parent 477186d09d
commit df410529b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -141,11 +141,14 @@ class Streams(commands.Cog):
'2. Click "Manage" on your application.\n' '2. Click "Manage" on your application.\n'
'3. Click on "New secret".\n' '3. Click on "New secret".\n'
"5. Copy your client ID and your client secret into:\n" "5. Copy your client ID and your client secret into:\n"
"`[p]set api twitch client_id <your_client_id_here> " "{command}"
"client_secret <your_client_secret_here>`\n\n" "\n\n"
"Note: These tokens are sensitive and should " "Note: These tokens are sensitive and should only be used in a private channel "
"only be used in a private channel "
"or in DM with the bot." "or in DM with the bot."
).format(
command="`[p]set api twitch client_id {} client_secret {}`".format(
_("<your_client_id_here>"), _("<your_client_secret_here>")
)
) )
if notified_owner_missing_twitch_secret is False: if notified_owner_missing_twitch_secret is False:
await send_to_owners_with_prefix_replaced(self.bot, message) await send_to_owners_with_prefix_replaced(self.bot, message)
@ -250,17 +253,15 @@ class Streams(commands.Cog):
await ctx.send(_("That channel doesn't seem to exist.")) await ctx.send(_("That channel doesn't seem to exist."))
except InvalidTwitchCredentials: except InvalidTwitchCredentials:
await ctx.send( await ctx.send(
_( _("The Twitch token is either invalid or has not been set. See {command}.").format(
"The Twitch token is either invalid or has not been set. See " command=f"`{ctx.clean_prefix}streamset twitchtoken`"
"`{prefix}streamset twitchtoken`." )
).format(prefix=ctx.clean_prefix)
) )
except InvalidYoutubeCredentials: except InvalidYoutubeCredentials:
await ctx.send( await ctx.send(
_( _(
"The YouTube API key is either invalid or has not been set. See " "The YouTube API key is either invalid or has not been set. See {command}."
"`{prefix}streamset youtubekey`." ).format(command=f"`{ctx.clean_prefix}streamset youtubekey`")
).format(prefix=ctx.clean_prefix)
) )
except APIError: except APIError:
await ctx.send( await ctx.send(
@ -405,17 +406,16 @@ class Streams(commands.Cog):
except InvalidTwitchCredentials: except InvalidTwitchCredentials:
await ctx.send( await ctx.send(
_( _(
"The Twitch token is either invalid or has not been set. See " "The Twitch token is either invalid or has not been set. See {command}."
"`{prefix}streamset twitchtoken`." ).format(command=f"`{ctx.clean_prefix}streamset twitchtoken`")
).format(prefix=ctx.clean_prefix)
) )
return return
except InvalidYoutubeCredentials: except InvalidYoutubeCredentials:
await ctx.send( await ctx.send(
_( _(
"The YouTube API key is either invalid or has not been set. See " "The YouTube API key is either invalid or has not been set. See "
"`{prefix}streamset youtubekey`." "{command}."
).format(prefix=ctx.clean_prefix) ).format(command=f"`{ctx.clean_prefix}streamset youtubekey`")
) )
return return
except APIError: except APIError:
@ -452,7 +452,6 @@ class Streams(commands.Cog):
@checks.is_owner() @checks.is_owner()
async def twitchtoken(self, ctx: commands.Context): async def twitchtoken(self, ctx: commands.Context):
"""Explain how to set the twitch token.""" """Explain how to set the twitch token."""
message = _( message = _(
"To set the twitch API tokens, follow these steps:\n" "To set the twitch API tokens, follow these steps:\n"
"1. Go to this page: https://dev.twitch.tv/dashboard/apps.\n" "1. Go to this page: https://dev.twitch.tv/dashboard/apps.\n"
@ -461,11 +460,15 @@ class Streams(commands.Cog):
"select an Application Category of your choosing.\n" "select an Application Category of your choosing.\n"
"4. Click *Register*.\n" "4. Click *Register*.\n"
"5. Copy your client ID and your client secret into:\n" "5. Copy your client ID and your client secret into:\n"
"`{prefix}set api twitch client_id <your_client_id_here> " "{command}"
"client_secret <your_client_secret_here>`\n\n" "\n\n"
"Note: These tokens are sensitive and should only be used in a private channel\n" "Note: These tokens are sensitive and should only be used in a private channel\n"
"or in DM with the bot.\n" "or in DM with the bot.\n"
).format(prefix=ctx.clean_prefix) ).format(
command="`{}set api twitch client_id {} client_secret {}`".format(
ctx.clean_prefix, _("<your_client_id_here>"), _("<your_client_secret_here>")
)
)
await ctx.maybe_send_embed(message) await ctx.maybe_send_embed(message)
@ -483,10 +486,14 @@ class Streams(commands.Cog):
"3. Set up your API key \n" "3. Set up your API key \n"
"(see https://support.google.com/googleapi/answer/6158862 for instructions)\n" "(see https://support.google.com/googleapi/answer/6158862 for instructions)\n"
"4. Copy your API key and run the command " "4. Copy your API key and run the command "
"`{prefix}set api youtube api_key <your_api_key_here>`\n\n" "{command}\n\n"
"Note: These tokens are sensitive and should only be used in a private channel\n" "Note: These tokens are sensitive and should only be used in a private channel\n"
"or in DM with the bot.\n" "or in DM with the bot.\n"
).format(prefix=ctx.clean_prefix) ).format(
command="`{}set api youtube api_key {}`".format(
ctx.clean_prefix, _("<your_api_key_here>")
)
)
await ctx.maybe_send_embed(message) await ctx.maybe_send_embed(message)