Verified Commit 46db8b39 authored by Sli's avatar Sli

rootplace: make code clearer and fix typos

parent f9d4f41b
Pipeline #1700 passed with stage
in 11 minutes and 30 seconds
......@@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-03-18 20:48+0100\n"
"POT-Creation-Date: 2019-03-19 17:16+0100\n"
"PO-Revision-Date: 2016-07-18\n"
"Last-Translator: Skia <skia@libskia.so>\n"
"Language-Team: AE info <ae.info@utbm.fr>\n"
......@@ -4618,9 +4618,11 @@ msgstr "Supprimer les messages"
#: rootplace/templates/rootplace/delete_user_messages.jinja:14
msgid ""
"If you have trouble using this utility (timeout error, 500 error), try using "
"the command line utility"
msgstr "Si vous avez des soucis en utilisant cet utilitaire (connection expirée, erreur 500), "
"essayez en utilisant l'utilitaire en ligne de commande"
"the command line utility. Use ./manage.py delete_all_forum_user_messages ID."
msgstr ""
"Si vous avez des soucis en utilisant cet utilitaire (connexion expirée, "
"erreur 500), essayez en utilisant l'utilitaire en ligne de commande. "
"Utilisez ./manage.py delete_user_messages ID."
#: rootplace/templates/rootplace/merge.jinja:8
msgid "Merge two users"
......
......@@ -31,8 +31,7 @@ from rootplace.views import delete_all_forum_user_messages
class Command(BaseCommand):
"""
Delete all forum messages from an user
Messages are soft deleted and are still visible from admins
Delete all forum messages from a user
"""
help = "Delete all user's forum message"
......@@ -46,15 +45,15 @@ class Command(BaseCommand):
if user is None:
print("User with ID %s not found" % (options["user_id"],))
return
exit(1)
confirm = input(
"User selected %s\nDo you really want to delete all user's messages ? [y/N] "
"User selected: %s\nDo you really want to delete all message from this user ? [y/N] "
% (user,)
)
if confirm != "y" and confirm != "Y":
if not confirm.lower().startswith("y"):
print("Operation aborted")
return
exit(1)
delete_all_forum_user_messages(user, User.objects.get(id=0), True)
......@@ -11,5 +11,5 @@
{{ form.as_p() }}
<p><input type="submit" value="{% trans %}Delete messages{% endtrans %}" /></p>
</form>
<p><strong>{% trans %}If you have trouble using this utility (timeout error, 500 error), try using the command line utility{% endtrans %}</strong></p>
<p><strong>{% trans %}If you have trouble using this utility (timeout error, 500 error), try using the command line utility. Use ./manage.py delete_all_forum_user_messages ID.{% endtrans %}</strong></p>
{% endblock %}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment