WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#30950 closed defect (bug) (wontfix)

French translations with shortcode using parameter values wrapped with double-quotes not parsing correctly

Reported by: cais Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.1
Component: Shortcodes Keywords:
Focuses: Cc:

Description

I'm not exactly sure how best to describe this but see below for additional details including how I was able to reproduce.

As it is, I have test a few different plugins by a few different authors and found when a WordPress installation is set to use the "Francais" (forgive the lack of accents) most if not all shortcodes will have their parameters wrapped in "double-quotes" change to at least the first being a "double-right-arrow".

To the best of my understanding the "double-right-arrow" is correct as far as the translation itself is concerned (and should be followed by a closing "double-left-arrow", which is not necessarily the case I am seeing in my "visual" testing).

Also to note, the plugin itself does not need to necessarily have a French language translation available.

To reproduce, use any shortcode implementing parameter values wrapped in double-quotes and switch the site's default language to French. At a minimum the first "double-quote" will be changed to a "double-right-arrow" and the shortcode will not parse correctly. Also to note, the underlying "code" as viewed in the Text tab of TinyMCE (or even as automatically produced by the_excerpt) will display the original version of the shortcode as written.

PS: This may be "known" to a certain extent per @nacin.

Change History (5)

This ticket was mentioned in Slack in #meta-i18n by cais. View the logs.


5 years ago

#2 @cais
5 years ago

Quick update ... further testing (as this is coming up for all the "French" sites I have been troubleshooting) has shown a short-term work-around. To temporarily "fix" this issue wrap the shortcode in <pre> tags.

This will apply the styles associated with the <pre> tag so some additional CSS may be needed on most sites employing this temporary work-around.

#3 follow-up: @dd32
5 years ago

Can you supply a self-contained code example that duplicates the problem?

I have a feeling that this is being caused by an unregistered shortcode (one that is not added with add_shortcode(), as the quote conversion doesn't affect registered shortcodes.
See http://codex.wordpress.org/Shortcode_API#Unregistered_Names for more information.

(Just to add: This works for me in testing, with a registered shortcode, but fails as described with an unregistered shortcode)

Last edited 5 years ago by dd32 (previous) (diff)

#4 in reply to: ↑ 3 @cais
5 years ago

  • Resolution set to wontfix
  • Status changed from new to closed

Replying to dd32:

Can you supply a self-contained code example that duplicates the problem?

I have a feeling that this is being caused by an unregistered shortcode (one that is not added with add_shortcode(), as the quote conversion doesn't affect registered shortcodes.
See http://codex.wordpress.org/Shortcode_API#Unregistered_Names for more information.

(Just to add: This works for me in testing, with a registered shortcode, but fails as described with an unregistered shortcode)

Hmm ... it seems further testing proves out what you are describing. I am not able to reproduce it in all cases of shortcodes with double-quotes wrapping their parameters and suspect this is an issue much along the lines you are suggesting via that link. I would suspect this ticket can be closed (resolving as #wontfix).

My previous tests were misleading. I'll let the other plugin author know about the issue. Thanks!

#5 @SergeyBiryukov
5 years ago

  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.