German quotation marks

When typing quotation marks in Discourse like \" \", they are rendered 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 automatically render those quotation marks 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 лайков

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 лайков

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.

7 лайков

Awesome, thanks a lot, Gerhard :blush:.

1 лайк

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?

rake posts:rebake will do the trick.

2 лайка

Thanks, these steps did the trick:

cd /var/discourse/
sudo ./launcher enter app
sudo rake posts:rebake
exit

This is described here, too:

5 лайков

Sorry to bother you 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.

Is there any chance to also have the quotes in the title rendered as German quotes?

4 лайка

Here we go:

And I added a new rake task to update topic titles.

rake topics:update_fancy_titles
5 лайков

Can we somehow set the quotes appropriately when the language is changed @gerhard? :thinking:

I believe we have some other site setting triggers based on the language changing, such as shorter minimum search length in Chinese?

1 лайк

I added defaults for German and French. Every other language will use the English default for now.

4 лайка

@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.

I’ll try to improve this in the future.

3 лайка

Thanks for mentioning this.

Hope to get the correct quotation marks in titles back soon :slight_smile:

Seavus to Graz!

1 лайк