WordPress.org

Make WordPress Core

Opened 9 years ago

Closed 8 years ago

Last modified 8 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 9 years ago.
3181.2.diff (3.3 KB) - added by Sewar 8 years ago.
Using js_escape()

Download all attachments as: .zip

Change History (14)

comment:1 @Viper007Bond9 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.

comment:2 @Sewar9 years ago

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

comment:3 @foolswisdom9 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."

@Sewar9 years ago

comment:4 @Sewar9 years ago

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

comment:5 @ryan8 years ago

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

comment:6 @matt8 years ago

  • Milestone changed from 2.1 to 2.2

@Sewar8 years ago

Using js_escape()

comment:7 @Sewar8 years ago

  • Milestone changed from 2.2 to 2.1

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

comment:8 @ryan8 years ago

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

comment:9 @ryan8 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.

comment:10 @foolswisdom8 years ago

  • Milestone changed from 2.2 to 2.3

comment:11 @Nazgul8 years ago

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

Fixed by [5167]

comment:12 @rob1n8 years ago

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