fix: Formatting and missing formats.
This commit is contained in:
@@ -235,14 +235,14 @@ class Timer:
|
|||||||
pattern = self.pattern
|
pattern = self.pattern
|
||||||
name = self.base_name
|
name = self.base_name
|
||||||
if stage is not None:
|
if stage is not None:
|
||||||
remaining = str(int(5 * math.ceil((stage.end - utc_now()).total_seconds() / 60)))
|
remaining = int(5 * math.ceil((stage.end - utc_now()).total_seconds() / 60))
|
||||||
stagestr = t(self.focus_name if stage.focused else self.break_name, locale=self.locale.value)
|
stagestr = t(self.focus_name if stage.focused else self.break_name, locale=self.locale.value)
|
||||||
else:
|
else:
|
||||||
remaining = str(self.data.focus_length // 60)
|
remaining = self.data.focus_length // 60
|
||||||
stagestr = t(self.focus_name, locale=self.locale.value)
|
stagestr = t(self.focus_name, locale=self.locale.value)
|
||||||
|
|
||||||
mapping = {
|
mapping = {
|
||||||
'{remaining}': remaining,
|
'{remaining}': f"{remaining}m",
|
||||||
'{stage}': stagestr,
|
'{stage}': stagestr,
|
||||||
'{members}': str(len(self.members)),
|
'{members}': str(len(self.members)),
|
||||||
'{name}': name,
|
'{name}': name,
|
||||||
|
|||||||
@@ -152,7 +152,7 @@ class RankOverviewUI(MessageUI):
|
|||||||
'ui:rank_overview|menu:roles|error:above_caller',
|
'ui:rank_overview|menu:roles|error:above_caller',
|
||||||
"You have insufficient permissions to assign {mention} as a rank role! "
|
"You have insufficient permissions to assign {mention} as a rank role! "
|
||||||
"You may only manage roles below your top role."
|
"You may only manage roles below your top role."
|
||||||
))
|
)).format(mention=role.mention)
|
||||||
embed = discord.Embed(
|
embed = discord.Embed(
|
||||||
title=t(_p(
|
title=t(_p(
|
||||||
'ui:rank_overview|menu:roles|error:above_caller|title',
|
'ui:rank_overview|menu:roles|error:above_caller|title',
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ class StatsCog(LionCog):
|
|||||||
@appcmds.describe(
|
@appcmds.describe(
|
||||||
season_start=_p(
|
season_start=_p(
|
||||||
'cmd:configure_statistics|param:season_start|desc',
|
'cmd:configure_statistics|param:season_start|desc',
|
||||||
"Time from which to start counting activity for rank badges and season leadeboards."
|
"Time from which to start counting activity for rank badges and season leaderboards. (YYYY-MM-DD)"
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@appcmds.default_permissions(manage_guild=True)
|
@appcmds.default_permissions(manage_guild=True)
|
||||||
|
|||||||
@@ -221,14 +221,14 @@ class GoalEditor(FastModal):
|
|||||||
t(_p(
|
t(_p(
|
||||||
'modal:goal_editor|field:text_goal|error:NAN',
|
'modal:goal_editor|field:text_goal|error:NAN',
|
||||||
"The provided message goal `{input}` is not a number! Please try again."
|
"The provided message goal `{input}` is not a number! Please try again."
|
||||||
))
|
)).format(input=string)
|
||||||
)
|
)
|
||||||
elif self.stat_page.stat is StatType.ANKI:
|
elif self.stat_page.stat is StatType.ANKI:
|
||||||
raise UserInputError(
|
raise UserInputError(
|
||||||
t(_p(
|
t(_p(
|
||||||
'modal:goal_editor|field:anki_goal|error:NAN',
|
'modal:goal_editor|field:anki_goal|error:NAN',
|
||||||
"The provided card goal `{input}` is not a number! Please try again."
|
"The provided card goal `{input}` is not a number! Please try again."
|
||||||
))
|
)).format(input=string)
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
result = int(string)
|
result = int(string)
|
||||||
|
|||||||
@@ -984,7 +984,7 @@ class TimestampSetting(InteractiveSetting[ParentID, str, dt.datetime]):
|
|||||||
raise UserInputError(t(_p(
|
raise UserInputError(t(_p(
|
||||||
'settype:timestamp|parse|error:invalid',
|
'settype:timestamp|parse|error:invalid',
|
||||||
"Could not parse `{provided}` as a timestamp. Please use `YYYY-MM-DD HH:MM` format."
|
"Could not parse `{provided}` as a timestamp. Please use `YYYY-MM-DD HH:MM` format."
|
||||||
)))
|
)).format(provided=string))
|
||||||
return ts
|
return ts
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
|||||||
Reference in New Issue
Block a user