Changeset 12

Show
Ignore:
Timestamp:
04/15/07 23:14:06 (3 years ago)
Author:
matt_dorn@yahoo.com
Message:

Spanish i18n

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • Extensions/XL8External.py

    r9 r12  
    11from Products.CMFCore.utils import getToolByName 
    22from DateTime import DateTime 
     3from urllib import quote_plus 
    34 
    45def changeTransOwner(self): 
    56 
    6  
    77    mtool = getToolByName(self, 'portal_membership') 
    88    putils = getToolByName(self, 'plone_utils') 
     9    translation_service = getToolByName(self, 'translation_service') 
     10     
    911    member = mtool.getAuthenticatedMember().getId() 
    1012 
     
    1820     
    1921    url=self.absolute_url() 
    20     msg="?portal_status_message=You have taken ownership of this translation." 
    21     self.REQUEST.RESPONSE.redirect(url+msg) 
    22  
     22    msg = translation_service.utranslate(domain='PloneXL8', 
     23                                         msgid='You have taken ownership of this translation.', 
     24                                         default='You have taken ownership of this translation.', 
     25                                         context=self) 
     26    # Let UTF-8 messages be passed via the URL query string 
     27    msg = msg.encode('utf-8') 
     28    msg = quote_plus(msg) 
     29     
     30    self.REQUEST.RESPONSE.redirect(url + "?portal_status_message=" + msg) 
  • skins/PloneXL8/document_byline_xl8.pt

    r9 r12  
    1616        <tal:name tal:condition="creator" 
    1717            tal:define="author python:mtool.getMemberInfo(creator)"> 
    18           <span
    19             Owner:  
    20           <a href="#" 
     18          <span i18n:domain="PloneXL8" i18n:translate="PloneXL8_text_owner"
     19            Owner: </span> 
     20          <span><a href="#" 
    2121             tal:attributes="href string:${portal_url}/author/${creator}" 
    2222             tal:content="python:author and author['fullname'] or creator" 
  • skins/PloneXL8/dtc_view.pt

    r10 r12  
    22      lang="en" 
    33      metal:use-macro="here/main_template/macros/master" 
    4       i18n:domain="plone"> 
     4      i18n:domain="PloneXL8"> 
    55 
    66<body> 
     
    3636                            batch folderContents; 
    3737                            tc_languages here/getTCLanguages; 
    38                                                         query_string python:request['QUERY_STRING']"> 
     38                                                        query_string python:request['QUERY_STRING'];"> 
    3939                                                         
    4040            <form name="filter" method="GET"> 
     
    4242 
    4343                                        <tr> 
    44                                                 <td><input type="radio" name="isDocSource" value="Yes" tal:attributes="checked python:contentFilter['isDocSource']=='Yes'" onclick="clearTranslationArea();" />Source Language 
     44                                                <td><input type="radio" name="isDocSource" value="Yes" tal:attributes="checked python:contentFilter['isDocSource']=='Yes'" onclick="clearTranslationArea();" id="is_doc_source" /><label for="is_doc_source" i18n:translate="PloneXL8_label_source_language">Source Language</label> 
    4545                                                        <select name="Language" multiple="true" size="5" tal:define="sel_source python:here.selectedSourceLangsForSearch(request.form)"> 
    4646                                                                <option value="all" tal:attributes="selected python:'all' in sel_source">All</option> 
     
    5050                                                                                tal:content="lang" /> 
    5151                                                        </select><br /> 
    52                                                         <input type="checkbox" name="includeArchived" value="Yes" tal:attributes="checked python:contentFilter['includeArchived']=='Yes'" />Include archived sources? 
     52                                                        <input type="checkbox" name="includeArchived" value="Yes" tal:attributes="checked python:contentFilter['includeArchived']=='Yes'" id="include_archived" /><label for="include_archived" i18n:translate="PloneXL8_label_include_archived_sources">Include archived sources?</label> 
    5353                                                </td> 
    54                                                 <td valign="top" bgcolor="#cccccc"><input type="radio" name="isDocSource" value="No" tal:attributes="checked python:contentFilter['isDocSource']=='No'" />Target Language 
     54                                                <td valign="top" bgcolor="#cccccc"><input type="radio" name="isDocSource" value="No" tal:attributes="checked python:contentFilter['isDocSource']=='No'" id="is_not_doc_source" /><label for="is_not_doc_source" i18n:translate="PloneXL8_label_target_language">Target Language</label> 
    5555                                                        <select name="Language2" multiple="true" size="5" onclick="checkTranslationArea();"> 
    5656                                                                <option tal:repeat="lang tc_languages"  
     
    6161                                                </td> 
    6262                                                <td valign="top" bgcolor="#cccccc"> 
    63                                                         State: 
     63                                                        <label i18n:translate="PloneXL8_label_state">State</label> 
    6464                                                        <select name="review_state" onclick="checkTranslationArea();"> 
    6565                                                                <option value="">All</option> 
     
    7171                                                </td> 
    7272                                                <td valign="top"> 
    73                                                         <input type="submit" value="Filter" /> 
     73                                                        <input type="submit" value="Filter" i18n:attributes="value" /> 
    7474                                                </td>                                            
    7575                                        </tr> 
     
    9494                        <th class="nosort">&nbsp;<tal:title i18n:translate="listingheader_title" 
    9595                          >Title</tal:title>&nbsp;</th> 
    96                                                   <th class="nosort"
     96                                                  <th class="nosort" i18n:translate="PloneXL8_listingheader_original"
    9797                                                          Original 
    9898                                                  </th> 
    99                                                   <th class="nosort"
     99                                                  <th class="nosort" i18n:translate="PloneXL8_listingheader_words"
    100100                                                          Words 
    101101                                                  </th>              
    102                                                   <th class="nosort"
     102                                                  <th class="nosort" i18n:translate="PloneXL8_listingheader_translations"
    103103                                                          Translations 
    104104                                                  </th> 
    105105 
    106                                                   <th class="nosort"
     106                                                  <th class="nosort" i18n:translate="PloneXL8_listingheader_deadline"
    107107                                                  Deadline 
    108108                                                  </th> 
    109                                                   <th class="nosort"
     109                                                  <th class="nosort" i18n:translate="PloneXL8_listingheader_proofdeadline"
    110110                                                  Proofread Deadline 
    111111                                                  </th>                                            
     
    138138                                                                                  item_due item/getDueDate; 
    139139                                                                                  item_proof_due item/getProofDueDate; 
    140                                           item_urgency item/getUrgency; 
    141                                           "> 
     140                                          item_urgency item/getUrgency"> 
    142141                            <td width="250"> 
    143142                                <img tal:attributes="src python:'urgency' + str(item_urgency) + '.gif';   
     
    195194            <p class="discreet" 
    196195               tal:condition="not: folderContents" 
    197                i18n:translate=""> 
     196               i18n:translate="PloneXL8_text_no_items_found"> 
    198197                No items found. 
    199198            </p> 
    200199        </metal:empty> 
    201         <p class="discreet"><img src="urgency2.gif" /> = Urgent&nbsp; 
    202         <img src="urgency3.gif" /> = Super urgent<br /></p> 
     200        <p class="discreet"><img src="urgency2.gif" /> = <span i18n:translate="PloneXL8_text_urgent">Urgent</span>&nbsp; 
     201        <img src="urgency3.gif" /> = <span i18n:translate="PloneXL8_text_superurgent">Super urgent</span><br /></p> 
    203202        <a href="#" 
    204203                   tal:attributes="href string:rss?${query_string}"> 
  • skins/PloneXL8/formatDueDate.py

    r9 r12  
    66##bind subpath=traverse_subpath 
    77##parameters=mydate 
    8 ##title= 
     8##title=A sort of customized toLocalizedTime for shorter, nicer date format 
    99## 
    1010 
    1111from DateTime import DateTime 
     12from Products.CMFCore.utils import getToolByName 
    1213 
    1314if mydate: 
     15    formatted = mydate.strftime("%d %b %y") 
     16    date_arr = formatted.split(" ") 
     17    day = date_arr[0] 
     18    month = date_arr[1] 
     19    year = date_arr[2] 
     20    mo_lower = month.lower() 
     21    mo_msg_id = "month_" + mo_lower + "_abbr" 
     22     
     23    translation_service = getToolByName(context, 'translation_service') 
     24    short_month = translation_service.utranslate(domain='plone', 
     25                                             msgid=mo_msg_id, 
     26                                             default=month, 
     27                                             context=context) 
    1428    if mydate.isCurrentYear: 
    15         return mydate.strftime("%b %d") 
     29        return day + " " + short_month 
    1630    else: 
    17         return mydate.strftime("%b %d, %Y") 
     31        return day + " " + short_month + " " + year 
  • skins/PloneXL8/getQueryString.py

    r10 r12  
    1 ##parameters=req 
     1##parameters=req, sort='getUrgency' 
    22##title=Return query string for processing by catalog search 
    33 
     
    5050 
    5151# behind the scenes 
    52 req["sort_on"]="getUrgency" 
     52req["sort_on"]=sort 
    5353req["sort_order"]="Reverse" 
    5454 
  • skins/PloneXL8/rss.pt

    r1 r12  
    1313    define-macro="master"  
    1414    tal:define=" 
    15       contentFilter python:here.getQueryString(request.form); 
     15      contentFilter python:here.getQueryString(request.form, sort='created'); 
    1616      contentsMethod python:here.getFolderContents; 
    1717      objects python:contentsMethod(contentFilter, batch=True, b_size=15); 
     
    5050 
    5151<tal:items repeat="obj_item objects"> 
    52     <item tal:define="orig_info python:here.getOriginalInfo(obj_item); 
     52    <item rdf:about="" tal:attributes="rdf:about obj_item/getURL|obj_item/absolute_url"  
     53                          tal:define="orig_info python:here.getOriginalInfo(obj_item); 
    5354                      language obj_item/Language; 
    5455                      title python:orig_info[0] + ' (' + orig_info[2] + ') => ' + language; 
     
    6465            <dc:subject tal:content="item">Item</dc:subject> 
    6566        </tal:block> 
    66         <dc:date tal:content="python: obj_item.modified.HTML4()">Modification date</dc:date> 
     67        <dc:date tal:content="python: obj_item.created.HTML4()">Create date</dc:date> 
    6768        <dc:type tal:content="obj_item/Type">Type</dc:type> 
    6869    </item> 
  • skins/PloneXL8/rssmail.pt

    r10 r12  
    5050        <a href="#" tal:attributes="href python:url + '/rss?' + query_string">RSS feed</a> for this language combination. 
    5151        </p> 
    52         <form action='http://www.r-mail.org/' method='post'><div> 
     52        <form action='http://www.r-mail.org/' method='post'> 
    5353        <input type="hidden" name="rss" tal:attributes="value python:url + '/rss?' + query_string" /> 
    5454        <input type="hidden" name="mailto" tal:attributes="value python:member.email" />