We have a structure in Turkish like this: "2017'de" which means "in 2017". When typogrify is enabled it becomes: "2017›de". In order to fix this, I changed the relevant line to include numbers as well as letters before apostrophe (SmartyPants.php #911):
$_ = preg_replace("/(\\p{L}|\p{N})(')(?=\\p{L}|$)/u", '\1’', $_);
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | typogrify-2882550-2.patch | 505 bytes | jigish.addweb |
Comments
Comment #2
jigish.addweb commented@akin.demirci, Please find my attached patch that changed the line as per your request. Thanks!..
Comment #3
benjifisherSince the title mentions Turkish, I was hoping to get a review from another Turkish speaker. In fact, this bug comes up whenever an apostrophe (
'character) follows a numeral and the single-close-quote character, which depends on the language, is different from the apostrophe. I am updating the issue title to reflect this.I tested with the Umami profile, adding the (English) text
to Spanish and Turkish translations of a node. In Spanish, I get
without the patch,
after applying the patch. I think this is an improvement.
Comment #5
benjifisherFixed.
Thanks to @akin.demirci for reporting the issue and to @jigish.addweb for supplying the patch!
Comment #6
wim leersI think #3025543: Typographers' quotes don't play nicely with wrap initial quote option might be related?