From b4194dcadf060f9410069a90b391b9a44596920f Mon Sep 17 00:00:00 2001 From: Romain J Date: Wed, 11 Nov 2020 02:46:48 +0100 Subject: [PATCH] feat(commands:locale|Utils): add translations for source info and credits --- tuxbot/cogs/Admin/locales/en-US.po | 6 +- tuxbot/cogs/Admin/locales/en-US.po~ | 6 +- tuxbot/cogs/Admin/locales/fr-FR.po | 6 +- tuxbot/cogs/Admin/locales/fr-FR.po~ | 6 +- tuxbot/cogs/Admin/locales/messages.pot | 6 +- tuxbot/cogs/Dev/locales/fr-FR.po | 4 +- tuxbot/cogs/Logs/locales/fr-FR.po | 4 +- tuxbot/cogs/Utils/locales/en-US.po | 88 +++++++++++++++++++++- tuxbot/cogs/Utils/locales/en-US.po~ | 100 +++++++++++++++++++++++++ tuxbot/cogs/Utils/locales/fr-FR.po | 94 ++++++++++++++++++++++- tuxbot/cogs/Utils/locales/messages.pot | 86 ++++++++++++++++++++- tuxbot/cogs/Utils/utils.py | 50 +++++++------ 12 files changed, 411 insertions(+), 45 deletions(-) create mode 100644 tuxbot/cogs/Utils/locales/en-US.po~ diff --git a/tuxbot/cogs/Admin/locales/en-US.po b/tuxbot/cogs/Admin/locales/en-US.po index e3e2632..25a4a1e 100644 --- a/tuxbot/cogs/Admin/locales/en-US.po +++ b/tuxbot/cogs/Admin/locales/en-US.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Tuxbot-bot\n" "Report-Msgid-Bugs-To: rick@gnous.eu\n" -"POT-Creation-Date: 2020-06-11 19:07+0200\n" +"POT-Creation-Date: 2020-11-11 02:40+0100\n" "PO-Revision-Date: 2020-06-10 00:38+0200\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -17,11 +17,11 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: tuxbot/cogs/admin/admin.py:33 +#: tuxbot/cogs/Admin/admin.py:50 #, python-brace-format msgid "Locale changed to {lang} successfully" msgstr "" -#: tuxbot/cogs/admin/admin.py:43 +#: tuxbot/cogs/Admin/admin.py:65 msgid "List of available locales: " msgstr "" diff --git a/tuxbot/cogs/Admin/locales/en-US.po~ b/tuxbot/cogs/Admin/locales/en-US.po~ index fad1457..ef537f7 100644 --- a/tuxbot/cogs/Admin/locales/en-US.po~ +++ b/tuxbot/cogs/Admin/locales/en-US.po~ @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Tuxbot-bot\n" "Report-Msgid-Bugs-To: rick@gnous.eu\n" -"POT-Creation-Date: 2020-06-11 18:24+0200\n" +"POT-Creation-Date: 2020-10-21 01:13+0200\n" "PO-Revision-Date: 2020-06-10 00:38+0200\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -17,11 +17,11 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: tuxbot/cogs/admin/admin.py:38 +#: tuxbot/cogs/admin/admin.py:47 #, python-brace-format msgid "Locale changed to {lang} successfully" msgstr "" -#: tuxbot/cogs/admin/admin.py:47 +#: tuxbot/cogs/admin/admin.py:62 msgid "List of available locales: " msgstr "" diff --git a/tuxbot/cogs/Admin/locales/fr-FR.po b/tuxbot/cogs/Admin/locales/fr-FR.po index 05626fd..2b14077 100644 --- a/tuxbot/cogs/Admin/locales/fr-FR.po +++ b/tuxbot/cogs/Admin/locales/fr-FR.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Tuxbot-bot\n" "Report-Msgid-Bugs-To: rick@gnous.eu\n" -"POT-Creation-Date: 2020-06-11 19:07+0200\n" +"POT-Creation-Date: 2020-11-11 02:40+0100\n" "PO-Revision-Date: 2020-06-10 00:38+0200\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -18,11 +18,11 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -#: tuxbot/cogs/admin/admin.py:33 +#: tuxbot/cogs/Admin/admin.py:50 #, fuzzy, python-brace-format msgid "Locale changed to {lang} successfully" msgstr "Langue changée pour {lang} avec succès" -#: tuxbot/cogs/admin/admin.py:43 +#: tuxbot/cogs/Admin/admin.py:65 msgid "List of available locales: " msgstr "Liste des langues disponibles : " diff --git a/tuxbot/cogs/Admin/locales/fr-FR.po~ b/tuxbot/cogs/Admin/locales/fr-FR.po~ index ee3ea87..bd34d0b 100644 --- a/tuxbot/cogs/Admin/locales/fr-FR.po~ +++ b/tuxbot/cogs/Admin/locales/fr-FR.po~ @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Tuxbot-bot\n" "Report-Msgid-Bugs-To: rick@gnous.eu\n" -"POT-Creation-Date: 2020-06-11 18:24+0200\n" +"POT-Creation-Date: 2020-10-21 01:13+0200\n" "PO-Revision-Date: 2020-06-10 00:38+0200\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -18,11 +18,11 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -#: tuxbot/cogs/admin/admin.py:38 +#: tuxbot/cogs/admin/admin.py:47 #, fuzzy, python-brace-format msgid "Locale changed to {lang} successfully" msgstr "Langue changée pour {lang} avec succès" -#: tuxbot/cogs/admin/admin.py:47 +#: tuxbot/cogs/admin/admin.py:62 msgid "List of available locales: " msgstr "Liste des langues disponibles : " diff --git a/tuxbot/cogs/Admin/locales/messages.pot b/tuxbot/cogs/Admin/locales/messages.pot index 5bf0f40..78bd0bf 100644 --- a/tuxbot/cogs/Admin/locales/messages.pot +++ b/tuxbot/cogs/Admin/locales/messages.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Tuxbot-bot\n" "Report-Msgid-Bugs-To: rick@gnous.eu\n" -"POT-Creation-Date: 2020-10-21 01:13+0200\n" +"POT-Creation-Date: 2020-11-11 02:44+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,11 +17,11 @@ msgstr "" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" -#: tuxbot/cogs/admin/admin.py:47 +#: tuxbot/cogs/Admin/admin.py:50 #, python-brace-format msgid "Locale changed to {lang} successfully" msgstr "" -#: tuxbot/cogs/admin/admin.py:62 +#: tuxbot/cogs/Admin/admin.py:65 msgid "List of available locales: " msgstr "" diff --git a/tuxbot/cogs/Dev/locales/fr-FR.po b/tuxbot/cogs/Dev/locales/fr-FR.po index 3562511..5f7d0d1 100644 --- a/tuxbot/cogs/Dev/locales/fr-FR.po +++ b/tuxbot/cogs/Dev/locales/fr-FR.po @@ -12,8 +12,8 @@ msgstr "" "PO-Revision-Date: 2020-10-21 01:15+0200\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" -"Language: en_US\n" +"Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" diff --git a/tuxbot/cogs/Logs/locales/fr-FR.po b/tuxbot/cogs/Logs/locales/fr-FR.po index 3562511..5f7d0d1 100644 --- a/tuxbot/cogs/Logs/locales/fr-FR.po +++ b/tuxbot/cogs/Logs/locales/fr-FR.po @@ -12,8 +12,8 @@ msgstr "" "PO-Revision-Date: 2020-10-21 01:15+0200\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" -"Language: en_US\n" +"Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" diff --git a/tuxbot/cogs/Utils/locales/en-US.po b/tuxbot/cogs/Utils/locales/en-US.po index e7d396a..ebbc558 100644 --- a/tuxbot/cogs/Utils/locales/en-US.po +++ b/tuxbot/cogs/Utils/locales/en-US.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Tuxbot-bot\n" "Report-Msgid-Bugs-To: rick@gnous.eu\n" -"POT-Creation-Date: 2020-06-11 19:07+0200\n" +"POT-Creation-Date: 2020-11-11 02:44+0100\n" "PO-Revision-Date: 2020-06-10 00:38+0200\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -16,3 +16,89 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: tuxbot/cogs/Utils/utils.py:38 +msgid "Information about TuxBot" +msgstr "" + +#: tuxbot/cogs/Utils/utils.py:44 +msgid "__:busts_in_silhouette: Development__" +msgstr "" + +#: tuxbot/cogs/Utils/utils.py:61 +msgid "" +"**{}** physical memory\n" +"**{}** virtual memory" +msgstr "" + +#: tuxbot/cogs/Utils/utils.py:72 +msgid "__Servers count__" +msgstr "" + +#: tuxbot/cogs/Utils/utils.py:77 +msgid "__Channels count__" +msgstr "" + +#: tuxbot/cogs/Utils/utils.py:82 +msgid "__Members count__" +msgstr "" + +#: tuxbot/cogs/Utils/utils.py:88 +msgid "__:file_folder: Files__" +msgstr "" + +#: tuxbot/cogs/Utils/utils.py:95 +msgid "__¶ Lines__" +msgstr "" + +#: tuxbot/cogs/Utils/utils.py:105 +msgid "__Latest changes__" +msgstr "" + +#: tuxbot/cogs/Utils/utils.py:111 +msgid "__:link: Links__" +msgstr "" + +#: tuxbot/cogs/Utils/utils.py:116 +msgid "| [Invite]" +msgstr "" + +#: tuxbot/cogs/Utils/utils.py:131 +msgid "Contributors" +msgstr "" + +#: tuxbot/cogs/Utils/utils.py:187 +msgid "Invite" +msgstr "" + +#: tuxbot/cogs/Utils/utils.py:191 +msgid "Minimal" +msgstr "" + +#: tuxbot/cogs/Utils/utils.py:193 +msgid "" +"The minimum permissions include the strict requirements for the proper " +"functioning of all basics commands.\n" +msgstr "" + +#: tuxbot/cogs/Utils/utils.py:198 tuxbot/cogs/Utils/utils.py:210 +msgid "[Add!]" +msgstr "" + +#: tuxbot/cogs/Utils/utils.py:203 +msgid "Admin" +msgstr "" + +#: tuxbot/cogs/Utils/utils.py:205 +msgid "" +"All minimal permissions + extra permissions for admin commands such as kick " +"and ban\n" +msgstr "" + +#: tuxbot/cogs/Utils/utils.py:233 +msgid "Unable to find `{}`" +msgstr "" + +#: tuxbot/cogs/Utils/utils.py:241 +msgid "Unable to fetch lines for `{}`" +msgstr "" diff --git a/tuxbot/cogs/Utils/locales/en-US.po~ b/tuxbot/cogs/Utils/locales/en-US.po~ new file mode 100644 index 0000000..cf4934a --- /dev/null +++ b/tuxbot/cogs/Utils/locales/en-US.po~ @@ -0,0 +1,100 @@ +# English translations for Tuxbot-bot package. +# Copyright (C) 2020 THE Tuxbot-bot'S COPYRIGHT HOLDER +# This file is distributed under the same license as the Tuxbot-bot package. +# Automatically generated, 2020. +# +msgid "" +msgstr "" +"Project-Id-Version: Tuxbot-bot\n" +"Report-Msgid-Bugs-To: rick@gnous.eu\n" +"POT-Creation-Date: 2020-11-11 02:40+0100\n" +"PO-Revision-Date: 2020-06-10 00:38+0200\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: en_US\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: tuxbot/cogs/Utils/utils.py:38 +msgid "Information about TuxBot" +msgstr "" + +#: tuxbot/cogs/Utils/utils.py:44 +msgid "__:busts_in_silhouette: Development__" +msgstr "" + +#: tuxbot/cogs/Utils/utils.py:61 +msgid "" +"**{}** physical memory\n" +"**{}** virtual memory" +msgstr "" + +#: tuxbot/cogs/Utils/utils.py:72 +msgid "__Servers count__" +msgstr "" + +#: tuxbot/cogs/Utils/utils.py:77 +msgid "__Channels count__" +msgstr "" + +#: tuxbot/cogs/Utils/utils.py:82 +msgid "__Members count__" +msgstr "" + +#: tuxbot/cogs/Utils/utils.py:88 +msgid "__:file_folder: Files__" +msgstr "" + +#: tuxbot/cogs/Utils/utils.py:95 +msgid "__¶ Lines__" +msgstr "" + +#: tuxbot/cogs/Utils/utils.py:105 +msgid "__Latest changes__" +msgstr "" + +#: tuxbot/cogs/Utils/utils.py:111 +msgid "__:link: Links__" +msgstr "" + +#: tuxbot/cogs/Utils/utils.py:116 +msgid "| [Invite]" +msgstr "" + +#: tuxbot/cogs/Utils/utils.py:131 +msgid "Contributors" +msgstr "" + +#: tuxbot/cogs/Utils/utils.py:187 +msgid "Invite" +msgstr "" + +#: tuxbot/cogs/Utils/utils.py:191 +msgid "Minimal" +msgstr "" + +#: tuxbot/cogs/Utils/utils.py:193 +msgid "" +"The minimum permissions include the strict requirements for the proper " +"functioning of all basics commands.\n" +msgstr "" + +#: tuxbot/cogs/Utils/utils.py:203 +msgid "Admin" +msgstr "" + +#: tuxbot/cogs/Utils/utils.py:205 +msgid "" +"All minimal permissions + extra permissions for admin commands such as kick " +"and ban\n" +msgstr "" + +#: tuxbot/cogs/Utils/utils.py:233 +msgid "Unable to find `{}`" +msgstr "" + +#: tuxbot/cogs/Utils/utils.py:241 +msgid "Unable to fetch lines for `{}`" +msgstr "" diff --git a/tuxbot/cogs/Utils/locales/fr-FR.po b/tuxbot/cogs/Utils/locales/fr-FR.po index c2a5aea..991b176 100644 --- a/tuxbot/cogs/Utils/locales/fr-FR.po +++ b/tuxbot/cogs/Utils/locales/fr-FR.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Tuxbot-bot\n" "Report-Msgid-Bugs-To: rick@gnous.eu\n" -"POT-Creation-Date: 2020-06-11 19:07+0200\n" +"POT-Creation-Date: 2020-11-11 02:44+0100\n" "PO-Revision-Date: 2020-06-10 00:38+0200\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -17,3 +17,95 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#: tuxbot/cogs/Utils/utils.py:38 +msgid "Information about TuxBot" +msgstr "Information sur TuxBot" + +#: tuxbot/cogs/Utils/utils.py:44 +msgid "__:busts_in_silhouette: Development__" +msgstr "__:busts_in_silhouette: Développement__" + +#: tuxbot/cogs/Utils/utils.py:61 +msgid "" +"**{}** physical memory\n" +"**{}** virtual memory" +msgstr "" +"**{}** mémoire physique\n" +"**{}** mémoire virtuelle" + +#: tuxbot/cogs/Utils/utils.py:72 +msgid "__Servers count__" +msgstr "__Nombre de serveurs__" + +#: tuxbot/cogs/Utils/utils.py:77 +msgid "__Channels count__" +msgstr "__Nombre de salons__" + +#: tuxbot/cogs/Utils/utils.py:82 +msgid "__Members count__" +msgstr "__Nombre de membres__" + +#: tuxbot/cogs/Utils/utils.py:88 +msgid "__:file_folder: Files__" +msgstr "__:file_folder: Fichiers__" + +#: tuxbot/cogs/Utils/utils.py:95 +msgid "__¶ Lines__" +msgstr "__¶ Lignes__" + +#: tuxbot/cogs/Utils/utils.py:105 +msgid "__Latest changes__" +msgstr "__Derniers changements__" + +#: tuxbot/cogs/Utils/utils.py:111 +msgid "__:link: Links__" +msgstr "__:link: Liens__" + +#: tuxbot/cogs/Utils/utils.py:116 +msgid "| [Invite]" +msgstr "| [Invitation]" + +#: tuxbot/cogs/Utils/utils.py:131 +msgid "Contributors" +msgstr "Contributeurs" + +#: tuxbot/cogs/Utils/utils.py:187 +msgid "Invite" +msgstr "Invitation" + +#: tuxbot/cogs/Utils/utils.py:191 +msgid "Minimal" +msgstr "Minimale" + +#: tuxbot/cogs/Utils/utils.py:193 +msgid "" +"The minimum permissions include the strict requirements for the proper " +"functioning of all basics commands.\n" +msgstr "" +"Les permissions minimales avec le strict nécessaire pour le bon " +"fonctionnement des commandes de base\n" + +#: tuxbot/cogs/Utils/utils.py:198 tuxbot/cogs/Utils/utils.py:210 +msgid "[Add!]" +msgstr "[Ajouter !]" + +#: tuxbot/cogs/Utils/utils.py:203 +msgid "Admin" +msgstr "Admin" + +#: tuxbot/cogs/Utils/utils.py:205 +msgid "" +"All minimal permissions + extra permissions for admin commands such as kick " +"and ban\n" +msgstr "" +"Toutes les permissions minimales + les permissions extra pour les commandes " +"d'administration telles que kick et ban\n" + +#: tuxbot/cogs/Utils/utils.py:233 +msgid "Unable to find `{}`" +msgstr "Impossible de trouver `{}`" + +#: tuxbot/cogs/Utils/utils.py:241 +msgid "Unable to fetch lines for `{}`" +msgstr "Impossible de récuperer les lignes pour `{}`" diff --git a/tuxbot/cogs/Utils/locales/messages.pot b/tuxbot/cogs/Utils/locales/messages.pot index e53851f..3e3e5d8 100644 --- a/tuxbot/cogs/Utils/locales/messages.pot +++ b/tuxbot/cogs/Utils/locales/messages.pot @@ -8,11 +8,93 @@ msgid "" msgstr "" "Project-Id-Version: Tuxbot-bot\n" "Report-Msgid-Bugs-To: rick@gnous.eu\n" -"POT-Creation-Date: 2020-10-21 01:13+0200\n" +"POT-Creation-Date: 2020-11-11 02:44+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: \n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=CHARSET\n" +"Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" + +#: tuxbot/cogs/Utils/utils.py:38 +msgid "Information about TuxBot" +msgstr "" + +#: tuxbot/cogs/Utils/utils.py:44 +msgid "__:busts_in_silhouette: Development__" +msgstr "" + +#: tuxbot/cogs/Utils/utils.py:61 +msgid "" +"**{}** physical memory\n" +"**{}** virtual memory" +msgstr "" + +#: tuxbot/cogs/Utils/utils.py:72 +msgid "__Servers count__" +msgstr "" + +#: tuxbot/cogs/Utils/utils.py:77 +msgid "__Channels count__" +msgstr "" + +#: tuxbot/cogs/Utils/utils.py:82 +msgid "__Members count__" +msgstr "" + +#: tuxbot/cogs/Utils/utils.py:88 +msgid "__:file_folder: Files__" +msgstr "" + +#: tuxbot/cogs/Utils/utils.py:95 +msgid "__¶ Lines__" +msgstr "" + +#: tuxbot/cogs/Utils/utils.py:105 +msgid "__Latest changes__" +msgstr "" + +#: tuxbot/cogs/Utils/utils.py:111 +msgid "__:link: Links__" +msgstr "" + +#: tuxbot/cogs/Utils/utils.py:116 +msgid "| [Invite]" +msgstr "" + +#: tuxbot/cogs/Utils/utils.py:131 +msgid "Contributors" +msgstr "" + +#: tuxbot/cogs/Utils/utils.py:187 +msgid "Invite" +msgstr "" + +#: tuxbot/cogs/Utils/utils.py:191 +msgid "Minimal" +msgstr "" + +#: tuxbot/cogs/Utils/utils.py:193 +msgid "The minimum permissions include the strict requirements for the proper functioning of all basics commands.\n" +msgstr "" + +#: tuxbot/cogs/Utils/utils.py:198 tuxbot/cogs/Utils/utils.py:210 +msgid "[Add!]" +msgstr "" + +#: tuxbot/cogs/Utils/utils.py:203 +msgid "Admin" +msgstr "" + +#: tuxbot/cogs/Utils/utils.py:205 +msgid "All minimal permissions + extra permissions for admin commands such as kick and ban\n" +msgstr "" + +#: tuxbot/cogs/Utils/utils.py:233 +msgid "Unable to find `{}`" +msgstr "" + +#: tuxbot/cogs/Utils/utils.py:241 +msgid "Unable to fetch lines for `{}`" +msgstr "" diff --git a/tuxbot/cogs/Utils/utils.py b/tuxbot/cogs/Utils/utils.py index b157367..a731dcf 100644 --- a/tuxbot/cogs/Utils/utils.py +++ b/tuxbot/cogs/Utils/utils.py @@ -40,8 +40,11 @@ class Utils(commands.Cog, name="Utils"): ) e.add_field( - name=f"__:busts_in_silhouette: " - f"{_('Development', ctx, self.bot.config)}__", + name=_( + "__:busts_in_silhouette: Development__", + ctx, + self.bot.config, + ), value="**Romain#5117:** [git](https://git.gnous.eu/Romain)\n" "**Outout#4039:** [git](https://git.gnous.eu/mael)\n", inline=True, @@ -54,39 +57,42 @@ class Utils(commands.Cog, name="Utils"): ) e.add_field( name="__:gear: Usage__", - value=f"**{humanize.naturalsize(mem.rss)}** " - f"{_('physical memory', ctx, self.bot.config)}\n" - f"**{humanize.naturalsize(mem.vms)}** " - f"{_('virtual memory', ctx, self.bot.config)}\n", + value=_( + "**{}** physical memory\n**{}** virtual memory", + ctx, + self.bot.config, + ).format( + humanize.naturalsize(mem.rss), + humanize.naturalsize(mem.vms), + ), inline=True, ) e.add_field( - name=f"__{_('Servers count', ctx, self.bot.config)}__", + name=_("__Servers count__", ctx, self.bot.config), value=str(len(self.bot.guilds)), inline=True, ) e.add_field( - name=f"__{_('Channels count', ctx, self.bot.config)}__", + name=_("__Channels count__", ctx, self.bot.config), value=str(len(list(self.bot.get_all_channels()))), inline=True, ) e.add_field( - name=f"__{_('Members count', ctx, self.bot.config)}__", + name=_("__Members count__", ctx, self.bot.config), value=str(len(list(self.bot.get_all_members()))), inline=True, ) e.add_field( - name=f"__:file_folder: " - f"{_('Files', ctx, self.bot.config)}__", + name=_("__:file_folder: Files__", ctx, self.bot.config), value=f"{infos.get('file_amount')} " f"*({infos.get('python_file_amount')}" f" <:python:596577462335307777>)*", inline=True, ) e.add_field( - name=f"__¶ {_('Lines', ctx, self.bot.config)}__", + name=_("__¶ Lines__", ctx, self.bot.config), value=f"{infos.get('total_lines')} " f"*({infos.get('total_python_class')} class," f" {infos.get('total_python_functions')} functions," @@ -96,20 +102,20 @@ class Utils(commands.Cog, name="Utils"): ) e.add_field( - name=f"__{_('Latest changes', ctx, self.bot.config)}__", + name=_("__Latest changes__", ctx, self.bot.config), value=version_info.info, inline=False, ) e.add_field( - name=f"__:link: {_('Links', ctx, self.bot.config)}__", + name=_("__:link: Links__", ctx, self.bot.config), value="[tuxbot.gnous.eu](https://tuxbot.gnous.eu/) " "| [gnous.eu](https://gnous.eu/) " "| [git](https://git.gnous.eu/gnouseu/tuxbot-bot) " "| [status](https://status.gnous.eu/check/154250) " - f"| [{_('Invite', ctx, self.bot.config)}]" - f"(https://discordapp.com/oauth2/authorize?client_id=" - f"301062143942590465&scope=bot&permissions=268749888)", + + _("| [Invite]", ctx, self.bot.config) + + "(https://discordapp.com/oauth2/authorize?client_id=" + "301062143942590465&scope=bot&permissions=268749888)", inline=False, ) @@ -189,8 +195,8 @@ class Utils(commands.Cog, name="Utils"): ctx, self.bot.config, ) - + f"[{_('Add!', ctx, self.bot.config, )}]" - f"({discord.utils.oauth_url(self.bot.user.id, basic_perms)})", + + _("[Add!]", ctx, self.bot.config) + + f"({discord.utils.oauth_url(self.bot.user.id, basic_perms)})", inline=False, ) e.add_field( @@ -201,8 +207,8 @@ class Utils(commands.Cog, name="Utils"): ctx, self.bot.config, ) - + f"[{_('Add!', ctx, self.bot.config, )}]" - f"({discord.utils.oauth_url(self.bot.user.id, admin_perms)})", + + _("[Add!]", ctx, self.bot.config) + + f"({discord.utils.oauth_url(self.bot.user.id, admin_perms)})", inline=False, ) @@ -211,7 +217,7 @@ class Utils(commands.Cog, name="Utils"): # ========================================================================= @command_extra(name="source") - async def _invite(self, ctx: ContextPlus, *, name=None): + async def _source(self, ctx: ContextPlus, *, name=None): base_url = "https://github.com/Rom1-J/tuxbot-bot" if not name: