Piki is a minimal wiki
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

messages.py 1.2KB

12345678910111213141516171819202122232425262728293031
  1. from django.contrib import messages
  2. from django.utils.translation import gettext as _
  3. import pages
  4. def permission_denied_msg_page(request, rel_path):
  5. # TODO: Add translation for this message
  6. messages.error(request, _("Permission denied: You don't have sufficient acces to the Page '%s'. Please contact the adminstrator.") % rel_path)
  7. def unavailable_msg_page(request, rel_path):
  8. # TODO: Add translation for this message
  9. messages.info(request, _("Unavailable: The Page '%s' is not available. Create it or follow a valid link, please.") % rel_path)
  10. def edit_success(request):
  11. # TODO: Add translation for this message
  12. messages.success(request, _('Thanks for editing, page stored.'))
  13. def edit_no_change(request):
  14. # TODO: Add translation for this message
  15. messages.info(request, _("Nothing changed, no storage needed."))
  16. def history_version_display(request, rel_path, history_version):
  17. # TODO: Add translation for this message
  18. messages.warning(request, _("You see an old version of the page (Version = %d). Click <a href='%s'>here</a> to recover this Version.") % (
  19. history_version,
  20. pages.url_edit(request, rel_path, history=history_version)
  21. ))