Changeset 481

Show
Ignore:
Timestamp:
08/18/06 13:40:50
Author:
gerrykirk
Message:

lots of updates - added missing i18n ids, improved some English, changed the code for the prefs tabs to be like the code in Plone, which is easier for adding i18n ids

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • qPloneComments/branches/plone-2.5-i18n/skins/qplonecomments/2.0.5/discussion_publish_comment.py

    r480 r481  
    2727send_notification_message = send_email(reply, container, state="published") 
    2828 
    29 portal_status_message='Comment+successfully+published' 
     29portal_status_message='Comment+published' 
    3030 
    3131transaction_note('Published discussion item') 
  • qPloneComments/branches/plone-2.5-i18n/skins/qplonecomments/2.0.5/discussion_reply.cpy

    r480 r481  
    7979transaction_note('Added comment to %s at %s' % (parent.title_or_id(), reply.absolute_url())) 
    8080 
    81 portal_status_message='Comment successfully added.' 
     81portal_status_message='Comment published.' 
    8282 
    8383# Inform user about awaiting moderation 
    8484if ifModerate and reply: 
    85     portal_status_message='Your comment awaits moderation.' 
     85    portal_status_message='Currently, all comments require approval before being published. Please check back later.' 
    8686 
    8787target = '%s/%s?portal_status_message=%s' % (parent.absolute_url(), parent.getTypeInfo().getActionById('view'), portal_status_message) 
  • qPloneComments/branches/plone-2.5-i18n/skins/qplonecomments/2.0.5/discussion_reply_form.cpt

    r480 r481  
    3030 
    3131            <div class="field" 
    32                  tal:condition="isForAnonymous"> 
     32                 tal:condition="isForAnonymous" 
     33                 i18n:domain="plonecomments"> 
    3334 
    3435                <div class="field" 
     
    5657                               size="40" 
    5758                               tabindex="" 
    58                                i18n:attributes="title" 
     59                               i18n:attributes="alt title" 
    5960                               tal:attributes="tabindex tabindex/next; 
    6061                                               value python:test(isAnon, '', member.getUserName()); 
  • qPloneComments/branches/plone-2.5-i18n/skins/qplonecomments/2.0.5/discussionitem_view.pt

    r480 r481  
    7171                       type="submit" 
    7272                       value="Publish This Reply" 
     73                                          i18n:domain="plonecomments" 
    7374                       i18n:attributes="value" 
    7475                       /> 
     
    7677 
    7778            <div class="documentByLine" 
    78                  tal:condition="not:isPublished">Until publishing this comment adding reply impossible.</div> 
     79                 tal:condition="not:isPublished"> 
     80                                <span i18n:translate="text_no_reply_until_published">Until publishing this comment adding reply impossible.</span> 
     81                   </div> 
    7982 
    8083        </div> 
  • qPloneComments/branches/plone-2.5-i18n/skins/qplonecomments/2.0.5/validate_talkback.vpy

    r480 r481  
    2525        req = context.REQUEST 
    2626        if not (req.form.has_key('Creator') and not req.form['Creator'] == ""): 
    27             state.setError('Creator', 'Please enter your Name.', 'name_required') 
     27            state.setError('Creator', 'Please enter your name.', 'name_required') 
    2828 
    2929if state.getErrors(): 
  • qPloneComments/branches/plone-2.5-i18n/skins/qplonecomments/2.1/discussion_publish_comment.py

    r480 r481  
    2727send_notification_message = send_email(reply, container, state="published") 
    2828 
    29 portal_status_message='Comment+successfully+published
     29portal_status_message='Comment published.
    3030 
    3131putils = getToolByName(context, 'plone_utils') 
  • qPloneComments/branches/plone-2.5-i18n/skins/qplonecomments/2.1/discussion_reply.cpy

    r480 r481  
    8282 
    8383# Inform user about awaiting moderation 
    84 portal_status_message='Comment+successfully+added
     84portal_status_message='Comment published.
    8585if ifModerate and reply: 
    86     portal_status_message='Your+comment+awaits+moderation
     86    portal_status_message='Currently, all comments require approval before being published. Please check back later.
    8787 
    8888from Products.CMFPlone.utils import transaction_note 
  • qPloneComments/branches/plone-2.5-i18n/skins/qplonecomments/2.1/discussion_reply_form.cpt

    r480 r481  
    7676 
    7777            <div class="field" 
    78                  tal:condition="isForAnonymous"> 
     78                 tal:condition="isForAnonymous" 
     79                 i18n:domain="plonecomments"> 
    7980 
    8081                <div class="field" 
     
    102103                               size="40" 
    103104                               tabindex="" 
    104                                i18n:attributes="title" 
     105                               i18n:attributes="alt title" 
    105106                               tal:attributes="tabindex tabindex/next; 
    106107                                               value python:test(isAnon, '', member.getUserName()); 
  • qPloneComments/branches/plone-2.5-i18n/skins/qplonecomments/2.1/validate_talkback.vpy

    r480 r481  
    3333        req = context.REQUEST 
    3434        if not (req.form.has_key('Creator') and not req.form['Creator'] == ""): 
    35             state.setError('Creator', 'Please enter your Name.', 'name_required') 
     35            state.setError('Creator', 'Please enter your name.', 'name_required') 
    3636 
    3737if state.getErrors(): 
  • qPloneComments/branches/plone-2.5-i18n/skins/qplonecomments/2.5/discussion_publish_comment.py

    r480 r481  
    2727send_notification_message = send_email(reply, container, state="published") 
    2828 
    29 portal_status_message='Comment+successfully+published
     29portal_status_message='Comment published.
    3030 
    3131putils = getToolByName(context, 'plone_utils') 
  • qPloneComments/branches/plone-2.5-i18n/skins/qplonecomments/2.5/discussion_reply.cpy

    r480 r481  
    8080 
    8181# Inform user about awaiting moderation 
    82 portal_status_message='Comment+successfully+added
     82portal_status_message='Comment published.
    8383if ifModerate and reply: 
    84     portal_status_message='Your+comment+awaits+moderation
     84    portal_status_message='Currently, all comments require approval before being published. Please check back later.
    8585 
    8686from Products.CMFPlone.utils import transaction_note 
  • qPloneComments/branches/plone-2.5-i18n/skins/qplonecomments/2.5/discussion_reply_form.cpt

    r480 r481  
    7676 
    7777            <div class="field" 
    78                  tal:condition="isForAnonymous"> 
     78                 tal:condition="isForAnonymous" 
     79                 i18n:domain="plonecomments"> 
    7980 
    8081                <div class="field" 
     
    102103                               size="40" 
    103104                               tabindex="" 
    104                                i18n:attributes="title" 
     105                               i18n:attributes="alt title" 
    105106                               tal:attributes="tabindex tabindex/next; 
    106107                                               value python:test(isAnon, '', member.getUserName()); 
  • qPloneComments/branches/plone-2.5-i18n/skins/qplonecomments/2.5/validate_talkback.vpy

    r480 r481  
    3333        req = context.REQUEST 
    3434        if not (req.form.has_key('Creator') and not req.form['Creator'] == ""): 
    35             state.setError('Creator', 'Please enter your Name.', 'name_required') 
     35            state.setError('Creator', 'Please enter your name.', 'name_required') 
    3636 
    3737if state.getErrors(): 
  • qPloneComments/branches/plone-2.5-i18n/skins/qplonecomments/approve_comment_template.pt

    r480 r481  
    1 <div i18n:domain="plone"  
     1<div i18n:domain="plonecomments"  
    22     tal:omit-tag="" 
    33     tal:define="charset here/portal_properties/site_properties/default_charset|string:utf-8; 
     
    66>To: <tal:x replace="options/mto"/> 
    77From: <tal:x replace="options/mfrom"/> 
    8 Subject: <tal:x condition="organization_name" replace="string:[$organization_name] "/>New comment awaits moderation 
     8Subject: <tal:x condition="organization_name" replace="string:[$organization_name] "/><tal:subject i18n:translate="approvemail_subject">New comment awaits moderation</tal:subject> 
    99 
    10 <tal:x define="obj nocall:options/obj"> 
    11 New comment added to page "<tal:x replace="obj/Title"/>" at: 
    12 <tal:x replace="obj/absolute_url"/> 
    13 </tal:x> 
     10<tal:new_comment define="obj nocall:options/obj"  
     11       i18n:translate="approvemail_new_comment_link"> 
     12       Please review new comment added to the following page "<tal:x replace="obj/Title" i18n:name="title"/>": 
     13       <tal:link replace="obj/absolute_url" i18n:name="link"/> 
     14</tal:new_comment> 
    1415 
    1516-- 
    16 <tal:x condition="organization_name" replace="string:$organization_name "/>Support Team. 
    17  
     17<tal:signature i18n:translate="signature">  
     18    <tal:organization_name condition="organization_name"  
     19                           replace="string:$organization_name"  
     20                           i18n:name="organization_name"/> 
     21    Support Team. 
     22</tal:signature> 
    1823</div> 
  • qPloneComments/branches/plone-2.5-i18n/skins/qplonecomments/prefs_comments_setup_form.cpt

    r480 r481  
    22      xml:lang="en" 
    33      lang="en" 
    4       i18n:domain="plone
     4      i18n:domain="plonecomments
    55      metal:use-macro="here/prefs_main_template/macros/master"> 
    66        <!--      metal:use-macro="here/main_template/macros/master" --> 
     
    1010     tal:define="errors python:request.get('controller_state', None).getErrors();"> 
    1111 
    12     <div metal:define-macro="main" i18n:domain="plone"> 
     12    <div metal:define-macro="main" i18n:domain="plonecomments"> 
    1313    <div class="configlet"> 
    1414    <div class="documentEditable"> 
    1515 
    16     <!-- simulating views --> 
    17     <ul class="contentViews" 
    18        tal:define="tabs python:('Configure qPloneComments','prefs_comments_setup_form'), ('Recent comments moderation','prefs_recent_comments_form'),; 
    19                    tabs python:[ {'label':label, 'name':name} for (label,name) in tabs ];" 
    20     > 
    21         <li class="selected"  
    22             tal:repeat="tab tabs" 
    23             tal:attributes="class python:tab['name']==template.id and 'selected' or ''"> 
     16    <!-- simulating views on the configure/comments pages until we have real objects. --> 
     17    <ul class="contentViews"> 
     18        <li class="selected"> 
    2419        <a href="" 
    25            tal:attributes="href string:${here/absolute_url}/${tab/name}" 
    26            i18n:translate="" tal:content="tab/label">Configure qPloneComments</a> 
     20        tal:attributes="href string:${template/id}" 
     21        i18n:translate="label_configure">Configure qPloneComments</a> 
     22        </li> 
     23 
     24        <li class=""> 
     25        <a href="" 
     26        tal:attributes="href string: prefs_recent_comments_form" 
     27        i18n:translate="label_comments">Recent comments moderation</a> 
    2728        </li> 
    2829    </ul> 
     
    3334    <!-- End of tabs --> 
    3435    <div class="documentContent" metal:define-slot="prefs_content"> 
    35         <h1 i18n:translate="qpc_setup">qPloneComments Setup</h1> 
     36        <h1 i18n:translate="heading_comments_setup">qPloneComments Setup</h1> 
    3637 
    3738        <a href="" 
    3839           class="link-parent" 
    3940           tal:attributes="href string: $portal_url/plone_control_panel" 
    40            i18n:translate="label_up_to_plone_setup"> 
     41           i18n:translate="label_up_to_plone_setup" 
     42           i18n:domain="plone"> 
    4143           Up to Plone Setup 
    4244        </a> 
     
    5153 
    5254            <fieldset> 
    53                 <legend i18n:translate="legend_qpc_notification_legend">qPloneComments setup Details</legend> 
     55                <legend i18n:translate="legend_setup_options">qPloneComments setup options</legend> 
    5456 
    5557                <div class="field" 
     
    127129                                           tabindex tabindex/next;"/> 
    128130 
    129                     <label i18n:translate="label_enable_approve_notification" 
     131                    <label i18n:translate="label_enable_approve_notification"  
    130132                           for="isEnableApproveNotification">Enable Discussion Manager notification on new comments.</label> 
    131133                </div> 
    132134 
    133                 <div class="field" 
    134                      tal:define="isEnabledManagerModeration python:checkPermission('Moderate Discussion', here);"> 
    135  
    136                     <input type="checkbox"  
    137                            class="noborder" 
    138                            name="EnableManagerModeration" 
    139                            id="EnableManagerModeration" 
    140                            tabindex ="" 
    141                            tal:attributes="value isEnabledManagerModeration; 
    142                                            checked python:test(isEnabledManagerModeration, 'True', ''); 
    143                                            tabindex tabindex/next;"/> 
    144  
    145                     <label i18n:translate="enable_manager_moderation" 
    146                            for="isEnableApproveNotification">Enable Manager moderation.</label> 
    147                 </div> 
    148  
    149                 <div class="field" 
    150                      tal:define="property_id string:email_discussion_manager; 
     135                <div class="field" 
     136                     tal:define="property_id string:additional_email; 
    151137                                 email python:props_sheet.getProperty(property_id, ''); 
    152138                                 error python:test(errors.has_key(property_id), errors.get(property_id), None);" 
    153139                     tal:attributes="class python:test(error, 'field error', 'field')" 
    154140                     tal:condition="python:props_sheet.hasProperty(property_id)"> 
    155  
    156                     <label i18n:translate="label_discussion-manager_email">Send comments notification emails to:</label> 
    157  
     141         
     142                    <label i18n:translate="label_additional_email">Send comments notification emails to:</label> 
     143         
    158144                    <div class="formHelp" id="smtp_server_help" 
    159                          i18n:translate="help_discussion-manager_email"> 
    160                         The e-mail address where notifications about adding new comments will be sent. 
     145                         i18n:translate="help_additional_email"> 
     146                        Specify one e-mail address where notifications about adding new comments will be sent. 
    161147                    </div> 
    162148                     
    163149                    <div tal:content="error">Validation error output</div> 
    164150 
    165                     <input name="email_discussion-manager
     151                    <input name="additional_email
    166152                           value="" 
    167153                           size="40" 
     
    202188                           value="Save" 
    203189                           i18n:attributes="value" 
     190                           i18n:domain="plone" 
    204191                           tal:attributes="tabindex tabindex/next;" 
    205192                           /> 
  • qPloneComments/branches/plone-2.5-i18n/skins/qplonecomments/prefs_recent_comments_delete.cpy

    r480 r481  
    2727    talkback.deleteReply( comment_id ) 
    2828 
    29 return state.set(portal_status_message='Comments was successfully deleted.') 
     29return state.set(portal_status_message='Comment(s) deleted.') 
    3030 
  • qPloneComments/branches/plone-2.5-i18n/skins/qplonecomments/prefs_recent_comments_form.cpt

    r480 r481  
    22      xml:lang="en" 
    33      lang="en" 
    4       i18n:domain="plone
     4      i18n:domain="plonecomments
    55      metal:use-macro="here/prefs_main_template/macros/master"> 
    66        <!--      metal:use-macro="here/main_template/macros/master" --> 
     
    1313    <div class="configlet"> 
    1414    <div class="documentEditable"> 
     15    <!-- simulating views on the configure/comments pages until we have real objects. --> 
     16    <ul class="contentViews"> 
     17        <li class=""> 
     18        <a href="" 
     19        tal:attributes="href string:prefs_comments_setup_form" 
     20        i18n:translate="label_configure">Configure qPloneComments</a> 
     21        </li> 
    1522 
    16     <!-- simulating views --> 
    17     <ul class="contentViews" 
    18        tal:define="tabs python:('Configure qPloneComments','prefs_comments_setup_form'), ('Recent comments moderation','prefs_recent_comments_form'),; 
    19                    tabs python:[ {'label':label, 'name':name} for (label,name) in tabs ];" 
    20     > 
    21         <li class="selected"  
    22             tal:repeat="tab tabs" 
    23             tal:attributes="class python:tab['name']==template.id and 'selected' or ''"> 
     23        <li class="selected"> 
    2424        <a href="" 
    25            tal:attributes="href string:${here/absolute_url}/${tab/name}" 
    26            i18n:translate="" tal:content="tab/label">Recent comments moderation</a> 
     25        tal:attributes="href string:${template/id}" 
     26        i18n:translate="label_comments">Recent comments moderation</a> 
    2727        </li> 
    2828    </ul> 
     
    3636         tal:define ="results python:here.portal_catalog.searchResults(portal_type='Discussion Item',review_state='private',sort_on='created',sort_order='reverse');"> 
    3737 
    38         <h1 i18n:translate="qpc_setup">Recent comments</h1> 
     38        <h1 i18n:translate="heading_comments">Recent comments</h1> 
    3939 
    4040        <a href="" 
    4141           class="link-parent" 
    4242           tal:attributes="href string: $portal_url/plone_control_panel" 
    43            i18n:translate="label_up_to_plone_setup"> 
     43           i18n:translate="label_up_to_plone_setup" 
     44           i18n:domain="plone"> 
    4445           Up to Plone Setup 
    4546        </a> 
    46         <div tal:condition="not:results"> No new comments.</div> 
     47         
     48        <p tal:condition="not:results" i18n:translate="text_no_new_comments">No new comments.</p> 
    4749 
    4850        <div tal:condition="results" 
     
    5759                  tal:attributes="action string:${here/getId}/${template/getId}"> 
    5860                <fieldset> 
    59                     <legend i18n:translate="legend_qpc_notification_legend">List of recent comments</legend> 
     61                    <legend i18n:translate="legend_recent_comments">List of recent comments</legend> 
    6062 
    6163                    <table><tbody> 
     
    7274                                 alt="Select all items" 
    7375                                 i18n:attributes="title label_select_all_items; alt label_select_all_items;" 
     76                                 i18n:domain="plone" 
    7477                      /> 
    7578                      </th> 
  • qPloneComments/branches/plone-2.5-i18n/skins/qplonecomments/prefs_recent_comments_publish.cpy

    r480 r481  
    2222    send_notification_message = send_email(comment, container, state="published") 
    2323 
    24 return state.set(portal_status_message='Comments was successfully published.') 
     24return state.set(portal_status_message='Comment(s) published.') 
    2525 
  • qPloneComments/branches/plone-2.5-i18n/skins/qplonecomments/published_comment_template.pt

    r480 r481  
    1 <div i18n:domain="plone"  
     1<div i18n:domain="plonecomments"  
    22     tal:omit-tag="" 
    33     tal:define="charset here/portal_properties/site_properties/default_charset|string:utf-8; 
     
    66>To: <tal:x replace="options/mto"/> 
    77From: <tal:x replace="options/mfrom"/> 
    8 Subject: <tal:x condition="organization_name" replace="string:[$organization_name] "/>New comment added 
     8Subject: <tal:x condition="organization_name" replace="string:[$organization_name] "/><tal:subject i18n:translate="publishedmail_subject">New comment added</tal:subject> 
    99 
    10 <tal:x define="obj nocall:options/obj"> 
    11 New comment added to page "<tal:x replace="obj/Title"/>" at
    12 <tal:x replace="obj/absolute_url"/> 
    13 </tal:x
     10<tal:new_comment define="obj nocall:options/obj" i18n:translate="publishedmail_new_comment_link"> 
     11View new comment added to the following page "<tal:x replace="obj/Title" i18n:name="title"/>"
     12<tal:x replace="obj/absolute_url" i18n:name="link"/> 
     13</tal:new_comment
    1414 
    1515-- 
    16 <tal:x condition="organization_name" replace="string:$organization_name "/>Support Team. 
     16<tal:signature i18n:translate="signature">  
     17    <tal:organization_name condition="organization_name"  
     18                           replace="string:$organization_name"  
     19                           i18n:name="organization_name"/> 
     20    Support Team. 
     21</tal:signature> 
    1722 
    1823</div> 
  • qPloneComments/branches/plone-2.5-i18n/skins/qplonecomments/validate_reply.vpy

    r480 r481  
    1010 
    1111if hasattr(context, 'review_state') and not context.review_state=="published": 
    12     return state.set(status='failure', portal_status_message="You can't add comment to not published reply.") 
     12    return state.set(status='failure', portal_status_message="Reply not allowed because the response is to a comment waiting to be approved. Please wait for the comment to be approved before replying.") 
    1313 
    1414return state