-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use HTML instead of Markdown in the default messages
Before this commit, Markdown was used in all the default messages. This was fine for most of them, but it causes problems in the `/help` command if someone puts any markdown special characters in the docstring of any commands. This commit switches all the default messages to forced HTML, because it supports escaping unwanted entities. Fixes: GH-51
- Loading branch information
Pietro Albini
committed
Mar 30, 2016
1 parent
d45177e
commit 88f5e39
Showing
6 changed files
with
87 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,14 +7,14 @@ msgid "" | |
msgstr "" | ||
"Project-Id-Version: botogram 1.0.dev0\n" | ||
"Report-Msgid-Bugs-To: https://github.com/pietroalbini/botogram/issues\n" | ||
"POT-Creation-Date: 2016-03-22 22:09+0100\n" | ||
"POT-Creation-Date: 2016-03-30 22:31+0200\n" | ||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | ||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | ||
"Language-Team: LANGUAGE <[email protected]>\n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=utf-8\n" | ||
"Content-Transfer-Encoding: 8bit\n" | ||
"Generated-By: Babel 2.2.0\n" | ||
"Generated-By: Babel 2.1.1\n" | ||
|
||
#: botogram/defaults.py:32 | ||
msgid "Use /help to get a list of all the commands." | ||
|
@@ -29,40 +29,42 @@ msgid "This shows a greeting message." | |
msgstr "" | ||
|
||
#: botogram/defaults.py:48 | ||
msgid "*Error!* The `/help` command allows up to one argument." | ||
msgid "<b>Error!</b> The <code>/help</code> command allows up to one argument." | ||
msgstr "" | ||
|
||
#: botogram/defaults.py:54 botogram/defaults.py:151 | ||
#: botogram/defaults.py:54 botogram/defaults.py:153 | ||
#, python-format | ||
msgid "*Unknown command:* `/%(name)s`" | ||
msgid "<b>Unknown command:</b> <code>/%(name)s</code>" | ||
msgstr "" | ||
|
||
#: botogram/defaults.py:56 botogram/defaults.py:152 | ||
#: botogram/defaults.py:57 botogram/defaults.py:155 | ||
msgid "Use /help to get a list of the commands." | ||
msgstr "" | ||
|
||
#: botogram/defaults.py:77 | ||
msgid "*This bot supports those commands:*" | ||
#: botogram/defaults.py:78 | ||
msgid "<b>This bot supports those commands:</b>" | ||
msgstr "" | ||
|
||
#: botogram/defaults.py:88 botogram/defaults.py:128 | ||
msgid "You can also use `/help <command>` to get help about a specific command." | ||
#: botogram/defaults.py:89 botogram/defaults.py:130 | ||
msgid "" | ||
"You can also use <code>/help <command></code> to get help about a " | ||
"specific command." | ||
msgstr "" | ||
|
||
#: botogram/defaults.py:91 | ||
msgid "_This bot has no commands._" | ||
#: botogram/defaults.py:93 | ||
msgid "<i>This bot has no commands.</i>" | ||
msgstr "" | ||
|
||
#: botogram/defaults.py:100 botogram/defaults.py:117 | ||
#: botogram/defaults.py:102 botogram/defaults.py:119 | ||
#, python-format | ||
msgid "Please contact %(owner)s if you have problems with this bot." | ||
msgstr "" | ||
|
||
#: botogram/defaults.py:127 | ||
#: botogram/defaults.py:129 | ||
msgid "Show this help message." | ||
msgstr "" | ||
|
||
#: botogram/utils.py:138 | ||
#: botogram/utils.py:144 | ||
msgid "No description available." | ||
msgstr "" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ msgid "" | |
msgstr "" | ||
"Project-Id-Version: botogram 1.0.dev0\n" | ||
"Report-Msgid-Bugs-To: https://github.com/pietroalbini/botogram/issues\n" | ||
"POT-Creation-Date: 2016-03-22 22:09+0100\n" | ||
"POT-Creation-Date: 2016-03-30 22:31+0200\n" | ||
"PO-Revision-Date: 2015-08-01 17:20+0200\n" | ||
"Last-Translator: Pietro Albini <[email protected]>\n" | ||
"Language: en\n" | ||
|
@@ -16,7 +16,7 @@ msgstr "" | |
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=utf-8\n" | ||
"Content-Transfer-Encoding: 8bit\n" | ||
"Generated-By: Babel 2.2.0\n" | ||
"Generated-By: Babel 2.1.1\n" | ||
|
||
#: botogram/defaults.py:32 | ||
msgid "Use /help to get a list of all the commands." | ||
|
@@ -31,40 +31,41 @@ msgid "This shows a greeting message." | |
msgstr "" | ||
|
||
#: botogram/defaults.py:48 | ||
msgid "*Error!* The `/help` command allows up to one argument." | ||
msgid "<b>Error!</b> The <code>/help</code> command allows up to one argument." | ||
msgstr "" | ||
|
||
#: botogram/defaults.py:54 botogram/defaults.py:151 | ||
#: botogram/defaults.py:54 botogram/defaults.py:153 | ||
#, python-format | ||
msgid "*Unknown command:* `/%(name)s`" | ||
msgid "<b>Unknown command:</b> <code>/%(name)s</code>" | ||
msgstr "" | ||
|
||
#: botogram/defaults.py:56 botogram/defaults.py:152 | ||
#: botogram/defaults.py:57 botogram/defaults.py:155 | ||
msgid "Use /help to get a list of the commands." | ||
msgstr "" | ||
|
||
#: botogram/defaults.py:77 | ||
msgid "*This bot supports those commands:*" | ||
#: botogram/defaults.py:78 | ||
msgid "<b>This bot supports those commands:</b>" | ||
msgstr "" | ||
|
||
#: botogram/defaults.py:88 botogram/defaults.py:128 | ||
msgid "You can also use `/help <command>` to get help about a specific command." | ||
#: botogram/defaults.py:89 botogram/defaults.py:130 | ||
msgid "" | ||
"You can also use <code>/help <command></code> to get help about a " | ||
"specific command." | ||
msgstr "" | ||
|
||
#: botogram/defaults.py:91 | ||
msgid "_This bot has no commands._" | ||
#: botogram/defaults.py:93 | ||
msgid "<i>This bot has no commands.</i>" | ||
msgstr "" | ||
|
||
#: botogram/defaults.py:100 botogram/defaults.py:117 | ||
#: botogram/defaults.py:102 botogram/defaults.py:119 | ||
#, python-format | ||
msgid "Please contact %(owner)s if you have problems with this bot." | ||
msgstr "" | ||
|
||
#: botogram/defaults.py:127 | ||
#: botogram/defaults.py:129 | ||
msgid "Show this help message." | ||
msgstr "" | ||
|
||
#: botogram/utils.py:138 | ||
#: botogram/utils.py:144 | ||
msgid "No description available." | ||
msgstr "" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ msgid "" | |
msgstr "" | ||
"Project-Id-Version: botogram 1.0.dev0\n" | ||
"Report-Msgid-Bugs-To: https://github.com/pietroalbini/botogram/issues\n" | ||
"POT-Creation-Date: 2016-03-22 22:09+0100\n" | ||
"POT-Creation-Date: 2016-03-30 22:31+0200\n" | ||
"PO-Revision-Date: 2015-08-01 17:06+0200\n" | ||
"Last-Translator: Pietro Albini <[email protected]>\n" | ||
"Language: it\n" | ||
|
@@ -16,7 +16,7 @@ msgstr "" | |
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=utf-8\n" | ||
"Content-Transfer-Encoding: 8bit\n" | ||
"Generated-By: Babel 2.2.0\n" | ||
"Generated-By: Babel 2.1.1\n" | ||
|
||
#: botogram/defaults.py:32 | ||
msgid "Use /help to get a list of all the commands." | ||
|
@@ -31,40 +31,42 @@ msgid "This shows a greeting message." | |
msgstr "Questo comando visualizza un messaggio di benvenuto." | ||
|
||
#: botogram/defaults.py:48 | ||
msgid "*Error!* The `/help` command allows up to one argument." | ||
msgstr "*Errore!* Il comando `/help` non accetta più di un argomento." | ||
msgid "<b>Error!</b> The <code>/help</code> command allows up to one argument." | ||
msgstr "<b>Errore!</b> Il comando <code>/help</code> non accetta più di un argomento." | ||
|
||
#: botogram/defaults.py:54 botogram/defaults.py:151 | ||
#: botogram/defaults.py:54 botogram/defaults.py:153 | ||
#, python-format | ||
msgid "*Unknown command:* `/%(name)s`" | ||
msgstr "*Comando sconosciuto:* `/%(name)s`" | ||
msgid "<b>Unknown command:</b> <code>/%(name)s</code>" | ||
msgstr "<b>Comando sconosciuto:</b> <code>/%(name)s</code>" | ||
|
||
#: botogram/defaults.py:56 botogram/defaults.py:152 | ||
#: botogram/defaults.py:57 botogram/defaults.py:155 | ||
msgid "Use /help to get a list of the commands." | ||
msgstr "Utilizza /help per ottenere la lista dei comandi." | ||
|
||
#: botogram/defaults.py:77 | ||
msgid "*This bot supports those commands:*" | ||
msgstr "*Questo bot supporta i seguenti comandi:*" | ||
#: botogram/defaults.py:78 | ||
msgid "<b>This bot supports those commands:</b>" | ||
msgstr "<b>Questo bot supporta i seguenti comandi:</b>" | ||
|
||
#: botogram/defaults.py:88 botogram/defaults.py:128 | ||
msgid "You can also use `/help <command>` to get help about a specific command." | ||
msgstr "Puoi anche usare `/help <comando>` per ottenere aiuto su un comando." | ||
#: botogram/defaults.py:89 botogram/defaults.py:130 | ||
msgid "" | ||
"You can also use <code>/help <command></code> to get help about a " | ||
"specific command." | ||
msgstr "Puoi anche usare <code>/help <comando></code> per ottenere aiuto su un comando." | ||
|
||
#: botogram/defaults.py:91 | ||
msgid "_This bot has no commands._" | ||
msgstr "_Questo bot non ha comandi._" | ||
#: botogram/defaults.py:93 | ||
msgid "<i>This bot has no commands.</i>" | ||
msgstr "<i>Questo bot non ha comandi.</i>" | ||
|
||
#: botogram/defaults.py:100 botogram/defaults.py:117 | ||
#: botogram/defaults.py:102 botogram/defaults.py:119 | ||
#, python-format | ||
msgid "Please contact %(owner)s if you have problems with this bot." | ||
msgstr "Contatta %(owner)s se hai problemi con questo bot." | ||
|
||
#: botogram/defaults.py:127 | ||
#: botogram/defaults.py:129 | ||
msgid "Show this help message." | ||
msgstr "Visualizza questo messaggio di aiuto." | ||
|
||
#: botogram/utils.py:138 | ||
#: botogram/utils.py:144 | ||
msgid "No description available." | ||
msgstr "Nessuna descrizione disponibile." | ||
|