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’', $_);

CommentFileSizeAuthor
#2 typogrify-2882550-2.patch505 bytesjigish.addweb

Comments

akin.demirci created an issue. See original summary.

jigish.addweb’s picture

Status: Active » Needs review
StatusFileSize
new505 bytes

@akin.demirci, Please find my attached patch that changed the line as per your request. Thanks!..

benjifisher’s picture

Title: Apostrophes are replaced with wrong quotation mark in Turkish » Apostrophes after numerals are replaced with quotation marks
Status: Needs review » Reviewed & tested by the community

Since 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

What is Espanol for "3'rd and 17'th"?

to Spanish and Turkish translations of a node. In Spanish, I get

What is Espanol for «3“rd and 17“th»?

without the patch,

What is Espanol for «3’rd and 17’th»?

after applying the patch. I think this is an improvement.

benjifisher’s picture

Status: Reviewed & tested by the community » Fixed

Fixed.

Thanks to @akin.demirci for reporting the issue and to @jigish.addweb for supplying the patch!

wim leers’s picture

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.