Changeset 3059 for trunk


Ignore:
Timestamp:
10/25/10 11:48:59 (9 years ago)
Author:
jukka
Message:

Added i18n-message ids for browsing portlets.

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LeMillCatalogTool.py

    r3056 r3059  
    473473                del keywords['portfolio'] 
    474474            elif 'content' in path: 
    475                 keywords['portal_type']=CONTENT_TYPES 
     475                keywords['portal_type']=list(CONTENT_TYPES) 
    476476            elif 'methods' in path: 
    477477                keywords['portal_type']='Activity' 
     
    479479                keywords['portal_type']='Tool' 
    480480            elif 'community' in path: 
    481                 keywords['portal_type']=COMMUNITY_TYPES 
    482             else: 
    483                 keywords['portal_type']=SEARCHABLE_TYPES 
     481                keywords['portal_type']=list(COMMUNITY_TYPES) 
     482            else: 
     483                keywords['portal_type']=list(SEARCHABLE_TYPES) 
    484484        if 'q' in keywords:  
    485485            keywords['SearchableText']=keywords['q'] 
     
    495495        if not 'Language' in keywords: 
    496496            found=False 
    497             if 'base' in keywords: 
    498                 if keywords['base']=='language': 
    499                     found=True 
    500             if 'portal_type' in keywords and keywords['portal_type']=='MemberFolder': 
    501                 found=True 
    502                  
    503             if not found: 
     497            if 'base' in keywords and keywords['base']=='language': 
     498                found=True                 
     499            else: 
    504500                for compensating in ['SearchableText','listCreators','getTarget_group','getTags','getSubject_area','created','getLatestEdit']: 
    505501                    if compensating in keywords: 
     
    508504            if not found: 
    509505                keywords['Language']=getToolByName(self, 'portal_languages').getLanguageCookie() or 'en' 
    510         if 'Language' in keywords: 
    511             if not keywords['Language']: 
     506        if 'Language' in keywords:  
     507            if not keywords['Language']: # Delete empty 'Language' 
    512508                del keywords['Language'] 
     509            elif 'portal_type' in keywords: 
     510                if 'MemberFolder' in keywords['portal_type']: 
     511                    keywords['getLanguage_skills']=keywords['Language'] 
     512 
    513513        if 'base' in keywords: 
    514514            del keywords['base'] 
  • trunk/skins/lemill/browse_macros.pt

    r3057 r3059  
    2828           lang_filter d/lang_filter;" 
    2929           tal:attributes="action string:$url_base/browse"> 
    30      <p tal:condition="d/do_languages"><a href="" tal:attributes="href string:$cloud_url?base=language" i18n:translate="">Language</a><br/> 
     30     <p tal:condition="d/do_languages"><a href="" tal:attributes="href string:$cloud_url?base=language" i18n:translate="label_language">Language</a><br/> 
    3131        <select tal:attributes="tabindex tabindex/next; disabled d/lang_disabled" name="language" onchange="this.form.submit()"> 
    3232            <optgroup><tal:loop repeat="item d/common_languages"><option tal:attributes="value python:item[0]; selected python:item[2]"><span tal:replace="python:str(item[1])" /><tal:counter condition="python:item[3]"> (<span tal:replace="python:item[3]"/>)</tal:counter></option></tal:loop></optgroup> 
     
    3434        </select> 
    3535     </p>          
    36      <p tal:condition="d/do_subject_areas"><a href="" tal:attributes="href string:$cloud_url?${lang_filter}base=subject_area" i18n:translate="">Subject area</a><br/> 
     36     <p tal:condition="d/do_subject_areas"><a href="" tal:attributes="href string:$cloud_url?${lang_filter}base=subject_area" i18n:translate="label_subject_area">Subject area</a><br/> 
    3737        <select tal:attributes="tabindex tabindex/next; disabled d/subjs_disabled" name="subject_area" onchange="this.form.submit()"> 
    3838            <tal:loop repeat="item d/subject_area"><option tal:attributes="value python:item[0]; selected python:item[2]"><span tal:content="python:str(item[1])" i18n:translate="" tal:omit-tag=""/><tal:counter condition="python:item[3]"> (<span tal:replace="python:item[3]"/>)</tal:counter></option></tal:loop> 
    3939        </select> 
    4040     </p> 
    41      <p tal:condition="d/do_target_groups"><a href="" tal:attributes="href string:$cloud_url?${lang_filter}base=target_group" i18n:translate="">Target group</a><br/> 
     41     <p tal:condition="d/do_target_groups"><a href="" tal:attributes="href string:$cloud_url?${lang_filter}base=target_group" i18n:translate="label_target_group">Target group</a><br/> 
    4242        <select tal:attributes="tabindex tabindex/next; disabled d/targs_disabled" name="target_group" onchange="this.form.submit()"> 
    4343            <tal:loop repeat="item d/target_group"><option tal:attributes="value python:item[0]; selected python:item[2]"><span tal:content="python:str(item[1])" i18n:translate="" tal:omit-tag=""/><tal:counter condition="python:item[3]"> (<span tal:replace="python:item[3]"/>)</tal:counter></option></tal:loop> 
    4444        </select> 
    4545     </p> 
    46      <p tal:condition="d/do_types"><span i18n:translate="">Type</span><br/> 
     46     <p tal:condition="d/do_types"><span i18n:translate="label_type">Type</span><br/> 
    4747        <select tal:attributes="tabindex tabindex/next" name="type" onchange="this.form.submit()"> 
    4848            <tal:loop repeat="item d/type"><option tal:attributes="value python:item[0]; selected python:item[2]"><span tal:content="python:str(item[1])" i18n:translate="" tal:omit-tag=""/><tal:counter condition="python:item[3]"> (<span tal:replace="python:item[3]"/>)</tal:counter></option></tal:loop> 
    4949        </select> 
    5050     </p> 
    51      <p tal:condition="d/do_edited"><span i18n:translate="">Date</span><br/> 
     51     <p tal:condition="d/do_edited"><span i18n:translate="label_date">Date</span><br/> 
    5252        <select tal:attributes="tabindex tabindex/next" name="edited" onchange="this.form.submit()"> 
    5353            <tal:loop repeat="item d/edited"><option tal:attributes="value python:item[0]; selected python:item[2]"><span tal:content="python:str(item[1])" i18n:translate="" tal:omit-tag=""/></option></tal:loop> 
  • trunk/skins/lemill/personalize_form.cpt

    r3057 r3059  
    3838            schematas memberfolder/Schemata; 
    3939            fields python:schematas['default'].editableFields(memberfolder); 
     40            fields python:[field for field in fields if field.getName() not in ['mobile','slideshare_username','skills','interests','messenger1','messenger2','messenger3']];  
    4041            js python:here.getUniqueWidgetAttr(fields, 'helper_js')"> 
    4142          
  • trunk/skins/lemill/portfolio.cpt

    r3057 r3059  
    2727           d python:here.portal_catalog.createBrowsingOptions(REQUEST=request, results=results, portfolio=True);" 
    2828           tal:attributes="action string:$here_url/portfolio"> 
    29         <p><span i18n:translate="">Type</span><br/> 
     29        <p><span i18n:translate="label_type">Type</span><br/> 
    3030        <select tal:attributes="tabindex tabindex/next" name="type" onchange="$('input#q').val($('input#searchGadget').val());this.form.submit()"> 
    3131            <tal:loop repeat="item d/type"><option tal:attributes="value python:item[0]; selected python:item[2]"><span tal:content="python:str(item[1])" i18n:translate="" tal:omit-tag=""/><tal:counter condition="python:item[3]"> (<span tal:replace="python:item[3]"/>)</tal:counter></option></tal:loop> 
    3232        </select> 
    3333        </p> 
    34         <p><span i18n:translate="">Subject area</span><br/> 
     34        <p><span i18n:translate="label_subject_area">Subject area</span><br/> 
    3535        <select tal:attributes="tabindex tabindex/next; disabled d/subjs_disabled" name="subject_area" onchange="$('input#q').val($('input#searchGadget').val());this.form.submit()"> 
    3636            <tal:loop repeat="item d/subject_area"><option tal:attributes="value python:item[0]; selected python:item[2]"><span tal:content="python:str(item[1])" i18n:translate="" tal:omit-tag=""/><tal:counter condition="python:item[3]"> (<span tal:replace="python:item[3]"/>)</tal:counter></option></tal:loop> 
    3737        </select> 
    3838        </p> 
    39         <p><span i18n:translate="">Date</span><br/> 
     39        <p><span i18n:translate="label_date">Date</span><br/> 
    4040        <select tal:attributes="tabindex tabindex/next" name="edited" onchange="$('input#q').val($('input#searchGadget').val());this.form.submit()"> 
    4141            <tal:loop repeat="item d/edited"><option tal:attributes="value python:item[0]; selected python:item[2]"><span tal:content="python:str(item[1])" i18n:translate="" tal:omit-tag=""/></option></tal:loop> 
Note: See TracChangeset for help on using the changeset viewer.