Piki is a minimal wiki
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

messages.py 2.0KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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 deleted_page(request):
  8. # TODO: Add translation for this message
  9. messages.info(request, _("Page was deleted. Recover not yet implemented. Use the 'Administration' area for recovery. Rebuild the search index afterwards."))
  10. def unavailable_msg_page(request, rel_path):
  11. # TODO: Add translation for this message
  12. messages.info(request, _("Unavailable: The Page '%s' is not available. Create it or follow a valid link, please.") % rel_path)
  13. def edit_success(request):
  14. # TODO: Add translation for this message
  15. messages.success(request, _('Thanks for editing, page stored.'))
  16. def no_change(request):
  17. # TODO: Add translation for this message
  18. messages.info(request, _("Nothing changed, no storage needed."))
  19. def operation_canceled(request):
  20. # TODO: Add translation for this message
  21. messages.info(request, _('Operation caneled, no change to the content.'))
  22. def page_deleted(request, title):
  23. # TODO: Add translation for this message
  24. messages.info(request, _('The page "%s" has been deleted.') % title)
  25. def page_renamed(request):
  26. # TODO: Add translation for this message
  27. messages.info(request, _('The page has been renamed.'))
  28. def internal_error(request):
  29. # TODO: Add translation for this message
  30. messages.error(request, _('internal ERROR: Action not performed..'))
  31. def history_version_display(request, rel_path, history_version):
  32. # TODO: Add translation for this message
  33. messages.warning(request, _("You see an old version of the page (Version = %d). Click <a href='%s'>here</a> to recover this Version.") % (
  34. history_version,
  35. pages.url_edit(rel_path, history=history_version)
  36. ))