# HG changeset patch # User ymh # Date 1343055953 -7200 # Node ID d66abfc1cb87a7b46a4d26a636bfab0aedf447c7 # Parent 31dc2726ca51e322c2fec7c45e9c5c16e854f86c# Parent 48bf2c83d359e1ea4ceed002dfc1e55753417011 Merge with 48bf2c83d359e1ea4ceed002dfc1e55753417011 diff -r 31dc2726ca51 -r d66abfc1cb87 src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/content_project_pagination.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/content_project_pagination.html Mon Jul 23 17:05:53 2012 +0200 @@ -0,0 +1,42 @@ +{% load front_tags %} + +{% if nb_pages %} +

{% comment %} + alors ? : {{begin}} - {{middle}} - {{end}} - nb_pages = {{nb_pages}}
+ alors ? : nb_pages = {{nb_pages}} - range = {{nb_pages|get_range}} - cur_page_nb = {{cur_page_nb}}
{% endcomment %} + {% if 0 < cur_page_nb %}<< {% endif %} + {% for i in begin %} + {% if i == cur_page_nb %} + {{i|add:'1'}} + {% else %} + {{i|add:'1'}} + {% endif %} +   + {% endfor %} + {% if middle %} + ...  + {% for i in middle %} + {% if i == cur_page_nb %} + {{i|add:'1'}} + {% else %} + {{i|add:'1'}} + {% endif %} +   + {% endfor %} + {% endif %} + {% if end %} + ...  + {% for i in end %} + {% if i == cur_page_nb %} + {{i|add:'1'}} + {% else %} + {{i|add:'1'}} + {% endif %} +   + {% endfor %} + {% endif %} + {% if cur_page_nb|add:'1' < nb_pages %}>>{% endif %} +

+{% endif %} + + diff -r 31dc2726ca51 -r d66abfc1cb87 src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/contentslist.html --- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/contentslist.html Fri Jul 20 12:40:08 2012 +0200 +++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/contentslist.html Mon Jul 23 17:05:53 2012 +0200 @@ -3,19 +3,8 @@ {% load front_tags %} {% if nb_ct_pages %} -

- {% if 0 < current_content_page %}<<  {% endif %} - {% for i in nb_ct_pages|get_range %} - {% if i == current_content_page %} - {{i|add:'1'}} - {% else %} - {{i|add:'1'}} - {% endif %} -    - {% endfor %} - {% if current_content_page|add:'1' < nb_ct_pages %}>>{% endif %} - -

+ {% load navigation %}{% build_pagination nb_ct_pages current_content_page "contents_page clickable" %} + {% endif %}
{% trans "name" %} diff -r 31dc2726ca51 -r d66abfc1cb87 src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/projectslist.html --- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/projectslist.html Fri Jul 20 12:40:08 2012 +0200 +++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/projectslist.html Mon Jul 23 17:05:53 2012 +0200 @@ -3,17 +3,7 @@ {% load front_tags %} {% if nb_pj_pages %} -

- {% if 0 < current_project_page %}<<  {% endif %} - {% for i in nb_pj_pages|get_range %} - {% if i == current_project_page %} - {{i|add:'1'}} - {% else %} - {{i|add:'1'}} - {% endif %} -    - {% endfor %} - {% if current_project_page|add:'1' < nb_pj_pages %}>>{% endif %} + {% load navigation %}{% build_pagination nb_pj_pages current_project_page "projects_page clickable" %}

{% endif %} diff -r 31dc2726ca51 -r d66abfc1cb87 src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/publishedprojectslist.html --- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/publishedprojectslist.html Fri Jul 20 12:40:08 2012 +0200 +++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/publishedprojectslist.html Mon Jul 23 17:05:53 2012 +0200 @@ -3,19 +3,8 @@ {% load front_tags %} {% if nb_pj_pages %} -

- {% if 0 < current_project_page %}<<  {% endif %} - {% for i in nb_pj_pages|get_range %} - {% if i == current_project_page %} - {{i|add:'1'}} - {% else %} - {{i|add:'1'}} - {% endif %} -    - {% endfor %} - {% if current_project_page|add:'1' < nb_pj_pages %}>>{% endif %} + {% load navigation %}{% build_pagination nb_pj_pages current_project_page "projects_page clickable" %} -

{% endif %}
{% trans "name" %} diff -r 31dc2726ca51 -r d66abfc1cb87 src/ldt/ldt/locale/en/LC_MESSAGES/django.mo Binary file src/ldt/ldt/locale/en/LC_MESSAGES/django.mo has changed diff -r 31dc2726ca51 -r d66abfc1cb87 src/ldt/ldt/locale/en/LC_MESSAGES/django.po --- a/src/ldt/ldt/locale/en/LC_MESSAGES/django.po Fri Jul 20 12:40:08 2012 +0200 +++ b/src/ldt/ldt/locale/en/LC_MESSAGES/django.po Mon Jul 23 17:05:53 2012 +0200 @@ -896,3 +896,673 @@ msgid "confirm delete content" msgstr "Confirm delete content" +#: ldt_utils/views/content.py:321 +#, python-format +msgid "" +"Content '%(title)s' is referenced by this project : %(project_titles)s. " +"Please delete it beforehand." +msgid_plural "" +"Content '%(title)s' is referenced by %(count)d projects: %(project_titles)s. " +"Please delete them beforehand." +msgstr[0] "" +"Content '%(title)s' is referenced by this project : %(project_titles)s. " +"Please delete it beforehand." +msgstr[1] "" +"Content '%(title)s' is referenced by %(count)d projects: %(project_titles)s. " +"Please delete them beforehand." + +#: ldt_utils/views/json.py:34 ldt_utils/views/rdf.py:15 +#: ldt_utils/views/workspace.py:108 +msgid "You can not access this project" +msgstr "You can not access this project" + +#: ldt_utils/views/project.py:110 +#, python-format +msgid "the project %(title)s is published. please unpublish before deleting." +msgstr "the project %(title)s is published. please unpublish before deleting." + +#: ldt_utils/views/project.py:111 ldt_utils/views/project.py:115 +msgid "can not delete the project. Please correct the following error" +msgstr "can not delete the project. Please correct the following error" + +#: ldt_utils/views/project.py:112 ldt_utils/views/project.py:116 +msgid "title error deleting project" +msgstr "Error when deleting project" + +#: ldt_utils/views/project.py:114 +#, python-format +msgid "" +"the project %(title)s is the front project of %(content)s. please delete " +"this content first." +msgstr "" +"the project %(title)s is the front project of %(content)s. please delete " +"this content first." + +#: ldt_utils/views/project.py:118 +#, python-format +msgid "please confirm deleting project %(title)s" +msgstr "please confirm deleting project %(title)s" + +#: ldt_utils/views/project.py:119 +msgid "confirm deletion" +msgstr "Confirm deletion" + +#: templates/admin/cms_change_form.html:30 +msgid "Approve page deletion" +msgstr "Approve page deletion" + +#: templates/admin/cms_change_form.html:36 +#, python-format +msgid "(requires approvement at %(moderation_level)s level)" +msgstr "(requires approvement at %(moderation_level)s level)" + +#: templates/admin/cms_change_form.html:37 +msgid "(you can perform actions on this page directly)" +msgstr "(you can perform actions on this page directly)" + +#: templates/admin/cms_change_form.html:50 +msgid "Remove delete request" +msgstr "Remove delete request" + +#: templates/admin/cms_change_form.html:52 +msgid "Approve delete" +msgstr "Approve delete" + +#: templates/admin/cms_change_form.html:52 +msgid "Approve" +msgstr "Approve" + +#: templates/admin/cms_change_form.html:52 +#: templates/admin/cms_change_form.html:53 +msgid "draft" +msgstr "draft" + +#: templates/admin/cms_change_form.html:53 +msgid "Preview" +msgstr "Preview" + +#: templates/admin/cms_change_form.html:56 +#: templates/admin/page_change_form.html:27 +msgid "History" +msgstr "History" + +#: templates/admin/cms_change_form.html:57 +#: templates/admin/page_change_form.html:28 +msgid "View on site" +msgstr "View on site" + +#: templates/admin/cms_change_form.html:87 +#: templates/admin/page_change_form.html:38 +#: templates/admin/page_change_list.html:54 +#: templates/cms/admin/cms/page/change_form.html:24 +msgid "Please correct the error below." +msgid_plural "Please correct the errors below." +msgstr[0] "Please correct the error below." +msgstr[1] "Please correct the errors below." + +#: templates/admin/cms_change_form.html:107 +msgid "All permissions" +msgstr "All permissions" + +#: templates/admin/cms_change_form.html:108 +#: templates/admin/cms_change_form.html:120 +msgid "Loading..." +msgstr "Loading..." + +#: templates/admin/cms_change_form.html:119 +msgid "Page states" +msgstr "Page states" + +#: templates/admin/cms_change_form.html:142 +#, python-format +msgid "" +"This page must be moderated at level %(moderation_level)s, post a message " +"for moderator." +msgstr "" +"This page must be moderated at level %(moderation_level)s, post a message " +"for moderator." + +#: templates/admin/cms_change_form.html:144 +msgid "Request approvemet" +msgstr "Request approvement" + +#: templates/admin/cms_change_form.html:234 +#: user/templates/registration/registration_form.html:16 +msgid "Save" +msgstr "Save" + +#: templates/admin/cms_change_form.html:235 +msgid "Save and continue editing" +msgstr "Save and continue editing" + +#: templates/admin/cms_change_list.html:51 +msgid "Successfully moved" +msgstr "Successfully moved" + +#: templates/admin/cms_change_list.html:76 +#, python-format +msgid "Recover deleted %(name)s" +msgstr "Recover deleted %(name)s" + +#: templates/admin/cms_change_list.html:79 +#: templates/admin/page_change_list.html:46 +#, python-format +msgid "Add %(name)s" +msgstr "Add %(name)s" + +#: templates/admin/cms_change_list.html:91 +msgid "Pages on:" +msgstr "Pages on:" + +#: templates/admin/cms_change_list.html:108 +msgid "on" +msgstr "on" + +#: templates/admin/cms_change_list.html:108 +msgid "off" +msgstr "off" + +#: templates/admin/cms_change_list.html:110 +#: templates/admin/page_change_list.html:65 +msgid "Filter" +msgstr "Filter" + +#: templates/admin/index.html:18 templates/admin/page_index.html:18 +#, python-format +msgid "Models available in the %(name)s application." +msgstr "Models available in the %(name)s application." + +#: templates/admin/index.html:19 templates/admin/page_app_index.html:10 +#: templates/admin/page_index.html:19 +#, python-format +msgid "%(name)s" +msgstr "%(name)s" + +#: templates/admin/index.html:29 templates/admin/page_change_form.html:20 +#: templates/admin/page_index.html:29 +msgid "Add" +msgstr "Add" + +#: templates/admin/index.html:35 templates/admin/page_index.html:35 +msgid "Change" +msgstr "Change" + +#: templates/admin/index.html:64 templates/admin/page_index.html:45 +msgid "You don't have permission to edit anything." +msgstr "You don't have permission to edit anything." + +#: templates/admin/index.html:72 templates/admin/page_index.html:53 +msgid "Recent Actions" +msgstr "Recent Actions" + +#: templates/admin/index.html:73 templates/admin/page_index.html:54 +msgid "My Actions" +msgstr "My Actions" + +#: templates/admin/index.html:77 templates/admin/page_index.html:58 +msgid "None available" +msgstr "None available" + +#: templates/admin/index.html:91 templates/admin/page_index.html:72 +msgid "Unknown content" +msgstr "Unknown content" + +#: templates/admin/page_base.html:20 templates/admin/page_index.html:11 +msgid "Pages" +msgstr "Pages" + +#: templates/admin/page_base_site.html:7 +msgid "Django administration" +msgstr "Django administration" + +#: templates/admin/page_login.html:8 +msgid "Connexion" +msgstr "Connexion" + +#: templates/admin/page_login.html:20 +msgid "Username:" +msgstr "Username:" + +#: templates/admin/page_login.html:24 +msgid "Password:" +msgstr "Password:" + +#: templates/admin/page_login.html:29 +#: user/templates/registration/login.html:39 +msgid "Create an account" +msgstr "Create an account" + +#: templates/admin/page_login.html:30 +#: user/templates/registration/login.html:40 +msgid "Forget password?" +msgstr "Forget password?" + +#: templates/cms/admin/cms/page/change_form.html:11 +msgid "Documentation" +msgstr "Documentation" + +#: templates/cms/admin/cms/page/change_form.html:11 +msgid "Change password" +msgstr "Change password" + +#: templates/cms/admin/cms/page/change_form.html:42 +msgid "Ordering" +msgstr "Ordering" + +#: templates/cms/admin/cms/page/change_form.html:45 +msgid "Order:" +msgstr "Order:" + +#: templates/ldt/ldt_base.html:86 +msgid "header_title" +msgstr "LDT Platform" + +#: templates/ldt/ldt_base.html:90 +msgid "Link to admin" +msgstr "admin" + +#: templates/ldt/ldt_base.html:90 +msgid "Staff" +msgstr "admin" + +#: templates/ldt/ldt_base.html:93 +msgid "front link" +msgstr "front" + +#: templates/ldt/ldt_base.html:94 +#: user/templates/ldt/user/change_profile.html:95 +msgid "Profile change" +msgstr "Profile change" + +#: templates/ldt/ldt_base.html:114 templates/ldt/ldt_base.html.py:115 +msgid "home" +msgstr "Home" + +#: templates/ldt/ldt_base.html:148 +msgid "Version number" +msgstr "Version" + +#: templates/ldt/ldt_base.html:148 +#, python-format +msgid " web %(WEB_VERSION)s | platform %(VERSION)s" +msgstr " web %(WEB_VERSION)s | platform %(VERSION)s" + +#: templates/ldt/ldt_raw_base.html:14 +msgid "page_title" +msgstr "LDT Platform" + +#: text/models.py:17 +msgid "annotation.external_id" +msgstr "external id" + +#: text/models.py:18 +msgid "annotation.uri" +msgstr "annotation uri" + +#: text/models.py:19 +msgid "annotation.tags" +msgstr "tags" + +#: text/models.py:20 +msgid "annotation.title" +msgstr "title" + +#: text/models.py:21 +msgid "annotation.description" +msgstr "description" + +#: text/models.py:22 +msgid "annotation.text" +msgstr "text" + +#: text/models.py:23 +msgid "annotation.color" +msgstr "color" + +#: text/models.py:24 +msgid "creator.title" +msgstr "title" + +#: text/models.py:25 +msgid "contributor.title" +msgstr "title" + +#: text/models.py:26 +msgid "annotation.creation_date" +msgstr "creation date" + +#: text/models.py:27 +msgid "annotation.update_date" +msgstr "update date" + +#: user/admin.py:27 +msgid "User details" +msgstr "User details" + +#: user/admin.py:28 +msgid "Groups" +msgstr "Groups" + +#: user/admin.py:29 +msgid "Permissions" +msgstr "Permissions" + +#: user/admin.py:40 user/templates/ldt/user/change_profile.html:105 +#: user/templates/ldt/user/login_form.html:61 +msgid "Password" +msgstr "Password" + +#: user/forms.py:27 user/templates/ldt/user/change_password.html:40 +#: user/templates/ldt/user/change_profile.html:118 +msgid "New password" +msgstr "New password" + +#: user/forms.py:29 user/templates/ldt/user/change_password.html:50 +#: user/templates/ldt/user/change_profile.html:131 +msgid "New password confirmation" +msgstr "New password confirmation" + +#: user/forms.py:58 user/forms.py:59 +msgid "E-mail" +msgstr "E-mail" + +#: user/forms.py:70 +msgid "The two emails didn't match." +msgstr "The two emails didn't match." + +#: user/forms.py:81 user/templates/ldt/user/change_profile.html:54 +msgid "First name" +msgstr "First name" + +#: user/forms.py:82 +msgid "Last name" +msgstr "Last name" + +#: user/forms.py:109 user/templates/ldt/user/change_profile.html:83 +msgid "Language" +msgstr "Language" + +#: user/forms.py:123 +msgid "Profile picture" +msgstr "Profile picture" + +#: user/forms.py:133 +#, python-format +msgid "Image size is limited to %s" +msgstr "Image size is limited to %s" + +#: user/views.py:28 +msgid "Your profile has been updated." +msgstr "Your profile has been updated." + +#: user/views.py:52 +msgid "Your password has been updated." +msgstr "Your password has been updated." + +#: user/views.py:76 +msgid "Your profile picture has been updated." +msgstr "Your profile picture has been updated." + +#: user/views.py:98 user/templates/registration/login.html:24 +msgid "Sorry, that's not a valid username or password." +msgstr "Sorry, that's not a valid username or password." + +#: user/templates/ldt/user/change_password.html:31 +msgid "Old password" +msgstr "Old password" + +#: user/templates/ldt/user/change_password.html:44 +msgid "passwords don't match" +msgstr "passwords don't match" + +#: user/templates/ldt/user/change_password.html:57 +#: user/templates/ldt/user/change_profile.html:144 +#: user/templates/registration/password_change_form.html:14 +#: user/templates/registration/password_change_form.html:17 +msgid "Password change" +msgstr "Password change" + +#: user/templates/ldt/user/change_password.html:61 +msgid "Your new password has been saved." +msgstr "Your new password has been saved." + +#: user/templates/ldt/user/change_profile.html:19 +msgid "Invalid extension ! Your file has to be JPG, JPEG or PNG." +msgstr "Invalid extension ! Your file has to be JPG, JPEG or PNG." + +#: user/templates/ldt/user/change_profile.html:43 +msgid "Username" +msgstr "Username" + +#: user/templates/ldt/user/change_profile.html:70 +msgid "Email" +msgstr "Email" + +#: user/templates/ldt/user/change_profile.html:175 +msgid "Profile picture change" +msgstr "Profile picture change" + +#: user/templates/ldt/user/login_form.html:32 +#: user/templates/registration/password_change_done.html:7 +#: user/templates/registration/password_change_form.html:13 +msgid "Profiles" +msgstr "Profiles" + +#: user/templates/ldt/user/login_form.html:50 +msgid "create account" +msgstr "create account" + +#: user/templates/ldt/user/login_form.html:54 +msgid "Pseudo" +msgstr "Nickname" + +#: user/templates/ldt/user/login_form.html:57 +#: user/templates/ldt/user/login_form.html:64 +msgid "this field is compulsory" +msgstr "this field is compulsory" + +#: user/templates/ldt/user/login_form.html:68 +msgid "reset password" +msgstr "reset password" + +#: user/templates/ldt/user/login_form.html:71 +msgid "Connection" +msgstr "Connexion" + +#: user/templates/registration/activate.html:6 +#: user/templates/registration/activate.html:9 +msgid "Activate account" +msgstr "Activate account" + +#: user/templates/registration/activate.html:12 +msgid "You have activated your account" +msgstr "You have activated your account" + +#: user/templates/registration/activate.html:13 +msgid "Go back to login page" +msgstr "Go back to login page" + +#: user/templates/registration/activation_complete.html:4 +#: user/templates/registration/registration_complete.html:8 +msgid "Sign up successfully" +msgstr "Sign up successfully" + +#: user/templates/registration/activation_complete.html:6 +msgid "activation completed" +msgstr "activation completed" + +#: user/templates/registration/logged_out.html:8 +msgid "Thanks for spending some quality time with the Web site today." +msgstr "Thak you for your visit" + +#: user/templates/registration/logged_out.html:10 +msgid "Log in again" +msgstr "Log in" + +#: user/templates/registration/login.html:46 +msgid "login" +msgstr "login" + +#: user/templates/registration/password_change_done.html:3 +#: user/templates/registration/password_change_done.html:11 +msgid "password change successful" +msgstr "password change successful" + +#: user/templates/registration/password_change_done.html:8 +msgid "password change" +msgstr "password change" + +#: user/templates/registration/password_change_done.html:14 +msgid "Your password has been changed." +msgstr "Your password has been changed." + +#: user/templates/registration/password_change_done.html:15 +msgid "Go back to profiles" +msgstr "Go back to profiles" + +#: user/templates/registration/password_change_form.html:20 +msgid "" +"Please enter your old password, for security's sake, and then enter your new " +"password twice so we can verify you typed it in correctly." +msgstr "" +"Please enter your old password, for security's sake, and then enter your new " +"password twice so we can verify you typed it in correctly." + +#: user/templates/registration/password_change_form.html:26 +msgid "Old password:" +msgstr "Old password:" + +#: user/templates/registration/password_change_form.html:32 +#: user/templates/registration/password_reset_confirm.html:19 +msgid "New password:" +msgstr "New password:" + +#: user/templates/registration/password_change_form.html:38 +#: user/templates/registration/password_reset_confirm.html:21 +msgid "Confirm password:" +msgstr "Confirm password:" + +#: user/templates/registration/password_change_form.html:44 +#: user/templates/registration/password_reset_confirm.html:22 +msgid "Change my password" +msgstr "Change my password" + +#: user/templates/registration/password_reset_complete.html:6 +#: user/templates/registration/password_reset_confirm.html:6 +#: user/templates/registration/password_reset_confirm.html:9 +#: user/templates/registration/password_reset_done.html:6 +#: user/templates/registration/password_reset_form.html:13 +#: user/templates/registration/password_reset_form.html:15 +#: user/templates/registration/password_reset_form.html:18 +msgid "Password reset" +msgstr "Password reset" + +#: user/templates/registration/password_reset_complete.html:9 +msgid "Password reset complete" +msgstr "Password reset complete" + +#: user/templates/registration/password_reset_complete.html:12 +msgid "Your password has been set. You may go ahead and log in now." +msgstr "Your password has been set. You may go ahead and log in now." + +#: user/templates/registration/password_reset_confirm.html:15 +msgid "" +"Please enter your new password twice so we can verify you typed it in " +"correctly." +msgstr "" +"Please enter your new password twice so we can verify you typed it in " +"correctly." + +#: user/templates/registration/password_reset_confirm.html:27 +msgid "Password reset unsuccessful" +msgstr "Password reset unsuccessful" + +#: user/templates/registration/password_reset_confirm.html:29 +msgid "" +"The password reset link was invalid, possibly because it has already been " +"used. Please request a new password reset." +msgstr "" +"The password reset link was invalid, possibly because it has already been " +"used. Please request a new password reset." + +#: user/templates/registration/password_reset_done.html:8 +msgid "Password reset successful" +msgstr "Password reset successful" + +#: user/templates/registration/password_reset_done.html:12 +msgid "" +"We've e-mailed you instructions for setting your password to the e-mail " +"address you submitted. You should be receiving it shortly." +msgstr "" +"We've e-mailed you instructions for setting your password to the e-mail " +"address you submitted. You should be receiving it shortly." + +#: user/templates/registration/password_reset_email.html:2 +msgid "You're receiving this e-mail because you requested a password reset" +msgstr "You're receiving this e-mail because you requested a password reset" + +#: user/templates/registration/password_reset_email.html:3 +#, python-format +msgid "for your user account at %(site_name)s" +msgstr "for your user account at %(site_name)s" + +#: user/templates/registration/password_reset_email.html:5 +msgid "Please go to the following page and choose a new password:" +msgstr "Please go to the following page and choose a new password:" + +#: user/templates/registration/password_reset_email.html:9 +msgid "Your username, in case you've forgotten:" +msgstr "Your username, in case you've forgotten:" + +#: user/templates/registration/password_reset_email.html:11 +msgid "Thanks for using our site!" +msgstr "Thanks for using our site!" + +#: user/templates/registration/password_reset_email.html:13 +#, python-format +msgid "The %(site_name)s team" +msgstr "The %(site_name)s team" + +#: user/templates/registration/password_reset_form.html:22 +msgid "" +"Forgotten your password? Enter your e-mail address below, and we'll e-mail " +"instructions for setting a new one." +msgstr "" +"Forgotten your password? Enter your e-mail address below, and we'll e-mail " +"instructions for setting a new one." + +#: user/templates/registration/password_reset_form.html:27 +msgid "Adresse émail" +msgstr "Email address" + +#: user/templates/registration/password_reset_form.html:32 +msgid "Reset my password" +msgstr "Reset my password" + +#: user/templates/registration/registration_active.html:5 +#: user/templates/registration/registration_active.html:7 +msgid "Activate the account" +msgstr "Activate the account" + +#: user/templates/registration/registration_active.html:9 +msgid "" +"Vous avez bien activé votre compte, vous pouvez accedez à votre espace " +"personnel." +msgstr "You have activated your account, you can access your personnal space" + +#: user/templates/registration/registration_active.html:10 +msgid "retourner à la page de connexion" +msgstr "Back to the login page" + +#: user/templates/registration/registration_complete.html:6 +#: user/templates/registration/registration_form.html:11 +msgid "Sign up" +msgstr "Sign up" + +#: user/templates/registration/registration_complete.html:10 +msgid "" +"We've e-mailed you instructions for activate your account to the e-mail " +"address you submitted. You should be receiving it shortly." +msgstr "" +"We've e-mailed you instructions for activate your account to the e-mail " +"address you submitted. You should be receiving it shortly." diff -r 31dc2726ca51 -r d66abfc1cb87 src/ldt/ldt/locale/fr/LC_MESSAGES/django.mo Binary file src/ldt/ldt/locale/fr/LC_MESSAGES/django.mo has changed diff -r 31dc2726ca51 -r d66abfc1cb87 src/ldt/ldt/locale/fr/LC_MESSAGES/django.po --- a/src/ldt/ldt/locale/fr/LC_MESSAGES/django.po Fri Jul 20 12:40:08 2012 +0200 +++ b/src/ldt/ldt/locale/fr/LC_MESSAGES/django.po Mon Jul 23 17:05:53 2012 +0200 @@ -895,3 +895,679 @@ msgid "confirm delete content" msgstr "Confirmation effacement contenu" +#: ldt_utils/views/content.py:321 +#, python-format +msgid "" +"Content '%(title)s' is referenced by this project : %(project_titles)s. " +"Please delete it beforehand." +msgid_plural "" +"Content '%(title)s' is referenced by %(count)d projects: %(project_titles)s. " +"Please delete them beforehand." +msgstr[0] "" +"Le contenu '%(title)s' est référencé par le projet '%(project_titles)s'." +"Veuillez l'effacer préalablement." +msgstr[1] "" +"Le contenu '%(title)s' est référencé par les projets suivants : '%" +"(project_titles)s'.Veuillez les effacer préalablement." + +#: ldt_utils/views/json.py:34 ldt_utils/views/rdf.py:15 +#: ldt_utils/views/workspace.py:108 +msgid "You can not access this project" +msgstr "vous n'avez pas l'autorisation d'accéder à ce projet" + +#: ldt_utils/views/project.py:110 +#, python-format +msgid "the project %(title)s is published. please unpublish before deleting." +msgstr "Le projet %(title)s est publié. Déplublier le avant de l'effacer." + +#: ldt_utils/views/project.py:111 ldt_utils/views/project.py:115 +msgid "can not delete the project. Please correct the following error" +msgstr "" +"Le projet ne peut pas être effacé. Veuillez corriger les erreurs suivantes." + +#: ldt_utils/views/project.py:112 ldt_utils/views/project.py:116 +msgid "title error deleting project" +msgstr "Erreur lors de l'effacement du projet" + +#: ldt_utils/views/project.py:114 +#, python-format +msgid "" +"the project %(title)s is the front project of %(content)s. please delete " +"this content first." +msgstr "" +"Le projet %(title)s est référencé par le contenu '%(content)s'.Veuillez " +"l'effacer préalablement." + +#: ldt_utils/views/project.py:118 +#, python-format +msgid "please confirm deleting project %(title)s" +msgstr "Veuillez confirmer l'effacement du contenu %(title)s" + +#: ldt_utils/views/project.py:119 +msgid "confirm deletion" +msgstr "Confirmation d'effacement" + +#: templates/admin/cms_change_form.html:30 +msgid "Approve page deletion" +msgstr "Accepter l'effacement de la page" + +#: templates/admin/cms_change_form.html:36 +#, python-format +msgid "(requires approvement at %(moderation_level)s level)" +msgstr "(Demande l'approbation au niveau %(moderation_level)s)" + +#: templates/admin/cms_change_form.html:37 +msgid "(you can perform actions on this page directly)" +msgstr "(Vous pouvez agir sur cette page directement)" + +#: templates/admin/cms_change_form.html:50 +msgid "Remove delete request" +msgstr "Effacer la requête d'affacement" + +#: templates/admin/cms_change_form.html:52 +msgid "Approve delete" +msgstr "Accepter l'effacement" + +#: templates/admin/cms_change_form.html:52 +msgid "Approve" +msgstr "Accepter" + +#: templates/admin/cms_change_form.html:52 +#: templates/admin/cms_change_form.html:53 +msgid "draft" +msgstr "brouillon" + +#: templates/admin/cms_change_form.html:53 +msgid "Preview" +msgstr "Aperçu" + +#: templates/admin/cms_change_form.html:56 +#: templates/admin/page_change_form.html:27 +msgid "History" +msgstr "Historique" + +#: templates/admin/cms_change_form.html:57 +#: templates/admin/page_change_form.html:28 +msgid "View on site" +msgstr "Voir sur le site" + +#: templates/admin/cms_change_form.html:87 +#: templates/admin/page_change_form.html:38 +#: templates/admin/page_change_list.html:54 +#: templates/cms/admin/cms/page/change_form.html:24 +msgid "Please correct the error below." +msgid_plural "Please correct the errors below." +msgstr[0] "Veuillez corriger l'erreur ci-dessous" +msgstr[1] "Veuillez corriger les erreurs ci-dessous" + +#: templates/admin/cms_change_form.html:107 +msgid "All permissions" +msgstr "Toutes les permissions" + +#: templates/admin/cms_change_form.html:108 +#: templates/admin/cms_change_form.html:120 +msgid "Loading..." +msgstr "Chargement..." + +#: templates/admin/cms_change_form.html:119 +msgid "Page states" +msgstr "Etat de la page" + +#: templates/admin/cms_change_form.html:142 +#, python-format +msgid "" +"This page must be moderated at level %(moderation_level)s, post a message " +"for moderator." +msgstr "" +"Le niveau nécessaire pour modérer cette page est le niveau %" +"(moderation_level)s, laisser un message pour le modérateur" + +#: templates/admin/cms_change_form.html:144 +msgid "Request approvemet" +msgstr "Demander l'approbation" + +#: templates/admin/cms_change_form.html:234 +#: user/templates/registration/registration_form.html:16 +msgid "Save" +msgstr "Enregistrer" + +#: templates/admin/cms_change_form.html:235 +msgid "Save and continue editing" +msgstr "Sauver et continuer l'édition" + +#: templates/admin/cms_change_list.html:51 +msgid "Successfully moved" +msgstr "Déplacement réussi" + +#: templates/admin/cms_change_list.html:76 +#, python-format +msgid "Recover deleted %(name)s" +msgstr "Récupérer %(name)s effacé" + +#: templates/admin/cms_change_list.html:79 +#: templates/admin/page_change_list.html:46 +#, python-format +msgid "Add %(name)s" +msgstr "Ajouter %(name)s" + +#: templates/admin/cms_change_list.html:91 +msgid "Pages on:" +msgstr "Pages sur :" + +#: templates/admin/cms_change_list.html:108 +msgid "on" +msgstr "on" + +#: templates/admin/cms_change_list.html:108 +msgid "off" +msgstr "off" + +#: templates/admin/cms_change_list.html:110 +#: templates/admin/page_change_list.html:65 +msgid "Filter" +msgstr "Filtre" + +#: templates/admin/index.html:18 templates/admin/page_index.html:18 +#, python-format +msgid "Models available in the %(name)s application." +msgstr "Le modèle disponible dans l'application %(name)s." + +#: templates/admin/index.html:19 templates/admin/page_app_index.html:10 +#: templates/admin/page_index.html:19 +#, python-format +msgid "%(name)s" +msgstr "%(name)s" + +#: templates/admin/index.html:29 templates/admin/page_change_form.html:20 +#: templates/admin/page_index.html:29 +msgid "Add" +msgstr "Ajouter" + +#: templates/admin/index.html:35 templates/admin/page_index.html:35 +msgid "Change" +msgstr "modifié par" + +#: templates/admin/index.html:64 templates/admin/page_index.html:45 +msgid "You don't have permission to edit anything." +msgstr "Vous n'avez pas l'autorisation d'édition." + +#: templates/admin/index.html:72 templates/admin/page_index.html:53 +msgid "Recent Actions" +msgstr "Actions récentes" + +#: templates/admin/index.html:73 templates/admin/page_index.html:54 +msgid "My Actions" +msgstr "Mes actions" + +#: templates/admin/index.html:77 templates/admin/page_index.html:58 +msgid "None available" +msgstr "Aucune disponible" + +#: templates/admin/index.html:91 templates/admin/page_index.html:72 +msgid "Unknown content" +msgstr "Contenu inconnu" + +#: templates/admin/page_base.html:20 templates/admin/page_index.html:11 +msgid "Pages" +msgstr "Pages" + +#: templates/admin/page_base_site.html:7 +msgid "Django administration" +msgstr "Administration de Django" + +#: templates/admin/page_login.html:8 +msgid "Connexion" +msgstr "Connexion" + +#: templates/admin/page_login.html:20 +msgid "Username:" +msgstr "Nom de utilisateur :" + +#: templates/admin/page_login.html:24 +msgid "Password:" +msgstr "Mot de passe :" + +#: templates/admin/page_login.html:29 +#: user/templates/registration/login.html:39 +msgid "Create an account" +msgstr "Créer un compte" + +#: templates/admin/page_login.html:30 +#: user/templates/registration/login.html:40 +msgid "Forget password?" +msgstr "mot de pass oublié ?" + +#: templates/cms/admin/cms/page/change_form.html:11 +msgid "Documentation" +msgstr "Documentation" + +#: templates/cms/admin/cms/page/change_form.html:11 +msgid "Change password" +msgstr "Modifier le mot de passe" + +#: templates/cms/admin/cms/page/change_form.html:42 +msgid "Ordering" +msgstr "Ordre" + +#: templates/cms/admin/cms/page/change_form.html:45 +msgid "Order:" +msgstr "Ordre :" + +#: templates/ldt/ldt_base.html:86 +msgid "header_title" +msgstr "Plateforme Ldt" + +#: templates/ldt/ldt_base.html:90 +msgid "Link to admin" +msgstr "Administration" + +#: templates/ldt/ldt_base.html:90 +msgid "Staff" +msgstr "admin" + +#: templates/ldt/ldt_base.html:93 +msgid "front link" +msgstr "front" + +#: templates/ldt/ldt_base.html:94 +#: user/templates/ldt/user/change_profile.html:95 +msgid "Profile change" +msgstr "Modification du profil" + +#: templates/ldt/ldt_base.html:114 templates/ldt/ldt_base.html.py:115 +msgid "home" +msgstr "accueil" + +#: templates/ldt/ldt_base.html:148 +msgid "Version number" +msgstr "Numéro de version" + +#: templates/ldt/ldt_base.html:148 +#, python-format +msgid " web %(WEB_VERSION)s | platform %(VERSION)s" +msgstr "web v%(WEB_VERSION)s | platform v%(VERSION)s " + +#: templates/ldt/ldt_raw_base.html:14 +msgid "page_title" +msgstr "Plateforme Ldt" + +#: text/models.py:17 +msgid "annotation.external_id" +msgstr "id externe" + +#: text/models.py:18 +msgid "annotation.uri" +msgstr "uri" + +#: text/models.py:19 +msgid "annotation.tags" +msgstr "tags" + +#: text/models.py:20 +msgid "annotation.title" +msgstr "titre" + +#: text/models.py:21 +msgid "annotation.description" +msgstr "description" + +#: text/models.py:22 +msgid "annotation.text" +msgstr "texte d'annotation" + +#: text/models.py:23 +msgid "annotation.color" +msgstr "couleur d'annotation" + +#: text/models.py:24 +msgid "creator.title" +msgstr "titre" + +#: text/models.py:25 +msgid "contributor.title" +msgstr "titre" + +#: text/models.py:26 +msgid "annotation.creation_date" +msgstr "date de création" + +#: text/models.py:27 +msgid "annotation.update_date" +msgstr "Date de maj" + +#: user/admin.py:27 +msgid "User details" +msgstr "Détail utilisateur" + +#: user/admin.py:28 +msgid "Groups" +msgstr "Groupes" + +#: user/admin.py:29 +msgid "Permissions" +msgstr "Permissions" + +#: user/admin.py:40 user/templates/ldt/user/change_profile.html:105 +#: user/templates/ldt/user/login_form.html:61 +msgid "Password" +msgstr "Mot de passe" + +#: user/forms.py:27 user/templates/ldt/user/change_password.html:40 +#: user/templates/ldt/user/change_profile.html:118 +msgid "New password" +msgstr "Nouveau mot de passe" + +#: user/forms.py:29 user/templates/ldt/user/change_password.html:50 +#: user/templates/ldt/user/change_profile.html:131 +msgid "New password confirmation" +msgstr "Confirmation du nouveau mot de passe" + +#: user/forms.py:58 user/forms.py:59 +msgid "E-mail" +msgstr "E-mail" + +#: user/forms.py:70 +msgid "The two emails didn't match." +msgstr "les deux emails ne correspondent pas" + +#: user/forms.py:81 user/templates/ldt/user/change_profile.html:54 +msgid "First name" +msgstr "Prénom" + +#: user/forms.py:82 +msgid "Last name" +msgstr "Nom" + +#: user/forms.py:109 user/templates/ldt/user/change_profile.html:83 +msgid "Language" +msgstr "Langue" + +#: user/forms.py:123 +msgid "Profile picture" +msgstr "Image de profil" + +#: user/forms.py:133 +#, python-format +msgid "Image size is limited to %s" +msgstr "La taille de l'image est limitée à %s" + +#: user/views.py:28 +msgid "Your profile has been updated." +msgstr "Votre profil a été modifié" + +#: user/views.py:52 +msgid "Your password has been updated." +msgstr "Votre mot de passe a été changeé." + +#: user/views.py:76 +msgid "Your profile picture has been updated." +msgstr "Votre image de profil a été modifiée" + +#: user/views.py:98 user/templates/registration/login.html:24 +msgid "Sorry, that's not a valid username or password." +msgstr "Saisissez un nom d'utilisateur et un mot de passe valide." + +#: user/templates/ldt/user/change_password.html:31 +msgid "Old password" +msgstr "Ancien mot de passe" + +#: user/templates/ldt/user/change_password.html:44 +msgid "passwords don't match" +msgstr "les mots de passe ne correspondent pas" + +#: user/templates/ldt/user/change_password.html:57 +#: user/templates/ldt/user/change_profile.html:144 +#: user/templates/registration/password_change_form.html:14 +#: user/templates/registration/password_change_form.html:17 +msgid "Password change" +msgstr "Modification du mot de passe" + +#: user/templates/ldt/user/change_password.html:61 +msgid "Your new password has been saved." +msgstr "Votre mot de passe a été changé." + +#: user/templates/ldt/user/change_profile.html:19 +msgid "Invalid extension ! Your file has to be JPG, JPEG or PNG." +msgstr "extension invalide ! votre fichier doit être JPG, JPEG ou PNG" + +#: user/templates/ldt/user/change_profile.html:43 +msgid "Username" +msgstr "Nom" + +#: user/templates/ldt/user/change_profile.html:70 +msgid "Email" +msgstr "E-mail" + +#: user/templates/ldt/user/change_profile.html:175 +msgid "Profile picture change" +msgstr "Modification de l'image de profil" + +#: user/templates/ldt/user/login_form.html:32 +#: user/templates/registration/password_change_done.html:7 +#: user/templates/registration/password_change_form.html:13 +msgid "Profiles" +msgstr "Les profils" + +#: user/templates/ldt/user/login_form.html:50 +msgid "create account" +msgstr "Créer un compte" + +#: user/templates/ldt/user/login_form.html:54 +msgid "Pseudo" +msgstr "Pseudo" + +#: user/templates/ldt/user/login_form.html:57 +#: user/templates/ldt/user/login_form.html:64 +msgid "this field is compulsory" +msgstr "Ce champs est obligatoire" + +#: user/templates/ldt/user/login_form.html:68 +msgid "reset password" +msgstr "Réinitialiser le mot de passe" + +#: user/templates/ldt/user/login_form.html:71 +msgid "Connection" +msgstr "Connexion" + +#: user/templates/registration/activate.html:6 +#: user/templates/registration/activate.html:9 +msgid "Activate account" +msgstr "Activer le compte" + +#: user/templates/registration/activate.html:12 +msgid "You have activated your account" +msgstr "Vous avez bien activé votre compte." + +#: user/templates/registration/activate.html:13 +msgid "Go back to login page" +msgstr "Retourner à la page de connexion" + +#: user/templates/registration/activation_complete.html:4 +#: user/templates/registration/registration_complete.html:8 +msgid "Sign up successfully" +msgstr "Création de compte avec succès" + +#: user/templates/registration/activation_complete.html:6 +msgid "activation completed" +msgstr "Activation terminée" + +#: user/templates/registration/logged_out.html:8 +msgid "Thanks for spending some quality time with the Web site today." +msgstr "Merci de votre visite." + +#: user/templates/registration/logged_out.html:10 +msgid "Log in again" +msgstr "Se reconnecter" + +#: user/templates/registration/login.html:46 +msgid "login" +msgstr "Connexion" + +#: user/templates/registration/password_change_done.html:3 +#: user/templates/registration/password_change_done.html:11 +msgid "password change successful" +msgstr "Changement de mot de passe réussi" + +#: user/templates/registration/password_change_done.html:8 +msgid "password change" +msgstr "Changement de mot de passe" + +#: user/templates/registration/password_change_done.html:14 +msgid "Your password has been changed." +msgstr "Votre mot de passe a été changé." + +#: user/templates/registration/password_change_done.html:15 +msgid "Go back to profiles" +msgstr "Retourner à la page de mon profil" + +#: user/templates/registration/password_change_form.html:20 +msgid "" +"Please enter your old password, for security's sake, and then enter your new " +"password twice so we can verify you typed it in correctly." +msgstr "" +"Par sécurité, veuillez enter votre ancien mot de passe puis le nouveau a " +"deux reprise afin de savoir si vous l'avez taper correctement " + +#: user/templates/registration/password_change_form.html:26 +msgid "Old password:" +msgstr "Ancien mot de passe :" + +#: user/templates/registration/password_change_form.html:32 +#: user/templates/registration/password_reset_confirm.html:19 +msgid "New password:" +msgstr "Nouveau mot de passe :" + +#: user/templates/registration/password_change_form.html:38 +#: user/templates/registration/password_reset_confirm.html:21 +msgid "Confirm password:" +msgstr "Confirmer le mot de passe :" + +#: user/templates/registration/password_change_form.html:44 +#: user/templates/registration/password_reset_confirm.html:22 +msgid "Change my password" +msgstr "Modifier mon mot de passe" + +#: user/templates/registration/password_reset_complete.html:6 +#: user/templates/registration/password_reset_confirm.html:6 +#: user/templates/registration/password_reset_confirm.html:9 +#: user/templates/registration/password_reset_done.html:6 +#: user/templates/registration/password_reset_form.html:13 +#: user/templates/registration/password_reset_form.html:15 +#: user/templates/registration/password_reset_form.html:18 +msgid "Password reset" +msgstr "Réinitialiser le mot de passe" + +#: user/templates/registration/password_reset_complete.html:9 +msgid "Password reset complete" +msgstr "Réinitialisation du mot de passe terminée" + +#: user/templates/registration/password_reset_complete.html:12 +msgid "Your password has been set. You may go ahead and log in now." +msgstr "Votre mot de passe a été défini. vous pouvez vous connecter maintenant." + +#: user/templates/registration/password_reset_confirm.html:15 +msgid "" +"Please enter your new password twice so we can verify you typed it in " +"correctly." +msgstr "" +"veuillez enter votre nouveau mot de pass deux fois afin de le vérifier." + +#: user/templates/registration/password_reset_confirm.html:27 +msgid "Password reset unsuccessful" +msgstr "Reinitialisation du mot de pass a échoué" + +#: user/templates/registration/password_reset_confirm.html:29 +msgid "" +"The password reset link was invalid, possibly because it has already been " +"used. Please request a new password reset." +msgstr "" +"Le lien de réinitialisation du mot de passe n'est pas valide, certainement " +"car il a déjà été utilisé. veuiller demander une nouvelle réinitialisation." + +#: user/templates/registration/password_reset_done.html:8 +msgid "Password reset successful" +msgstr "Réinitialisation du mot de passe réussie" + +#: user/templates/registration/password_reset_done.html:12 +msgid "" +"We've e-mailed you instructions for setting your password to the e-mail " +"address you submitted. You should be receiving it shortly." +msgstr "" +"Nous vous avons envoyer les instructions de reinitialisation de votre mot de " +"passe à l'adresse email que vous nous avez fournie. vous devriez les " +"recevoir bientôt." + +#: user/templates/registration/password_reset_email.html:2 +msgid "You're receiving this e-mail because you requested a password reset" +msgstr "" +"Vous recevez ce mail car vous avez demander la réinitialisation du mot de " +"passe" + +#: user/templates/registration/password_reset_email.html:3 +#, python-format +msgid "for your user account at %(site_name)s" +msgstr "Pour votre compte sur le site %(site_name)s" + +#: user/templates/registration/password_reset_email.html:5 +msgid "Please go to the following page and choose a new password:" +msgstr "" +"veuillez aller à la page suivante et choisissez un nouveau mot de passe :" + +#: user/templates/registration/password_reset_email.html:9 +msgid "Your username, in case you've forgotten:" +msgstr "Pour rappel votre nom d'autilisateur :" + +#: user/templates/registration/password_reset_email.html:11 +msgid "Thanks for using our site!" +msgstr "Merci de votre visite." + +#: user/templates/registration/password_reset_email.html:13 +#, python-format +msgid "The %(site_name)s team" +msgstr "L'équipe du site %(site_name)s" + +#: user/templates/registration/password_reset_form.html:22 +msgid "" +"Forgotten your password? Enter your e-mail address below, and we'll e-mail " +"instructions for setting a new one." +msgstr "" +"Mot de passe oublié ? Entrez votre adresse email ci-dessous pour recevoir " +"les instructions pour en entrer un nouveau." + +#: user/templates/registration/password_reset_form.html:27 +msgid "Adresse émail" +msgstr "Adresse émail" + +#: user/templates/registration/password_reset_form.html:32 +msgid "Reset my password" +msgstr "Reinitialiser mon mot de passe" + +#: user/templates/registration/registration_active.html:5 +#: user/templates/registration/registration_active.html:7 +msgid "Activate the account" +msgstr "Activer le compte" + +#: user/templates/registration/registration_active.html:9 +msgid "" +"Vous avez bien activé votre compte, vous pouvez accedez à votre espace " +"personnel." +msgstr "" +"Vous avez bien activé votre compte, vous pouvez accedez à votre espace " +"personnel." + +#: user/templates/registration/registration_active.html:10 +msgid "retourner à la page de connexion" +msgstr "retourner à la page de connexion" + +#: user/templates/registration/registration_complete.html:6 +#: user/templates/registration/registration_form.html:11 +msgid "Sign up" +msgstr "Création d'un compte" + +#: user/templates/registration/registration_complete.html:10 +msgid "" +"We've e-mailed you instructions for activate your account to the e-mail " +"address you submitted. You should be receiving it shortly." +msgstr "" +"Nous vous avons envoyé par courriel les instructions pour activer le compte " +"à l'adresse que vous avez indiquée. Vous devriez le recevoir rapidement." diff -r 31dc2726ca51 -r d66abfc1cb87 src/ldt/ldt/templatetags/navigation.py --- a/src/ldt/ldt/templatetags/navigation.py Fri Jul 20 12:40:08 2012 +0200 +++ b/src/ldt/ldt/templatetags/navigation.py Mon Jul 23 17:05:53 2012 +0200 @@ -17,3 +17,60 @@ if re.search(pattern, request.path): return css_class return '' + + +@register.inclusion_tag("ldt/ldt_utils/partial/content_project_pagination.html", takes_context=True) +def build_pagination(context, nb_pages, cur_page_nb, a_class, begin_pages=2, end_pages=2, before_current_pages=2, after_current_pages=2): + # Digg-like pagination. Adapted from http://djangosnippets.org/snippets/2199/ + nb_pages = int(nb_pages) + cur_page_nb = int(cur_page_nb) + #assert False, str(nb_pages) + ', ' + str(cur_page_nb) + before = max(cur_page_nb - before_current_pages - 1, 0) + after = cur_page_nb + after_current_pages + + page_range = range(nb_pages) + #assert False, str(nb_pages) + str(page_range) + begin = page_range[:begin_pages] + #assert False, str(nb_pages) + ", " + str(page_range) + ", " + str(begin) + middle = page_range[before+1:after+1] + end = page_range[-end_pages:] + last_page_number = end[-1] + #assert False, "a - cur_page_nb = " + str(cur_page_nb) + ", before = " + str(before) + ", after = " + str(after) + ", begin = " + str(begin) + ", middle = " + str(middle) + ", end = " + str(end) + + def collides(firstlist, secondlist): + """ Returns true if lists collides (have same entries) + >>> collides([1,2,3,4],[3,4,5,6,7]) + True + >>> collides([1,2,3,4],[5,6,7]) + False + """ + return any(item in secondlist for item in firstlist) + + # If middle and end has same entries, then end is what we want + if collides(middle, end): + end = range(max(cur_page_nb-before_current_pages, 1), last_page_number+1) + middle = [] + + #assert False, "0, " + str(nb_pages) + ", " + str(page_range) + ", " + str(begin) + # If begin and middle ranges has same entries, then begin is what we want + if collides(begin, middle): + begin = range(0, min(cur_page_nb + after_current_pages - 1, last_page_number)+1) + middle = [] + #assert False, "1 - cur_page_nb = " + str(cur_page_nb) + ", before = " + str(before) + ", after = " + str(after) + ", begin = " + str(begin) + ", middle = " + str(middle) + ", end = " + str(end) + + # If begin and end has same entries then begin is what we want + if collides(begin, end): + begin = range(1, last_page_number+1) + end = [] + #assert False, "2 - " + str(nb_pages) + ", " + str(page_range) + ", " + str(begin) + + #assert False, str(nb_pages) + ", " + str(page_range) + ", " + str(begin) + + context.update({'begin' : begin, + 'middle' : middle, + 'end' : end, + 'nb_pages' : nb_pages, + 'cur_page_nb' : cur_page_nb, + 'a_class' : a_class}) + #assert False, begin + middle + end + return context