i18n for quicktags.js. Props Nazgul. fixes #3958
git-svn-id: http://svn.automattic.com/wordpress/trunk@5167 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
e273f11ec5
commit
99f1babe59
|
@ -168,7 +168,7 @@ function edShowButton(button, i) {
|
|||
}
|
||||
|
||||
function edShowLinks() {
|
||||
var tempStr = '<select onchange="edQuickLink(this.options[this.selectedIndex].value, this);"><option value="-1" selected>(Quick Links)</option>';
|
||||
var tempStr = '<select onchange="edQuickLink(this.options[this.selectedIndex].value, this);"><option value="-1" selected>' + quicktagsL10n.quickLinks + '</option>';
|
||||
for (i = 0; i < edLinks.length; i++) {
|
||||
tempStr += '<option value="' + i + '">' + edLinks[i].display + '</option>';
|
||||
}
|
||||
|
@ -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('<input type="button" id="ed_spell" class="ed_button" onclick="edSpell(edCanvas);" title="Dictionary lookup" value="lookup" />');
|
||||
document.write('<input type="button" id="ed_close" class="ed_button" onclick="edCloseAllTags();" title="Close all open tags" value="Close Tags" />');
|
||||
document.write('<input type="button" id="ed_spell" class="ed_button" onclick="edSpell(edCanvas);" title="' + quicktagsL10n.dictionaryLookup + '" value="' + quicktagsL10n.lookup + '" />');
|
||||
document.write('<input type="button" id="ed_close" class="ed_button" onclick="edCloseAllTags();" title="' + quicktagsL10n.closeAllOpenTags + '" value="' + quicktagsL10n.closeTags + '" />');
|
||||
// edShowLinks(); // disabled by default
|
||||
document.write('</div>');
|
||||
}
|
||||
|
@ -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 = '<a href="' + URL + '">';
|
||||
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 = '<img src="'
|
||||
+ myValue
|
||||
+ '" alt="' + prompt('Enter a description of the image', '')
|
||||
+ '" alt="' + prompt(quicktagsL10n.enterImageDescription, '')
|
||||
+ '" />';
|
||||
edInsertContent(myField, myValue);
|
||||
}
|
||||
|
|
|
@ -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');
|
||||
|
|
Loading…
Reference in New Issue