mirror of
https://github.com/ae-utbm/sith.git
synced 2024-12-22 15:51:19 +00:00
Add basic BBcode translator
Signed-off-by: Skia <skia@libskia.so>
This commit is contained in:
parent
32ac6640ab
commit
136d0f3fa0
@ -1,12 +1,14 @@
|
||||
{% extends "core/base.jinja" %}
|
||||
|
||||
{% block title %}
|
||||
{% trans %}Doku to Markdown{% endtrans %}
|
||||
{% trans %}To Markdown{% endtrans %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<form action="" method="post" enctype="multipart/form-data">
|
||||
{% csrf_token %}
|
||||
<input type="radio" name="syntax" value="doku" {% if request.POST['syntax'] != "bbcode" %}checked{% endif %} >Doku</input>
|
||||
<input type="radio" name="syntax" value="bbcode" {% if request.POST['syntax'] == "bbcode" %}checked{% endif %} >BBCode</input>
|
||||
<textarea name="text" id="text" rows="30" cols="80">
|
||||
{{- text -}}
|
||||
</textarea>
|
@ -108,7 +108,7 @@
|
||||
</ul>
|
||||
<h4>{% trans %}Other tools{% endtrans %}</h4>
|
||||
<ul>
|
||||
<li><a href="{{ url('core:doku_to_markdown') }}">{% trans %}Convert dokuwiki syntax to Markdown{% endtrans %}</a></li>
|
||||
<li><a href="{{ url('core:to_markdown') }}">{% trans %}Convert dokuwiki/BBcode syntax to Markdown{% endtrans %}</a></li>
|
||||
<li><a href="{{ url('trombi:user_tools') }}">{% trans %}Trombi tools{% endtrans %}</a></li>
|
||||
</ul>
|
||||
|
||||
|
@ -28,7 +28,7 @@ from core.views import *
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^$', index, name='index'),
|
||||
url(r'^doku_to_markdown$', DokuToMarkdownView.as_view(), name='doku_to_markdown'),
|
||||
url(r'^to_markdown$', ToMarkdownView.as_view(), name='to_markdown'),
|
||||
url(r'^notifications$', NotificationList.as_view(), name='notification_list'),
|
||||
url(r'^notification/(?P<notif_id>[0-9]+)$', notification, name='notification'),
|
||||
|
||||
|
@ -66,6 +66,7 @@ def exif_auto_rotate(image):
|
||||
return image
|
||||
|
||||
def doku_to_markdown(text):
|
||||
"""This is a quite correct doku translator"""
|
||||
text = re.sub(r'([^:]|^)\/\/(.*?)\/\/', r'*\2*', text) # Italic (prevents protocol:// conflict)
|
||||
text = re.sub(r'<del>(.*?)<\/del>', r'~~\1~~', text, flags=re.DOTALL) # Strike (may be multiline)
|
||||
text = re.sub(r'<sup>(.*?)<\/sup>', r'^\1^', text) # Superscript (multiline not supported, because almost never used)
|
||||
@ -133,3 +134,44 @@ def doku_to_markdown(text):
|
||||
|
||||
return "\n".join(new_text)
|
||||
|
||||
def bbcode_to_markdown(text):
|
||||
"""This is a very basic BBcode translator"""
|
||||
text = re.sub(r'\[b\](.*?)\[\/b\]', r'**\1**', text, flags=re.DOTALL) # Bold
|
||||
text = re.sub(r'\[i\](.*?)\[\/i\]', r'*\1*', text, flags=re.DOTALL) # Italic
|
||||
text = re.sub(r'\[u\](.*?)\[\/u\]', r'__\1__', text, flags=re.DOTALL) # Underline
|
||||
text = re.sub(r'\[s\](.*?)\[\/s\]', r'~~\1~~', text, flags=re.DOTALL) # Strike (may be multiline)
|
||||
text = re.sub(r'\[strike\](.*?)\[\/strike\]', r'~~\1~~', text, flags=re.DOTALL) # Strike 2
|
||||
|
||||
text = re.sub(r'article://', r'page://', text)
|
||||
text = re.sub(r'dfile://', r'file://', text)
|
||||
|
||||
text = re.sub(r'\[url=(.*?)\](.*)\[\/url\]', r'[\2](\1)', text) # Links
|
||||
text = re.sub(r'\[url\](.*)\[\/url\]', r'\1', text) # Links 2
|
||||
text = re.sub(r'\[img\](.*)\[\/img\]', r'![\1](\1 "\1")', text) # Images
|
||||
|
||||
new_text = []
|
||||
quote_level = 0
|
||||
for line in text.splitlines(): # Tables and quotes
|
||||
enter = re.finditer(r'\[quote(=(.+?))?\]', line)
|
||||
quit = re.finditer(r'\[/quote\]', line)
|
||||
if enter or quit: # Quote part
|
||||
for quote in enter: # Enter quotes (support multiple at a time)
|
||||
quote_level += 1
|
||||
try:
|
||||
new_text.append("> " * quote_level + "##### " + quote.group(2))
|
||||
except:
|
||||
new_text.append("> " * quote_level)
|
||||
line = line.replace(quote.group(0), '')
|
||||
final_quote_level = quote_level # Store quote_level to use at the end, since it will be modified during quit iteration
|
||||
final_newline = False
|
||||
for quote in quit: # Quit quotes (support multiple at a time)
|
||||
line = line.replace(quote.group(0), '')
|
||||
quote_level -= 1
|
||||
final_newline = True
|
||||
new_text.append("> " * final_quote_level + line) # Finally append the line
|
||||
if final_newline: new_text.append("\n") # Add a new line to ensure the separation between the quote and the following text
|
||||
else:
|
||||
new_text.append(line)
|
||||
|
||||
return "\n".join(new_text)
|
||||
|
||||
|
@ -37,7 +37,7 @@ from itertools import chain
|
||||
from haystack.query import SearchQuerySet
|
||||
|
||||
from core.models import User, Notification
|
||||
from core.utils import doku_to_markdown
|
||||
from core.utils import doku_to_markdown, bbcode_to_markdown
|
||||
from club.models import Club
|
||||
|
||||
def index(request, context=None):
|
||||
@ -98,17 +98,20 @@ def search_json(request):
|
||||
}
|
||||
return JsonResponse(result)
|
||||
|
||||
class DokuToMarkdownView(TemplateView):
|
||||
template_name = "core/doku_to_markdown.jinja"
|
||||
class ToMarkdownView(TemplateView):
|
||||
template_name = "core/to_markdown.jinja"
|
||||
|
||||
def post(self, request, *args, **kwargs):
|
||||
self.text = request.POST['text']
|
||||
self.text_md = doku_to_markdown(self.text)
|
||||
if request.POST['syntax'] == "doku":
|
||||
self.text_md = doku_to_markdown(self.text)
|
||||
else:
|
||||
self.text_md = bbcode_to_markdown(self.text)
|
||||
context = self.get_context_data(**kwargs)
|
||||
return self.render_to_response(context)
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
kwargs = super(DokuToMarkdownView, self).get_context_data(**kwargs)
|
||||
kwargs = super(ToMarkdownView, self).get_context_data(**kwargs)
|
||||
try:
|
||||
kwargs['text'] = self.text
|
||||
kwargs['text_md'] = self.text_md
|
||||
|
@ -6,7 +6,7 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-05-14 03:16+0200\n"
|
||||
"POT-Creation-Date: 2017-05-30 19:28+0200\n"
|
||||
"PO-Revision-Date: 2016-07-18\n"
|
||||
"Last-Translator: Skia <skia@libskia.so>\n"
|
||||
"Language-Team: AE info <ae.info@utbm.fr>\n"
|
||||
@ -17,8 +17,8 @@ msgstr ""
|
||||
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
||||
|
||||
#: accounting/models.py:60 accounting/models.py:108 accounting/models.py:135
|
||||
#: accounting/models.py:194 club/models.py:42 counter/models.py:99
|
||||
#: counter/models.py:124 counter/models.py:159 forum/models.py:49
|
||||
#: accounting/models.py:194 club/models.py:43 counter/models.py:100
|
||||
#: counter/models.py:125 counter/models.py:160 forum/models.py:50
|
||||
#: launderette/models.py:37 launderette/models.py:82 launderette/models.py:107
|
||||
#: stock/models.py:38 stock/models.py:54 stock/models.py:77 stock/models.py:97
|
||||
msgid "name"
|
||||
@ -64,9 +64,9 @@ msgstr "IBAN"
|
||||
msgid "account number"
|
||||
msgstr "numero de compte"
|
||||
|
||||
#: accounting/models.py:111 accounting/models.py:136 club/models.py:172
|
||||
#: com/models.py:64 com/models.py:152 counter/models.py:133
|
||||
#: counter/models.py:160
|
||||
#: accounting/models.py:111 accounting/models.py:136 club/models.py:183
|
||||
#: com/models.py:64 com/models.py:152 counter/models.py:134
|
||||
#: counter/models.py:161
|
||||
msgid "club"
|
||||
msgstr "club"
|
||||
|
||||
@ -87,12 +87,12 @@ msgstr "Compte club"
|
||||
msgid "%(club_account)s on %(bank_account)s"
|
||||
msgstr "%(club_account)s sur %(bank_account)s"
|
||||
|
||||
#: accounting/models.py:192 club/models.py:173 counter/models.py:428
|
||||
#: accounting/models.py:192 club/models.py:184 counter/models.py:433
|
||||
#: election/models.py:18 launderette/models.py:144
|
||||
msgid "start date"
|
||||
msgstr "date de début"
|
||||
|
||||
#: accounting/models.py:193 club/models.py:174 counter/models.py:429
|
||||
#: accounting/models.py:193 club/models.py:185 counter/models.py:434
|
||||
#: election/models.py:19
|
||||
msgid "end date"
|
||||
msgstr "date de fin"
|
||||
@ -105,8 +105,8 @@ msgstr "est fermé"
|
||||
msgid "club account"
|
||||
msgstr "compte club"
|
||||
|
||||
#: accounting/models.py:197 accounting/models.py:253 counter/models.py:52
|
||||
#: counter/models.py:268
|
||||
#: accounting/models.py:197 accounting/models.py:253 counter/models.py:53
|
||||
#: counter/models.py:273
|
||||
msgid "amount"
|
||||
msgstr "montant"
|
||||
|
||||
@ -126,18 +126,18 @@ msgstr "numéro"
|
||||
msgid "journal"
|
||||
msgstr "classeur"
|
||||
|
||||
#: accounting/models.py:254 core/models.py:577 core/models.py:948
|
||||
#: core/models.py:988 counter/models.py:271 counter/models.py:319
|
||||
#: counter/models.py:445 eboutic/models.py:39 eboutic/models.py:72
|
||||
#: forum/models.py:194 forum/models.py:249 stock/models.py:76
|
||||
#: accounting/models.py:254 core/models.py:596 core/models.py:967
|
||||
#: core/models.py:1007 counter/models.py:276 counter/models.py:324
|
||||
#: counter/models.py:450 eboutic/models.py:39 eboutic/models.py:72
|
||||
#: forum/models.py:238 forum/models.py:309 stock/models.py:76
|
||||
msgid "date"
|
||||
msgstr "date"
|
||||
|
||||
#: accounting/models.py:255 counter/models.py:446 stock/models.py:79
|
||||
#: accounting/models.py:255 counter/models.py:451 stock/models.py:79
|
||||
msgid "comment"
|
||||
msgstr "commentaire"
|
||||
|
||||
#: accounting/models.py:256 counter/models.py:272 counter/models.py:320
|
||||
#: accounting/models.py:256 counter/models.py:277 counter/models.py:325
|
||||
#: subscription/models.py:53
|
||||
msgid "payment method"
|
||||
msgstr "méthode de paiement"
|
||||
@ -163,7 +163,7 @@ msgid "accounting type"
|
||||
msgstr "type comptable"
|
||||
|
||||
#: accounting/models.py:265 accounting/models.py:364 accounting/models.py:390
|
||||
#: accounting/models.py:413 counter/models.py:311
|
||||
#: accounting/models.py:413 counter/models.py:316
|
||||
msgid "label"
|
||||
msgstr "étiquette"
|
||||
|
||||
@ -242,7 +242,7 @@ msgstr ""
|
||||
"Vous devez fournir soit un type comptable simplifié ou un type comptable "
|
||||
"standard"
|
||||
|
||||
#: accounting/models.py:359 counter/models.py:128
|
||||
#: accounting/models.py:359 counter/models.py:129
|
||||
msgid "code"
|
||||
msgstr "code"
|
||||
|
||||
@ -335,7 +335,7 @@ msgstr "Compte en banque : "
|
||||
#: counter/templates/counter/last_ops.jinja:59
|
||||
#: election/templates/election/election_detail.jinja:280
|
||||
#: election/templates/election/election_detail.jinja:329
|
||||
#: forum/templates/forum/macros.jinja:20 forum/templates/forum/macros.jinja:110
|
||||
#: forum/templates/forum/macros.jinja:21 forum/templates/forum/macros.jinja:113
|
||||
#: launderette/templates/launderette/launderette_admin.jinja:16
|
||||
#: launderette/views.py:178 sas/templates/sas/album.jinja:26
|
||||
#: sas/templates/sas/moderation.jinja:18 sas/templates/sas/picture.jinja:74
|
||||
@ -379,8 +379,8 @@ msgstr "Nouveau compte club"
|
||||
#: election/templates/election/election_detail.jinja:279
|
||||
#: election/templates/election/election_detail.jinja:326
|
||||
#: election/templates/election/election_detail.jinja:374
|
||||
#: forum/templates/forum/macros.jinja:19 forum/templates/forum/macros.jinja:56
|
||||
#: forum/templates/forum/macros.jinja:104
|
||||
#: forum/templates/forum/macros.jinja:20 forum/templates/forum/macros.jinja:62
|
||||
#: forum/templates/forum/macros.jinja:107
|
||||
#: launderette/templates/launderette/launderette_list.jinja:16
|
||||
#: sas/templates/sas/album.jinja:18 sas/templates/sas/picture.jinja:100
|
||||
#: trombi/templates/trombi/detail.jinja:9
|
||||
@ -797,11 +797,11 @@ msgstr "Opérations sans étiquette"
|
||||
msgid "Refound this account"
|
||||
msgstr "Rembourser ce compte"
|
||||
|
||||
#: club/models.py:44
|
||||
#: club/models.py:45
|
||||
msgid "unix name"
|
||||
msgstr "nom unix"
|
||||
|
||||
#: club/models.py:48
|
||||
#: club/models.py:49
|
||||
msgid ""
|
||||
"Enter a valid unix name. This value may contain only letters, numbers ./-/_ "
|
||||
"characters."
|
||||
@ -809,52 +809,52 @@ msgstr ""
|
||||
"Entrez un nom UNIX valide. Cette valeur peut contenir uniquement des "
|
||||
"lettres, des nombres, et les caractères ./-/_"
|
||||
|
||||
#: club/models.py:53
|
||||
#: club/models.py:54
|
||||
msgid "A club with that unix name already exists."
|
||||
msgstr "Un club avec ce nom UNIX existe déjà."
|
||||
|
||||
#: club/models.py:56 core/models.py:189
|
||||
#: club/models.py:57 core/models.py:189
|
||||
msgid "address"
|
||||
msgstr "Adresse"
|
||||
|
||||
#: club/models.py:62 core/models.py:150
|
||||
#: club/models.py:63 core/models.py:150
|
||||
msgid "home"
|
||||
msgstr "home"
|
||||
|
||||
#: club/models.py:74
|
||||
#: club/models.py:75
|
||||
msgid "You can not make loops in clubs"
|
||||
msgstr "Vous ne pouvez pas faire de boucles dans les clubs"
|
||||
|
||||
#: club/models.py:88
|
||||
#: club/models.py:89
|
||||
msgid "A club with that unix_name already exists"
|
||||
msgstr "Un club avec ce nom UNIX existe déjà."
|
||||
|
||||
#: club/models.py:171 counter/models.py:426 counter/models.py:443
|
||||
#: club/models.py:182 counter/models.py:431 counter/models.py:448
|
||||
#: eboutic/models.py:38 eboutic/models.py:71 election/models.py:130
|
||||
#: launderette/models.py:111 launderette/models.py:148 sas/models.py:156
|
||||
msgid "user"
|
||||
msgstr "nom d'utilisateur"
|
||||
|
||||
#: club/models.py:175 core/models.py:169 election/models.py:129
|
||||
#: club/models.py:186 core/models.py:169 election/models.py:129
|
||||
#: election/models.py:145
|
||||
msgid "role"
|
||||
msgstr "rôle"
|
||||
|
||||
#: club/models.py:177 core/models.py:61 counter/models.py:100
|
||||
#: counter/models.py:125 election/models.py:15 election/models.py:82
|
||||
#: election/models.py:131 forum/models.py:50 forum/models.py:149
|
||||
#: club/models.py:188 core/models.py:61 counter/models.py:101
|
||||
#: counter/models.py:126 election/models.py:15 election/models.py:82
|
||||
#: election/models.py:131 forum/models.py:51 forum/models.py:183
|
||||
msgid "description"
|
||||
msgstr "description"
|
||||
|
||||
#: club/models.py:182
|
||||
#: club/models.py:193
|
||||
msgid "User must be subscriber to take part to a club"
|
||||
msgstr "L'utilisateur doit être cotisant pour faire partie d'un club"
|
||||
|
||||
#: club/models.py:184
|
||||
#: club/models.py:195
|
||||
msgid "User is already member of that club"
|
||||
msgstr "L'utilisateur est déjà membre de ce club"
|
||||
|
||||
#: club/models.py:188
|
||||
#: club/models.py:199
|
||||
msgid "past member"
|
||||
msgstr "Anciens membres"
|
||||
|
||||
@ -1108,7 +1108,8 @@ msgid "Call"
|
||||
msgstr "Appel"
|
||||
|
||||
#: com/models.py:60 com/models.py:102 com/models.py:149 election/models.py:14
|
||||
#: election/models.py:81 election/models.py:118 forum/models.py:192
|
||||
#: election/models.py:81 election/models.py:118 forum/models.py:185
|
||||
#: forum/models.py:236
|
||||
msgid "title"
|
||||
msgstr "titre"
|
||||
|
||||
@ -1120,7 +1121,7 @@ msgstr "résumé"
|
||||
msgid "content"
|
||||
msgstr "contenu"
|
||||
|
||||
#: com/models.py:63 core/models.py:987 launderette/models.py:84
|
||||
#: com/models.py:63 core/models.py:1006 launderette/models.py:84
|
||||
#: launderette/models.py:109 launderette/models.py:145 stock/models.py:59
|
||||
#: stock/models.py:98
|
||||
msgid "type"
|
||||
@ -1130,7 +1131,7 @@ msgstr "type"
|
||||
msgid "author"
|
||||
msgstr "auteur"
|
||||
|
||||
#: com/models.py:66 core/models.py:578
|
||||
#: com/models.py:66 core/models.py:597
|
||||
msgid "is moderated"
|
||||
msgstr "est modéré"
|
||||
|
||||
@ -1202,8 +1203,8 @@ msgstr "Type"
|
||||
#: com/templates/com/news_admin_list.jinja:15
|
||||
#: com/templates/com/news_admin_list.jinja:50
|
||||
#: com/templates/com/weekmail.jinja:19 com/templates/com/weekmail.jinja:48
|
||||
#: forum/templates/forum/forum.jinja:26 forum/templates/forum/forum.jinja:44
|
||||
#: forum/views.py:127
|
||||
#: forum/templates/forum/forum.jinja:27 forum/templates/forum/forum.jinja:46
|
||||
#: forum/templates/forum/main.jinja:25 forum/views.py:141
|
||||
msgid "Title"
|
||||
msgstr "Titre"
|
||||
|
||||
@ -1215,7 +1216,7 @@ msgstr "Résumé"
|
||||
#: com/templates/com/news_admin_list.jinja:18
|
||||
#: com/templates/com/news_admin_list.jinja:53
|
||||
#: com/templates/com/weekmail.jinja:17 com/templates/com/weekmail.jinja:46
|
||||
#: forum/templates/forum/forum.jinja:48
|
||||
#: forum/templates/forum/forum.jinja:50
|
||||
msgid "Author"
|
||||
msgstr "Auteur"
|
||||
|
||||
@ -1663,124 +1664,124 @@ msgstr "adresse des parents"
|
||||
msgid "is subscriber viewable"
|
||||
msgstr "profil visible par les cotisants"
|
||||
|
||||
#: core/models.py:330
|
||||
#: core/models.py:349
|
||||
msgid "A user with that username already exists"
|
||||
msgstr "Un utilisateur de ce nom d'utilisateur existe déjà"
|
||||
|
||||
#: core/models.py:455 core/templates/core/macros.jinja:17
|
||||
#: core/models.py:474 core/templates/core/macros.jinja:17
|
||||
#: core/templates/core/user_detail.jinja:14
|
||||
#: core/templates/core/user_detail.jinja:16
|
||||
#: core/templates/core/user_edit.jinja:17
|
||||
#: election/templates/election/election_detail.jinja:316
|
||||
#: forum/templates/forum/macros.jinja:87 forum/templates/forum/macros.jinja:89
|
||||
#: forum/templates/forum/macros.jinja:93 forum/templates/forum/macros.jinja:95
|
||||
#: forum/templates/forum/reply.jinja:36 forum/templates/forum/reply.jinja:38
|
||||
#: trombi/templates/trombi/user_tools.jinja:43
|
||||
msgid "Profile"
|
||||
msgstr "Profil"
|
||||
|
||||
#: core/models.py:535
|
||||
#: core/models.py:554
|
||||
msgid "Visitor"
|
||||
msgstr "Visiteur"
|
||||
|
||||
#: core/models.py:540
|
||||
#: core/models.py:559
|
||||
msgid "do you want to receive the weekmail"
|
||||
msgstr "voulez-vous recevoir le Weekmail"
|
||||
|
||||
#: core/models.py:545
|
||||
#: core/models.py:564
|
||||
msgid "define if we show a users stats"
|
||||
msgstr "Definit si l'on montre les statistiques de l'utilisateur"
|
||||
|
||||
#: core/models.py:547
|
||||
#: core/models.py:566
|
||||
msgid "Show your account statistics to others"
|
||||
msgstr "Montrez vos statistiques de compte aux autres"
|
||||
|
||||
#: core/models.py:566
|
||||
#: core/models.py:585
|
||||
msgid "file name"
|
||||
msgstr "nom du fichier"
|
||||
|
||||
#: core/models.py:567 core/models.py:775
|
||||
#: core/models.py:586 core/models.py:794
|
||||
msgid "parent"
|
||||
msgstr "parent"
|
||||
|
||||
#: core/models.py:568 core/models.py:584
|
||||
#: core/models.py:587 core/models.py:603
|
||||
msgid "file"
|
||||
msgstr "fichier"
|
||||
|
||||
#: core/models.py:569
|
||||
#: core/models.py:588
|
||||
msgid "compressed file"
|
||||
msgstr "version allégée"
|
||||
|
||||
#: core/models.py:570
|
||||
#: core/models.py:589
|
||||
msgid "thumbnail"
|
||||
msgstr "miniature"
|
||||
|
||||
#: core/models.py:571 core/models.py:579
|
||||
#: core/models.py:590 core/models.py:598
|
||||
msgid "owner"
|
||||
msgstr "propriétaire"
|
||||
|
||||
#: core/models.py:572 core/models.py:781 core/views/files.py:146
|
||||
#: core/models.py:591 core/models.py:800 core/views/files.py:146
|
||||
msgid "edit group"
|
||||
msgstr "groupe d'édition"
|
||||
|
||||
#: core/models.py:573 core/models.py:782 core/views/files.py:147
|
||||
#: core/models.py:592 core/models.py:801 core/views/files.py:147
|
||||
msgid "view group"
|
||||
msgstr "groupe de vue"
|
||||
|
||||
#: core/models.py:574
|
||||
#: core/models.py:593
|
||||
msgid "is folder"
|
||||
msgstr "est un dossier"
|
||||
|
||||
#: core/models.py:575
|
||||
#: core/models.py:594
|
||||
msgid "mime type"
|
||||
msgstr "type mime"
|
||||
|
||||
#: core/models.py:576
|
||||
#: core/models.py:595
|
||||
msgid "size"
|
||||
msgstr "taille"
|
||||
|
||||
#: core/models.py:580
|
||||
#: core/models.py:599
|
||||
msgid "asked for removal"
|
||||
msgstr "retrait demandé"
|
||||
|
||||
#: core/models.py:581
|
||||
#: core/models.py:600
|
||||
msgid "is in the SAS"
|
||||
msgstr "est dans le SAS"
|
||||
|
||||
#: core/models.py:620
|
||||
#: core/models.py:639
|
||||
msgid "Character '/' not authorized in name"
|
||||
msgstr "Le caractère '/' n'est pas autorisé dans les noms de fichier"
|
||||
|
||||
#: core/models.py:623 core/models.py:628
|
||||
#: core/models.py:642 core/models.py:647
|
||||
msgid "Loop in folder tree"
|
||||
msgstr "Boucle dans l'arborescence des dossiers"
|
||||
|
||||
#: core/models.py:632
|
||||
#: core/models.py:651
|
||||
msgid "You can not make a file be a children of a non folder file"
|
||||
msgstr ""
|
||||
"Vous ne pouvez pas mettre un fichier enfant de quelque chose qui n'est pas "
|
||||
"un dossier"
|
||||
|
||||
#: core/models.py:636
|
||||
#: core/models.py:655
|
||||
msgid "Duplicate file"
|
||||
msgstr "Un fichier de ce nom existe déjà"
|
||||
|
||||
#: core/models.py:650
|
||||
#: core/models.py:669
|
||||
msgid "You must provide a file"
|
||||
msgstr "Vous devez fournir un fichier"
|
||||
|
||||
#: core/models.py:716
|
||||
#: core/models.py:735
|
||||
msgid "Folder: "
|
||||
msgstr "Dossier : "
|
||||
|
||||
#: core/models.py:718
|
||||
#: core/models.py:737
|
||||
msgid "File: "
|
||||
msgstr "Fichier : "
|
||||
|
||||
#: core/models.py:766
|
||||
#: core/models.py:785
|
||||
msgid "page unix name"
|
||||
msgstr "nom unix de la page"
|
||||
|
||||
#: core/models.py:770
|
||||
#: core/models.py:789
|
||||
msgid ""
|
||||
"Enter a valid page name. This value may contain only unaccented letters, "
|
||||
"numbers and ./+/-/_ characters."
|
||||
@ -1788,51 +1789,51 @@ msgstr ""
|
||||
"Entrez un nom de page correct. Uniquement des lettres non accentuées, "
|
||||
"numéros, et ./+/-/_"
|
||||
|
||||
#: core/models.py:778
|
||||
#: core/models.py:797
|
||||
msgid "page name"
|
||||
msgstr "nom de la page"
|
||||
|
||||
#: core/models.py:779
|
||||
#: core/models.py:798
|
||||
msgid "owner group"
|
||||
msgstr "groupe propriétaire"
|
||||
|
||||
#: core/models.py:783
|
||||
#: core/models.py:802
|
||||
msgid "lock user"
|
||||
msgstr "utilisateur bloquant"
|
||||
|
||||
#: core/models.py:784
|
||||
#: core/models.py:803
|
||||
msgid "lock_timeout"
|
||||
msgstr "décompte du déblocage"
|
||||
|
||||
#: core/models.py:811
|
||||
#: core/models.py:830
|
||||
msgid "Duplicate page"
|
||||
msgstr "Une page de ce nom existe déjà"
|
||||
|
||||
#: core/models.py:817
|
||||
#: core/models.py:836
|
||||
msgid "Loop in page tree"
|
||||
msgstr "Boucle dans l'arborescence des pages"
|
||||
|
||||
#: core/models.py:945
|
||||
#: core/models.py:964
|
||||
msgid "revision"
|
||||
msgstr "révision"
|
||||
|
||||
#: core/models.py:946
|
||||
#: core/models.py:965
|
||||
msgid "page title"
|
||||
msgstr "titre de la page"
|
||||
|
||||
#: core/models.py:947
|
||||
#: core/models.py:966
|
||||
msgid "page content"
|
||||
msgstr "contenu de la page"
|
||||
|
||||
#: core/models.py:985
|
||||
#: core/models.py:1004
|
||||
msgid "url"
|
||||
msgstr "url"
|
||||
|
||||
#: core/models.py:986
|
||||
#: core/models.py:1005
|
||||
msgid "param"
|
||||
msgstr "param"
|
||||
|
||||
#: core/models.py:989
|
||||
#: core/models.py:1008
|
||||
msgid "viewed"
|
||||
msgstr "vue"
|
||||
|
||||
@ -1898,7 +1899,7 @@ msgstr "SAS"
|
||||
#: core/templates/core/base.jinja:94 forum/templates/forum/forum.jinja:10
|
||||
#: forum/templates/forum/last_unread.jinja:12
|
||||
#: forum/templates/forum/main.jinja:6 forum/templates/forum/main.jinja.py:11
|
||||
#: forum/templates/forum/main.jinja:13 forum/templates/forum/reply.jinja:15
|
||||
#: forum/templates/forum/main.jinja:14 forum/templates/forum/reply.jinja:15
|
||||
#: forum/templates/forum/topic.jinja:30
|
||||
msgid "Forum"
|
||||
msgstr "Forum"
|
||||
@ -1973,22 +1974,6 @@ msgstr "Confirmation"
|
||||
msgid "Cancel"
|
||||
msgstr "Annuler"
|
||||
|
||||
#: core/templates/core/doku_to_markdown.jinja:4
|
||||
msgid "Doku to Markdown"
|
||||
msgstr "Doku vers Markdown"
|
||||
|
||||
#: core/templates/core/doku_to_markdown.jinja:13
|
||||
msgid "Convert"
|
||||
msgstr "Convertir"
|
||||
|
||||
#: core/templates/core/doku_to_markdown.jinja:16
|
||||
msgid "Markdown"
|
||||
msgstr "Markdown"
|
||||
|
||||
#: core/templates/core/doku_to_markdown.jinja:20
|
||||
msgid "Render"
|
||||
msgstr "Rendu"
|
||||
|
||||
#: core/templates/core/edit.jinja:5 core/templates/core/edit.jinja.py:13
|
||||
#: core/templates/core/file_edit.jinja:4
|
||||
#: counter/templates/counter/cash_register_summary.jinja:4
|
||||
@ -2357,6 +2342,22 @@ msgstr "Utilisateurs"
|
||||
msgid "Clubs"
|
||||
msgstr "Clubs"
|
||||
|
||||
#: core/templates/core/to_markdown.jinja:4
|
||||
msgid "To Markdown"
|
||||
msgstr "Vers Markdown"
|
||||
|
||||
#: core/templates/core/to_markdown.jinja:15
|
||||
msgid "Convert"
|
||||
msgstr "Convertir"
|
||||
|
||||
#: core/templates/core/to_markdown.jinja:18
|
||||
msgid "Markdown"
|
||||
msgstr "Markdown"
|
||||
|
||||
#: core/templates/core/to_markdown.jinja:22
|
||||
msgid "Render"
|
||||
msgstr "Rendu"
|
||||
|
||||
#: core/templates/core/user_account.jinja:8
|
||||
msgid "Year"
|
||||
msgstr "Année"
|
||||
@ -2768,84 +2769,84 @@ msgstr "Photos"
|
||||
msgid "User already has a profile picture"
|
||||
msgstr "L'utilisateur a déjà une photo de profil"
|
||||
|
||||
#: counter/models.py:51
|
||||
#: counter/models.py:52
|
||||
msgid "account id"
|
||||
msgstr "numéro de compte"
|
||||
|
||||
#: counter/models.py:55
|
||||
#: counter/models.py:56
|
||||
msgid "customer"
|
||||
msgstr "client"
|
||||
|
||||
#: counter/models.py:56
|
||||
#: counter/models.py:57
|
||||
msgid "customers"
|
||||
msgstr "clients"
|
||||
|
||||
#: counter/models.py:76 counter/templates/counter/counter_click.jinja:48
|
||||
#: counter/models.py:77 counter/templates/counter/counter_click.jinja:48
|
||||
#: counter/templates/counter/counter_click.jinja:82
|
||||
msgid "Not enough money"
|
||||
msgstr "Solde insuffisant"
|
||||
|
||||
#: counter/models.py:104 counter/models.py:126
|
||||
#: counter/models.py:105 counter/models.py:127
|
||||
msgid "product type"
|
||||
msgstr "type du produit"
|
||||
|
||||
#: counter/models.py:129
|
||||
#: counter/models.py:130
|
||||
msgid "purchase price"
|
||||
msgstr "prix d'achat"
|
||||
|
||||
#: counter/models.py:130
|
||||
#: counter/models.py:131
|
||||
msgid "selling price"
|
||||
msgstr "prix de vente"
|
||||
|
||||
#: counter/models.py:131
|
||||
#: counter/models.py:132
|
||||
msgid "special selling price"
|
||||
msgstr "prix de vente spécial"
|
||||
|
||||
#: counter/models.py:132
|
||||
#: counter/models.py:133
|
||||
msgid "icon"
|
||||
msgstr "icône"
|
||||
|
||||
#: counter/models.py:134
|
||||
#: counter/models.py:135
|
||||
msgid "limit age"
|
||||
msgstr "âge limite"
|
||||
|
||||
#: counter/models.py:135
|
||||
#: counter/models.py:136
|
||||
msgid "tray price"
|
||||
msgstr "prix plateau"
|
||||
|
||||
#: counter/models.py:136
|
||||
#: counter/models.py:137
|
||||
msgid "parent product"
|
||||
msgstr "produit parent"
|
||||
|
||||
#: counter/models.py:138
|
||||
#: counter/models.py:139
|
||||
msgid "buying groups"
|
||||
msgstr "groupe d'achat"
|
||||
|
||||
#: counter/models.py:139
|
||||
#: counter/models.py:140
|
||||
msgid "archived"
|
||||
msgstr "archivé"
|
||||
|
||||
#: counter/models.py:142 counter/models.py:526
|
||||
#: counter/models.py:143 counter/models.py:531
|
||||
msgid "product"
|
||||
msgstr "produit"
|
||||
|
||||
#: counter/models.py:161
|
||||
#: counter/models.py:162
|
||||
msgid "products"
|
||||
msgstr "produits"
|
||||
|
||||
#: counter/models.py:162
|
||||
#: counter/models.py:163
|
||||
msgid "counter type"
|
||||
msgstr "type de comptoir"
|
||||
|
||||
#: counter/models.py:164
|
||||
#: counter/models.py:165
|
||||
msgid "Bar"
|
||||
msgstr "Bar"
|
||||
|
||||
#: counter/models.py:164
|
||||
#: counter/models.py:165
|
||||
msgid "Office"
|
||||
msgstr "Bureau"
|
||||
|
||||
#: counter/models.py:164 counter/templates/counter/counter_list.jinja:11
|
||||
#: counter/models.py:165 counter/templates/counter/counter_list.jinja:11
|
||||
#: eboutic/templates/eboutic/eboutic_main.jinja:4
|
||||
#: eboutic/templates/eboutic/eboutic_main.jinja:24
|
||||
#: eboutic/templates/eboutic/eboutic_makecommand.jinja:8
|
||||
@ -2854,62 +2855,62 @@ msgstr "Bureau"
|
||||
msgid "Eboutic"
|
||||
msgstr "Eboutic"
|
||||
|
||||
#: counter/models.py:165
|
||||
#: counter/models.py:166
|
||||
msgid "sellers"
|
||||
msgstr "vendeurs"
|
||||
|
||||
#: counter/models.py:168 launderette/models.py:147
|
||||
#: counter/models.py:169 launderette/models.py:147
|
||||
msgid "token"
|
||||
msgstr "jeton"
|
||||
|
||||
#: counter/models.py:171 counter/models.py:427 counter/models.py:444
|
||||
#: counter/models.py:172 counter/models.py:432 counter/models.py:449
|
||||
#: launderette/models.py:38 stock/models.py:39
|
||||
msgid "counter"
|
||||
msgstr "comptoir"
|
||||
|
||||
#: counter/models.py:274
|
||||
#: counter/models.py:279
|
||||
msgid "bank"
|
||||
msgstr "banque"
|
||||
|
||||
#: counter/models.py:276 counter/models.py:322
|
||||
#: counter/models.py:281 counter/models.py:327
|
||||
msgid "is validated"
|
||||
msgstr "est validé"
|
||||
|
||||
#: counter/models.py:279
|
||||
#: counter/models.py:284
|
||||
msgid "refilling"
|
||||
msgstr "rechargement"
|
||||
|
||||
#: counter/models.py:315 eboutic/models.py:127
|
||||
#: counter/models.py:320 eboutic/models.py:127
|
||||
msgid "unit price"
|
||||
msgstr "prix unitaire"
|
||||
|
||||
#: counter/models.py:316 counter/models.py:516 eboutic/models.py:128
|
||||
#: counter/models.py:321 counter/models.py:521 eboutic/models.py:128
|
||||
msgid "quantity"
|
||||
msgstr "quantité"
|
||||
|
||||
#: counter/models.py:321
|
||||
#: counter/models.py:326
|
||||
msgid "Sith account"
|
||||
msgstr "Compte utilisateur"
|
||||
|
||||
#: counter/models.py:321 sith/settings.py:354 sith/settings.py:359
|
||||
#: counter/models.py:326 sith/settings.py:354 sith/settings.py:359
|
||||
#: sith/settings.py:381
|
||||
msgid "Credit card"
|
||||
msgstr "Carte bancaire"
|
||||
|
||||
#: counter/models.py:325
|
||||
#: counter/models.py:330
|
||||
msgid "selling"
|
||||
msgstr "vente"
|
||||
|
||||
#: counter/models.py:344
|
||||
#: counter/models.py:349
|
||||
msgid "Unknown event"
|
||||
msgstr "Événement inconnu"
|
||||
|
||||
#: counter/models.py:345
|
||||
#: counter/models.py:350
|
||||
#, python-format
|
||||
msgid "Eticket bought for the event %(event)s"
|
||||
msgstr "Eticket acheté pour l'événement %(event)s"
|
||||
|
||||
#: counter/models.py:347 counter/models.py:359
|
||||
#: counter/models.py:352 counter/models.py:364
|
||||
#, python-format
|
||||
msgid ""
|
||||
"You bought an eticket for the event %(event)s.\n"
|
||||
@ -2918,51 +2919,51 @@ msgstr ""
|
||||
"Vous avez acheté un Eticket pour l'événement %(event)s.\n"
|
||||
"Vous pouvez le télécharger sur cette page: %(url)s"
|
||||
|
||||
#: counter/models.py:430
|
||||
#: counter/models.py:435
|
||||
msgid "last activity date"
|
||||
msgstr "dernière activité"
|
||||
|
||||
#: counter/models.py:433
|
||||
#: counter/models.py:438
|
||||
msgid "permanency"
|
||||
msgstr "permanence"
|
||||
|
||||
#: counter/models.py:447
|
||||
#: counter/models.py:452
|
||||
msgid "emptied"
|
||||
msgstr "coffre vidée"
|
||||
|
||||
#: counter/models.py:450
|
||||
#: counter/models.py:455
|
||||
msgid "cash register summary"
|
||||
msgstr "relevé de caisse"
|
||||
|
||||
#: counter/models.py:514
|
||||
#: counter/models.py:519
|
||||
msgid "cash summary"
|
||||
msgstr "relevé"
|
||||
|
||||
#: counter/models.py:515
|
||||
#: counter/models.py:520
|
||||
msgid "value"
|
||||
msgstr "valeur"
|
||||
|
||||
#: counter/models.py:517
|
||||
#: counter/models.py:522
|
||||
msgid "check"
|
||||
msgstr "chèque"
|
||||
|
||||
#: counter/models.py:520
|
||||
#: counter/models.py:525
|
||||
msgid "cash register summary item"
|
||||
msgstr "élément de relevé de caisse"
|
||||
|
||||
#: counter/models.py:527
|
||||
#: counter/models.py:532
|
||||
msgid "banner"
|
||||
msgstr "bannière"
|
||||
|
||||
#: counter/models.py:528
|
||||
#: counter/models.py:533
|
||||
msgid "event date"
|
||||
msgstr "date de l'événement"
|
||||
|
||||
#: counter/models.py:529
|
||||
#: counter/models.py:534
|
||||
msgid "event title"
|
||||
msgstr "titre de l'événement"
|
||||
|
||||
#: counter/models.py:530
|
||||
#: counter/models.py:535
|
||||
msgid "secret"
|
||||
msgstr "secret"
|
||||
|
||||
@ -3488,7 +3489,7 @@ msgstr "Les votes ouvriront "
|
||||
#: election/templates/election/election_list.jinja:34
|
||||
#: election/templates/election/election_list.jinja:39
|
||||
#: election/templates/election/election_list.jinja:42
|
||||
#: forum/templates/forum/macros.jinja:125
|
||||
#: forum/templates/forum/macros.jinja:129
|
||||
msgid " at "
|
||||
msgstr " à "
|
||||
|
||||
@ -3583,68 +3584,81 @@ msgstr "Début des candidatures"
|
||||
msgid "End candidature"
|
||||
msgstr "Fin des candidatures"
|
||||
|
||||
#: forum/models.py:51
|
||||
#: forum/models.py:52
|
||||
msgid "is a category"
|
||||
msgstr "est une catégorie"
|
||||
|
||||
#: forum/models.py:53
|
||||
#: forum/models.py:54
|
||||
msgid "owner club"
|
||||
msgstr "club propriétaire"
|
||||
|
||||
#: forum/models.py:59
|
||||
#: forum/models.py:60
|
||||
msgid "number to choose a specific forum ordering"
|
||||
msgstr "numéro spécifiant l'ordre d'affichage"
|
||||
|
||||
#: forum/models.py:103
|
||||
#: forum/models.py:61 forum/models.py:184
|
||||
msgid "the last message"
|
||||
msgstr "le dernier message"
|
||||
|
||||
#: forum/models.py:62
|
||||
msgid "number of topics"
|
||||
msgstr "nombre de sujets"
|
||||
|
||||
#: forum/models.py:137
|
||||
msgid "You can not make loops in forums"
|
||||
msgstr "Vous ne pouvez pas faire de boucles dans les forums"
|
||||
|
||||
#: forum/models.py:193
|
||||
#: forum/models.py:237
|
||||
msgid "message"
|
||||
msgstr "message"
|
||||
|
||||
#: forum/models.py:195
|
||||
#: forum/models.py:239
|
||||
msgid "readers"
|
||||
msgstr "lecteurs"
|
||||
|
||||
#: forum/models.py:241
|
||||
#: forum/models.py:240
|
||||
msgid "is deleted"
|
||||
msgstr "est supprimé"
|
||||
|
||||
#: forum/models.py:301
|
||||
msgid "Message edited by"
|
||||
msgstr "Message édité par"
|
||||
|
||||
#: forum/models.py:242
|
||||
#: forum/models.py:302
|
||||
msgid "Message deleted by"
|
||||
msgstr "Message supprimé par"
|
||||
|
||||
#: forum/models.py:243
|
||||
#: forum/models.py:303
|
||||
msgid "Message undeleted by"
|
||||
msgstr "Message restauré par"
|
||||
|
||||
#: forum/models.py:250
|
||||
#: forum/models.py:310
|
||||
msgid "action"
|
||||
msgstr "action"
|
||||
|
||||
#: forum/models.py:259
|
||||
#: forum/models.py:325
|
||||
msgid "last read date"
|
||||
msgstr "dernière date de lecture"
|
||||
|
||||
#: forum/templates/forum/forum.jinja:19 forum/templates/forum/main.jinja:19
|
||||
#: forum/templates/forum/forum.jinja:20 forum/templates/forum/main.jinja:20
|
||||
msgid "New forum"
|
||||
msgstr "Nouveau forum"
|
||||
|
||||
#: forum/templates/forum/forum.jinja:21 forum/templates/forum/reply.jinja:8
|
||||
#: forum/templates/forum/forum.jinja:22 forum/templates/forum/reply.jinja:8
|
||||
#: forum/templates/forum/reply.jinja:25
|
||||
msgid "New topic"
|
||||
msgstr "Nouveau sujet"
|
||||
|
||||
#: forum/templates/forum/forum.jinja:30
|
||||
#: forum/templates/forum/forum.jinja:31 forum/templates/forum/main.jinja:29
|
||||
msgid "Topics"
|
||||
msgstr "Sujets"
|
||||
|
||||
#: forum/templates/forum/forum.jinja:33 forum/templates/forum/forum.jinja:54
|
||||
#: forum/templates/forum/forum.jinja:34 forum/templates/forum/forum.jinja:56
|
||||
#: forum/templates/forum/main.jinja:32
|
||||
msgid "Last message"
|
||||
msgstr "Dernier message"
|
||||
|
||||
#: forum/templates/forum/forum.jinja:51
|
||||
#: forum/templates/forum/forum.jinja:53
|
||||
msgid "Messages"
|
||||
msgstr "Messages"
|
||||
|
||||
@ -3657,36 +3671,36 @@ msgstr "Derniers messages non lus"
|
||||
msgid "Refresh"
|
||||
msgstr "Rafraîchir"
|
||||
|
||||
#: forum/templates/forum/macros.jinja:102
|
||||
#: forum/templates/forum/macros.jinja:105
|
||||
msgid "Reply as quote"
|
||||
msgstr "Répondre en citant"
|
||||
|
||||
#: forum/templates/forum/macros.jinja:108
|
||||
#: forum/templates/forum/macros.jinja:111
|
||||
msgid "Undelete"
|
||||
msgstr "Restaurer"
|
||||
|
||||
#: forum/templates/forum/macros.jinja:126
|
||||
#: forum/templates/forum/macros.jinja:130
|
||||
msgid " the "
|
||||
msgstr " le "
|
||||
|
||||
#: forum/templates/forum/macros.jinja:138
|
||||
#: forum/templates/forum/macros.jinja:142
|
||||
msgid "Deleted or unreadable message."
|
||||
msgstr "Message supprimé ou non-visible."
|
||||
|
||||
#: forum/templates/forum/main.jinja:15
|
||||
#: forum/templates/forum/main.jinja:16
|
||||
msgid "View last unread messages"
|
||||
msgstr "Voir les derniers messages non lus"
|
||||
|
||||
#: forum/templates/forum/reply.jinja:6 forum/templates/forum/reply.jinja:23
|
||||
#: forum/templates/forum/topic.jinja:39 forum/templates/forum/topic.jinja:58
|
||||
#: forum/templates/forum/topic.jinja:40 forum/templates/forum/topic.jinja:59
|
||||
msgid "Reply"
|
||||
msgstr "Répondre"
|
||||
|
||||
#: forum/views.py:92
|
||||
#: forum/views.py:97
|
||||
msgid "Apply rights and club owner recursively"
|
||||
msgstr "Appliquer les droits et le club propriétaire récursivement"
|
||||
|
||||
#: forum/views.py:230
|
||||
#: forum/views.py:253
|
||||
#, python-format
|
||||
msgid "%(author)s said"
|
||||
msgstr "Citation de %(author)s"
|
||||
@ -4583,3 +4597,6 @@ msgstr "Vous ne pouvez plus écrire de commentaires, la date est passée."
|
||||
#, python-format
|
||||
msgid "Maximum characters: %(max_length)s"
|
||||
msgstr "Nombre de caractères max: %(max_length)s"
|
||||
|
||||
#~ msgid "Doku to Markdown"
|
||||
#~ msgstr "Doku vers Markdown"
|
||||
|
@ -45,7 +45,7 @@ from django.core.files import File
|
||||
|
||||
|
||||
from core.models import User, SithFile
|
||||
from core.utils import doku_to_markdown
|
||||
from core.utils import doku_to_markdown, bbcode_to_markdown
|
||||
from club.models import Club, Membership
|
||||
from counter.models import Customer, Counter, Selling, Refilling, Product, ProductType, Permanency, Eticket
|
||||
from subscription.models import Subscription
|
||||
@ -1279,7 +1279,7 @@ def migrate_forum():
|
||||
if r['syntaxengine_message'] == "doku":
|
||||
msg.message = doku_to_markdown(to_unicode(r['contenu_message']))
|
||||
else:
|
||||
msg.message = to_unicode(r['contenu_message'])
|
||||
msg.message = bbcode_to_markdown(to_unicode(r['contenu_message']))
|
||||
msg.save()
|
||||
except Exception as e:
|
||||
print(" FAIL to migrate message: %s" % (repr(e)))
|
||||
|
Loading…
Reference in New Issue
Block a user