WordPress.org

Make WordPress Core

Opened 10 years ago

Closed 9 years ago

Last modified 9 years ago

#3181 closed defect (bug) (fixed)

i18n issue in quicktags

Reported by: Nazgul Owned by: ryan
Milestone: 2.2 Priority: normal
Severity: minor Version: 2.1
Component: Administration Keywords: i18n quicktags has-patch
Focuses: Cc:

Description

The quicktags.js file contains a few hardcoded texts which can't be translated by language packs this way.

A quick scan gives at least the following texts: (line number in brackets)
Quick Links (171)
Dictionary lookup (263)
Close all open tags (264)
Enter the URL (369)
Enter the URL of the image (381)
Enter a description of the image (385)

Attachments (2)

3181.diff (4.2 KB) - added by Sewar 10 years ago.
3181.2.diff (3.3 KB) - added by Sewar 10 years ago.
Using js_escape()

Download all attachments as: .zip

Change History (14)

#1 @Viper007Bond
10 years ago

  • Keywords translate quicktags i18n removed
  • Severity changed from normal to minor
  • Type changed from defect to enhancement

Changing it to quicktags.php would be needed (and would be nice). It'd allow us to add in a hook to easily add more simple buttons.

#2 @Sewar
10 years ago

  • Keywords i18n quicktags has-patch added
  • Owner changed from anonymous to Sewar
  • Status changed from new to assigned

#3 @foolswisdom
10 years ago

  • Type changed from enhancement to defect

Probably safe to consider this a defect, "hardcoded texts which can't be translated by language packs this way."

@Sewar
10 years ago

#4 @Sewar
10 years ago

"svn mv quicktags.js quicktags-js.php" then apply the patch.

#5 @ryan
10 years ago

Use js_escape() instead of addslashes for escaping inside JS.

#6 @matt
10 years ago

  • Milestone changed from 2.1 to 2.2

@Sewar
10 years ago

Using js_escape()

#7 @Sewar
10 years ago

  • Milestone changed from 2.2 to 2.1

This is like #3224, so it can be go in 2.1

#8 @ryan
10 years ago

  • Owner changed from Sewar to ryan
  • Status changed from assigned to new

#9 @ryan
10 years ago

  • Milestone changed from 2.1 to 2.2

Moving to php and including wp-config.php means we do a full WP load. That can slow down quicktags load quite a bit. Let's defer this until we can figure out something faster for these cases where we just want some gettext for JS.

#10 @foolswisdom
9 years ago

  • Milestone changed from 2.2 to 2.3

#11 @Nazgul
9 years ago

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

Fixed by [5167]

#12 @rob1n
9 years ago

  • Milestone changed from 2.3 to 2.2
Note: See TracTickets for help on using tickets.