Skip to content

Commit

Permalink
Updated support for i18n and added news string for translate
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.socialplanning.org/svn/opencore/trunk@27823 40f73b84-6177-4a8e-8c61-7eee4b1974ed
  • Loading branch information
macagua committed Dec 6, 2010
1 parent 31360a7 commit eb279bf
Show file tree
Hide file tree
Showing 55 changed files with 2,573 additions and 2,363 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
Your email address.
</div>

<div tal:content="error">Validation error output</div>
<div tal:content="error"><tal:comment replace="nothing">Validation error output</tal:comment></div>

<input type="text"
id="send_from_address"
Expand Down
8 changes: 4 additions & 4 deletions Products/OpenPlans/skins/openplans/mailing_lists.pt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
</div>

<h1 tal:content="object_title" class="documentFirstHeading">
Title or id
<tal:comment replace="nothing">Title or id</tal:comment>
</h1>

<a href=""
Expand All @@ -37,7 +37,7 @@
</a>

<div class="documentDescription" tal:content="here/Description">
description
<tal:comment replace="nothing">description</tal:comment>
</div>

<a href="opencore.add_mailinglist"
Expand Down Expand Up @@ -85,7 +85,7 @@
tal:attributes="href python:test(item_type in use_view_action, item_url+'/view', item_url+'/');
class string:$item_wf_state_class visualIconPadding"
tal:content="item_title_or_id">
Item Title
<tal:comment replace="nothing">Item Title</tal:comment>
</a>
</span>

Expand Down Expand Up @@ -146,7 +146,7 @@
&nbsp;
</span>
<span tal:omit-tag="" tal:content="item_description">
description
<tal:comment replace="nothing">description </tal:comment>
</span>
</dd>
</tal:block>
Expand Down
6 changes: 3 additions & 3 deletions Products/OpenPlans/skins/openplans/openteam_membership.cpt
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@
/>
</td>

<td tal:content="member_username">username</td>
<td tal:content="member/getFullname">username</td>
<td tal:content="member_username"><tal:comment replace="nothing">username</tal:comment></td>
<td tal:content="member/getFullname"><tal:comment replace="nothing">fullname</tal:comment></td>

</tr>
</tbody>
Expand Down Expand Up @@ -178,7 +178,7 @@
Full Name
</option>
<option value="getUserName" i18n:translate="label_user_name">
Login Name
User Name
</option>
</select>
</div>
Expand Down
2 changes: 1 addition & 1 deletion Products/OpenPlans/skins/openplans_patches/author.cpt
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@


<div class="documentDescription" tal:content="authorinfo/description">
Author description.
<tal:comment replace="nothing">Author description.</tal:comment>
</div>

<div class="visualClear"><!-- --></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<tal:inProject condition="inProject">
<a tal:attributes="href projInfo/project/absolute_url">
<h1 tal:content="projInfo/project/getFull_name">The Name of the Project</h1>
<h1 tal:content="projInfo/project/getFull_name"><tal:comment replace="nothing">The Name of the Project</tal:comment></h1>
</a>
</tal:inProject>

Expand Down
4 changes: 2 additions & 2 deletions Products/OpenPlans/skins/openplans_patches/document_byline.pt
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@
August 16, 2001 at 23:35:59
</span>

<span class="state-expired"
&mdash; <span class="state-expired"
tal:condition="python:portal.isExpired(here)"
i18n:translate="time_expired">
&mdash; expired
expired
</span>

<span tal:define="locked here/lock_icon.gif"
Expand Down
8 changes: 5 additions & 3 deletions Products/OpenPlans/skins/openplans_patches/folder_contents.pt
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@
</div>
<h1>
<tal:block replace="structure python:getattr(here, here.getIcon(1))"/>
<span tal:content="python: view_title and here.utranslate(view_title) or putils.pretty_title_or_id(here)" tal:omit-tag="">Directory Id</span>
<span tal:content="python: view_title and here.utranslate(view_title) or putils.pretty_title_or_id(here)" tal:omit-tag="">
<tal:comment replace="nothing">Directory Id</tal:comment>
</span>
</h1>
<tal:full_view condition="full_view">

Expand Down Expand Up @@ -231,7 +233,7 @@
<strong tal:omit-tag="python:not isBrowserDefault">
<label tal:content="item_title_or_id"
tal:attributes="for string:cb_$item_id">
Item Title
<tal:comment replace="nothing">Item Title</tal:comment>
</label>
</strong>
</a>
Expand All @@ -251,7 +253,7 @@
</td>
<td tal:content="python:toLocalizedTime(item_modified, long_format=1)"
tal:attributes="class item_wf_state_class">
08/19/2001 03:01 AM
<tal:comment replace="nothing">08/19/2001 03:01 AM</tal:comment>
</td>
<td>
<span i18n:translate=""
Expand Down
17 changes: 8 additions & 9 deletions Products/OpenPlans/skins/openplans_patches/global_sections.pt
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,14 @@
tal:define="selected_tabs python:here.selectedTabs('index_html', here, portal_tabs);
selected_portal_tab selected_tabs/portal;"
tal:condition="portal_tabs">
<ul id="portal-globalnav"
><tal:tabs tal:repeat="tab portal_tabs"
><li tal:attributes="id string:portaltab-${tab/id};
class python:test(selected_portal_tab==tab['id'], 'selected', 'plain');"
><a href="" tal:content="tab/name" tal:attributes="href tab/url; title tab/description|nothing"
>tab name</a
></li
></tal:tabs
></ul>
<ul id="portal-globalnav">
<tal:tabs tal:repeat="tab portal_tabs">
<li tal:attributes="id string:portaltab-${tab/id};
class python:test(selected_portal_tab==tab['id'], 'selected', 'plain');">
<a href="" tal:content="tab/name" tal:attributes="href tab/url; title tab/description|nothing"><tal:comment replace="nothing">tab name</tal:comment></a>
</li>
</tal:tabs>
</ul>
</div>
</body>
</html>
6 changes: 3 additions & 3 deletions Products/OpenPlans/skins/openplans_patches/login_form.cpt
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,14 @@ Need a username and password?
tal:attributes="class python:test(error, 'field error', 'field')">

<label i18n:translate="label_login_name"
tal:attributes="for ac_name">Login Name</label>
tal:attributes="for ac_name"><tal:comment replace="nothing">Login Name</tal:comment></label>

<div i18n:translate="help_login_name_caps"
class="formHelp">
Login names are case sensitive, make sure the caps lock key is not enabled.
</div>

<div tal:content="error">Validation error output</div>
<div tal:content="error"><tal:comment replace="nothing">Validation error output</tal:comment></div>

<input type="text"
size="15"
Expand All @@ -121,7 +121,7 @@ Need a username and password?
</div>
</div>

<div tal:content="error">Validation error output</div>
<div tal:content="error"><tal:comment replace="nothing">Validation error output</tal:comment></div>

<input type="password"
size="15"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
<tal:block replace="structure here/newsitem_icon.gif"/>
<span tal:replace="obj/pretty_title_or_id"> Extended Calendar Product</span>
<span class="portletItemDetails"
tal:content="python:here.toLocalizedTime(obj.Date)">July 7, 08:11</span>
tal:content="python:here.toLocalizedTime(obj.Date)"><tal:comment replace="nothing">July 7, 08:11</tal:comment></span>
</a>
</dd>
</tal:newsitems>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
i18n:domain="atreferencebrowserwidget">

<head tal:define="ztu modules/ZTUtils;">
<title tal:content="here/title_or_id">Title or Id</title>
<title tal:content="here/title_or_id"><tal:comment replace="nothing">Title or Id</tal:comment></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"
tal:define="charset here/portal_properties/site_properties/default_charset;
dummy python:request.RESPONSE.setHeader('Content-Type', 'text/html;;charset=%s' % charset)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<table width="100%">
<tr>
<td>
<h1 tal:content="here/pretty_title_or_id" class="documentFirstHeading"> Title or id </h1>
<h1 tal:content="here/pretty_title_or_id" class="documentFirstHeading"> <tal:comment replace="nothing">Title or id</tal:comment> </h1>
</td>
<td>
<div metal:use-macro="here/document_byline/macros/byline">
Expand Down
2 changes: 1 addition & 1 deletion Products/OpenPlans/skins/openplans_patches/search_form.pt
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@
tal:condition="python: len(creators) &lt;= 30">
<option value="" i18n:translate="label_any_author">Any Author</option>
<metal:block tal:repeat="creator creators">
<option value="" tal:attributes="value creator" tal:content="creator"> username </option>
<option value="" tal:attributes="value creator" tal:content="creator"> <tal:comment replace="nothing">username</tal:comment> </option>
</metal:block>
</select>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
tal:attributes="href item_url;
title desc;"
tal:content="item/pretty_title_or_id">
Related Item
<tal:comment replace="nothing">Related Item</tal:comment>
</a>
</span>
</li>
Expand Down Expand Up @@ -123,7 +123,7 @@
value attachment/Title;"/>
<div class="discreet">
(<a href="" target="_blank" tal:attributes="href attachment/getURL"
tal:content="attachment/getId">Id</a> -
tal:content="attachment/getId"><tal:comment replace="nothing">Id</tal:comment></a> -
<span tal:replace="attachment/getObjSize"/>)
</div>
</td>
Expand Down Expand Up @@ -166,7 +166,7 @@
<div class="formHelp" i18n:translate="manage_attachments_title_help">
Enter a title for the attachment
</div>
<div tal:content="error_title">Validation error output</div>
<div tal:content="error_title"><tal:comment replace="nothing">Validation error output</tal:comment></div>
<input type="string"
name="attachmentTitle"
size="30"
Expand All @@ -183,7 +183,7 @@
Select an attachment to add and click 'Upload'
</div>

<div tal:content="error_file">Validation error output</div>
<div tal:content="error_file"><tal:comment replace="nothing">Validation error output</tal:comment></div>

<input
type="file"
Expand Down
2 changes: 1 addition & 1 deletion opencore/account/join.pt
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@
</fieldset>

</form>
<p i18n:translate="join_description" tal:condition="not:fdata/getUser | nothing" class="oc-discreetText">
<p i18n:translate="join_description_not_share_email " tal:condition="not:fdata/getUser | nothing" class="oc-discreetText">
We will not share your email with anyone. Ever.
</p>
</div><!-- end #oc-content-main -->
Expand Down
37 changes: 21 additions & 16 deletions opencore/browser/footer.pt
Original file line number Diff line number Diff line change
Expand Up @@ -5,35 +5,40 @@
<li><a i18n:translate="footer_contact_link" tal:attributes="href string:${here/portal_url}/contact-site-admin">contact</a></li>
<li><a i18n:translate="footer_news_link" tal:attributes="href string:${here/portal_url}/news">news</a></li>
<li><a i18n:translate="footer_help_link" tal:attributes="href string:${here/portal_url}/help">help</a></li>
<!-- <li><a tal:attributes="href string:${here/portal_url}/legal">legal</a></li> -->
<!-- <li><a tal:attributes="href string:${here/portal_url}/privacy">privacy</a></li> -->
<!-- <li><a i18n:translate="footer_legal_link" tal:attributes="href string:${here/portal_url}/legal">legal</a></li> -->
<!-- <li><a i18n:translate="footer_privacy_link" tal:attributes="href string:${here/portal_url}/privacy">privacy</a></li> -->
</ul>

<div i18n:translate="footer_stats_summary" id="oc-footer-about"
tal:define="people_url string:${here/portal_url}/people;
projects_url string:${here/portal_url}/projects">
<tal:comment replace="nothing">
<div tal:define="people_url string:${here/portal_url}/people;
projects_url string:${here/portal_url}/projects"
id="oc-footer-about" i18n:translate="footer_stats_summary">

<tal:comment replace="nothing" i18n:name="hack_values_i18n_mapping">
<!-- a hack to get these values into the i18n mapping -->
<tal:dummy i18n:name="people_url" replace="people_url" />
<tal:dummy i18n:name="projects_url" replace="projects_url" />
<tal:dummy replace="people_url" />
<tal:dummy replace="projects_url" />
</tal:comment>

<span i18n:name="portal_title" tal:replace="string:${view/portal_title}" /> is
<a tal:attributes="href people_url">
<span i18n:name="num_people" tal:replace="string:${view/nusers}"/>
people</a>

<a i18n:name="num_people" tal:attributes="href people_url">
<span i18n:name="label_num_people" tal:replace="string:${view/nusers}"/>
<span i18n:translate="label_people">people</span>
</a>
and
<a tal:attributes="href projects_url">
<span i18n:name="num_projects" tal:replace="string:${view/projects_served_count}"/>
<span i18n:name="project_noun" tal:replace="view/project_noun">project</span>s</a>
<a i18n:name="num_projects" tal:attributes="href projects_url">
<span i18n:name="label_num_projects" tal:replace="string:${view/projects_served_count}"/>
<span i18n:name="label_projects" tal:replace="view/project_noun">project</span>(s)</a>
since
<span i18n:name="site_birthdate" tal:replace="string:${view/dob}" />.<br />

</div>

<div tal:content="structure provider:opencore.extra.footer">
</div>

<div>
Powered by <a href="http://www.coactivate.org/projects/opencore/">OpenCore</a>
<div i18n:translate="powered-by-opencore">
Powered by <a href='http://www.coactivate.org/projects/opencore/'>OpenCore</a>
</div>
</div>
</div>
10 changes: 5 additions & 5 deletions opencore/listen/browser/archive_date_messages.pt
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@

<ul id="message-list" class="oc-plainList">
<li tal:repeat="message messages">
<a href="." tal:attributes="href message/url;"
><strong tal:content="structure message/brief_subject">Re: Subj</strong></a>
<a href="." tal:attributes="href message/url;">
<strong tal:content="structure message/brief_subject"><tal:comment replace="nothing">Re: Subj</tal:comment></strong></a>
<span class="oc-discreetText">
<span i18n:translate="">from</span> <a href="."
tal:omit-tag="not:message/from_id"
tal:attributes="href string:${here/portal_url}/people/${message/from_id}/profile"
><span tal:replace="structure message/mail_from">test@example.com</span
></a>
tal:attributes="href string:${here/portal_url}/people/${message/from_id}/profile">
<span tal:replace="structure message/mail_from">test@example.com</span>
</a>
<span i18n:translate="">on</span> <span tal:replace="message/date">Tue, 16 Nov 2005</span>
</span>
</li>
Expand Down
2 changes: 1 addition & 1 deletion opencore/listen/browser/archive_date_view.pt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<a href="."
tal:attributes="href month/url"
tal:content="python: month['title'] or default">
(No Subject)
<tal:comment replace="nothing">(No Subject)</tal:comment>
</a>
</li>
</ul>
Expand Down
4 changes: 2 additions & 2 deletions opencore/listen/browser/archive_forum_view.pt
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
<span tal:replace="structure item/mail_from">test@example.com</span>
</a>
</td>
<td tal:content="item/responses">10</td>
<td tal:content="item/last_post">12/1/2005 3:54 pm</td>
<td tal:content="item/responses"><tal:comment replace="nothing">10</tal:comment></td>
<td tal:content="item/last_post"><tal:comment replace="nothing">12/1/2005 3:54 pm</tal:comment></td>
</tr>
</tal:items>
</tbody>
Expand Down
4 changes: 2 additions & 2 deletions opencore/listen/browser/archive_thread_messages.pt
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
<ul id="message-list" class="oc-plainList">
<li tal:repeat="message thread">
<a href="."
tal:attributes="href message/url;"
><strong tal:content="structure message/brief_subject">Re: Subj</strong></a>
tal:attributes="href message/url;">
<strong tal:content="structure message/brief_subject"><tal:comment replace="nothing">Re: Subj</tal:comment></strong></a>
<span class="oc-discreetText">
<span i18n:translate="">from</span> <a href="."
tal:omit-tag="not:message/from_id"
Expand Down
4 changes: 2 additions & 2 deletions opencore/listen/browser/lookup_view.pt
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
<tbody>
<tal:entry repeat="entry here/showAddressMapping">
<tr>
<td class="list-address" tal:content="entry/address">address</td>
<td class="list-path" tal:content="entry/path">path</td>
<td class="list-address" tal:content="entry/address"><tal:comment replace="nothing">address</tal:comment></td>
<td class="list-path" tal:content="entry/path"><tal:comment replace="nothing">path</tal:comment></td>
</tr>
</tal:entry>
</tbody>
Expand Down
2 changes: 1 addition & 1 deletion opencore/listen/browser/mailing_lists.pt
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
<dt class="oc-bigText">
<a href="#" tal:content="list_title_or_id"
tal:attributes="href list_url">
Item Title
<tal:comment replace="nothing">Item Title</tal:comment>
</a>
<span class="oc-discreetText"><span tal:condition="view/loggedin" tal:replace="python:'(' + list.getObject().mailto + ')'" /></span>
</dt>
Expand Down
Loading

0 comments on commit eb279bf

Please sign in to comment.