From b11b72c851355f3c606b78eab53511fcb3dfe926 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Sun, 1 Apr 2007 16:06:19 +0000 Subject: [PATCH] i18n for quicktags.js. Props Nazgul. fixes #3958 git-svn-id: https://develop.svn.wordpress.org/trunk@5167 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/js/quicktags.js | 14 +++++++------- wp-includes/script-loader.php | 13 ++++++++++++- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/wp-includes/js/quicktags.js b/wp-includes/js/quicktags.js index 12a95c7d98..0837d84a5c 100644 --- a/wp-includes/js/quicktags.js +++ b/wp-includes/js/quicktags.js @@ -168,7 +168,7 @@ function edShowButton(button, i) { } function edShowLinks() { - var tempStr = ''; for (i = 0; i < edLinks.length; i++) { tempStr += ''; } @@ -248,7 +248,7 @@ function edSpell(myField) { } } if (word == '') { - word = prompt('Enter a word to look up:', ''); + word = prompt(quicktagsL10n.wordLookup, ''); } if (word !== null && /^\w[\w ]*$/.test(word)) { window.open('http://www.answers.com/' + escape(word)); @@ -260,8 +260,8 @@ function edToolbar() { for (i = 0; i < edButtons.length; i++) { edShowButton(edButtons[i], i); } - document.write(''); - document.write(''); + document.write(''); + document.write(''); // edShowLinks(); // disabled by default document.write(''); } @@ -366,7 +366,7 @@ function edInsertLink(myField, i, defaultValue) { defaultValue = 'http://'; } if (!edCheckOpenTags(i)) { - var URL = prompt('Enter the URL' ,defaultValue); + var URL = prompt(quicktagsL10n.enterURL, defaultValue); if (URL) { edButtons[i].tagStart = ''; edInsertTag(myField, i); @@ -378,11 +378,11 @@ function edInsertLink(myField, i, defaultValue) { } function edInsertImage(myField) { - var myValue = prompt('Enter the URL of the image', 'http://'); + var myValue = prompt(quicktagsL10n.enterImageURL, 'http://'); if (myValue) { myValue = '' + prompt('Enter a description of the image', '') 
+				+ ''; edInsertContent(myField, myValue); } diff --git a/wp-includes/script-loader.php b/wp-includes/script-loader.php index b4e8c319f7..442d7d03d2 100644 --- a/wp-includes/script-loader.php +++ b/wp-includes/script-loader.php @@ -13,7 +13,18 @@ class WP_Scripts { $this->add( 'dbx', '/wp-includes/js/dbx.js', false, '2.05' ); $this->add( 'fat', '/wp-includes/js/fat.js', false, '1.0-RC1_3660' ); $this->add( 'sack', '/wp-includes/js/tw-sack.js', false, '1.6.1' ); - $this->add( 'quicktags', '/wp-includes/js/quicktags.js', false, '3517' ); + $this->add( 'quicktags', '/wp-includes/js/quicktags.js', false, '3958' ); + $this->localize( 'quicktags', 'quicktagsL10n', array( + 'quickLinks' => __('(Quick Links)'), + 'wordLookup' => __('Enter a word to look up:'), + 'dictionaryLookup' => attribute_escape(__('Dictionary lookup')), + 'lookup' => attribute_escape(__('lookup')), + 'closeAllOpenTags' => attribute_escape(__('Close all open tags')), + 'closeTags' => attribute_escape(__('close tags')), + 'enterURL' => __('Enter the URL'), + 'enterImageURL' => __('Enter the URL of the image'), + 'enterImageDescription' => __('Enter a description of the image') + ) ); $this->add( 'colorpicker', '/wp-includes/js/colorpicker.js', false, '3517' ); $this->add( 'tiny_mce', '/wp-includes/js/tinymce/tiny_mce_gzip.php', false, '20070326' ); $mce_config = apply_filters('tiny_mce_config_url', '/wp-includes/js/tinymce/tiny_mce_config.php');