Changeset 002f2a in indico


Ignore:
Timestamp:
04/12/10 17:27:19 (3 years ago)
Author:
Jose Benito <jose.benito.gonzalez@…>
Branches:
master, burotel, hello-world-walkthrough, ipv6, new-webex, v0.97-series, v0.98-series, v0.98.2, v0.98.3, v0.98b1, v0.98b2, v0.99, 051b2622c51afb171a1dedb46a0df4fbb0cbd02e, d9941f8582b36b24821a11ea5ba16fda6a457fb1
Children:
becf92
Parents:
9e3b7ff
git-author:
David Martín Clavo <david.martin.clavo@…> (03/25/10 13:49:53)
git-committer:
Jose Benito <jose.benito.gonzalez@…> (04/12/10 17:27:19)
Message:

[FIX] VSOverview page problems in French

-There was a Python's _ i18n function
being used inside a Javascript string;
the english string was 'In event' and
was being replaced by 'Dans l'évènenement',
therefore provoking a syntax error.
-Replaced <%= _() %> by $T() in Javascript code.
-Added some missing <%= _() %> in HTML code.

  • fixes #186
  • reviewed by jbenito: missing $T.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • indico/MaKaC/webinterface/tpls/AdminCollaboration.tpl

    r65a5a26 r002f2a  
    1515            <% additionalStyle = '' %> 
    1616        <% end %> 
    17          
     17 
    1818        <a id="index_<%=indexName%>" onclick="indexSelectedObs('<%=indexName%>', false)" class="CAIndexUnselected" <%=additionalStyle%> > 
    1919            <%= indexName[0].upper() + indexName[1:] %> 
     
    4747        </div> 
    4848    </div> 
    49      
     49 
    5050    <div id="dateFilter" style="padding-top: 10px"> 
    5151        <div> 
     
    6161            <%= _("Since")%> <input type="text" size="16" id="sinceDate" onkeypress="updateFilterButton()" value="<%= InitialSinceDate %>"/> 
    6262            <%= _("to")%> <input type="text" size="16" id="toDate" onkeypress="updateFilterButton()" value="<%= InitialToDate %>"/> 
    63             <span class="CAMinMaxKeySuggestion">Please input dates</span> 
     63            <span class="CAMinMaxKeySuggestion"><%= _("Please input dates") %></span> 
    6464        </div> 
    6565        <div style="padding-top: 5px"> 
     
    6868            <%= _("days ago to")%> <input type="text" size="3" id="toDays" onkeypress="updateFilterButton()" value="<%= InitialToDays %>"/> 
    6969            <%= _("days in the future") %> 
    70             <span class="CAMinMaxKeySuggestion">Please input integers</span> 
     70            <span class="CAMinMaxKeySuggestion"><%= _("Please input integers") %></span> 
    7171        </div> 
    7272    </div> 
     
    7575            <%= _("From")%> <input type="text" size="16" id="fromTitle" onkeypress="updateFilterButton()" value="<%= InitialFromTitle %>"/> 
    7676            <%= _("to")%> <input type="text" size="16" id="toTitle" onkeypress="updateFilterButton()" value="<%= InitialToTitle %>"/> 
    77             <span class="CAMinMaxKeySuggestion">Please input a conference title or the beginning of it</span> 
    78         </div> 
    79     </div> 
    80      
     77            <span class="CAMinMaxKeySuggestion"><%= _("Please input a conference title or the beginning of it") %></span> 
     78        </div> 
     79    </div> 
     80 
    8181    <div style="padding-top: 10px"> 
    8282        <input type="button" id="filterButton" value="<%= _("Refresh")%>" onclick="refresh()"/> 
     
    8888        <span class="CAViewBySpan"><%= _("Order:")%> </span> 
    8989        <a class="CAViewByLink" id="ascendingViewBy" onclick="orderByObs('ascending')"><%= _("Ascending")%></a> 
    90         <a class="CAViewByLink" id="descendingViewBy" onclick="orderByObs('descending')" ><%= _("Descending")%></a>  
     90        <a class="CAViewByLink" id="descendingViewBy" onclick="orderByObs('descending')" ><%= _("Descending")%></a> 
    9191    </div> 
    9292    <div class="CAViewByDiv"> 
     
    9898        <a class="CAViewByLink" id="startDateViewBy" onclick="viewByObs('startDate')"><%= _("Start Date")%></a> 
    9999    </div> 
    100      
     100 
    101101    <div class="CAInfoDiv"> 
    102102        <div class="CATypesDiv"> 
    103             <%= _("This list can have bookings of the following type(s):")%> <span class="pluginNames" id="indexPluginTypes"></span>  
    104         </div> 
    105      
     103            <%= _("This list can have bookings of the following type(s):")%> <span class="pluginNames" id="indexPluginTypes"></span> 
     104        </div> 
     105 
    106106        <div class="CAStaticURLDiv"> 
    107107            <a class="CAStaticURLSwitch" onclick="staticURLSwitch()"><%= _("Static URL for this result")%></a> <%= _("(Use it for bookmarks)")%><br /> 
     
    117117        <div id="resultsInfo" style="display:none;"> 
    118118            <div class="CATotalInIndexDiv"> 
    119                 <span id="totalInIndex"></span><span>&nbsp;bookings in this index.</span> 
     119                <span id="totalInIndex"></span><span>&nbsp;<%= _("bookings in this index.") %></span> 
    120120            </div> 
    121121            <div class="CANResultsDiv"> 
    122                 <span>Query returned&nbsp;</span><span id="nBookings"></span><span>&nbsp;bookings.</span> 
     122                <span>Query returned&nbsp;</span><span id="nBookings"></span><span>&nbsp;<%= _("bookings.") %></span> 
    123123            </div> 
    124124        </div> 
     
    168168    for (var i=0; i<indexNames.length; i++) { 
    169169        $E('index_' + indexNames[i]).dom.onmouseover = function(event) { 
    170             IndicoUI.Widgets.Generic.tooltip(this, event, '<div style="padding:5px">Plugins in this index:<br \/>' + 
     170            IndicoUI.Widgets.Generic.tooltip(this, event, '<div style="padding:5px">' + $T("Plugins in this index:") + '<br \/>' + 
    171171                    indexInformation[this.id.substring(6)].plugins.join(", ") + 
    172172                    '<\/div>'); 
    173173        } 
    174     }     
     174    } 
    175175} 
    176176 
    177177var alertNoIndexSelected = function() { 
    178     var popup = new AlertPopup("No index selected", Html.span('',"Please select an index name"), Html.br(), 
     178    var popup = new AlertPopup($T("No index selected"), Html.span({},$T("Please select an index name")), Html.br(), 
    179179            Html.span(indexNames.join(', '))); 
    180180    popup.open(); 
     
    182182 
    183183var indexSelectedObs = function(selectedIndexName, firstTime) { 
    184      
     184 
    185185    for (var i=0; i<indexNames.length; i++) { 
    186186        var name = indexNames[i]; 
     
    197197    var hasViewByStartDate = indexInformation[selectedIndexName].hasViewByStartDate; 
    198198    var hasShowOnlyPending = indexInformation[selectedIndexName].hasShowOnlyPending; 
    199      
     199 
    200200    if (hasViewByStartDate) { 
    201201        IndicoUI.Effect.appear($E('startDateViewBy')); 
     
    229229        } 
    230230    } 
    231      
     231 
    232232    if ((endsWith(queryParams.viewBy, 'Date') || firstTime) && viewBySelected == 'conferenceTitle') { 
    233233        if (!(firstTime && bookings)) { 
     
    250250        orderByObs('descending', true); // we put true because we don't want to trigger another request 
    251251    } 
    252      
     252 
    253253    queryParams.viewBy = viewBySelected; 
    254254 
     
    291291 
    292292var confIdObs = function() { 
    293         $E('categoryId').dom.disabled = ($E('conferenceId').get() != '')  
     293        $E('categoryId').dom.disabled = ($E('conferenceId').get() != '') 
    294294} 
    295295 
    296296var updateFilterButton = function() { 
    297     $E('filterButton').dom.value = '<%= _("Apply Filter")%>';    
     297    $E('filterButton').dom.value = $T("Apply Filter"); 
    298298} 
    299299 
     
    308308 
    309309var applyFilter = function(){ 
    310      
     310 
    311311    queryParams.showOnlyPending = $E('pendingCB').dom.checked; 
    312312    queryParams.conferenceId = $E('conferenceId').get(); 
     
    336336    queryParams.resultsPerPage = $E('resultsPerPage').get(); 
    337337    queryParams.page = 1; 
    338     $E('filterButton').dom.value = '<%= _("Refresh")%>'; 
    339      
     338    $E('filterButton').dom.value = $T('Refresh'); 
     339 
    340340} 
    341341 
     
    349349    } 
    350350 
    351     var killProgress = IndicoUI.Dialogs.Util.progress("<%= _("Retrieving the data...")%>"); 
     351    var killProgress = IndicoUI.Dialogs.Util.progress($T("Retrieving the data...")); 
    352352    updateStaticURL(); 
    353353 
     
    384384        } 
    385385    ); 
    386      
     386 
    387387} 
    388388 
    389389var updateStaticURL = function() { 
    390     var url = '<%= BaseURL %>' +  
    391               '?queryOnLoad=true' +  
     390    var url = '<%= BaseURL %>' + 
     391              '?queryOnLoad=true' + 
    392392              '&page=' + queryParams.page + 
    393393              '&resultsPerPage=' + queryParams.resultsPerPage + 
     
    428428 
    429429    var result = Html.tbody({}, 
    430         Html.tr({}, Html.td({className : 'ACBookingGroupTitle', colspan: 10, colSpan: 10},  
     430        Html.tr({}, Html.td({className : 'ACBookingGroupTitle', colspan: 10, colSpan: 10}, 
    431431            Html.a({className : 'ACConfLink', href : conference.videoServicesDisplayURL}, 
    432432                    Html.span('ACConfTitle', conference.title), 
     
    450450    row.append(cell); 
    451451 
    452     var cell = Html.td('ACBookingCellNoWrap', '<%= _("Last modification:")%> ' + formatDateTimeCS(booking.modificationDate) ); 
     452    var cell = Html.td('ACBookingCellNoWrap', $T("Last modification:") + formatDateTimeCS(booking.modificationDate) ); 
    453453    row.append(cell); 
    454454 
     
    475475    var time = booking[viewBy].time.substring(0,5) // we can do this because viewBy will be creationDate, etc. which are the same 
    476476                                                   // names of the fields of the booking 
    477      
     477 
    478478    var cell = Html.td('ACBookingFirstCell ACBookingTime', time); 
    479479    row.append(cell); 
    480480 
    481     var cell = Html.td('ACBookingCellNoWrap', Html.span('', booking.type)); 
     481    var cell = Html.td('ACBookingCellNoWrap', Html.span({}, booking.type)); 
    482482    row.append(cell); 
    483483 
     
    485485    row.append(cell); 
    486486 
    487     var cell = Html.td('ACBookingCell', Html.span('', '<%= _("In event:")%> '), Html.span('', booking.conference.title)); 
     487    var cell = Html.td('ACBookingCell', Html.span({}, $T("In event: ")), Html.span({}, booking.conference.title)); 
    488488    row.append(cell); 
    489489 
     
    495495    } 
    496496 
    497     var cell = Html.td('ACBookingCellNoWrap', Html.a({href: booking.modificationURL}, 'Change'), 
     497    var cell = Html.td('ACBookingCellNoWrap', Html.a({href: booking.modificationURL}, $T('Change')), 
    498498            Html.span('horizontalSeparator', '|'), 
    499             Html.a({href: booking.conference.videoServicesDisplayURL}, 'Event Display')); 
     499            Html.a({href: booking.conference.videoServicesDisplayURL}, $T('Event Display'))); 
    500500    row.append(cell); 
    501501 
    502502    IndicoUI.Effect.mouseOver(row.dom); 
    503      
     503 
    504504    return row; 
    505505} 
     
    510510 
    511511    var result = Html.tbody({}, 
    512             Html.tr({}, Html.td({className : 'ACBookingGroupTitle', colspan: 10, colSpan: 10},  
     512            Html.tr({}, Html.td({className : 'ACBookingGroupTitle', colspan: 10, colSpan: 10}, 
    513513                Html.span({}, date) 
    514514            ))); 
     
    526526 
    527527var updateResults = function() { 
    528      
     528 
    529529    $E('results').clear(); 
    530530 
    531531    if (nBookings < 1) { 
    532         $E('resultsMessage').set('<%= _("No results found")%>'); 
     532        $E('resultsMessage').set($T("No results found")); 
    533533        IndicoUI.Effect.appear($E('resultsMessage')); 
    534534        IndicoUI.Effect.disappear($E('resultsInfo')); 
     
    573573    <% end %> 
    574574    updateStaticURL(); 
    575      
     575 
    576576    $E('pageNumberList').set(pf.draw()); 
    577577 
     
    583583    resultsPerPageParameterManager.add($E('resultsPerPage'), 'int', false, function(value) { 
    584584        if (value < 1) { 
    585             return "<%= _("Please input number higher than 0")%>"; 
     585            return $T("Please input number higher than 0"); 
    586586        } 
    587587    }) 
    588      
     588 
    589589    if (bookings) { 
    590590        updateResults(); 
Note: See TracChangeset for help on using the changeset viewer.