2024-10-05 16:22:40 +02:00
from django . contrib import messages
from django . utils . translation import gettext as _
2024-10-11 21:28:04 +02:00
import pages
2024-10-05 16:22:40 +02:00
def permission_denied_msg_page ( request , rel_path ) :
# TODO: Add translation for this message
messages . error ( request , _ ( " Permission denied: You don ' t have sufficient acces to the Page ' %s ' . Please contact the adminstrator. " ) % rel_path )
2024-10-21 07:20:37 +02:00
def deleted_page ( request ) :
# TODO: Add translation for this message
messages . info ( request , _ ( " Page was deleted. Recover not yet implemented. Use the ' Administration ' area for recovery. Rebuild the search index afterwards. " ) )
2024-10-05 16:22:40 +02:00
def unavailable_msg_page ( request , rel_path ) :
# TODO: Add translation for this message
messages . info ( request , _ ( " Unavailable: The Page ' %s ' is not available. Create it or follow a valid link, please. " ) % rel_path )
2024-10-09 16:25:24 +02:00
def edit_success ( request ) :
# TODO: Add translation for this message
messages . success ( request , _ ( ' Thanks for editing, page stored. ' ) )
2024-10-18 20:47:33 +02:00
def no_change ( request ) :
2024-10-09 16:25:24 +02:00
# TODO: Add translation for this message
messages . info ( request , _ ( " Nothing changed, no storage needed. " ) )
2024-10-11 21:28:04 +02:00
2024-10-18 20:47:33 +02:00
def operation_canceled ( request ) :
# TODO: Add translation for this message
messages . info ( request , _ ( ' Operation caneled, no change to the content. ' ) )
def page_deleted ( request , title ) :
# TODO: Add translation for this message
messages . info ( request , _ ( ' The page " %s " has been deleted. ' ) % title )
def page_renamed ( request ) :
# TODO: Add translation for this message
messages . info ( request , _ ( ' The page has been renamed. ' ) )
2024-10-21 07:20:37 +02:00
def internal_error ( request ) :
# TODO: Add translation for this message
messages . error ( request , _ ( ' internal ERROR: Action not performed.. ' ) )
2024-10-11 21:28:04 +02:00
def history_version_display ( request , rel_path , history_version ) :
# TODO: Add translation for this message
messages . warning ( request , _ ( " You see an old version of the page (Version = %d ). Click <a href= ' %s ' >here</a> to recover this Version. " ) % (
history_version ,
2024-10-18 21:01:27 +02:00
pages . url_edit ( rel_path , history = history_version )
2024-10-11 21:28:04 +02:00
) )