Fixes concurrency spelling with time(s) (#4450)

* Change spelling

* Change for translation
This commit is contained in:
Stonedestroyer 2020-10-28 11:56:27 +01:00 committed by GitHub
parent bd0955ac44
commit 7db2ba556d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -303,15 +303,27 @@ def init_events(bot, cli_flags):
await ctx.send(msg, delete_after=error.retry_after) await ctx.send(msg, delete_after=error.retry_after)
elif isinstance(error, commands.MaxConcurrencyReached): elif isinstance(error, commands.MaxConcurrencyReached):
if error.per is commands.BucketType.default: if error.per is commands.BucketType.default:
msg = _( if error.per > 1:
"Too many people using this command." msg = _(
" It can only be used {number} time(s) concurrently." "Too many people using this command."
).format(number=error.number) " It can only be used {number} times concurrently."
).format(number=error.number)
else:
msg = _(
"Too many people using this command."
" It can only be used {number} time concurrently."
).format(number=error.number)
else: else:
msg = _( if error.per > 1:
"Too many people using this command." msg = _(
" It can only be used {number} time(s) per {type} concurrently." "Too many people using this command."
).format(number=error.number, type=error.per.name) " It can only be used {number} times per {type} concurrently."
).format(number=error.number, type=error.per.name)
else:
msg = _(
"Too many people using this command."
" It can only be used {number} time per {type} concurrently."
).format(number=error.number, type=error.per.name)
await ctx.send(msg) await ctx.send(msg)
else: else:
log.exception(type(error).__name__, exc_info=error) log.exception(type(error).__name__, exc_info=error)