Fix a bug with blog articles
I noticed a bug completely by accident; sometimes, perhaps by pure chance or something, clicking on a blog post would not open the correct blog post file, and instead would lock all blog posts to one single file.
- Author
- Maarten Vangeneugden
- Date
- May 9, 2022, 10:26 p.m.
- Hash
- 95d6fa21f26e861a9f9458212349e807ba114d51
- Parent
- 0eb87046c5b1112d66eae80ea97bfb8cd527ff73
- Modified files
- locale/af/LC_MESSAGES/django.po
- locale/de/LC_MESSAGES/django.po
- locale/eo/LC_MESSAGES/django.po
- locale/es/LC_MESSAGES/django.po
- locale/fr/LC_MESSAGES/django.po
- locale/nl/LC_MESSAGES/django.po
- models.py
- templates/blog/index.djhtml
- templates/blog/locale/af/LC_MESSAGES/django.po
- templates/blog/locale/de/LC_MESSAGES/django.po
- templates/blog/locale/eo/LC_MESSAGES/django.po
- templates/blog/locale/es/LC_MESSAGES/django.po
- templates/blog/locale/fr/LC_MESSAGES/django.po
- templates/blog/locale/nl/LC_MESSAGES/django.po
- templates/blog/post.djhtml
- views.py
locale/af/LC_MESSAGES/django.po ¶
5 additions and 5 deletions.
View changes Hide changes
1 |
1 |
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER |
2 |
2 |
# This file is distributed under the same license as the PACKAGE package. |
3 |
3 |
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. |
4 |
4 |
# |
5 |
5 |
#, fuzzy |
6 |
6 |
msgid "" |
7 |
7 |
msgstr "" |
8 |
8 |
"Project-Id-Version: PACKAGE VERSION\n" |
9 |
9 |
"Report-Msgid-Bugs-To: \n" |
10 |
10 |
"POT-Creation-Date: 2022-04-04 23:18+0000\n" |
11 |
- | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
+ |
11 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
12 |
12 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
13 |
13 |
"Language-Team: LANGUAGE <LL@li.org>\n" |
14 |
14 |
"Language: \n" |
15 |
15 |
"MIME-Version: 1.0\n" |
16 |
16 |
"Content-Type: text/plain; charset=UTF-8\n" |
17 |
17 |
"Content-Transfer-Encoding: 8bit\n" |
18 |
18 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n" |
19 |
19 |
|
20 |
20 |
#: blog/views.py:28 |
21 |
- | msgid "Notepad from a student" |
+ |
21 |
msgid "Notepad from a student" |
22 |
22 |
msgstr "" |
23 |
23 |
|
24 |
24 |
#: blog/views.py:45 |
25 |
- | msgid "Comment succesfully submitted!" |
+ |
25 |
msgid "Comment succesfully submitted!" |
26 |
26 |
msgstr "" |
27 |
27 |
|
28 |
28 |
#: blog/views.py:49 |
29 |
- | msgid "" |
+ |
29 |
msgid "" |
30 |
30 |
"An error occured while trying to submit your comment. Please try again later." |
31 |
31 |
msgstr "" |
32 |
32 |
|
33 |
33 |
#: blog/views.py:88 |
34 |
- | msgid "Weekly-archief" |
+ |
34 |
msgid "Weekly-archief" |
35 |
35 |
msgstr "" |
36 |
36 |
locale/de/LC_MESSAGES/django.po ¶
9 additions and 8 deletions.
View changes Hide changes
1 |
1 |
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER |
2 |
2 |
# This file is distributed under the same license as the PACKAGE package. |
3 |
3 |
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. |
4 |
4 |
# |
5 |
5 |
#, fuzzy |
6 |
6 |
msgid "" |
7 |
7 |
msgstr "" |
8 |
8 |
"Project-Id-Version: PACKAGE VERSION\n" |
9 |
9 |
"Report-Msgid-Bugs-To: \n" |
10 |
10 |
"POT-Creation-Date: 2022-04-04 23:18+0000\n" |
11 |
- | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
+ |
11 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
12 |
12 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
13 |
13 |
"Language-Team: LANGUAGE <LL@li.org>\n" |
14 |
14 |
"Language: \n" |
15 |
15 |
"MIME-Version: 1.0\n" |
16 |
16 |
"Content-Type: text/plain; charset=UTF-8\n" |
17 |
17 |
"Content-Transfer-Encoding: 8bit\n" |
18 |
18 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n" |
19 |
19 |
|
20 |
20 |
#: blog/views.py:28 |
21 |
- | msgid "Notepad from a student" |
+ |
21 |
msgid "Notepad from a student" |
22 |
22 |
msgstr "" |
23 |
- | |
+ |
23 |
|
24 |
24 |
#: blog/views.py:45 |
25 |
- | msgid "Comment succesfully submitted!" |
+ |
25 |
msgid "Comment succesfully submitted!" |
26 |
26 |
msgstr "" |
27 |
- | |
+ |
27 |
|
28 |
28 |
#: blog/views.py:49 |
29 |
- | msgid "" |
+ |
29 |
msgid "" |
30 |
30 |
"An error occured while trying to submit your comment. Please try again later." |
31 |
31 |
msgstr "" |
32 |
32 |
|
+ |
33 |
|
33 |
34 |
#: blog/views.py:88 |
34 |
- | msgid "Weekly-archief" |
+ |
35 |
msgid "Weekly-archief" |
35 |
36 |
msgstr "" |
36 |
- | |
+ |
37 |
locale/eo/LC_MESSAGES/django.po ¶
5 additions and 5 deletions.
View changes Hide changes
1 |
1 |
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER |
2 |
2 |
# This file is distributed under the same license as the PACKAGE package. |
3 |
3 |
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. |
4 |
4 |
# |
5 |
5 |
#, fuzzy |
6 |
6 |
msgid "" |
7 |
7 |
msgstr "" |
8 |
8 |
"Project-Id-Version: PACKAGE VERSION\n" |
9 |
9 |
"Report-Msgid-Bugs-To: \n" |
10 |
10 |
"POT-Creation-Date: 2022-04-04 23:18+0000\n" |
11 |
- | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
+ |
11 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
12 |
12 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
13 |
13 |
"Language-Team: LANGUAGE <LL@li.org>\n" |
14 |
14 |
"Language: \n" |
15 |
15 |
"MIME-Version: 1.0\n" |
16 |
16 |
"Content-Type: text/plain; charset=UTF-8\n" |
17 |
17 |
"Content-Transfer-Encoding: 8bit\n" |
18 |
18 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n" |
19 |
19 |
|
20 |
20 |
#: blog/views.py:28 |
21 |
- | msgid "Notepad from a student" |
+ |
21 |
msgid "Notepad from a student" |
22 |
22 |
msgstr "" |
23 |
23 |
|
24 |
24 |
#: blog/views.py:45 |
25 |
- | msgid "Comment succesfully submitted!" |
+ |
25 |
msgid "Comment succesfully submitted!" |
26 |
26 |
msgstr "" |
27 |
27 |
|
28 |
28 |
#: blog/views.py:49 |
29 |
- | msgid "" |
+ |
29 |
msgid "" |
30 |
30 |
"An error occured while trying to submit your comment. Please try again later." |
31 |
31 |
msgstr "" |
32 |
32 |
|
33 |
33 |
#: blog/views.py:88 |
34 |
- | msgid "Weekly-archief" |
+ |
34 |
msgid "Weekly-archief" |
35 |
35 |
msgstr "" |
36 |
36 |
locale/es/LC_MESSAGES/django.po ¶
5 additions and 5 deletions.
View changes Hide changes
1 |
1 |
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER |
2 |
2 |
# This file is distributed under the same license as the PACKAGE package. |
3 |
3 |
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. |
4 |
4 |
# |
5 |
5 |
#, fuzzy |
6 |
6 |
msgid "" |
7 |
7 |
msgstr "" |
8 |
8 |
"Project-Id-Version: PACKAGE VERSION\n" |
9 |
9 |
"Report-Msgid-Bugs-To: \n" |
10 |
10 |
"POT-Creation-Date: 2022-04-04 23:18+0000\n" |
11 |
- | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
+ |
11 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
12 |
12 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
13 |
13 |
"Language-Team: LANGUAGE <LL@li.org>\n" |
14 |
14 |
"Language: \n" |
15 |
15 |
"MIME-Version: 1.0\n" |
16 |
16 |
"Content-Type: text/plain; charset=UTF-8\n" |
17 |
17 |
"Content-Transfer-Encoding: 8bit\n" |
18 |
18 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n" |
19 |
19 |
|
20 |
20 |
#: blog/views.py:28 |
21 |
- | msgid "Notepad from a student" |
+ |
21 |
msgid "Notepad from a student" |
22 |
22 |
msgstr "" |
23 |
23 |
|
24 |
24 |
#: blog/views.py:45 |
25 |
- | msgid "Comment succesfully submitted!" |
+ |
25 |
msgid "Comment succesfully submitted!" |
26 |
26 |
msgstr "" |
27 |
27 |
|
28 |
28 |
#: blog/views.py:49 |
29 |
- | msgid "" |
+ |
29 |
msgid "" |
30 |
30 |
"An error occured while trying to submit your comment. Please try again later." |
31 |
31 |
msgstr "" |
32 |
32 |
|
33 |
33 |
#: blog/views.py:88 |
34 |
- | msgid "Weekly-archief" |
+ |
34 |
msgid "Weekly-archief" |
35 |
35 |
msgstr "" |
36 |
36 |
locale/fr/LC_MESSAGES/django.po ¶
8 additions and 21 deletions.
View changes Hide changes
1 |
1 |
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER |
2 |
2 |
# This file is distributed under the same license as the PACKAGE package. |
3 |
3 |
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. |
4 |
4 |
# |
5 |
5 |
#, fuzzy |
6 |
6 |
msgid "" |
7 |
7 |
msgstr "" |
8 |
8 |
"Project-Id-Version: PACKAGE VERSION\n" |
9 |
9 |
"Report-Msgid-Bugs-To: \n" |
10 |
10 |
"POT-Creation-Date: 2022-04-04 23:18+0000\n" |
11 |
- | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
+ |
11 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
12 |
12 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
13 |
13 |
"Language-Team: LANGUAGE <LL@li.org>\n" |
14 |
14 |
"Language: \n" |
15 |
15 |
"MIME-Version: 1.0\n" |
16 |
16 |
"Content-Type: text/plain; charset=UTF-8\n" |
17 |
17 |
"Content-Transfer-Encoding: 8bit\n" |
18 |
18 |
"Plural-Forms: nplurals=2; plural=(n > 1);\n" |
19 |
19 |
|
20 |
20 |
#: blog/views.py:28 |
21 |
- | msgid "Notepad from a student" |
+ |
21 |
msgid "Notepad from a student" |
22 |
22 |
msgstr "Bloc-notes d'un étudiant" |
23 |
23 |
|
24 |
24 |
#: blog/views.py:45 |
25 |
- | msgid "Comment succesfully submitted!" |
+ |
25 |
msgid "Comment succesfully submitted!" |
26 |
26 |
msgstr "" |
27 |
- | |
+ |
27 |
|
28 |
28 |
#: blog/views.py:49 |
29 |
- | msgid "" |
+ |
29 |
msgid "" |
30 |
30 |
"An error occured while trying to submit your comment. Please try again later." |
31 |
31 |
msgstr "" |
32 |
- | |
+ |
32 |
|
33 |
33 |
#: blog/views.py:88 |
34 |
- | msgid "Weekly-archief" |
+ |
34 |
msgid "Weekly-archief" |
35 |
35 |
msgstr "" |
36 |
- | |
37 |
- | #, fuzzy |
38 |
- | #~| msgid "Blog main page" |
39 |
- | #~ msgid "Back to main page" |
40 |
- | #~ msgstr "Blog // Page principal" |
41 |
- | |
42 |
- | #~ msgid "Contact" |
43 |
- | #~ msgstr "Contact" |
44 |
- | |
+ |
36 |
|
45 |
37 |
#~ msgid "" |
46 |
- | #~ "Maarten's personal blog, with sprinkles and a dollop of healthy bugs." |
47 |
- | #~ msgstr "" |
48 |
- | #~ "Blog personnel de Maarten, avec des sprinkles et un cuillerée des bogues " |
49 |
- | #~ "sains." |
50 |
- |
locale/nl/LC_MESSAGES/django.po ¶
7 additions and 6 deletions.
View changes Hide changes
1 |
1 |
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER |
2 |
2 |
# This file is distributed under the same license as the PACKAGE package. |
3 |
3 |
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. |
4 |
4 |
# |
5 |
5 |
msgid "" |
6 |
6 |
msgstr "" |
7 |
7 |
"Project-Id-Version: \n" |
8 |
8 |
"Report-Msgid-Bugs-To: \n" |
9 |
9 |
"POT-Creation-Date: 2022-04-04 23:18+0000\n" |
10 |
- | "PO-Revision-Date: 2021-10-30 16:10+0200\n" |
+ |
10 |
"PO-Revision-Date: 2021-10-30 16:10+0200\n" |
11 |
11 |
"Last-Translator: \n" |
12 |
12 |
"Language-Team: \n" |
13 |
13 |
"Language: nl\n" |
14 |
14 |
"MIME-Version: 1.0\n" |
15 |
15 |
"Content-Type: text/plain; charset=UTF-8\n" |
16 |
16 |
"Content-Transfer-Encoding: 8bit\n" |
17 |
17 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n" |
18 |
18 |
"X-Generator: Poedit 3.0\n" |
19 |
19 |
|
20 |
20 |
#: blog/views.py:28 |
21 |
- | msgid "Notepad from a student" |
+ |
21 |
msgid "Notepad from a student" |
22 |
22 |
msgstr "Studentikoos kladblok" |
23 |
23 |
|
24 |
24 |
#: blog/views.py:45 |
25 |
- | msgid "Comment succesfully submitted!" |
+ |
25 |
msgid "Comment succesfully submitted!" |
26 |
26 |
msgstr "" |
27 |
- | |
+ |
27 |
|
28 |
28 |
#: blog/views.py:49 |
29 |
- | msgid "" |
+ |
29 |
msgid "" |
30 |
30 |
"An error occured while trying to submit your comment. Please try again later." |
31 |
31 |
msgstr "" |
32 |
32 |
|
+ |
33 |
|
33 |
34 |
#: blog/views.py:88 |
34 |
- | msgid "Weekly-archief" |
+ |
35 |
msgid "Weekly-archief" |
35 |
36 |
msgstr "Weekly-archief" |
36 |
37 |
|
37 |
38 |
#, fuzzy |
38 |
39 |
#~| msgid "Blog main page" |
39 |
40 |
#~ msgid "Back to main page" |
40 |
41 |
#~ msgstr "Blog // Hoofdpagina" |
41 |
42 |
|
42 |
43 |
#~ msgid "Contact" |
43 |
44 |
#~ msgstr "Contact" |
44 |
45 |
|
45 |
46 |
#~ msgid "" |
46 |
47 |
#~ "Maarten's personal blog, with sprinkles and a dollop of healthy bugs." |
47 |
48 |
#~ msgstr "" |
48 |
49 |
#~ "Maartens persoonlijke blog, met sprinkeltjes en een doperwtje aan gezonde " |
49 |
50 |
#~ "bugs." |
50 |
51 |
models.py ¶
6 additions and 6 deletions.
View changes Hide changes
1 |
1 |
from django.utils import translation |
2 |
2 |
from django.template.defaultfilters import slugify |
3 |
3 |
from django.db import models |
4 |
4 |
from django.conf import settings # Necessary to get the link to the media root folder |
5 |
5 |
import pytz |
6 |
6 |
import datetime |
7 |
7 |
import os |
8 |
8 |
import subprocess |
9 |
9 |
|
10 |
10 |
from django.shortcuts import render as render_shortcut |
11 |
11 |
|
12 |
12 |
""" New version: |
13 |
13 |
- For each post, there's no longer a mandatory Dutch and English |
14 |
14 |
version. Instead, only the title needs to be in multiple languages. |
15 |
15 |
- There's a new table for the links to the articles themselves. These include a |
16 |
16 |
language code and a foreign key to the post they belong to. |
17 |
17 |
- If an article is available in the active language, but not tagged for the same |
18 |
18 |
dialect, then it should just show up without any warnings. |
19 |
19 |
- If an article is not available in the active language, only the title should |
20 |
20 |
show up, but where the short intro text would normally be, there should be an |
21 |
21 |
explanation that it's only available in other languages, and provide links to |
22 |
22 |
those versions. |
23 |
23 |
""" |
24 |
24 |
|
25 |
25 |
# Look, you think this function is worthless, it's not. It's required to make |
26 |
26 |
# migrations with manage.py, so here it stays, being empty and hollow like the |
27 |
27 |
# piece of shit it is. |
28 |
28 |
def post_title_directory(): |
29 |
29 |
pass |
30 |
30 |
|
31 |
31 |
|
32 |
32 |
class Post(models.Model): |
33 |
33 |
""" Represents a blog post.""" |
34 |
34 |
published = models.DateTimeField(auto_now_add=True) |
35 |
35 |
visible = models.BooleanField(default=True, |
36 |
36 |
help_text="Whether this post is shown in the index. If False, it's \ |
37 |
37 |
only accessible by direct link.") |
38 |
38 |
# TODO: The titles should all be changed to 'unique=True' to avoid slug |
39 |
39 |
# collisions. But at this moment, there are still some posts that don't have |
40 |
40 |
# a title in all these languages (and "" collides with ""), so until that's |
41 |
41 |
# fixed, they're set to False. |
42 |
42 |
title_en = models.CharField(max_length=64, unique=False, blank=False) |
43 |
43 |
title_nl = models.CharField(max_length=64, unique=False, blank=False) |
44 |
44 |
title_fr = models.CharField(max_length=64, unique=False, blank=True) |
45 |
45 |
title_de = models.CharField(max_length=64, unique=False, blank=True) |
46 |
46 |
title_es = models.CharField(max_length=64, unique=False, blank=True) |
47 |
47 |
title_eo = models.CharField(max_length=64, unique=False, blank=True) |
48 |
48 |
title_af = models.CharField(max_length=64, unique=False, blank=True) |
49 |
49 |
title_nl_be=models.CharField(max_length=64, unique=False, blank=True) |
50 |
50 |
title_fr_be=models.CharField(max_length=64, unique=False, blank=True) |
51 |
51 |
|
52 |
52 |
|
53 |
53 |
def __str__(self): |
54 |
54 |
return self.title() |
55 |
55 |
|
56 |
56 |
|
57 |
57 |
def articles(self): |
58 |
58 |
#print(len(Article.objects.filter(post=self))) |
59 |
59 |
return Article.objects.filter(post=self) |
60 |
60 |
|
61 |
61 |
def article(self): |
62 |
62 |
language_code = translation.get_language() |
63 |
63 |
print(language_code) |
64 |
64 |
# Retrieves all articles that have this post as their foreign key |
65 |
65 |
articles = Article.objects.filter(post=self) |
66 |
66 |
for a in articles: |
67 |
67 |
if a.language_code == language_code: |
68 |
68 |
return a |
69 |
69 |
# If no exact match was found, try again, but now accept other dialects |
70 |
70 |
# as well: |
71 |
71 |
for a in articles: |
72 |
72 |
if a.language_code.startswith(language_code): |
73 |
73 |
return a |
74 |
74 |
|
75 |
75 |
# If still no article was found, return None |
76 |
76 |
return None |
77 |
77 |
|
78 |
78 |
def title(self): |
79 |
79 |
language_code = translation.get_language() |
80 |
80 |
options = {'af': self.title_af, |
81 |
81 |
'de': self.title_de, |
82 |
82 |
'es': self.title_es, |
83 |
83 |
'en': self.title_en, |
84 |
84 |
'eo': self.title_eo, |
85 |
85 |
'fr': self.title_fr, |
86 |
86 |
'nl-be': self.title_nl_be, |
87 |
87 |
'fr-be': self.title_fr_be, |
88 |
88 |
'nl': self.title_nl} |
89 |
89 |
for code, translated_title in options.items(): |
90 |
90 |
if language_code.startswith(code): |
91 |
91 |
return translated_title |
92 |
92 |
# If no return has happened, default to English |
93 |
93 |
return self.title_en |
94 |
94 |
|
95 |
95 |
def org_to_html(file_path, return_djhtml_path=False): |
96 |
- | """ Converts the given org formatted file to HTML. |
+ |
96 |
""" Converts the given org formatted file to HTML. |
97 |
97 |
This function directly returns the resulting HTML code. This function uses |
98 |
98 |
the amazing Haskell library Pandoc to convert the file (and takes care |
99 |
99 |
of header id's and all that stuff). |
100 |
100 |
""" |
101 |
101 |
# FIXME: Remove hardcoded link to media. Replace with media tag! |
102 |
102 |
# XXX: The reason I'm first converting all occurences of .jpg][ and .png][ |
103 |
103 |
# to .jpgPANDOCBUG][ and .pngPANDOCBUG][, is because of a Pandoc bug that |
104 |
104 |
# removes the text links for images. It is afterwards converted back, no |
105 |
105 |
# worries. |
106 |
106 |
file = open(file_path, "r", encoding="utf-8") |
107 |
107 |
text = file.read() |
108 |
108 |
file.close() |
109 |
109 |
text = text.replace(".jpg][", ".jpgPANDOCBUG][") |
110 |
110 |
text = text.replace(".png][", ".pngPANDOCBUG][") |
111 |
111 |
file = open("/tmp/blog-file.org", "w", encoding="utf-8") |
112 |
- | file.write(text) |
+ |
112 |
file.write(text) |
113 |
113 |
file.close() |
114 |
114 |
# --wrap=none is necessary for the Article.headings method to function |
115 |
115 |
# properly, otherwise the heuristic fails on a regular basis |
116 |
116 |
html_text = subprocess.check_output(["pandoc", "--from=org", "--to=html", "--wrap=none", "/tmp/blog-file.org"]) |
117 |
- | html_text = html_text.decode("utf-8").replace(".jpgPANDOCBUG", ".jpg") |
+ |
117 |
html_text = html_text.decode("utf-8").replace(".jpgPANDOCBUG", ".jpg") |
118 |
118 |
html_text = html_text.replace(".pngPANDOCBUG", ".png") |
119 |
119 |
# Detecting where the footnote section starts, and removing that tag |
120 |
120 |
html_text = html_text.replace('<section class="footnotes footnotes-end-of-document" role="doc-endnotes">', "") |
121 |
121 |
#rendered_file_path = "file_path.rpartition('.')[0] + ".djhtml" |
122 |
122 |
rendered_file_path = "/tmp/blog-file.djhtml" |
123 |
- | rendered_file = open(rendered_file_path, "w", encoding="utf-8") |
+ |
123 |
rendered_file = open(rendered_file_path, "w", encoding="utf-8") |
124 |
124 |
rendered_file.write(html_text) |
125 |
125 |
rendered_file.close() |
126 |
126 |
if return_djhtml_path: |
127 |
127 |
return rendered_file_path |
128 |
128 |
else: |
129 |
129 |
return html_text |
130 |
130 |
|
131 |
131 |
class Article(models.Model): |
132 |
132 |
AFRIKAANS = 'af' |
133 |
133 |
BELGIAN_FRENCH = 'fr-be' |
134 |
134 |
DUTCH = 'nl' |
135 |
135 |
ESPERANTO = 'eo' |
136 |
136 |
ENGLISH = 'en' |
137 |
137 |
FLEMISH = 'nl-be' |
138 |
138 |
FRENCH = 'fr' |
139 |
139 |
GERMAN = 'de' |
140 |
140 |
SPANISH = 'es' |
141 |
141 |
|
142 |
142 |
LANGUAGE_CODES = [ |
143 |
143 |
(AFRIKAANS, 'Afrikaans'), |
144 |
144 |
(BELGIAN_FRENCH, 'Français (Belgique)'), |
145 |
145 |
(DUTCH, 'Nederlands'), |
146 |
146 |
(ESPERANTO, 'Esperanto'), |
147 |
147 |
(ENGLISH, 'English'), |
148 |
148 |
(FLEMISH, 'Vlaams'), |
149 |
149 |
(FRENCH, 'Français'), |
150 |
150 |
(GERMAN, 'Deutsch'), |
151 |
151 |
(SPANISH, 'Español')] |
152 |
152 |
|
153 |
153 |
visible = models.BooleanField(default=True) |
154 |
154 |
post = models.ForeignKey(Post, on_delete=models.CASCADE) |
155 |
155 |
language_code = models.CharField(max_length=16, |
156 |
156 |
choices = LANGUAGE_CODES, |
157 |
157 |
blank=False) |
158 |
158 |
# file_path shouldn't be unique, because the same article file could be used |
159 |
159 |
# for multiple dialects of the same language. |
160 |
160 |
file_path = models.FilePathField(path=settings.MEDIA_ROOT + "blog/articles/", |
161 |
161 |
blank=False) |
162 |
162 |
# Same reason, slug shouldn't be unique |
163 |
163 |
slug = models.SlugField(unique=False, blank=False, allow_unicode=True) |
164 |
164 |
title = models.CharField(max_length=64, unique=False, blank=True) |
165 |
165 |
|
166 |
166 |
def text(self): |
167 |
167 |
return org_to_html(self.file_path) |
168 |
- | def djhtml_file(self): |
+ |
168 |
def djhtml_file(self): |
169 |
169 |
return org_to_html(self.file_path, return_djhtml_path=True) |
170 |
- | def headings(self): |
+ |
170 |
def headings(self): |
171 |
171 |
""" Returns the headings and their slugs present in this article. Useful |
172 |
172 |
for building the navigation drawer. """ |
173 |
173 |
text = self.text() |
174 |
174 |
headers = list() |
175 |
175 |
lines = text.splitlines() |
176 |
176 |
|
177 |
177 |
for line in lines: |
178 |
178 |
# Heuristic approach to collecting headers |
179 |
179 |
if "<h" in line and "id=" in line and "</h" in line: |
180 |
180 |
first_part, second_part = line.split(">", maxsplit=1) |
181 |
181 |
slug = first_part.split('"')[-2] |
182 |
182 |
header = second_part.split("<", maxsplit=1)[0] |
183 |
183 |
headers.append((header, slug)) |
184 |
184 |
return headers |
185 |
185 |
|
186 |
186 |
|
187 |
187 |
|
188 |
188 |
|
189 |
189 |
class Comment(models.Model): |
190 |
190 |
""" Represents a comment on a blog post. |
191 |
191 |
Comments are not filtered by language; a |
192 |
192 |
comment made by someone reading the article in Dutch, that's written in |
193 |
193 |
Dutch, will show up (unedited) for somebody whom's reading the Spanish |
194 |
194 |
version. |
195 |
195 |
""" |
196 |
196 |
# Allows me to manually hide certain messages if need be |
197 |
197 |
visible = models.BooleanField(default=True) |
198 |
198 |
date = models.DateTimeField(auto_now_add=True) |
199 |
199 |
name = models.CharField(max_length=64, blank=True) |
200 |
200 |
text = models.TextField(max_length=10000, blank=False) # Should be more than enough |
201 |
201 |
# reaction_to is null if it's not a reaction to an existing comment |
202 |
202 |
reaction_to = models.ForeignKey('Comment', on_delete=models.CASCADE, null=True) |
203 |
203 |
from_myself = models.BooleanField(default=False) |
204 |
204 |
post = models.ForeignKey( |
205 |
205 |
Post, |
206 |
206 |
on_delete=models.CASCADE, |
207 |
207 |
null=False, |
208 |
208 |
) |
209 |
209 |
class meta: |
210 |
210 |
ordering = ['date'] # When printed, prints the oldest comment first. |
211 |
211 |
|
212 |
212 |
def reactions(self): |
213 |
213 |
# Should return the comments that are a reaction to this comment |
214 |
214 |
return Comment.objects.filter(reaction_to=self).order_by('-date') |
215 |
215 |
def __str__(self): |
216 |
216 |
return str(self.id) +" | "+ self.name |
217 |
217 |
def is_new(self): |
218 |
218 |
# True if this comment was created less than one minute ago. |
219 |
219 |
now = datetime.datetime.utcnow().replace(tzinfo=pytz.UTC) |
220 |
220 |
delta = now-self.date |
221 |
221 |
return delta.seconds < 60 |
222 |
222 |
|
223 |
223 |
|
224 |
224 |
class FeedItem(models.Model): |
225 |
225 |
""" An item that shows up in the RSS feed.""" |
226 |
226 |
title = models.CharField(max_length=64) |
227 |
227 |
added = models.DateTimeField(auto_now_add=True) |
228 |
228 |
description = models.CharField(max_length=400) |
229 |
229 |
link = models.URLField() |
230 |
230 |
templates/blog/index.djhtml ¶
25 additions and 10 deletions.
View changes Hide changes
1 |
1 |
{% load i18n %} |
2 |
2 |
{% load static %} |
3 |
3 |
|
4 |
4 |
{% block stylesheets %} |
5 |
5 |
{{ block.super }} |
6 |
6 |
<style> |
7 |
7 |
img { |
8 |
8 |
width: 80%; |
9 |
9 |
display: block; |
10 |
10 |
margin-left: auto; |
11 |
11 |
margin-right: auto; |
12 |
12 |
} |
13 |
13 |
video { |
14 |
14 |
width: 80%; |
15 |
15 |
} |
16 |
16 |
</style> |
17 |
17 |
{% endblock %} |
18 |
18 |
|
19 |
19 |
{% block title %}{% trans "Maarten's blog" %}{% endblock title %} |
20 |
20 |
|
21 |
21 |
{% block description %}{% blocktrans %}The always coherently put together, yet |
22 |
22 |
fuzzy blog of whatever sprouts in my mind.{% endblocktrans %} |
23 |
23 |
{% endblock description %} |
24 |
24 |
|
25 |
25 |
{% block header %} |
26 |
26 |
<header> |
27 |
27 |
<h1>{% trans "Notepad of a student" %}</h1> |
28 |
- | <label for="nav-drawer-toggle">≡</label> |
29 |
28 |
</header> |
+ |
29 |
</header> |
30 |
30 |
{% endblock header %} |
31 |
31 |
|
32 |
32 |
{% block nav %} |
33 |
33 |
<input id="nav-drawer-toggle" type="checkbox" /> |
34 |
34 |
<nav> |
35 |
35 |
<label for="nav-drawer-toggle"><!--🡨-->🡠</label> |
36 |
36 |
<h2>{% trans "Navigation" %}</h2> |
37 |
37 |
{% comment %} |
38 |
- | {% for post in posts %} |
+ |
38 |
<hr> |
+ |
39 |
{% for post in posts %} |
39 |
40 |
<a class="nav-link" href="{{ link }}">{{ title }}</a> |
40 |
- | {% endfor %} |
+ |
41 |
<a class="nav-link" href="{% url 'blog-post' post.article.language_code post.article.slug %}"> |
+ |
42 |
{{ post.title }} |
+ |
43 |
</a> |
+ |
44 |
{% else %} |
+ |
45 |
{% for article in post.articles %} |
+ |
46 |
<a class="nav-link" href="{% url 'blog-post' article.language_code article.slug %}"> |
+ |
47 |
{% if article.language_code == "nl-be" %} |
+ |
48 |
({% translate "Flemish" %}) |
+ |
49 |
{% elif article.language_code == "fr-be" %} |
+ |
50 |
({% translate "Belgian French" %}) |
+ |
51 |
{% endif %} |
+ |
52 |
{{ article.title }} |
+ |
53 |
</a> |
+ |
54 |
{% endfor %} |
+ |
55 |
{% endif %} |
+ |
56 |
<hr class="half"> |
+ |
57 |
{% endfor %} |
41 |
58 |
{% endcomment %} |
42 |
- | <hr class="half" /> |
43 |
- | <a class="nav-link" href="{% url 'about-index' %}">{% trans "Front page" %}</a> |
44 |
- | </nav> |
45 |
59 |
{% endblock nav %} |
46 |
60 |
|
47 |
61 |
{% block main %} |
48 |
62 |
|
49 |
63 |
<section class="emphasis"> |
50 |
64 |
<h1>{% trans "Blog" %}</h1> |
51 |
65 |
<p> |
52 |
66 |
{% blocktrans %}Welcome to my blog. Here, I write |
53 |
67 |
about things that interest me. Politics, coding, |
54 |
68 |
studying, life, or anything else I fancy rambling |
55 |
69 |
about. If you're in luck, I may've written it in a |
56 |
70 |
language that you understand better than English. |
57 |
71 |
{% endblocktrans %} |
58 |
72 |
</p> |
59 |
73 |
</section> |
60 |
74 |
|
61 |
75 |
<div class="fab"> |
62 |
- | <a href="{% url 'blog-feed' %}" id="feed-fab"> |
+ |
76 |
<a href="{% url 'blog-feed' %}" id="feed-fab"> |
63 |
77 |
<b>RSS</b> |
64 |
- | </a> |
+ |
78 |
<img src="{% get_media_prefix %}blog/path.png"> |
+ |
79 |
</a> |
65 |
80 |
</div> |
66 |
81 |
|
67 |
82 |
<section> |
68 |
83 |
<h1>Monthly</h1> |
69 |
- | <a class="btn fill" href="{% url "blog-archive" %}"> {% translate "Open archive" %}</a> |
+ |
84 |
<a class="btn fill" href="{% url "blog-archive" %}"> {% translate "Open archive" %}</a> |
70 |
85 |
{% include "blog/monthly.html" %} |
71 |
- | </section> |
+ |
86 |
</section> |
72 |
87 |
|
73 |
88 |
<div class="cards"> |
74 |
89 |
{% for post in posts %} |
75 |
90 |
<div class="card"> |
76 |
91 |
<h3>{{ post.title }}</h3> |
77 |
92 |
<h4>{{ post.published|date:"DATE_FORMAT" }}</h4> |
78 |
93 |
{% if post.article %} |
79 |
94 |
{# No need for surrounding <p> tags #} |
80 |
95 |
{{ post.article.text|safe|truncatewords_html:100 }} |
81 |
96 |
{# Pandoc automatically makes those #} |
82 |
97 |
<a class="btn outline" href="{% url 'blog-post' post.article.language_code post.article.slug %}"> |
83 |
98 |
📚 {% translate "Read on" %}</a> |
84 |
99 |
{% else %} |
85 |
100 |
{% get_current_language as CUR_LANG %} |
86 |
101 |
{% get_language_info for CUR_LANG as lang %} |
87 |
102 |
{{ CUR_LANG.name_translated }} |
88 |
103 |
<p>{% blocktranslate with cur_lang=lang.name_translated %}This blog |
89 |
104 |
post is not available in {{ cur_lang }}.{% endblocktranslate %} |
90 |
105 |
{% blocktranslate count counter=post.articles|length %} |
91 |
106 |
However, it is available in |
92 |
107 |
{% plural %} |
93 |
108 |
If you want, you can choose to read it in one of these |
94 |
109 |
languages: <br> |
95 |
110 |
{% endblocktranslate %} |
96 |
111 |
{% for article in post.articles %} |
97 |
112 |
{% if article.language_code == "nl-be" %} |
98 |
113 |
{% translate "Flemish" %}: |
99 |
114 |
{% elif article.language_code == "fr-be" %} |
100 |
115 |
{% translate "Belgian French" %}: |
101 |
116 |
{% else %} |
102 |
117 |
{% get_language_info for article.language_code as lang %} |
103 |
118 |
{{ lang.name_translated }}: |
104 |
119 |
{% endif %} |
105 |
120 |
<a href="{% url 'blog-post' article.language_code article.slug %}"> |
106 |
121 |
{{ article.title }} |
107 |
122 |
</a> |
108 |
123 |
{% if not forloop.last %}<br>{% endif %} |
109 |
124 |
{% endfor %} |
110 |
125 |
</p> |
111 |
126 |
{% endif %} |
112 |
127 |
</div> |
113 |
128 |
{% endfor %} |
114 |
129 |
{% comment %} |
115 |
130 |
{% for title, date, blog_text, link in posts %} |
116 |
131 |
<div class="card"> |
117 |
132 |
<h3>{{ title }}</h3> |
118 |
133 |
<h4>{{ date|date:"DATE_FORMAT" }}</h4> |
119 |
134 |
<a class="btn outline" href="{{link}}">📚 {% translate "Read on" %}</a> |
120 |
135 |
</div> |
121 |
136 |
{% endfor %} |
122 |
137 |
{% endcomment %} |
123 |
138 |
</div> |
124 |
139 |
|
125 |
140 |
{% endblock main %} |
126 |
141 |
templates/blog/locale/af/LC_MESSAGES/django.po ¶
26 additions and 26 deletions.
View changes Hide changes
1 |
1 |
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER |
2 |
2 |
# This file is distributed under the same license as the PACKAGE package. |
3 |
3 |
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. |
4 |
4 |
# |
5 |
5 |
#, fuzzy |
6 |
6 |
msgid "" |
7 |
7 |
msgstr "" |
8 |
8 |
"Project-Id-Version: PACKAGE VERSION\n" |
9 |
9 |
"Report-Msgid-Bugs-To: \n" |
10 |
10 |
"POT-Creation-Date: 2022-04-04 23:18+0000\n" |
11 |
- | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
+ |
11 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
12 |
12 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
13 |
13 |
"Language-Team: LANGUAGE <LL@li.org>\n" |
14 |
14 |
"Language: \n" |
15 |
15 |
"MIME-Version: 1.0\n" |
16 |
16 |
"Content-Type: text/plain; charset=UTF-8\n" |
17 |
17 |
"Content-Transfer-Encoding: 8bit\n" |
18 |
18 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n" |
19 |
19 |
|
20 |
20 |
#: blog/templates/blog/comment.djhtml:21 |
21 |
21 |
msgid "Respond" |
22 |
22 |
msgstr "" |
23 |
23 |
|
24 |
24 |
#: blog/templates/blog/comment.djhtml:31 blog/templates/blog/post.djhtml:118 |
25 |
- | msgid "Your name" |
+ |
25 |
msgid "Your name" |
26 |
26 |
msgstr "" |
27 |
27 |
|
28 |
28 |
#: blog/templates/blog/comment.djhtml:32 |
29 |
29 |
msgid "Your response" |
30 |
30 |
msgstr "" |
31 |
31 |
|
32 |
32 |
#: blog/templates/blog/comment.djhtml:33 blog/templates/blog/post.djhtml:120 |
33 |
- | msgid "Submit" |
+ |
33 |
msgid "Submit" |
34 |
34 |
msgstr "" |
35 |
35 |
|
36 |
36 |
#: blog/templates/blog/index.djhtml:20 |
37 |
37 |
msgid "Maarten's blog" |
38 |
38 |
msgstr "" |
39 |
39 |
|
40 |
40 |
#: blog/templates/blog/index.djhtml:22 |
41 |
41 |
msgid "" |
42 |
42 |
"The always coherently put together, yet\n" |
43 |
43 |
"fuzzy blog of whatever sprouts in my mind." |
44 |
44 |
msgstr "" |
45 |
45 |
|
46 |
46 |
#: blog/templates/blog/index.djhtml:28 |
47 |
- | msgid "Notepad of a student" |
+ |
47 |
msgid "Notepad of a student" |
48 |
48 |
msgstr "" |
49 |
49 |
|
50 |
50 |
#: blog/templates/blog/index.djhtml:37 |
51 |
51 |
msgid "Navigation" |
52 |
52 |
msgstr "" |
53 |
53 |
|
54 |
54 |
#: blog/templates/blog/index.djhtml:45 |
55 |
- | msgid "Front page" |
+ |
55 |
msgid "Front page" |
56 |
56 |
msgstr "" |
57 |
57 |
|
58 |
58 |
#: blog/templates/blog/index.djhtml:52 |
59 |
- | msgid "Blog" |
+ |
59 |
msgid "Flemish" |
+ |
60 |
msgstr "" |
+ |
61 |
|
+ |
62 |
#: blog/templates/blog/index.djhtml:51 blog/templates/blog/index.djhtml:116 |
+ |
63 |
msgid "Belgian French" |
+ |
64 |
msgstr "" |
+ |
65 |
|
+ |
66 |
#: blog/templates/blog/index.djhtml:65 |
+ |
67 |
msgid "Blog" |
60 |
68 |
msgstr "" |
61 |
69 |
|
62 |
70 |
#: blog/templates/blog/index.djhtml:54 |
63 |
- | msgid "" |
+ |
71 |
msgid "" |
64 |
72 |
"Welcome to my blog. Here, I write\n" |
65 |
73 |
" about things that interest me. Politics, coding,\n" |
66 |
74 |
" studying, life, or anything else I fancy rambling\n" |
67 |
75 |
" about. If you're in luck, I may've written it in a\n" |
68 |
76 |
" language that you understand better than English.\n" |
69 |
77 |
" " |
70 |
78 |
msgstr "" |
71 |
79 |
|
72 |
80 |
#: blog/templates/blog/index.djhtml:71 |
73 |
- | msgid "Open archive" |
+ |
81 |
msgid "Open archive" |
74 |
82 |
msgstr "" |
75 |
83 |
|
76 |
84 |
#: blog/templates/blog/index.djhtml:85 |
77 |
- | msgid "Read on" |
+ |
85 |
msgid "Read on" |
78 |
86 |
msgstr "" |
79 |
87 |
|
80 |
88 |
#: blog/templates/blog/index.djhtml:90 |
81 |
- | #, python-format |
+ |
89 |
#, python-format |
82 |
90 |
msgid "" |
83 |
91 |
"This blog\n" |
84 |
92 |
" post is not available in %(cur_lang)s." |
85 |
93 |
msgstr "" |
86 |
94 |
|
87 |
95 |
#: blog/templates/blog/index.djhtml:92 |
88 |
- | msgid "" |
+ |
96 |
msgid "" |
89 |
97 |
"\n" |
90 |
98 |
" However, it is available in \n" |
91 |
99 |
" " |
92 |
100 |
msgid_plural "" |
93 |
101 |
"\n" |
94 |
102 |
" If you want, you can choose to read it in one of these\n" |
95 |
103 |
" languages: <br>\n" |
96 |
104 |
" " |
97 |
105 |
msgstr[0] "" |
98 |
106 |
msgstr[1] "" |
99 |
107 |
|
100 |
108 |
#: blog/templates/blog/index.djhtml:100 |
101 |
- | msgid "Flemish" |
102 |
- | msgstr "" |
103 |
- | |
104 |
- | #: blog/templates/blog/index.djhtml:102 |
105 |
- | msgid "Belgian French" |
106 |
- | msgstr "" |
107 |
- | |
108 |
- | #: blog/templates/blog/monthly_archive.djhtml:16 |
109 |
- | msgid "Weekly | Archief" |
+ |
109 |
msgid "Weekly | Archief" |
110 |
110 |
msgstr "" |
111 |
111 |
|
112 |
112 |
#: blog/templates/blog/monthly_archive.djhtml:19 |
113 |
- | msgid "Voor een duik terug in de geschiedenis van mijn publieke dagboek." |
+ |
113 |
msgid "Voor een duik terug in de geschiedenis van mijn publieke dagboek." |
114 |
114 |
msgstr "" |
115 |
115 |
|
116 |
116 |
#: blog/templates/blog/post.djhtml:86 |
117 |
- | msgid "Table of contents" |
+ |
117 |
msgid "Table of contents" |
118 |
118 |
msgstr "" |
119 |
119 |
|
120 |
120 |
#: blog/templates/blog/post.djhtml:91 |
121 |
- | msgid "Blog index" |
+ |
121 |
msgid "Blog index" |
122 |
122 |
msgstr "" |
123 |
123 |
|
124 |
124 |
#: blog/templates/blog/post.djhtml:92 |
125 |
- | msgid "Main page" |
+ |
125 |
msgid "Main page" |
126 |
126 |
msgstr "" |
127 |
127 |
|
128 |
128 |
#: blog/templates/blog/post.djhtml:112 |
129 |
- | msgid "Comments" |
+ |
129 |
msgid "Comments" |
130 |
130 |
msgstr "" |
131 |
131 |
|
132 |
132 |
#: blog/templates/blog/post.djhtml:119 |
133 |
- | msgid "Your comment" |
+ |
133 |
msgid "Your comment" |
134 |
134 |
msgstr "" |
135 |
135 |
templates/blog/locale/de/LC_MESSAGES/django.po ¶
52 additions and 46 deletions.
View changes Hide changes
1 |
1 |
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER |
2 |
2 |
# This file is distributed under the same license as the PACKAGE package. |
3 |
3 |
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. |
4 |
4 |
# |
5 |
5 |
#, fuzzy |
6 |
6 |
msgid "" |
7 |
7 |
msgstr "" |
8 |
8 |
"Project-Id-Version: PACKAGE VERSION\n" |
9 |
9 |
"Report-Msgid-Bugs-To: \n" |
10 |
10 |
"POT-Creation-Date: 2022-04-04 23:18+0000\n" |
11 |
- | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
+ |
11 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
12 |
12 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
13 |
13 |
"Language-Team: LANGUAGE <LL@li.org>\n" |
14 |
14 |
"Language: \n" |
15 |
15 |
"MIME-Version: 1.0\n" |
16 |
16 |
"Content-Type: text/plain; charset=UTF-8\n" |
17 |
17 |
"Content-Transfer-Encoding: 8bit\n" |
18 |
18 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n" |
19 |
19 |
|
20 |
20 |
#: blog/templates/blog/comment.djhtml:21 |
21 |
21 |
msgid "Respond" |
22 |
22 |
msgstr "" |
23 |
- | |
+ |
23 |
|
24 |
24 |
#: blog/templates/blog/comment.djhtml:31 blog/templates/blog/post.djhtml:118 |
25 |
- | msgid "Your name" |
+ |
25 |
msgid "Your name" |
26 |
26 |
msgstr "" |
27 |
- | |
+ |
27 |
|
28 |
28 |
#: blog/templates/blog/comment.djhtml:32 |
29 |
29 |
msgid "Your response" |
30 |
30 |
msgstr "" |
31 |
- | |
+ |
31 |
|
32 |
32 |
#: blog/templates/blog/comment.djhtml:33 blog/templates/blog/post.djhtml:120 |
33 |
- | msgid "Submit" |
+ |
33 |
msgid "Submit" |
34 |
34 |
msgstr "" |
35 |
- | |
+ |
35 |
|
36 |
36 |
#: blog/templates/blog/index.djhtml:20 |
37 |
37 |
msgid "Maarten's blog" |
38 |
38 |
msgstr "" |
39 |
- | |
+ |
39 |
|
40 |
40 |
#: blog/templates/blog/index.djhtml:22 |
41 |
41 |
msgid "" |
42 |
42 |
"The always coherently put together, yet\n" |
43 |
43 |
"fuzzy blog of whatever sprouts in my mind." |
44 |
44 |
msgstr "" |
45 |
45 |
|
+ |
46 |
"meinem Kopf sprießt." |
+ |
47 |
|
46 |
48 |
#: blog/templates/blog/index.djhtml:28 |
47 |
- | msgid "Notepad of a student" |
+ |
49 |
msgid "Notepad of a student" |
48 |
50 |
msgstr "" |
49 |
- | |
+ |
51 |
|
50 |
52 |
#: blog/templates/blog/index.djhtml:37 |
51 |
53 |
msgid "Navigation" |
52 |
54 |
msgstr "" |
53 |
- | |
+ |
55 |
|
54 |
56 |
#: blog/templates/blog/index.djhtml:45 |
55 |
- | msgid "Front page" |
+ |
57 |
msgid "Front page" |
56 |
58 |
msgstr "" |
57 |
- | |
+ |
59 |
|
58 |
60 |
#: blog/templates/blog/index.djhtml:52 |
59 |
- | msgid "Blog" |
+ |
61 |
msgid "Flemish" |
+ |
62 |
msgstr "Flämisch" |
+ |
63 |
|
+ |
64 |
#: blog/templates/blog/index.djhtml:51 blog/templates/blog/index.djhtml:116 |
+ |
65 |
msgid "Belgian French" |
+ |
66 |
msgstr "Belgisches Französisch" |
+ |
67 |
|
+ |
68 |
#: blog/templates/blog/index.djhtml:65 |
+ |
69 |
msgid "Blog" |
60 |
70 |
msgstr "" |
61 |
- | |
+ |
71 |
|
62 |
72 |
#: blog/templates/blog/index.djhtml:54 |
63 |
- | msgid "" |
+ |
73 |
msgid "" |
64 |
74 |
"Welcome to my blog. Here, I write\n" |
65 |
75 |
" about things that interest me. Politics, coding,\n" |
66 |
76 |
" studying, life, or anything else I fancy rambling\n" |
67 |
77 |
" about. If you're in luck, I may've written it in a\n" |
68 |
78 |
" language that you understand better than English.\n" |
69 |
79 |
" " |
70 |
80 |
msgstr "" |
71 |
81 |
|
+ |
82 |
"interessieren. Politik, Codierung, Studium, Leben oder alles andere, worüber ich " |
+ |
83 |
"mich ausbreiten möchte. Wenn Sie Glück haben, habe ich es vielleicht in einer " |
+ |
84 |
"Sprache geschrieben, die Sie besser verstehen als Englisch." |
+ |
85 |
|
72 |
86 |
#: blog/templates/blog/index.djhtml:71 |
73 |
- | msgid "Open archive" |
+ |
87 |
msgid "Open archive" |
74 |
88 |
msgstr "" |
75 |
- | |
+ |
89 |
|
76 |
90 |
#: blog/templates/blog/index.djhtml:85 |
77 |
- | msgid "Read on" |
+ |
91 |
msgid "Read on" |
78 |
92 |
msgstr "" |
79 |
- | |
+ |
93 |
|
80 |
94 |
#: blog/templates/blog/index.djhtml:90 |
81 |
- | #, python-format |
+ |
95 |
#, python-format |
82 |
96 |
msgid "" |
83 |
97 |
"This blog\n" |
84 |
98 |
" post is not available in %(cur_lang)s." |
85 |
99 |
msgstr "" |
86 |
- | |
+ |
100 |
|
87 |
101 |
#: blog/templates/blog/index.djhtml:92 |
88 |
- | msgid "" |
+ |
102 |
msgid "" |
89 |
103 |
"\n" |
90 |
104 |
" However, it is available in \n" |
91 |
105 |
" " |
92 |
106 |
msgid_plural "" |
93 |
107 |
"\n" |
94 |
108 |
" If you want, you can choose to read it in one of these\n" |
95 |
109 |
" languages: <br>\n" |
96 |
110 |
" " |
97 |
111 |
msgstr[0] "" |
98 |
- | msgstr[1] "" |
99 |
- | |
100 |
- | #: blog/templates/blog/index.djhtml:100 |
101 |
- | msgid "Flemish" |
102 |
- | msgstr "" |
103 |
- | |
104 |
- | #: blog/templates/blog/index.djhtml:102 |
105 |
- | msgid "Belgian French" |
106 |
- | msgstr "" |
107 |
- | |
+ |
112 |
msgstr[1] "Wenn Sie möchten, können Sie es in einer dieser Sprachen lesen: <br>" |
+ |
113 |
|
108 |
114 |
#: blog/templates/blog/monthly_archive.djhtml:16 |
109 |
- | msgid "Weekly | Archief" |
+ |
115 |
msgid "Weekly | Archief" |
110 |
116 |
msgstr "" |
111 |
- | |
+ |
117 |
|
112 |
118 |
#: blog/templates/blog/monthly_archive.djhtml:19 |
113 |
- | msgid "Voor een duik terug in de geschiedenis van mijn publieke dagboek." |
+ |
119 |
msgid "Voor een duik terug in de geschiedenis van mijn publieke dagboek." |
114 |
120 |
msgstr "" |
115 |
121 |
|
116 |
122 |
#: blog/templates/blog/post.djhtml:86 |
117 |
- | msgid "Table of contents" |
+ |
123 |
msgid "Table of contents" |
118 |
124 |
msgstr "" |
119 |
- | |
+ |
125 |
|
120 |
126 |
#: blog/templates/blog/post.djhtml:91 |
121 |
- | msgid "Blog index" |
+ |
127 |
msgid "Blog index" |
122 |
128 |
msgstr "" |
123 |
- | |
+ |
129 |
|
124 |
130 |
#: blog/templates/blog/post.djhtml:92 |
125 |
- | msgid "Main page" |
+ |
131 |
msgid "Main page" |
126 |
132 |
msgstr "" |
127 |
- | |
+ |
133 |
|
128 |
134 |
#: blog/templates/blog/post.djhtml:112 |
129 |
- | msgid "Comments" |
+ |
135 |
msgid "Comments" |
130 |
136 |
msgstr "" |
131 |
- | |
+ |
137 |
|
132 |
138 |
#: blog/templates/blog/post.djhtml:119 |
133 |
- | msgid "Your comment" |
+ |
139 |
msgid "Your comment" |
134 |
140 |
msgstr "" |
135 |
- | |
+ |
141 |
|
136 |
142 |
#~ msgid "This article in other languages" |
137 |
143 |
#~ msgstr "Dieser Artikel in anderen Sprachen" |
138 |
144 |
templates/blog/locale/eo/LC_MESSAGES/django.po ¶
26 additions and 26 deletions.
View changes Hide changes
1 |
1 |
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER |
2 |
2 |
# This file is distributed under the same license as the PACKAGE package. |
3 |
3 |
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. |
4 |
4 |
# |
5 |
5 |
#, fuzzy |
6 |
6 |
msgid "" |
7 |
7 |
msgstr "" |
8 |
8 |
"Project-Id-Version: PACKAGE VERSION\n" |
9 |
9 |
"Report-Msgid-Bugs-To: \n" |
10 |
10 |
"POT-Creation-Date: 2022-04-04 23:18+0000\n" |
11 |
- | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
+ |
11 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
12 |
12 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
13 |
13 |
"Language-Team: LANGUAGE <LL@li.org>\n" |
14 |
14 |
"Language: \n" |
15 |
15 |
"MIME-Version: 1.0\n" |
16 |
16 |
"Content-Type: text/plain; charset=UTF-8\n" |
17 |
17 |
"Content-Transfer-Encoding: 8bit\n" |
18 |
18 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n" |
19 |
19 |
|
20 |
20 |
#: blog/templates/blog/comment.djhtml:21 |
21 |
21 |
msgid "Respond" |
22 |
22 |
msgstr "" |
23 |
23 |
|
24 |
24 |
#: blog/templates/blog/comment.djhtml:31 blog/templates/blog/post.djhtml:118 |
25 |
- | msgid "Your name" |
+ |
25 |
msgid "Your name" |
26 |
26 |
msgstr "" |
27 |
27 |
|
28 |
28 |
#: blog/templates/blog/comment.djhtml:32 |
29 |
29 |
msgid "Your response" |
30 |
30 |
msgstr "" |
31 |
31 |
|
32 |
32 |
#: blog/templates/blog/comment.djhtml:33 blog/templates/blog/post.djhtml:120 |
33 |
- | msgid "Submit" |
+ |
33 |
msgid "Submit" |
34 |
34 |
msgstr "" |
35 |
35 |
|
36 |
36 |
#: blog/templates/blog/index.djhtml:20 |
37 |
37 |
msgid "Maarten's blog" |
38 |
38 |
msgstr "" |
39 |
39 |
|
40 |
40 |
#: blog/templates/blog/index.djhtml:22 |
41 |
41 |
msgid "" |
42 |
42 |
"The always coherently put together, yet\n" |
43 |
43 |
"fuzzy blog of whatever sprouts in my mind." |
44 |
44 |
msgstr "" |
45 |
45 |
|
46 |
46 |
#: blog/templates/blog/index.djhtml:28 |
47 |
- | msgid "Notepad of a student" |
+ |
47 |
msgid "Notepad of a student" |
48 |
48 |
msgstr "" |
49 |
49 |
|
50 |
50 |
#: blog/templates/blog/index.djhtml:37 |
51 |
51 |
msgid "Navigation" |
52 |
52 |
msgstr "" |
53 |
53 |
|
54 |
54 |
#: blog/templates/blog/index.djhtml:45 |
55 |
- | msgid "Front page" |
+ |
55 |
msgid "Front page" |
56 |
56 |
msgstr "" |
57 |
57 |
|
58 |
58 |
#: blog/templates/blog/index.djhtml:52 |
59 |
- | msgid "Blog" |
+ |
59 |
msgid "Flemish" |
+ |
60 |
msgstr "" |
+ |
61 |
|
+ |
62 |
#: blog/templates/blog/index.djhtml:51 blog/templates/blog/index.djhtml:116 |
+ |
63 |
msgid "Belgian French" |
+ |
64 |
msgstr "" |
+ |
65 |
|
+ |
66 |
#: blog/templates/blog/index.djhtml:65 |
+ |
67 |
msgid "Blog" |
60 |
68 |
msgstr "" |
61 |
69 |
|
62 |
70 |
#: blog/templates/blog/index.djhtml:54 |
63 |
- | msgid "" |
+ |
71 |
msgid "" |
64 |
72 |
"Welcome to my blog. Here, I write\n" |
65 |
73 |
" about things that interest me. Politics, coding,\n" |
66 |
74 |
" studying, life, or anything else I fancy rambling\n" |
67 |
75 |
" about. If you're in luck, I may've written it in a\n" |
68 |
76 |
" language that you understand better than English.\n" |
69 |
77 |
" " |
70 |
78 |
msgstr "" |
71 |
79 |
|
72 |
80 |
#: blog/templates/blog/index.djhtml:71 |
73 |
- | msgid "Open archive" |
+ |
81 |
msgid "Open archive" |
74 |
82 |
msgstr "" |
75 |
83 |
|
76 |
84 |
#: blog/templates/blog/index.djhtml:85 |
77 |
- | msgid "Read on" |
+ |
85 |
msgid "Read on" |
78 |
86 |
msgstr "" |
79 |
87 |
|
80 |
88 |
#: blog/templates/blog/index.djhtml:90 |
81 |
- | #, python-format |
+ |
89 |
#, python-format |
82 |
90 |
msgid "" |
83 |
91 |
"This blog\n" |
84 |
92 |
" post is not available in %(cur_lang)s." |
85 |
93 |
msgstr "" |
86 |
94 |
|
87 |
95 |
#: blog/templates/blog/index.djhtml:92 |
88 |
- | msgid "" |
+ |
96 |
msgid "" |
89 |
97 |
"\n" |
90 |
98 |
" However, it is available in \n" |
91 |
99 |
" " |
92 |
100 |
msgid_plural "" |
93 |
101 |
"\n" |
94 |
102 |
" If you want, you can choose to read it in one of these\n" |
95 |
103 |
" languages: <br>\n" |
96 |
104 |
" " |
97 |
105 |
msgstr[0] "" |
98 |
106 |
msgstr[1] "" |
99 |
107 |
|
100 |
108 |
#: blog/templates/blog/index.djhtml:100 |
101 |
- | msgid "Flemish" |
102 |
- | msgstr "" |
103 |
- | |
104 |
- | #: blog/templates/blog/index.djhtml:102 |
105 |
- | msgid "Belgian French" |
106 |
- | msgstr "" |
107 |
- | |
108 |
- | #: blog/templates/blog/monthly_archive.djhtml:16 |
109 |
- | msgid "Weekly | Archief" |
+ |
109 |
msgid "Weekly | Archief" |
110 |
110 |
msgstr "" |
111 |
111 |
|
112 |
112 |
#: blog/templates/blog/monthly_archive.djhtml:19 |
113 |
- | msgid "Voor een duik terug in de geschiedenis van mijn publieke dagboek." |
+ |
113 |
msgid "Voor een duik terug in de geschiedenis van mijn publieke dagboek." |
114 |
114 |
msgstr "" |
115 |
115 |
|
116 |
116 |
#: blog/templates/blog/post.djhtml:86 |
117 |
- | msgid "Table of contents" |
+ |
117 |
msgid "Table of contents" |
118 |
118 |
msgstr "" |
119 |
119 |
|
120 |
120 |
#: blog/templates/blog/post.djhtml:91 |
121 |
- | msgid "Blog index" |
+ |
121 |
msgid "Blog index" |
122 |
122 |
msgstr "" |
123 |
123 |
|
124 |
124 |
#: blog/templates/blog/post.djhtml:92 |
125 |
- | msgid "Main page" |
+ |
125 |
msgid "Main page" |
126 |
126 |
msgstr "" |
127 |
127 |
|
128 |
128 |
#: blog/templates/blog/post.djhtml:112 |
129 |
- | msgid "Comments" |
+ |
129 |
msgid "Comments" |
130 |
130 |
msgstr "" |
131 |
131 |
|
132 |
132 |
#: blog/templates/blog/post.djhtml:119 |
133 |
- | msgid "Your comment" |
+ |
133 |
msgid "Your comment" |
134 |
134 |
msgstr "" |
135 |
135 |
templates/blog/locale/es/LC_MESSAGES/django.po ¶
26 additions and 26 deletions.
View changes Hide changes
1 |
1 |
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER |
2 |
2 |
# This file is distributed under the same license as the PACKAGE package. |
3 |
3 |
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. |
4 |
4 |
# |
5 |
5 |
#, fuzzy |
6 |
6 |
msgid "" |
7 |
7 |
msgstr "" |
8 |
8 |
"Project-Id-Version: PACKAGE VERSION\n" |
9 |
9 |
"Report-Msgid-Bugs-To: \n" |
10 |
10 |
"POT-Creation-Date: 2022-04-04 23:18+0000\n" |
11 |
- | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
+ |
11 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
12 |
12 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
13 |
13 |
"Language-Team: LANGUAGE <LL@li.org>\n" |
14 |
14 |
"Language: \n" |
15 |
15 |
"MIME-Version: 1.0\n" |
16 |
16 |
"Content-Type: text/plain; charset=UTF-8\n" |
17 |
17 |
"Content-Transfer-Encoding: 8bit\n" |
18 |
18 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n" |
19 |
19 |
|
20 |
20 |
#: blog/templates/blog/comment.djhtml:21 |
21 |
21 |
msgid "Respond" |
22 |
22 |
msgstr "" |
23 |
23 |
|
24 |
24 |
#: blog/templates/blog/comment.djhtml:31 blog/templates/blog/post.djhtml:118 |
25 |
- | msgid "Your name" |
+ |
25 |
msgid "Your name" |
26 |
26 |
msgstr "" |
27 |
27 |
|
28 |
28 |
#: blog/templates/blog/comment.djhtml:32 |
29 |
29 |
msgid "Your response" |
30 |
30 |
msgstr "" |
31 |
31 |
|
32 |
32 |
#: blog/templates/blog/comment.djhtml:33 blog/templates/blog/post.djhtml:120 |
33 |
- | msgid "Submit" |
+ |
33 |
msgid "Submit" |
34 |
34 |
msgstr "" |
35 |
35 |
|
36 |
36 |
#: blog/templates/blog/index.djhtml:20 |
37 |
37 |
msgid "Maarten's blog" |
38 |
38 |
msgstr "" |
39 |
39 |
|
40 |
40 |
#: blog/templates/blog/index.djhtml:22 |
41 |
41 |
msgid "" |
42 |
42 |
"The always coherently put together, yet\n" |
43 |
43 |
"fuzzy blog of whatever sprouts in my mind." |
44 |
44 |
msgstr "" |
45 |
45 |
|
46 |
46 |
#: blog/templates/blog/index.djhtml:28 |
47 |
- | msgid "Notepad of a student" |
+ |
47 |
msgid "Notepad of a student" |
48 |
48 |
msgstr "" |
49 |
49 |
|
50 |
50 |
#: blog/templates/blog/index.djhtml:37 |
51 |
51 |
msgid "Navigation" |
52 |
52 |
msgstr "" |
53 |
53 |
|
54 |
54 |
#: blog/templates/blog/index.djhtml:45 |
55 |
- | msgid "Front page" |
+ |
55 |
msgid "Front page" |
56 |
56 |
msgstr "" |
57 |
57 |
|
58 |
58 |
#: blog/templates/blog/index.djhtml:52 |
59 |
- | msgid "Blog" |
+ |
59 |
msgid "Flemish" |
+ |
60 |
msgstr "" |
+ |
61 |
|
+ |
62 |
#: blog/templates/blog/index.djhtml:51 blog/templates/blog/index.djhtml:116 |
+ |
63 |
msgid "Belgian French" |
+ |
64 |
msgstr "" |
+ |
65 |
|
+ |
66 |
#: blog/templates/blog/index.djhtml:65 |
+ |
67 |
msgid "Blog" |
60 |
68 |
msgstr "" |
61 |
69 |
|
62 |
70 |
#: blog/templates/blog/index.djhtml:54 |
63 |
- | msgid "" |
+ |
71 |
msgid "" |
64 |
72 |
"Welcome to my blog. Here, I write\n" |
65 |
73 |
" about things that interest me. Politics, coding,\n" |
66 |
74 |
" studying, life, or anything else I fancy rambling\n" |
67 |
75 |
" about. If you're in luck, I may've written it in a\n" |
68 |
76 |
" language that you understand better than English.\n" |
69 |
77 |
" " |
70 |
78 |
msgstr "" |
71 |
79 |
|
72 |
80 |
#: blog/templates/blog/index.djhtml:71 |
73 |
- | msgid "Open archive" |
+ |
81 |
msgid "Open archive" |
74 |
82 |
msgstr "" |
75 |
83 |
|
76 |
84 |
#: blog/templates/blog/index.djhtml:85 |
77 |
- | msgid "Read on" |
+ |
85 |
msgid "Read on" |
78 |
86 |
msgstr "" |
79 |
87 |
|
80 |
88 |
#: blog/templates/blog/index.djhtml:90 |
81 |
- | #, python-format |
+ |
89 |
#, python-format |
82 |
90 |
msgid "" |
83 |
91 |
"This blog\n" |
84 |
92 |
" post is not available in %(cur_lang)s." |
85 |
93 |
msgstr "" |
86 |
94 |
|
87 |
95 |
#: blog/templates/blog/index.djhtml:92 |
88 |
- | msgid "" |
+ |
96 |
msgid "" |
89 |
97 |
"\n" |
90 |
98 |
" However, it is available in \n" |
91 |
99 |
" " |
92 |
100 |
msgid_plural "" |
93 |
101 |
"\n" |
94 |
102 |
" If you want, you can choose to read it in one of these\n" |
95 |
103 |
" languages: <br>\n" |
96 |
104 |
" " |
97 |
105 |
msgstr[0] "" |
98 |
106 |
msgstr[1] "" |
99 |
107 |
|
100 |
108 |
#: blog/templates/blog/index.djhtml:100 |
101 |
- | msgid "Flemish" |
102 |
- | msgstr "" |
103 |
- | |
104 |
- | #: blog/templates/blog/index.djhtml:102 |
105 |
- | msgid "Belgian French" |
106 |
- | msgstr "" |
107 |
- | |
108 |
- | #: blog/templates/blog/monthly_archive.djhtml:16 |
109 |
- | msgid "Weekly | Archief" |
+ |
109 |
msgid "Weekly | Archief" |
110 |
110 |
msgstr "" |
111 |
111 |
|
112 |
112 |
#: blog/templates/blog/monthly_archive.djhtml:19 |
113 |
- | msgid "Voor een duik terug in de geschiedenis van mijn publieke dagboek." |
+ |
113 |
msgid "Voor een duik terug in de geschiedenis van mijn publieke dagboek." |
114 |
114 |
msgstr "" |
115 |
115 |
|
116 |
116 |
#: blog/templates/blog/post.djhtml:86 |
117 |
- | msgid "Table of contents" |
+ |
117 |
msgid "Table of contents" |
118 |
118 |
msgstr "" |
119 |
119 |
|
120 |
120 |
#: blog/templates/blog/post.djhtml:91 |
121 |
- | msgid "Blog index" |
+ |
121 |
msgid "Blog index" |
122 |
122 |
msgstr "" |
123 |
123 |
|
124 |
124 |
#: blog/templates/blog/post.djhtml:92 |
125 |
- | msgid "Main page" |
+ |
125 |
msgid "Main page" |
126 |
126 |
msgstr "" |
127 |
127 |
|
128 |
128 |
#: blog/templates/blog/post.djhtml:112 |
129 |
- | msgid "Comments" |
+ |
129 |
msgid "Comments" |
130 |
130 |
msgstr "" |
131 |
131 |
|
132 |
132 |
#: blog/templates/blog/post.djhtml:119 |
133 |
- | msgid "Your comment" |
+ |
133 |
msgid "Your comment" |
134 |
134 |
msgstr "" |
135 |
135 |
templates/blog/locale/fr/LC_MESSAGES/django.po ¶
43 additions and 50 deletions.
View changes Hide changes
1 |
1 |
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER |
2 |
2 |
# This file is distributed under the same license as the PACKAGE package. |
3 |
3 |
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. |
4 |
4 |
# |
5 |
5 |
msgid "" |
6 |
6 |
msgstr "" |
7 |
7 |
"Project-Id-Version: \n" |
8 |
8 |
"Report-Msgid-Bugs-To: \n" |
9 |
9 |
"POT-Creation-Date: 2022-04-04 23:18+0000\n" |
10 |
- | "PO-Revision-Date: 2021-10-30 16:01+0200\n" |
+ |
10 |
"PO-Revision-Date: 2021-10-30 16:01+0200\n" |
11 |
11 |
"Last-Translator: \n" |
12 |
12 |
"Language-Team: \n" |
13 |
13 |
"Language: fr\n" |
14 |
14 |
"MIME-Version: 1.0\n" |
15 |
15 |
"Content-Type: text/plain; charset=UTF-8\n" |
16 |
16 |
"Content-Transfer-Encoding: 8bit\n" |
17 |
17 |
"Plural-Forms: nplurals=2; plural=(n > 1);\n" |
18 |
18 |
"X-Generator: Poedit 3.0\n" |
19 |
19 |
|
20 |
20 |
#: blog/templates/blog/comment.djhtml:21 |
21 |
21 |
msgid "Respond" |
22 |
22 |
msgstr "" |
23 |
- | |
+ |
23 |
|
24 |
24 |
#: blog/templates/blog/comment.djhtml:31 blog/templates/blog/post.djhtml:118 |
25 |
- | msgid "Your name" |
+ |
25 |
msgid "Your name" |
26 |
26 |
msgstr "" |
27 |
- | |
+ |
27 |
|
28 |
28 |
#: blog/templates/blog/comment.djhtml:32 |
29 |
29 |
msgid "Your response" |
30 |
30 |
msgstr "" |
31 |
- | |
+ |
31 |
|
32 |
32 |
#: blog/templates/blog/comment.djhtml:33 blog/templates/blog/post.djhtml:120 |
33 |
- | msgid "Submit" |
+ |
33 |
msgid "Submit" |
34 |
34 |
msgstr "Envoyer" |
35 |
35 |
|
36 |
36 |
#: blog/templates/blog/index.djhtml:20 |
37 |
37 |
msgid "Maarten's blog" |
38 |
38 |
msgstr "Blog de Maarten" |
39 |
39 |
|
40 |
40 |
#: blog/templates/blog/index.djhtml:22 |
41 |
41 |
msgid "" |
42 |
42 |
"The always coherently put together, yet\n" |
43 |
43 |
"fuzzy blog of whatever sprouts in my mind." |
44 |
44 |
msgstr "" |
45 |
45 |
"Le toujours mis de façon cohérente ensemble, mais floue de ce que les germes " |
46 |
46 |
"dans mon esprit." |
47 |
47 |
|
48 |
48 |
#: blog/templates/blog/index.djhtml:28 |
49 |
- | msgid "Notepad of a student" |
+ |
49 |
msgid "Notepad of a student" |
50 |
50 |
msgstr "" |
51 |
- | |
+ |
51 |
|
52 |
52 |
#: blog/templates/blog/index.djhtml:37 |
53 |
53 |
msgid "Navigation" |
54 |
54 |
msgstr "" |
55 |
- | |
+ |
55 |
|
56 |
56 |
#: blog/templates/blog/index.djhtml:45 |
57 |
- | msgid "Front page" |
+ |
57 |
msgid "Front page" |
58 |
58 |
msgstr "" |
59 |
- | |
+ |
59 |
|
60 |
60 |
#: blog/templates/blog/index.djhtml:52 |
61 |
- | msgid "Blog" |
+ |
61 |
msgid "Flemish" |
+ |
62 |
msgstr "Flamand" |
+ |
63 |
|
+ |
64 |
#: blog/templates/blog/index.djhtml:51 blog/templates/blog/index.djhtml:116 |
+ |
65 |
msgid "Belgian French" |
+ |
66 |
msgstr "français belge" |
+ |
67 |
|
+ |
68 |
#: blog/templates/blog/index.djhtml:65 |
+ |
69 |
msgid "Blog" |
62 |
70 |
msgstr "Blog" |
63 |
71 |
|
64 |
72 |
#: blog/templates/blog/index.djhtml:54 |
65 |
- | #, fuzzy |
66 |
- | #| msgid "" |
67 |
- | #| "Welcome to my blog. Here, I write\n" |
68 |
- | #| " about things that interest me. Politics, coding,\n" |
69 |
- | #| " studying, life, or anything else I fancy rambling\n" |
70 |
- | #| " about. If you're in luck, I may've written it in a\n" |
71 |
- | #| " language that you understand better than English.\n" |
72 |
- | #| " " |
73 |
- | msgid "" |
+ |
73 |
msgid "" |
74 |
74 |
"Welcome to my blog. Here, I write\n" |
75 |
75 |
" about things that interest me. Politics, coding,\n" |
76 |
76 |
" studying, life, or anything else I fancy rambling\n" |
77 |
77 |
" about. If you're in luck, I may've written it in a\n" |
78 |
78 |
" language that you understand better than English.\n" |
79 |
79 |
" " |
80 |
80 |
msgstr "" |
81 |
81 |
"Bienvenue dans mon blog. Ici j'écris des choses qui m'intéressent. La " |
82 |
82 |
"politique, le codage, l'étude, la vie, ou autre chose dont j'ai envie de me " |
83 |
83 |
"venger." |
84 |
84 |
|
85 |
85 |
#: blog/templates/blog/index.djhtml:71 |
86 |
- | msgid "Open archive" |
+ |
86 |
msgid "Open archive" |
87 |
87 |
msgstr "" |
88 |
- | |
+ |
88 |
|
89 |
89 |
#: blog/templates/blog/index.djhtml:85 |
90 |
- | msgid "Read on" |
+ |
90 |
msgid "Read on" |
91 |
91 |
msgstr "Lire plus" |
92 |
92 |
|
93 |
93 |
#: blog/templates/blog/index.djhtml:90 |
94 |
- | #, python-format |
+ |
94 |
#, python-format |
95 |
95 |
msgid "" |
96 |
96 |
"This blog\n" |
97 |
97 |
" post is not available in %(cur_lang)s." |
98 |
98 |
msgstr "" |
99 |
99 |
|
+ |
100 |
|
100 |
101 |
#: blog/templates/blog/index.djhtml:92 |
101 |
- | msgid "" |
+ |
102 |
msgid "" |
102 |
103 |
"\n" |
103 |
104 |
" However, it is available in \n" |
104 |
105 |
" " |
105 |
106 |
msgid_plural "" |
106 |
107 |
"\n" |
107 |
108 |
" If you want, you can choose to read it in one of these\n" |
108 |
109 |
" languages: <br>\n" |
109 |
110 |
" " |
110 |
111 |
msgstr[0] "" |
111 |
- | msgstr[1] "" |
112 |
- | |
+ |
112 |
"Cependant, il est disponible en " |
+ |
113 |
msgstr[1] "\n" |
+ |
114 |
"Si vous voulez, vous pouvez choisir de le lire dans l'une des autres langues: <br>" |
+ |
115 |
|
113 |
116 |
#: blog/templates/blog/index.djhtml:100 |
114 |
- | msgid "Flemish" |
115 |
- | msgstr "" |
116 |
- | |
117 |
- | #: blog/templates/blog/index.djhtml:102 |
118 |
- | msgid "Belgian French" |
119 |
- | msgstr "" |
120 |
- | |
121 |
- | #: blog/templates/blog/monthly_archive.djhtml:16 |
122 |
- | msgid "Weekly | Archief" |
+ |
117 |
msgid "Weekly | Archief" |
123 |
118 |
msgstr "" |
124 |
- | |
+ |
119 |
|
125 |
120 |
#: blog/templates/blog/monthly_archive.djhtml:19 |
126 |
- | msgid "Voor een duik terug in de geschiedenis van mijn publieke dagboek." |
+ |
121 |
msgid "Voor een duik terug in de geschiedenis van mijn publieke dagboek." |
127 |
122 |
msgstr "" |
128 |
123 |
|
129 |
124 |
#: blog/templates/blog/post.djhtml:86 |
130 |
- | msgid "Table of contents" |
+ |
125 |
msgid "Table of contents" |
131 |
126 |
msgstr "" |
132 |
- | |
+ |
127 |
|
133 |
128 |
#: blog/templates/blog/post.djhtml:91 |
134 |
- | msgid "Blog index" |
+ |
129 |
msgid "Blog index" |
135 |
130 |
msgstr "" |
136 |
- | |
+ |
131 |
|
137 |
132 |
#: blog/templates/blog/post.djhtml:92 |
138 |
- | msgid "Main page" |
+ |
133 |
msgid "Main page" |
139 |
134 |
msgstr "" |
140 |
- | |
+ |
135 |
|
141 |
136 |
#: blog/templates/blog/post.djhtml:112 |
142 |
- | msgid "Comments" |
+ |
137 |
msgid "Comments" |
143 |
138 |
msgstr "Commentaires" |
144 |
139 |
|
145 |
140 |
#: blog/templates/blog/post.djhtml:119 |
146 |
- | #, fuzzy |
147 |
- | #| msgid "Comments" |
148 |
- | msgid "Your comment" |
+ |
141 |
msgid "Your comment" |
149 |
142 |
msgstr "Commentaires" |
150 |
- | |
+ |
143 |
|
151 |
144 |
#~ msgid "This article in other languages" |
152 |
145 |
#~ msgstr "Cet article en autres langues" |
153 |
146 |
|
154 |
147 |
#~ msgid "Never miss an update again." |
155 |
148 |
#~ msgstr "Ne manquez plus jamais une mise à jour." |
156 |
149 |
|
157 |
150 |
#~ msgid "" |
158 |
151 |
#~ "Getting info on updates to blog posts, major website changes, and other " |
159 |
152 |
#~ "important\n" |
160 |
153 |
#~ " news items is now easy and convenient with RSS.\n" |
161 |
154 |
#~ " " |
162 |
155 |
#~ msgstr "" |
163 |
156 |
#~ "Recevoir des mise à jours du blog, des grands changements du site web et " |
164 |
157 |
#~ "d'autre information, c'est maitenant facile et pratique avec RSS." |
165 |
158 |
templates/blog/locale/nl/LC_MESSAGES/django.po ¶
41 additions and 50 deletions.
View changes Hide changes
1 |
1 |
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER |
2 |
2 |
# This file is distributed under the same license as the PACKAGE package. |
3 |
3 |
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. |
4 |
4 |
# |
5 |
5 |
msgid "" |
6 |
6 |
msgstr "" |
7 |
7 |
"Project-Id-Version: \n" |
8 |
8 |
"Report-Msgid-Bugs-To: \n" |
9 |
9 |
"POT-Creation-Date: 2022-04-04 23:18+0000\n" |
10 |
- | "PO-Revision-Date: 2021-10-30 16:11+0200\n" |
+ |
10 |
"PO-Revision-Date: 2021-10-30 16:11+0200\n" |
11 |
11 |
"Last-Translator: \n" |
12 |
12 |
"Language-Team: \n" |
13 |
13 |
"Language: nl\n" |
14 |
14 |
"MIME-Version: 1.0\n" |
15 |
15 |
"Content-Type: text/plain; charset=UTF-8\n" |
16 |
16 |
"Content-Transfer-Encoding: 8bit\n" |
17 |
17 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n" |
18 |
18 |
"X-Generator: Poedit 3.0\n" |
19 |
19 |
|
20 |
20 |
#: blog/templates/blog/comment.djhtml:21 |
21 |
21 |
msgid "Respond" |
22 |
22 |
msgstr "" |
23 |
- | |
+ |
23 |
|
24 |
24 |
#: blog/templates/blog/comment.djhtml:31 blog/templates/blog/post.djhtml:118 |
25 |
- | msgid "Your name" |
+ |
25 |
msgid "Your name" |
26 |
26 |
msgstr "" |
27 |
- | |
+ |
27 |
|
28 |
28 |
#: blog/templates/blog/comment.djhtml:32 |
29 |
29 |
msgid "Your response" |
30 |
30 |
msgstr "" |
31 |
- | |
+ |
31 |
|
32 |
32 |
#: blog/templates/blog/comment.djhtml:33 blog/templates/blog/post.djhtml:120 |
33 |
- | msgid "Submit" |
+ |
33 |
msgid "Submit" |
34 |
34 |
msgstr "Reageren" |
35 |
35 |
|
36 |
36 |
#: blog/templates/blog/index.djhtml:20 |
37 |
37 |
msgid "Maarten's blog" |
38 |
38 |
msgstr "Maartens blog" |
39 |
39 |
|
40 |
40 |
#: blog/templates/blog/index.djhtml:22 |
41 |
41 |
msgid "" |
42 |
42 |
"The always coherently put together, yet\n" |
43 |
43 |
"fuzzy blog of whatever sprouts in my mind." |
44 |
44 |
msgstr "" |
45 |
45 |
"Een zeer weloverwogen geschreven, en toch warrige blog over vanalles wat in " |
46 |
46 |
"mij opkomt." |
47 |
47 |
|
48 |
48 |
#: blog/templates/blog/index.djhtml:28 |
49 |
- | msgid "Notepad of a student" |
+ |
49 |
msgid "Notepad of a student" |
50 |
50 |
msgstr "" |
51 |
- | |
+ |
51 |
|
52 |
52 |
#: blog/templates/blog/index.djhtml:37 |
53 |
53 |
msgid "Navigation" |
54 |
54 |
msgstr "" |
55 |
- | |
+ |
55 |
|
56 |
56 |
#: blog/templates/blog/index.djhtml:45 |
57 |
- | msgid "Front page" |
+ |
57 |
msgid "Front page" |
58 |
58 |
msgstr "" |
59 |
- | |
+ |
59 |
|
60 |
60 |
#: blog/templates/blog/index.djhtml:52 |
61 |
- | msgid "Blog" |
+ |
61 |
msgid "Flemish" |
+ |
62 |
msgstr "Vlaams" |
+ |
63 |
|
+ |
64 |
#: blog/templates/blog/index.djhtml:51 blog/templates/blog/index.djhtml:116 |
+ |
65 |
msgid "Belgian French" |
+ |
66 |
msgstr "Belgisch-Frans" |
+ |
67 |
|
+ |
68 |
#: blog/templates/blog/index.djhtml:65 |
+ |
69 |
msgid "Blog" |
62 |
70 |
msgstr "Blog" |
63 |
71 |
|
64 |
72 |
#: blog/templates/blog/index.djhtml:54 |
65 |
- | #, fuzzy |
66 |
- | #| msgid "" |
67 |
- | #| "Welcome to my blog. Here, I write\n" |
68 |
- | #| " about things that interest me. Politics, coding,\n" |
69 |
- | #| " studying, life, or anything else I fancy rambling\n" |
70 |
- | #| " about. If you're in luck, I may've written it in a\n" |
71 |
- | #| " language that you understand better than English.\n" |
72 |
- | #| " " |
73 |
- | msgid "" |
+ |
73 |
msgid "" |
74 |
74 |
"Welcome to my blog. Here, I write\n" |
75 |
75 |
" about things that interest me. Politics, coding,\n" |
76 |
76 |
" studying, life, or anything else I fancy rambling\n" |
77 |
77 |
" about. If you're in luck, I may've written it in a\n" |
78 |
78 |
" language that you understand better than English.\n" |
79 |
79 |
" " |
80 |
80 |
msgstr "" |
81 |
81 |
"Welkom op mijn blog. Hier schrijf ik over onderwerpen die mij interesseren. " |
82 |
82 |
"Politiek, programmeren, studeren en het leven, plus alles waar ik goesting " |
83 |
83 |
"in heb om over te schrijven." |
84 |
84 |
|
85 |
85 |
#: blog/templates/blog/index.djhtml:71 |
86 |
- | msgid "Open archive" |
+ |
86 |
msgid "Open archive" |
87 |
87 |
msgstr "" |
88 |
- | |
+ |
88 |
|
89 |
89 |
#: blog/templates/blog/index.djhtml:85 |
90 |
- | msgid "Read on" |
+ |
90 |
msgid "Read on" |
91 |
91 |
msgstr "Verder lezen" |
92 |
92 |
|
93 |
93 |
#: blog/templates/blog/index.djhtml:90 |
94 |
- | #, python-format |
+ |
94 |
#, python-format |
95 |
95 |
msgid "" |
96 |
96 |
"This blog\n" |
97 |
97 |
" post is not available in %(cur_lang)s." |
98 |
98 |
msgstr "" |
99 |
99 |
|
+ |
100 |
|
100 |
101 |
#: blog/templates/blog/index.djhtml:92 |
101 |
- | msgid "" |
+ |
102 |
msgid "" |
102 |
103 |
"\n" |
103 |
104 |
" However, it is available in \n" |
104 |
105 |
" " |
105 |
106 |
msgid_plural "" |
106 |
107 |
"\n" |
107 |
108 |
" If you want, you can choose to read it in one of these\n" |
108 |
109 |
" languages: <br>\n" |
109 |
110 |
" " |
110 |
111 |
msgstr[0] "" |
111 |
- | msgstr[1] "" |
112 |
- | |
+ |
112 |
msgstr[1] "Als u wilt kunt u het wel lezen in één van deze talen: <br>" |
+ |
113 |
|
113 |
114 |
#: blog/templates/blog/index.djhtml:100 |
114 |
- | msgid "Flemish" |
115 |
- | msgstr "" |
116 |
- | |
117 |
- | #: blog/templates/blog/index.djhtml:102 |
118 |
- | msgid "Belgian French" |
119 |
- | msgstr "" |
120 |
- | |
121 |
- | #: blog/templates/blog/monthly_archive.djhtml:16 |
122 |
- | msgid "Weekly | Archief" |
+ |
115 |
msgid "Weekly | Archief" |
123 |
116 |
msgstr "" |
124 |
- | |
+ |
117 |
|
125 |
118 |
#: blog/templates/blog/monthly_archive.djhtml:19 |
126 |
- | msgid "Voor een duik terug in de geschiedenis van mijn publieke dagboek." |
+ |
119 |
msgid "Voor een duik terug in de geschiedenis van mijn publieke dagboek." |
127 |
120 |
msgstr "" |
128 |
121 |
|
129 |
122 |
#: blog/templates/blog/post.djhtml:86 |
130 |
- | msgid "Table of contents" |
+ |
123 |
msgid "Table of contents" |
131 |
124 |
msgstr "" |
132 |
- | |
+ |
125 |
|
133 |
126 |
#: blog/templates/blog/post.djhtml:91 |
134 |
- | msgid "Blog index" |
+ |
127 |
msgid "Blog index" |
135 |
128 |
msgstr "" |
136 |
- | |
+ |
129 |
|
137 |
130 |
#: blog/templates/blog/post.djhtml:92 |
138 |
- | msgid "Main page" |
+ |
131 |
msgid "Main page" |
139 |
132 |
msgstr "" |
140 |
- | |
+ |
133 |
|
141 |
134 |
#: blog/templates/blog/post.djhtml:112 |
142 |
- | msgid "Comments" |
+ |
135 |
msgid "Comments" |
143 |
136 |
msgstr "Reacties" |
144 |
137 |
|
145 |
138 |
#: blog/templates/blog/post.djhtml:119 |
146 |
- | #, fuzzy |
147 |
- | #| msgid "Comments" |
148 |
- | msgid "Your comment" |
+ |
139 |
msgid "Your comment" |
149 |
140 |
msgstr "Reacties" |
150 |
- | |
+ |
141 |
|
151 |
142 |
#~ msgid "This article in other languages" |
152 |
143 |
#~ msgstr "Dit artikel in andere talen" |
153 |
144 |
|
154 |
145 |
#~ msgid "Never miss an update again." |
155 |
146 |
#~ msgstr "Mis nooit meer een update." |
156 |
147 |
|
157 |
148 |
#~ msgid "" |
158 |
149 |
#~ "Getting info on updates to blog posts, major website changes, and other " |
159 |
150 |
#~ "important\n" |
160 |
151 |
#~ " news items is now easy and convenient with RSS.\n" |
161 |
152 |
#~ " " |
162 |
153 |
#~ msgstr "" |
163 |
154 |
#~ "Updates van blogartikelen, grote veranderingen op de website en andere " |
164 |
155 |
#~ "belangrijke nieuwtjes zijn nu makkelijk te verkrijgen met RSS." |
165 |
156 |
templates/blog/post.djhtml ¶
36 additions and 12 deletions.
View changes Hide changes
1 |
1 |
{% load humanize %} |
2 |
2 |
{% load i18n %} |
3 |
3 |
{% load static %} |
4 |
4 |
|
5 |
5 |
|
6 |
6 |
{% block stylesheets %} |
7 |
7 |
{{ block.super }} |
8 |
8 |
<style> |
9 |
9 |
@font-face { |
+ |
10 |
border-style: dashed; |
+ |
11 |
padding: 1em; |
+ |
12 |
display: inline-block; |
+ |
13 |
} |
+ |
14 |
span.bu { |
+ |
15 |
color: #FF9800; |
+ |
16 |
} |
+ |
17 |
span.im { |
+ |
18 |
color: #FF9800; |
+ |
19 |
font-weight: bold; |
+ |
20 |
} |
+ |
21 |
span.op { |
+ |
22 |
color: #33691E; |
+ |
23 |
} |
+ |
24 |
span.fl { |
+ |
25 |
color: #0e84b5; |
+ |
26 |
} |
+ |
27 |
span.dv { |
+ |
28 |
color: #00BCD4; |
+ |
29 |
} |
+ |
30 |
span.cf { |
+ |
31 |
color: #E91E63; |
+ |
32 |
font-weight: bold; |
+ |
33 |
} |
+ |
34 |
@font-face { |
10 |
35 |
font-family: 'Merriweather'; |
11 |
36 |
font-style: italic; |
12 |
37 |
font-weight: 400; |
13 |
38 |
src: url({% get_static_prefix %}fonts/merriweather-400-italic.woff2) format('woff2'); |
14 |
39 |
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; |
15 |
40 |
} |
16 |
41 |
@font-face { |
17 |
42 |
font-family: 'Merriweather'; |
18 |
43 |
font-style: normal; |
19 |
44 |
font-weight: 400; |
20 |
45 |
src: url({% get_static_prefix %}fonts/merriweather-400-regular.woff2) format('woff2'); |
21 |
46 |
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; |
22 |
47 |
} |
23 |
48 |
@font-face { |
24 |
49 |
font-family: 'Merriweather'; |
25 |
50 |
font-style: normal; |
26 |
51 |
font-weight: 700; |
27 |
52 |
src: url({% get_static_prefix %}fonts/merriweather-700-regular.woff2) format('woff2'); |
28 |
53 |
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; |
29 |
54 |
} |
30 |
55 |
|
31 |
56 |
body { |
32 |
57 |
background-color: #0d1521; /*#0d47a1; /* Material blue P900 */ |
33 |
58 |
} |
34 |
59 |
body video { |
35 |
- | width: 80%; |
36 |
- | } |
37 |
- | header { |
+ |
60 |
header { |
38 |
61 |
background-color: #3e2723; |
39 |
62 |
} |
40 |
- | section.article { |
+ |
63 |
section.article { |
41 |
64 |
background-color: #efebe9;/*rgb(210, 188, 157);*/ |
42 |
- | font-family: Merriweather, serif; |
+ |
65 |
font-family: Merriweather, serif; |
43 |
66 |
color: var(--light-black); |
44 |
- | |
+ |
67 |
|
45 |
68 |
} |
46 |
69 |
|
47 |
70 |
section.article @media (prefers-color-scheme: dark) { |
48 |
- | background-color: var(--P100); |
+ |
71 |
background-color: var(--P100); |
49 |
72 |
background-color: red; |
50 |
73 |
} |
51 |
- | .comment { |
+ |
74 |
.comment { |
52 |
75 |
margin-left: 0.2em; |
53 |
76 |
padding-left: 0.5em; |
54 |
77 |
padding-bottom: 0.5em; |
55 |
78 |
border-left-style: solid; |
56 |
79 |
border-color: var(--primary); |
57 |
80 |
} |
58 |
81 |
.recently-posted { |
59 |
82 |
background-color: var(--P100); |
60 |
83 |
} |
61 |
84 |
|
62 |
85 |
span.small-detail { |
63 |
86 |
font-size: smaller; |
64 |
87 |
color: grey; |
65 |
88 |
} |
66 |
89 |
</style> |
67 |
90 |
{% endblock stylesheets %} |
68 |
91 |
|
69 |
92 |
{% block description %} |
70 |
93 |
{{ article.text|safe|truncatewords_html:10 }} |
71 |
94 |
{% endblock description %} |
72 |
95 |
{% block title %}📚 {{ navbar_title }}{% endblock title %} |
73 |
96 |
|
74 |
97 |
|
75 |
98 |
{% block header %} |
76 |
99 |
<header> |
77 |
100 |
<label for="nav-drawer-toggle">≡</label> |
78 |
101 |
<h1>{{ navbar_title }}</h1> |
79 |
102 |
</header> |
80 |
103 |
{% endblock header %} |
81 |
104 |
|
82 |
105 |
{% block nav %} |
83 |
106 |
<input id="nav-drawer-toggle" type="checkbox"> |
84 |
107 |
<nav> |
85 |
108 |
<label for="nav-drawer-toggle">🡠</label> |
86 |
109 |
<h2>{% translate "Table of contents" %}</h2> |
87 |
110 |
{% for header, slug in article.headings %} |
+ |
111 |
<a class="nav-link" href="{% url "about-index" %}">{% translate "Main page" %}</a> |
+ |
112 |
<hr class="half"> |
+ |
113 |
{% for header, slug in article.headings %} |
88 |
114 |
<a class="nav-link" href="#{{ slug }}">{{ header }}</a> |
89 |
115 |
{% endfor %} |
90 |
116 |
<hr class="half"> |
91 |
- | <a class="nav-link" href="{% url "blog-index" %}">{% translate "Blog index" %}</a> |
92 |
- | <a class="nav-link" href="{% url "about-index" %}">{% translate "Main page" %}</a> |
93 |
- | </nav> |
94 |
117 |
{% endblock nav %} |
95 |
118 |
|
96 |
119 |
{% block main %} |
97 |
120 |
<section class="article"> |
98 |
121 |
<!--<article style="font-family:serif;">--> |
99 |
122 |
{#{{ article.text|safe }}#} |
100 |
123 |
{% include "/tmp/blog-file.djhtml" %} |
101 |
- | |
+ |
124 |
{% include djhtml_file %} |
+ |
125 |
|
102 |
126 |
<!--</article>--> |
103 |
127 |
</section> |
104 |
128 |
|
105 |
129 |
{% if comment_response %} |
106 |
130 |
<div class="snackbar"> |
107 |
131 |
{{ comment_response }} |
108 |
132 |
</div> |
109 |
133 |
{% endif %} |
110 |
134 |
|
111 |
135 |
<section class="reagoj"> |
112 |
136 |
<h2>{% translate "Comments" %}</h2> |
113 |
137 |
<form method="POST" action="#reagoj"> |
114 |
138 |
{% csrf_token %} |
115 |
139 |
<input type="hidden" name="reaction_to" value=""> |
116 |
140 |
<input type="hidden" name="post" value="{{ article.post.id }}"> |
117 |
141 |
<input type="text" id="name-root" name="name" maxlength="64" required> |
118 |
142 |
<label for="name-root">{% translate "Your name" %}</label><br> |
119 |
143 |
<textarea placeholder="{% translate "Your comment" %}" rows="2" cols="30" name="text" id="text-{{ comment.id }}" maxlength="10000" required></textarea><br> |
120 |
144 |
<input type="submit" value="{% translate "Submit" %}"> |
121 |
145 |
</form> |
122 |
146 |
<hr> |
123 |
147 |
{% for root_comment in root_comments %} |
124 |
148 |
{% include "blog/comment.djhtml" with comment=root_comment %} |
125 |
149 |
{% endfor %} |
126 |
150 |
</section> |
127 |
151 |
|
128 |
152 |
{% comment %} |
129 |
153 |
<h5 class="white-text">{% trans "This article in other languages" %}</h5> |
130 |
154 |
|
131 |
155 |
{% get_language_info for 'nl' as LANG %} |
132 |
156 |
<a {% if dutch_link %} href="{{dutch_link}}" {% endif %} |
133 |
157 |
class="btn fill |
134 |
158 |
{% if not dutch_link %}disabled{% endif %}"> |
135 |
159 |
🇧🇪 {{ LANG.name_translated}} 🇳🇱 |
136 |
160 |
</a> |
137 |
161 |
{% get_current_language as lang %} |
138 |
162 |
{% get_language_info for 'fr' as LANG %} |
139 |
163 |
<a {% if french_link %} href="{{french_link}}" {% endif %} |
140 |
164 |
class="btn fill |
141 |
165 |
{% if not french_link %}disabled{% endif %}"> |
142 |
166 |
🇧🇪 {{ LANG.name_translated}} 🇫🇷 |
143 |
167 |
</a> |
144 |
168 |
{% get_language_info for 'en' as LANG %} |
145 |
169 |
<a {% if english_link %} href="{{english_link}}" {% endif %} |
146 |
170 |
class="btn fill |
147 |
171 |
{% if not english_link %}disabled{% endif %}"> |
148 |
172 |
🇬🇧 {{ LANG.name_translated}} 🇺🇸 |
149 |
173 |
</a> |
150 |
174 |
{% get_language_info for 'de' as LANG %} |
151 |
175 |
<a {% if german_link %} href="{{german_link}}" {% endif %} |
152 |
176 |
class="btn fill |
153 |
177 |
{% if not german_link %}disabled{% endif %}"> |
154 |
178 |
🇧🇪 {{ LANG.name_translated}} 🇩🇪 |
155 |
179 |
</a> |
156 |
180 |
{% get_language_info for 'es' as LANG %} |
157 |
181 |
<a {% if spanish_link %} href="{{spanish_link}}" {% endif %} |
158 |
182 |
class="btn |
159 |
183 |
{% if not spanish_link %}disabled{% endif %}"> |
160 |
184 |
🇪🇸 {{ LANG.name_translated}} 🇲🇽 |
161 |
185 |
</a> |
162 |
186 |
{% endcomment %} |
163 |
187 |
|
164 |
188 |
{% comment %} |
165 |
189 |
<a href="{% url 'blog-post' post_slug %}" class="btn {{accent_color}} accent-4 black-text tooltipped" data-position="bottom" data-delay="50" data-tooltip="{% trans "Multilingual link. Links to the version in the viewer's preferred language." %}">🏳️🌈 {% trans "All available languages" %}</a> |
166 |
190 |
{# TODO: Change to rainbow flag when possible #} |
167 |
191 |
{% endcomment %} |
168 |
192 |
</div> |
169 |
193 |
|
170 |
194 |
</div> |
171 |
195 |
{% endblock main %} |
172 |
196 |
views.py ¶
13 additions and 7 deletions.
View changes Hide changes
1 |
1 |
import requests |
2 |
2 |
|
3 |
3 |
|
4 |
4 |
from django.utils.translation import ugettext as _ |
5 |
5 |
from django.shortcuts import get_object_or_404, render # This allows to render the template with the view here. It's pretty cool and important. |
6 |
6 |
from django.http import HttpResponseRedirect, HttpResponse |
7 |
7 |
from django.urls import reverse |
8 |
8 |
from django.template import loader # This allows to actually load the template. |
9 |
9 |
from .models import * |
+ |
10 |
from django.conf import settings # For the archive 20XX.org files |
+ |
11 |
|
+ |
12 |
from .models import * |
10 |
13 |
from .forms import CommentForm |
11 |
14 |
from django.core.exceptions import ObjectDoesNotExist |
12 |
15 |
from django.utils import translation |
13 |
16 |
|
14 |
17 |
GERMAN = "de" |
15 |
18 |
SPANISH = "es" |
16 |
19 |
FRENCH = "fr" |
17 |
20 |
DUTCH = "nl" |
18 |
21 |
ENGLISH = "en" |
19 |
22 |
|
20 |
23 |
def index(request): |
21 |
24 |
template = "blog/index.djhtml" |
22 |
25 |
posts = Post.objects.exclude(visible=False) |
23 |
26 |
|
24 |
27 |
|
25 |
28 |
context = { |
26 |
29 |
'posts': posts, |
27 |
30 |
'navbar_title': _("Notepad from a student"), |
28 |
31 |
'navbar_backArrow': True, |
29 |
32 |
'stylesheet_name': "blog", |
30 |
33 |
} |
31 |
34 |
return render(request, template, context) |
32 |
35 |
|
33 |
36 |
def post(request, language_code, post_slug): |
34 |
37 |
context = dict() |
35 |
38 |
if request.method == "POST": # Handling a reply if one is sent |
36 |
39 |
form = CommentForm(request.POST) |
37 |
40 |
|
38 |
41 |
form.post = Post.objects.get(id=request.POST['post']) |
39 |
42 |
if form.is_valid(): |
40 |
43 |
new_comment = form.save(commit=False) |
41 |
44 |
if request.POST['reaction_to'] != "": |
42 |
45 |
new_comment.reaction_to = Comment.objects.get(id=request.POST['reaction_to']) |
43 |
46 |
new_comment.save() |
44 |
47 |
context["comment_response"] = _("Comment succesfully submitted!") |
45 |
48 |
else: |
46 |
49 |
print("ERROR") |
47 |
50 |
print(form.errors) |
48 |
51 |
context["contact_response"] = _("An error occured while trying to submit your comment. Please try again later.") |
49 |
52 |
|
50 |
53 |
template = "blog/post.djhtml" |
51 |
54 |
article = Article.objects.get(slug=post_slug, language_code=language_code) |
52 |
55 |
root_comments = Comment.objects.filter(post=article.post, reaction_to=None).order_by('-date') |
53 |
56 |
context = context | { |
54 |
57 |
'article': article, |
+ |
58 |
'article': article, |
55 |
59 |
'root_comments': root_comments, |
56 |
60 |
'title': article.post.title(), |
57 |
61 |
'navbar_title': article.post.title(), |
58 |
62 |
'navbar_backArrow': False, |
59 |
63 |
'stylesheet_name': "blog"} |
60 |
64 |
|
61 |
65 |
return render(request, template, context) |
62 |
66 |
|
63 |
67 |
def rss(request): |
64 |
68 |
template = "blog/feed.rss" |
65 |
69 |
context = { |
66 |
70 |
'items': FeedItem.objects.all(), |
67 |
71 |
} |
68 |
72 |
return render(request, template, context, content_type="application/rss+xml") |
69 |
73 |
|
70 |
74 |
|
71 |
75 |
def archive(request): |
72 |
76 |
template = "blog/monthly_archive.djhtml" |
73 |
77 |
language = translation.get_language() |
74 |
78 |
|
75 |
79 |
file_2017 = org_to_html("blog/weekly/2017.org") |
76 |
- | file_2018 = org_to_html("blog/weekly/2018.org") |
77 |
- | file_2019 = org_to_html("blog/weekly/2019.org") |
78 |
- | |
+ |
80 |
file_2018 = org_to_html(settings.MEDIA_ROOT + "blog/weekly/2018.org") |
+ |
81 |
file_2019 = org_to_html(settings.MEDIA_ROOT + "blog/weekly/2019.org") |
+ |
82 |
file_2020 = org_to_html(settings.MEDIA_ROOT + "blog/weekly/2020.org") |
+ |
83 |
file_2021 = org_to_html(settings.MEDIA_ROOT + "blog/weekly/2021.org") |
+ |
84 |
|
+ |
85 |
|
+ |
86 |
|
79 |
87 |
|
80 |
88 |
|
81 |
89 |
context = { |
82 |
90 |
't2017': file_2017, |
83 |
91 |
't2018': file_2018, |
84 |
92 |
't2019': file_2019, |
85 |
93 |
'materialDesign_color': "brown", |
86 |
- | 'materialDesign_accentColor': "blue", |
87 |
- | 'navbar_title': _("Weekly-archief"), |
+ |
94 |
't2021': file_2021, |
+ |
95 |
'navbar_title': _("Weekly-archief"), |
88 |
96 |
'navbar_backArrow': True, |
89 |
97 |
'footer_links': footer_links, |
90 |
- | 'footer_description': footer_description, |
91 |
- | 'stylesheet_name': "blog", |
92 |
98 |
} |
93 |
99 |
return render(request, template, context) |
94 |
100 |