Commit b156874d authored by Floréal Cabanettes's avatar Floréal Cabanettes

Fix urls in panel to be translated

parent a8491df0
......@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-11-05 19:26+0100\n"
"PO-Revision-Date: 2017-11-05 19:27+0100\n"
"POT-Creation-Date: 2017-11-11 18:28+0100\n"
"PO-Revision-Date: 2017-11-11 18:29+0100\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: fr\n"
......@@ -36,7 +36,8 @@ msgstr "Erreur inattendue :"
#. Translators: recipe is the parent tag of a recipe
#: api/views/RecipeById.py:48 api/views/RecipeList.py:39
#: templates/website/index.html:18 website/urls.py:22
#: templates/panel/recipes.html:133 templates/website/index.html:18
#: website/urls.py:22
msgid "recipe"
msgstr "recette"
......@@ -113,7 +114,7 @@ msgid "Category"
msgstr "Catégorie"
#: main/models/Category.py:16 templates/panel/base.html:222
#: templates/panel/recipes.html:94 templates/panel/recipes.html:160
#: templates/panel/recipes.html:102 templates/panel/recipes.html:180
#: templates/website/sidebar.html:9
msgid "Categories"
msgstr "Catégories"
......@@ -189,7 +190,8 @@ msgstr "activer les commentaires"
msgid "published"
msgstr "publié"
#: main/models/Recipe.py:38 panel/urls.py:14 templates/panel/recipes.html:34
#: main/models/Recipe.py:38 panel/urls.py:22 panel/urls.py:23
#: templates/panel/recipes.html:34
msgid "trash"
msgstr "corbeille"
......@@ -207,21 +209,28 @@ msgstr "Recette"
msgid "Recipes"
msgstr "Recettes"
#: panel/urls.py:13 website/urls.py:14 website/urls.py:16 website/urls.py:19
#: panel/urls.py:18 panel/urls.py:19 panel/urls.py:22 panel/urls.py:23
#: panel/urls.py:27 panel/urls.py:29 panel/urls.py:33 panel/urls.py:35
#: panel/urls.py:39
msgid "recipes"
msgstr "recettes"
#: panel/urls.py:19 panel/urls.py:23 panel/urls.py:29 panel/urls.py:35
#: website/urls.py:14 website/urls.py:16 website/urls.py:19
msgid "page"
msgstr "page"
#: panel/urls.py:15 templates/panel/recipes.html:29
#: panel/urls.py:27 panel/urls.py:29 templates/panel/recipes.html:29
msgctxt "url"
msgid "mine"
msgstr "moi"
#: panel/urls.py:17 templates/panel/recipes.html:31
#: panel/urls.py:33 panel/urls.py:35 templates/panel/recipes.html:31
msgctxt "url"
msgid "published"
msgstr "publie"
#: panel/views/IndexView.py:34 panel/views/RecipesView.py:112
#: panel/views/IndexView.py:34 panel/views/RecipesView.py:110
#: templates/website/header.html:20
msgid "User panel"
msgstr "Panel utilisateur"
......@@ -327,31 +336,34 @@ msgstr "Publiées"
msgid "Trash"
msgstr "Corbeille"
#: templates/panel/recipes.html:41 templates/panel/recipes.html:179
#: templates/panel/recipes.html:41 templates/panel/recipes.html:199
msgid "Grouped actions"
msgstr "Actions groupées"
#: templates/panel/recipes.html:43 templates/panel/recipes.html:181
#: templates/panel/recipes.html:43 templates/panel/recipes.html:137
#: templates/panel/recipes.html:201
msgid "Publish"
msgstr "Publier"
#: templates/panel/recipes.html:44 templates/panel/recipes.html:182
#: templates/panel/recipes.html:44 templates/panel/recipes.html:139
#: templates/panel/recipes.html:202
msgid "Unpublish"
msgstr "Ne plus publier"
#: templates/panel/recipes.html:45 templates/panel/recipes.html:183
#: templates/panel/recipes.html:45 templates/panel/recipes.html:141
#: templates/panel/recipes.html:203
msgid "Move to trash"
msgstr "Mettre à la corbeille"
#: templates/panel/recipes.html:47 templates/panel/recipes.html:185
#: templates/panel/recipes.html:47 templates/panel/recipes.html:205
msgid "Restore"
msgstr "Rétablir"
#: templates/panel/recipes.html:48 templates/panel/recipes.html:186
#: templates/panel/recipes.html:48 templates/panel/recipes.html:206
msgid "Delete definitively"
msgstr "Supprimer définitivement"
#: templates/panel/recipes.html:51 templates/panel/recipes.html:189
#: templates/panel/recipes.html:51 templates/panel/recipes.html:209
msgid "Apply"
msgstr "Appliquer"
......@@ -373,31 +385,35 @@ msgstr "Filtrer"
msgid "Empty trash"
msgstr "Vider la corbeille"
#: templates/panel/recipes.html:88 templates/panel/recipes.html:154
#: templates/panel/recipes.html:96 templates/panel/recipes.html:174
msgid "Title"
msgstr "Titre"
#: templates/panel/recipes.html:91 templates/panel/recipes.html:157
#: templates/panel/recipes.html:99 templates/panel/recipes.html:177
msgid "Author"
msgstr "Auteur"
#: templates/panel/recipes.html:100 templates/panel/recipes.html:166
#: templates/panel/recipes.html:108 templates/panel/recipes.html:186
msgid "Date"
msgstr "Date"
#: templates/panel/recipes.html:103 templates/panel/recipes.html:169
#: templates/panel/recipes.html:111 templates/panel/recipes.html:189
msgid "Thumb"
msgstr "Thumb"
#: templates/panel/recipes.html:111
#: templates/panel/recipes.html:119
msgid "There is no recipes!"
msgstr "Aucune recette trouvée !"
#: templates/panel/recipes.html:136
#: templates/panel/recipes.html:133
msgid "Show"
msgstr "Afficher"
#: templates/panel/recipes.html:156
msgid "Published"
msgstr "Publiée"
#: templates/panel/recipes.html:138
#: templates/panel/recipes.html:158
msgid "Draft"
msgstr "Brouillon"
......
......@@ -7,21 +7,25 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-11-05 15:39+0100\n"
"PO-Revision-Date: 2017-11-05 15:39+0100\n"
"POT-Creation-Date: 2017-11-11 18:37+0100\n"
"PO-Revision-Date: 2017-11-11 18:37+0100\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: fr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
"Last-Translator: \n"
"Language-Team: \n"
"X-Generator: Poedit 1.8.7.1\n"
#: panel/static/js/jquery-ui.min.js:8
msgid "'"
msgstr ""
#: panel/static/js/panel.recipes.js:28
#: panel/static/js/panel.recipes.js:40
msgid "Please select an action to do!"
msgstr "Veuillez sélectionner une action à effectuer !"
#: panel/static/js/panel.recipes.js:49
msgid "recipes"
msgstr "recettes"
......@@ -39,7 +39,7 @@ panel.recipes.submit_grouped_actions = function (action) {
selection.each(function () {
selected.push(parseInt(this.value));
});
$.post("/panel/recipes/change/",
$.post("/panel/" + django.gettext("recipes") + "/change/",
{
selection: selected,
action: action,
......
......@@ -15,26 +15,26 @@ urlpatterns = [
#####################
# Main recipes URL:
url(r'^recipes/$', RecipesView.as_view(), name='recipes'),
url(r'^recipes/' + _("page") + '/(?P<page>\d+)$', RecipesView.as_view(), name='recipes_page'),
url(r'^' + _("recipes") + '/$', RecipesView.as_view(), name='recipes'),
url(r'^' + _("recipes") + '/' + _("page") + '/(?P<page>\d+)$', RecipesView.as_view(), name='recipes_page'),
# Trash:
url(r'^recipes/' + _("trash") + '/$', RecipesView.as_view(), name='recipes_trash', kwargs={"trash": True}),
url(r'^recipes/' + _("trash") + '/' + _("page") + '/(?P<page>\d+)$', RecipesView.as_view(),
url(r'^' + _("recipes") + '/' + _("trash") + '/$', RecipesView.as_view(), name='recipes_trash', kwargs={"trash": True}),
url(r'^' + _("recipes") + '/' + _("trash") + '/' + _("page") + '/(?P<page>\d+)$', RecipesView.as_view(),
name='recipes_trash_page', kwargs={"trash": True}),
# Mine:
url(r'^recipes/' + pgettext("url", "mine") + '/$', RecipesView.as_view(), name='recipes_mine',
url(r'^' + _("recipes") + '/' + pgettext("url", "mine") + '/$', RecipesView.as_view(), name='recipes_mine',
kwargs={"mine": True}),
url(r'^recipes/' + pgettext("url", "mine") + '/' + _("page") + '/(?P<page>\d+)$', RecipesView.as_view(),
url(r'^' + _("recipes") + '/' + pgettext("url", "mine") + '/' + _("page") + '/(?P<page>\d+)$', RecipesView.as_view(),
name='recipes_mine_page', kwargs={"mine": True}),
# Published
url(r'^recipes/' + pgettext("url", "published") + '/$', RecipesView.as_view(), name='recipes_published',
url(r'^' + _("recipes") + '/' + pgettext("url", "published") + '/$', RecipesView.as_view(), name='recipes_published',
kwargs={"published": True}),
url(r'^recipes/' + pgettext("url", "published") + '/' + _("page") + '/(?P<page>\d+)$', RecipesView.as_view(),
url(r'^' + _("recipes") + '/' + pgettext("url", "published") + '/' + _("page") + '/(?P<page>\d+)$', RecipesView.as_view(),
name='recipes_published_page', kwargs={"published": True}),
# Change:
url(r'^recipes/change/', RecipesChangeView.as_view(), name='recipes_change')
url(r'^' + _("recipes") + '/change/', RecipesChangeView.as_view(), name='recipes_change')
]
......@@ -218,7 +218,7 @@
<li class="header">MENU</li>
<!-- Optionally, you can add icons to the links -->
<li class="{% if page == 'home' %}active{% endif %}"><a href="/panel/"><i class="fa fa-home"></i> <span>{% trans "Home" %}</span></a></li>
<li class="{% if page == 'recipes' %}active{% endif %}"><a href="/panel/recipes/"><i class="fa fa-book"></i> <span>{% trans "Recipes" %}</span></a></li>
<li class="{% if page == 'recipes' %}active{% endif %}"><a href="{% url "recipes" %}"><i class="fa fa-book"></i> <span>{% trans "Recipes" %}</span></a></li>
<li><a href="#"><i class="fa fa-bookmark"></i> <span>{% trans "Categories" %}</span></a></li>
<li><a href="#"><i class="fa fa-picture-o"></i> <span>{% trans "Medias" %}</span></a></li>
<li><a href="#"><i class="fa fa-pagelines"></i> <span>{% trans "Page" %}</span></a></li>
......
......@@ -23,15 +23,15 @@
</section>
<section class="content">
<!-- Table header -->
<p><a href="/panel/recipes/" class="show-all {% if select == "all" %}filter-active{% endif %}">
<p><a href="{% url "recipes" %}" class="show-all {% if select == "all" %}filter-active{% endif %}">
{% trans "All" context "filter-recipes" %}</a> ({{ nb_recipes }})
|
<a href="/panel/recipes/{% trans 'mine' context 'url' %}/" class="show-mines {% if select == "mine" %}filter-active{% endif %}">
<a href="{% url "recipes_mine" %}" class="show-mines {% if select == "mine" %}filter-active{% endif %}">
{% trans "Mine" context "filter-recipes" %}</a> ({{ nb_my_recipes }}) |
<a href="/panel/recipes/{% trans 'published' context 'url' %}/" class="show-published {% if select == "published" %}filter-active{% endif %}">
<a href="{% url "recipes_published" %}" class="show-published {% if select == "published" %}filter-active{% endif %}">
{% trans "Published" context "filter-recipes" %}</a> ({{ nb_recipes_published }})
{% if nb_trash > 0 %}
| <a href="/panel/recipes/{% trans 'trash' %}/" class="show-trash {% if select == "trash" %}filter-active{% endif %}">
| <a href="{% url "recipes_trash" %}" class="show-trash {% if select == "trash" %}filter-active{% endif %}">
{% trans "Trash" %}</a> ({{ nb_trash }})
{% endif %}
</p>
......
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