feat(i18n:rule|Mod): feat rule command translations

This commit is contained in:
Romain J 2021-05-13 22:51:16 +02:00
parent ad443c9c48
commit 8f62c2c4a1
11 changed files with 204 additions and 39 deletions

View file

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Tuxbot-bot\n"
"Report-Msgid-Bugs-To: rick@gnous.eu\n"
"POT-Creation-Date: 2021-03-01 14:59+0100\n"
"POT-Creation-Date: 2021-05-13 22:20+0200\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"

View file

@ -8,12 +8,19 @@ msgid ""
msgstr ""
"Project-Id-Version: Tuxbot-bot\n"
"Report-Msgid-Bugs-To: rick@gnous.eu\n"
"POT-Creation-Date: 2021-03-01 14:59+0100\n"
"POT-Creation-Date: 2021-05-13 22:20+0200\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"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: tuxbot/cogs/Linux/functions/cnf.py:42
msgid "Something went wrong ..."
msgstr ""
#: tuxbot/cogs/Linux/linux.py:56
msgid "No result found"
msgstr ""

View file

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Tuxbot-bot\n"
"Report-Msgid-Bugs-To: rick@gnous.eu\n"
"POT-Creation-Date: 2021-03-01 14:59+0100\n"
"POT-Creation-Date: 2021-05-13 22:20+0200\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"
@ -21,10 +21,10 @@ msgstr ""
msgid "```An error occurred, the bot owner has been advertised...```"
msgstr ""
#: tuxbot/cogs/Logs/logs.py:333
#: tuxbot/cogs/Logs/logs.py:334
msgid "Sockets stats"
msgstr ""
#: tuxbot/cogs/Logs/logs.py:335
#: tuxbot/cogs/Logs/logs.py:336
msgid "{} socket events observed ({:.2f}/minute):"
msgstr ""

View file

@ -15,7 +15,7 @@ async def get_server_rules(guild_id: int) -> list[Rule]:
def get_most_recent_server_rules(rules: list[Rule]) -> Rule:
return sorted(rules, key=lambda r: r.updated_at)[0]
return sorted(rules, key=lambda r: r.updated_at, reverse=True)[0]
def paginate_server_rules(rules: list[Rule]) -> list[str]:

View file

@ -17,11 +17,55 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: tuxbot/cogs/Admin/admin.py:50
#: tuxbot/cogs/Mod/mod.py:67
#, python-brace-format
msgid "Locale changed to {lang} successfully"
msgstr ""
#: tuxbot/cogs/Admin/admin.py:61
#: tuxbot/cogs/Mod/mod.py:78
msgid "List of available locales: "
msgstr ""
#: tuxbot/cogs/Mod/mod.py:103
msgid ""
"{}please read the following rule: \n"
"{}"
msgstr ""
#: tuxbot/cogs/Mod/mod.py:120
msgid "Rules for {}"
msgstr ""
#: tuxbot/cogs/Mod/mod.py:126
msgid "Latest change: {}"
msgstr ""
#: tuxbot/cogs/Mod/mod.py:140
msgid "Rules for {} ({}/{})"
msgstr ""
#: tuxbot/cogs/Mod/mod.py:159
msgid ""
"Following rule added: \n"
"{}"
msgstr ""
#: tuxbot/cogs/Mod/mod.py:182
msgid ""
"Following rule updated: \n"
"{}"
msgstr ""
#: tuxbot/cogs/Mod/mod.py:200
msgid ""
"Following rule deleted: \n"
"{}"
msgstr ""
#: tuxbot/cogs/Mod/functions/converters.py:22
msgid "Unknown rule"
msgstr ""
#: tuxbot/cogs/Mod/functions/converters.py:31
msgid "Rule length must be 300 characters or lower."
msgstr ""

View file

@ -18,11 +18,64 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#: tuxbot/cogs/Admin/admin.py:50
#, fuzzy, python-brace-format
#: tuxbot/cogs/Mod/mod.py:67
#, python-brace-format
msgid "Locale changed to {lang} successfully"
msgstr "Langue changée pour {lang} avec succès"
#: tuxbot/cogs/Admin/admin.py:61
#: tuxbot/cogs/Mod/mod.py:78
msgid "List of available locales: "
msgstr "Liste des langues disponibles : "
#: tuxbot/cogs/Mod/mod.py:103
msgid ""
"{}please read the following rule: \n"
"{}"
msgstr ""
"{}merci de lire la règle suivante : \n"
"{}"
#: tuxbot/cogs/Mod/mod.py:120
msgid "Rules for {}"
msgstr "Règles pour {}"
#: tuxbot/cogs/Mod/mod.py:126
msgid "Latest change: {}"
msgstr "Dernières modifications : {}"
#: tuxbot/cogs/Mod/mod.py:140
msgid "Rules for {} ({}/{})"
msgstr "Règles pour {} ({}/{})"
#: tuxbot/cogs/Mod/mod.py:159
msgid ""
"Following rule added: \n"
"{}"
msgstr ""
"La règles suivante a été ajoutée: \n"
"{}"
#: tuxbot/cogs/Mod/mod.py:182
msgid ""
"Following rule updated: \n"
"{}"
msgstr ""
"La règles suivante a été modifiée: \n"
"{}"
#: tuxbot/cogs/Mod/mod.py:200
msgid ""
"Following rule deleted: \n"
"{}"
msgstr ""
"La règles suivante a été supprimée: \n"
"{}"
#: tuxbot/cogs/Mod/functions/converters.py:22
msgid "Unknown rule"
msgstr "Règle inconnue"
#: tuxbot/cogs/Mod/functions/converters.py:31
msgid "Rule length must be 300 characters or lower."
msgstr "La règles doit faire 300 characters ou moins"

View file

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Tuxbot-bot\n"
"Report-Msgid-Bugs-To: rick@gnous.eu\n"
"POT-Creation-Date: 2021-03-01 14:59+0100\n"
"POT-Creation-Date: 2021-05-13 22:20+0200\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"
@ -17,11 +17,55 @@ msgstr ""
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: tuxbot/cogs/Admin/admin.py:50
#: tuxbot/cogs/Mod/mod.py:67
#, python-brace-format
msgid "Locale changed to {lang} successfully"
msgstr ""
#: tuxbot/cogs/Admin/admin.py:61
#: tuxbot/cogs/Mod/mod.py:78
msgid "List of available locales: "
msgstr ""
#: tuxbot/cogs/Mod/mod.py:103
msgid ""
"{}please read the following rule: \n"
"{}"
msgstr ""
#: tuxbot/cogs/Mod/mod.py:120
msgid "Rules for {}"
msgstr ""
#: tuxbot/cogs/Mod/mod.py:126
msgid "Latest change: {}"
msgstr ""
#: tuxbot/cogs/Mod/mod.py:140
msgid "Rules for {} ({}/{})"
msgstr ""
#: tuxbot/cogs/Mod/mod.py:159
msgid ""
"Following rule added: \n"
"{}"
msgstr ""
#: tuxbot/cogs/Mod/mod.py:182
msgid ""
"Following rule updated: \n"
"{}"
msgstr ""
#: tuxbot/cogs/Mod/mod.py:200
msgid ""
"Following rule deleted: \n"
"{}"
msgstr ""
#: tuxbot/cogs/Mod/functions/converters.py:22
msgid "Unknown rule"
msgstr ""
#: tuxbot/cogs/Mod/functions/converters.py:31
msgid "Rule length must be 300 characters or lower."
msgstr ""

View file

@ -124,7 +124,7 @@ class Mod(commands.Cog):
)
embed.set_footer(
text=_("Latest change: {}", ctx, self.bot.config).format(
get_most_recent_server_rules(rules).created_at
get_most_recent_server_rules(rules).updated_at.ctime()
)
)

View file

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Tuxbot-bot\n"
"Report-Msgid-Bugs-To: rick@gnous.eu\n"
"POT-Creation-Date: 2021-03-01 14:59+0100\n"
"POT-Creation-Date: 2021-05-13 22:20+0200\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"
@ -17,57 +17,74 @@ msgstr ""
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: tuxbot/cogs/Network/functions/utils.py:39
msgid "Impossible to collect information on this in the given version"
#: tuxbot/cogs/Network/functions/utils.py:54
msgid "Unable to collect information on this in the given version"
msgstr ""
#: tuxbot/cogs/Network/functions/utils.py:62
#: tuxbot/cogs/Network/functions/utils.py:103
#, python-brace-format
msgid "IP address {ip_address} is already defined as Private-Use Networks via RFC 1918."
msgstr ""
#: tuxbot/cogs/Network/functions/utils.py:135
msgid "Invalid ip or domain"
msgstr ""
#: tuxbot/cogs/Network/functions/utils.py:142
#: tuxbot/cogs/Network/functions/utils.py:265
msgid "Invalid ip version"
msgstr ""
#: tuxbot/cogs/Network/functions/utils.py:164
#: tuxbot/cogs/Network/functions/utils.py:287
msgid "Supported queries : A, AAAA, CNAME, NS, DS, DNSKEY, SOA, TXT, PTR, MX"
msgstr ""
#: tuxbot/cogs/Network/network.py:94
msgid "*Retrieving information...*"
#: tuxbot/cogs/Network/functions/utils.py:296
msgid "Invalid ASN provided"
msgstr ""
#: tuxbot/cogs/Network/network.py:112
#: tuxbot/cogs/Network/network.py:137
#, python-brace-format
msgid "Information for ``{ip} ({ip_address})``"
msgstr ""
#: tuxbot/cogs/Network/network.py:118
#: tuxbot/cogs/Network/network.py:143
msgid "Belongs to:"
msgstr ""
#: tuxbot/cogs/Network/network.py:128
#: tuxbot/cogs/Network/network.py:153
msgid "Region:"
msgstr ""
#: tuxbot/cogs/Network/network.py:136
#: tuxbot/cogs/Network/network.py:161
#, python-brace-format
msgid "Hostname: {hostname}"
msgstr ""
#: tuxbot/cogs/Network/network.py:180
#: tuxbot/cogs/Network/network.py:205
msgid "Unable to collect information through CloudFlare"
msgstr ""
#: tuxbot/cogs/Network/network.py:250
msgid "[show all]({})"
msgstr ""
#: tuxbot/cogs/Network/network.py:190
#: tuxbot/cogs/Network/network.py:264 tuxbot/cogs/Network/network.py:337
msgid "Cannot connect to host {}"
msgstr ""
#: tuxbot/cogs/Network/network.py:218
#: tuxbot/cogs/Network/network.py:289
msgid "No result..."
msgstr ""
#: tuxbot/cogs/Network/network.py:321
msgid "Up!"
msgstr ""
#: tuxbot/cogs/Network/network.py:324
msgid "Down..."
msgstr ""
#: tuxbot/cogs/Network/network.py:353
msgid "Please retry in few minutes"
msgstr ""
#: tuxbot/cogs/Network/network.py:367
#, python-brace-format
msgid "AS{asn} could not be found in PeeringDB's database."
msgstr ""

View file

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Tuxbot-bot\n"
"Report-Msgid-Bugs-To: rick@gnous.eu\n"
"POT-Creation-Date: 2021-03-01 14:59+0100\n"
"POT-Creation-Date: 2021-05-13 22:20+0200\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"

View file

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Tuxbot-bot\n"
"Report-Msgid-Bugs-To: rick@gnous.eu\n"
"POT-Creation-Date: 2021-03-01 14:59+0100\n"
"POT-Creation-Date: 2021-05-13 22:20+0200\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"
@ -108,10 +108,10 @@ msgstr ""
msgid "All minimal permissions + extra permissions for admin commands such as kick and ban\n"
msgstr ""
#: tuxbot/cogs/Utils/utils.py:246
#: tuxbot/cogs/Utils/utils.py:247
msgid "Unable to find `{}`"
msgstr ""
#: tuxbot/cogs/Utils/utils.py:254
#: tuxbot/cogs/Utils/utils.py:255
msgid "Unable to fetch lines for `{}`"
msgstr ""