Skip to content
Permalink
Browse files

[smmdata] add "Uploaded courses" field

  • Loading branch information...
fixator10 committed May 18, 2019
1 parent de3bb4c commit ce6b50e807c53c9f53c84bd1c8a4a0134937ab91
Showing with 18 additions and 3 deletions.
  1. +7 −1 smmdata/locales/messages.pot
  2. +8 −2 smmdata/locales/ru-RU.po
  3. +2 −0 smmdata/smmbookmark.py
  4. +1 −0 smmdata/smmdata.py
@@ -5,7 +5,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2019-05-16 17:53+0400\n"
"POT-Creation-Date: 2019-05-18 22:44+0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -18,6 +18,9 @@ msgstr ""
msgid "Unable to find level {level}: {status}"
msgstr ""

msgid "The specified user could not be found."
msgstr ""

msgid "Unable to find user {user}: {status}"
msgstr ""

@@ -63,6 +66,9 @@ msgstr ""
msgid "Medals Earned"
msgstr ""

msgid "Uploaded Courses"
msgstr ""

msgid "100 Mario Challenge"
msgstr ""

@@ -5,8 +5,8 @@
msgid ""
msgstr ""
"Project-Id-Version: \n"
"POT-Creation-Date: 2019-05-16 17:53+0400\n"
"PO-Revision-Date: 2019-05-16 18:06+0400\n"
"POT-Creation-Date: 2019-05-18 22:44+0400\n"
"PO-Revision-Date: 2019-05-18 22:44+0400\n"
"Last-Translator: Максим Невзоров\n"
"Language-Team: \n"
"Language: ru_RU\n"
@@ -21,6 +21,9 @@ msgstr ""
msgid "Unable to find level {level}: {status}"
msgstr "Невозможно найти уровень {level}: {status}"

msgid "The specified user could not be found."
msgstr "Не удалось найти указанного пользователя."

msgid "Unable to find user {user}: {status}"
msgstr "Невозможно найти пользователя {user}: {status}"

@@ -66,6 +69,9 @@ msgstr "Получено звезд"
msgid "Medals Earned"
msgstr "Полученные медали"

msgid "Uploaded Courses"
msgstr "Отправленные уровни"

msgid "100 Mario Challenge"
msgstr "100 жизней Марио"

@@ -229,6 +229,8 @@ def medals(self) -> int:
) as page:
return cls(BeautifulSoup(await page.read(), "html.parser"))
except ClientResponseError as e:
if e.status == 404:
raise BadArgument(_("The specified user could not be found."))
raise BadArgument(
_("Unable to find user {user}: {status}").format(
user=argument, status=e.message
@@ -81,6 +81,7 @@ def cog_unload(self):
)
em.add_field(name=_("Stars Received"), value=f"{profile.stars}")
em.add_field(name=_("Medals Earned"), value=profile.medals)
em.add_field(name=_("Uploaded Courses"), value=profile.uploads)
em.add_field(
name=_("100 Mario Challenge"), value=EMBED_EMPTY_VALUE, inline=False
)

0 comments on commit ce6b50e

Please sign in to comment.
You can’t perform that action at this time.