WordPress.org

Make WordPress Core

Changeset 12276


Ignore:
Timestamp:
11/25/09 11:08:39 (5 years ago)
Author:
azaozz
Message:

l10n for thickbox.js, props nbachiyski, fixes #10278

Location:
trunk/wp-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/js/thickbox/thickbox.js

    r12205 r12276  
    8989                                TB_NextCaption = TB_TempArray[TB_Counter].title; 
    9090                                TB_NextURL = TB_TempArray[TB_Counter].href; 
    91                                 TB_NextHTML = "<span id='TB_next'>&nbsp;&nbsp;<a href='#'>Next &gt;</a></span>"; 
     91                                TB_NextHTML = "<span id='TB_next'>&nbsp;&nbsp;<a href='#'>"+thickboxL10n.next+"</a></span>"; 
    9292                            } else { 
    9393                                TB_PrevCaption = TB_TempArray[TB_Counter].title; 
    9494                                TB_PrevURL = TB_TempArray[TB_Counter].href; 
    95                                 TB_PrevHTML = "<span id='TB_prev'>&nbsp;&nbsp;<a href='#'>&lt; Prev</a></span>"; 
     95                                TB_PrevHTML = "<span id='TB_prev'>&nbsp;&nbsp;<a href='#'>"+thickboxL10n.prev+"</a></span>"; 
    9696                            } 
    9797                        } else { 
    9898                            TB_FoundURL = true; 
    99                             TB_imageCount = "Image " + (TB_Counter + 1) +" of "+ (TB_TempArray.length); 
     99                            TB_imageCount = thickboxL10n.image + ' ' + (TB_Counter + 1) + ' ' + thickboxL10n.of + ' ' + (TB_TempArray.length); 
    100100                        } 
    101101                } 
     
    131131            TB_WIDTH = imageWidth + 30; 
    132132            TB_HEIGHT = imageHeight + 60; 
    133             jQuery("#TB_window").append("<a href='' id='TB_ImageOff' title='Close'><img id='TB_Image' src='"+url+"' width='"+imageWidth+"' height='"+imageHeight+"' alt='"+caption+"'/></a>" + "<div id='TB_caption'>"+caption+"<div id='TB_secondLine'>" + TB_imageCount + TB_PrevHTML + TB_NextHTML + "</div></div><div id='TB_closeWindow'><a href='#' id='TB_closeWindowButton' title='Close'><img src='" + tb_closeImage + "' /></a></div>"); 
     133            jQuery("#TB_window").append("<a href='' id='TB_ImageOff' title='"+thickboxL10n.close+"'><img id='TB_Image' src='"+url+"' width='"+imageWidth+"' height='"+imageHeight+"' alt='"+caption+"'/></a>" + "<div id='TB_caption'>"+caption+"<div id='TB_secondLine'>" + TB_imageCount + TB_PrevHTML + TB_NextHTML + "</div></div><div id='TB_closeWindow'><a href='#' id='TB_closeWindowButton' title='"+thickboxL10n.close+"'><img src='" + tb_closeImage + "' /></a></div>"); 
    134134 
    135135            jQuery("#TB_closeWindowButton").click(tb_remove); 
     
    199199                    jQuery("#TB_iframeContent").remove(); 
    200200                    if(params['modal'] != "true"){//iframe no modal 
    201                         jQuery("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+caption+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton' title='Close'><img src='" + tb_closeImage + "' /></a></div></div><iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW + 29)+"px;height:"+(ajaxContentH + 17)+"px;' > </iframe>"); 
     201                        jQuery("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+caption+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton' title='"+thickboxL10n.close+"'><img src='" + tb_closeImage + "' /></a></div></div><iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW + 29)+"px;height:"+(ajaxContentH + 17)+"px;' > </iframe>"); 
    202202                    }else{//iframe modal 
    203203                    jQuery("#TB_overlay").unbind(); 
  • trunk/wp-includes/script-loader.php

    r12275 r12276  
    166166    $scripts->add_data( 'jquery-table-hotkeys', 'group', 1 ); 
    167167 
    168     $scripts->add( 'thickbox', "/wp-includes/js/thickbox/thickbox.js", array('jquery'), '3.1-20091117'); 
     168    $scripts->add( 'thickbox', "/wp-includes/js/thickbox/thickbox.js", array('jquery'), '3.1-20091124'); 
    169169    $scripts->add_data( 'thickbox', 'group', 1 ); 
     170    $scripts->localize( 'thickbox', 'thickboxL10n', array( 
     171            'next' => __('Next &gt;'), 
     172            'prev' => __('&lt; Prev'), 
     173            'image' => __('Image'), 
     174            'of' => __('of'), 
     175            'close' => __('Close'), 
     176            'l10n_print_after' => 'try{convertEntities(thickboxL10n);}catch(e){};' 
     177    ) ); 
     178     
    170179 
    171180    $scripts->add( 'jcrop', "/wp-includes/js/jcrop/jquery.Jcrop$suffix.js", array('jquery'), '0.9.8'); 
Note: See TracChangeset for help on using the changeset viewer.