uwe_keim
(Uwe Keim)
3. Juli 2019 um 04:29
1
When typing quotation marks in Discourse like " "
it renders them as “ ”
.
This is described in several posts here.
Being from Germany and running a German language discussion forum, I would love to see an option to render those quotation marks automatically as German quotation marks „ “
.
My question:
Is it somehow possible to configure Discourse to automatically render those " "
as „ “
?
(And optionally also single quotation marks ' '
as ‚ ‘
).
6 „Gefällt mir“
eviltrout
(Robin Ward)
3. Juli 2019 um 15:58
2
I think this is a great idea.
Our markdown engine supports a custom quotes
attribute see README that can take a quote pair which can be passed from a site setting.
@gerhard want to take this one?
7 „Gefällt mir“
gerhard
(Gerhard Schlager)
11. Juli 2019 um 21:23
4
It’s now possible to configure the rendered quotation marks with the new markdown_typographer_quotation_marks
site setting. Discourse already ships defaults for German and French.
https://github.com/discourse/discourse/commit/9a11a8b33bca293da9564e70a2d4798caaac4901
7 „Gefällt mir“
uwe_keim
(Uwe Keim)
12. Juli 2019 um 07:49
5
Awesome, thanks a lot, Gerhard .
1 „Gefällt mir“
uwe_keim
(Uwe Keim)
12. Juli 2019 um 08:05
6
Just discovered that old postings are not automatically re-rendered with the correct quotes.
Only when I edit and save them.
My question:
Is there any command to tell Discourse to re-render all (cached?) postings, so that the quotes get automatically corrected?
gerhard
(Gerhard Schlager)
12. Juli 2019 um 08:26
7
rake posts:rebake
will do the trick.
2 „Gefällt mir“
uwe_keim
(Uwe Keim)
12. Juli 2019 um 08:31
8
Thanks, these steps did the trick:
cd /var/discourse/
sudo ./launcher enter app
sudo rake posts:rebake
exit
This is described here , too:
Either one of these should work
./launcher enter app
rake posts:rebake
or
cd /var/discourse
./launcher enter app
bundle exec rake posts:rebake
5 „Gefällt mir“
uwe_keim
(Uwe Keim)
12. Juli 2019 um 09:24
9
Sorry to bother again.
Looking at this post in my forum:
One can see that the quotes in the body are correctly rendered as German quotes, while the quotes in the title are still rendered as English quotes.
Any chance to also have the quotes in the title as German quotes, too?
4 „Gefällt mir“
gerhard
(Gerhard Schlager)
12. Juli 2019 um 19:18
10
Here we go:
https://github.com/discourse/discourse/commit/ce8e09963903fcad725002b2d42b54b4af5d0930
And I added a new rake task to update topic titles.
rake topics:update_fancy_titles
5 „Gefällt mir“
Can we somehow set the quotes appropriately when the language is changed @gerhard ?
I believe we have some other site setting triggers based on the language changing, such as shorter minimum search length in Chinese?
1 „Gefällt mir“
gerhard
(Gerhard Schlager)
13. Juli 2019 um 06:48
12
I added defaults for German and French. Every other language will use the English default for now.
4 „Gefällt mir“
gerhard
(Gerhard Schlager)
18. Juli 2019 um 10:04
15
@uwe_keim Unfortunately I had to remove my changes that rendered the correct quotation marks in topic titles, because our code currently can’t distinguish between apostrophes and the right single quotation mark.
Hi.
Since the last Discourse update, when I write a post title that contains a quote ', it is converted to › preceded by a single space when I create the post.
[image]
If I click on the edit title button, the input correctly shows ' but it is always converted to › (preceded by a single space) when I do confirm the title edition.
[image]
Also it appears that if I write a double quote ", it will be converted to ».
I’ll try to improve this in the future.
3 „Gefällt mir“
uwe_keim
(Uwe Keim)
19. Juli 2019 um 07:12
16
Thanks for mentioning this.
Hope to get the correct quotation marks in titles back soon
Seavus nach Graz!
1 „Gefällt mir“