Make WordPress Core

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#20481 closed defect (bug) (invalid)

Single quotes transformed to double quotes in post_content

Reported by: mfields's profile mfields Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.4
Component: I18N Keywords: needs-patch
Focuses: Cc:

Description

When WPLANG is set to use certain non-English languages single quotes are converted to double quotes when displayed via the_content(). I think that the issue may have been introduced with [19795], but I am not certain about this. Here are steps to reproduce:

  • Export the Swedish .mo file from GlotPress and save it to wp-content/languages as sv_FI.mo.
  • Set define ('WPLANG', 'sv_FI' ); in wp-config.php.
  • Create a new post using the content from the attached test data (quotes-test-data.txt).
  • Publish the post and view in the the theme.

At this point you should notice that many of the single quotes have been converted to double.

I've only observed this when WordPress uses the Swedish .mo files. I have not tested in any other non-English languages. English does not appear to be affected.

Attachments (1)

quotes-test-data.txt (801 bytes) - added by mfields 12 years ago.

Download all attachments as: .zip

Change History (4)

#2 @nacin
12 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed

This is probably intentional. The sv_FI translators have deliberately translated ‘ and ’ to the double quotes.

http://translate.wordpress.org/projects/wp/dev/sv/default?filters[status]=either&filters[original_id]=40302&filters[translation_id]=1505200

http://translate.wordpress.org/projects/wp/dev/sv/default?filters[status]=either&filters[original_id]=40301&filters[translation_id]=1505199

Some languages may do this as they only have one kind of quote. (We differentiate single closing quotes from apostrophes in wptexturize, so they may — and do — translate that differently.)

If it is not intentional, then the translators can simply fix the string. You can let them know by posting to wppolyglots or using the contact form on sv.wordpress.org. This is not an issue with core.

#3 @mfields
12 years ago

Thanks for the feedback and sorry for the false alarm.

Note: See TracTickets for help on using tickets.