rugk / unicodify

✍️ A browser add-on (Firefox, Chrome, Thunderbird) that allows you to autocorrect common text sequences and convert text characters to a look like a special font.
https://addons.mozilla.org/firefox/addon/unicodify-text-transformer/?utm_source=github.com&utm_medium=git&utm_content=repo-about-description&utm_campaign=github
Other
11 stars 2 forks source link

Typographic quotes should be language-depdendend #82

Closed koppor closed 11 months ago

koppor commented 11 months ago

Background

German quotes != English quotes.

Proposed solution

When I type "something", the quotes should be replaced by the current language of the email.

Meaning „so“ in German :)

Alternatives

Manually inserting the Unicdode strings.

Additional context

The help text should also be written with typographic correct quotes:

image

rugk commented 11 months ago

Oh yeah many languages have many different characters for that: https://en.wikipedia.org/wiki/Quotation_mark#Summary_table The French ones are e.g. also typical.

The help text should also be written with typographic correct quotes:

Haha well it is written like that deliberately to demonstrate what is meant with these. Though even the good example looks like using the English quiotes, does not it hmm?

rugk commented 11 months ago

But yeah just looked and it is hardcoded: https://github.com/rugk/unicodify/blob/b3943b090207c6848f200fd8bc572f090c2786bc/src/_locales/de/messages.json#L319

Currently, only en-US quotes are supported.

tdulcet commented 11 months ago

It looks like this is a duplicate of #12.

Anyway, supporting smart quotes for other languages should be relatively easy, although we would need to know what quote characters are on the keyboards for each of those languages. Specifically, we would need to create a huge mapping of "straight quotes" to “smart quotes” for each language. Based on your comments, it sounds like German keyboards may use the same ASCII quote characters (" and ') as English keyboards, so we would just need to map those to „/“ and ‚/‘ respectively.

rugk commented 11 months ago

Duplicate of https://github.com/rugk/unicodify/issues/12