Skip to content

Commit

Permalink
make the site better translatable
Browse files Browse the repository at this point in the history
* Fix untranslatable content
* Fix concatenations
* Make image alt text translatable
* Use shortcut keys
  • Loading branch information
jhass committed Aug 16, 2013
1 parent 89876d1 commit 89c4c6c
Show file tree
Hide file tree
Showing 5 changed files with 249 additions and 261 deletions.
33 changes: 17 additions & 16 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
<li><%= link_to t('pages.about.menu_title'), about_url %></li>
<li><%= link_to t('pages.get_involved.menu_title'), get_involved_url %></li>
<!-- <li><%= link_to t('pages.blog.menu_title'), blog_index_url(subdomain: 'blog') %></li> -->
<li><a href="http://wiki.diasporafoundation.org">Wiki</a></li>
<!-- <li><a href="http://planet.diasporafoundation.org">Planet</a></li> -->
<li><%= link_to t('.wiki'), 'https://wiki.diasporafoundation.org' %></li>
<!-- <li><%= link_to t('.planet'), 'http://planet.diasporafoundation.org' %></li> -->
</ul>
<%= link_to t('buttons.host_pod'), about_path(anchor: "host"), class: 'btn primary' %>
<%= link_to t('buttons.join_diaspora'), root_path(anchor: "get_started"), class: 'btn success' %>
Expand All @@ -47,23 +47,23 @@
<div class="row">
<div class="span10" id="links">
<h4>
Useful Resources
<%= t '.useful_resources' %>
</h4>
<div class="span3">
<ul>
<li>
<a href="http://github.com/diaspora/diaspora/" title="Git repository">
Codebase
<%= t '.codebase' %>
</a>
</li>
<li>
<a href="http://wiki.diasporafoundation.org/" title="Diaspora wiki">
Documentation
<a href="https://wiki.diasporafoundation.org/" title="Diaspora wiki">
<%= t '.documentation' %>
</a>
</li>
<li>
<a href="http://github.com/diaspora/diaspora/issues" title="Bug tracker">
Find &amp; report bugs
<%= t '.report_bugs' %>
</a>
</li>
</ul>
Expand All @@ -73,13 +73,13 @@
<ul>
<li>
<a href="http://webchat.freenode.net/?channels=diaspora" title="#diaspora">
IRC - General
<%= t '.irc_general' %>
</a>
</li>
<li>
<a href="http://webchat.freenode.net/?channels=diaspora-dev"
title="#diaspora-dev">
IRC - Development
<%= t '.irc_development' %>
</a>
</li>
</ul>
Expand All @@ -90,13 +90,13 @@
<li>
<a href="http://groups.google.com/group/diaspora-discuss"
title="General discussion mailing list">
Discussion - General
<%= t '.discussion_general' %>
</a>
</li>
<li>
<a href="http://groups.google.com/group/diaspora-dev"
title="Dev mailing list">
Discussion - Development
<%= t '.discussion_development' %>
</a>
</li>
</ul>
Expand All @@ -106,7 +106,7 @@
<div id="locale-switcher" class="span4">
<div class="btn-group">
<a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
<%= t ".choose_language" %>
<%= t '.choose_language' %>
</a>

<ul class="dropdown-menu">
Expand All @@ -118,15 +118,16 @@
<div class="row" id="CC-licence">
<div class="span16">
<a rel="license" href="http://creativecommons.org/licenses/by/3.0/">
<%= image_tag '80x15.png', alt: 'Creative Commons License' %>
<%= image_tag '80x15.png', alt: t('.cc_license_alt') %>
</a>
<%= t('.licensed_under', site_link: '
<a href="https://diasporafoundation.org/" property="cc:attributionName"
rel="cc:attributionURL">
diasporafoundation.org
</a> is licensed under a
</a>', license_link: %Q{
<a rel="license" href="http://creativecommons.org/licenses/by/3.0/">
Creative Commons Attribution 3.0 Unported License
</a>.
#{t('.license_link_text')}
</a>.}).html_safe %>
</div>
</div>
</div>
Expand Down
150 changes: 71 additions & 79 deletions app/views/pages/about.html.erb
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<% content_for :page_title, t('pages.about.menu_title') %>
<% content_for :page_title, t('.menu_title') %>
<% content_for :wrapper_class, "about_page" %>

<div class="hero" id="masthead">
<div class="container">
<div class="row">
<h1><%= t 'pages.about.headline' %></h1>
<h2 class="lead"><%= t 'pages.about.byline' %></h2>
<h1><%= t '.headline' %></h1>
<h2 class="lead"><%= t '.byline' %></h2>
<br />
</div>
</div>
Expand All @@ -15,8 +15,8 @@
<div class="row top_spacing">
<div class="span4">&nbsp;</div>
<div class="span8">
<h1><%= t 'pages.about.decentralize' %></h1>
<p><%= t 'pages.about.decentralize_ex' %></p>
<h1><%= t '.decentralize' %></h1>
<p><%= t '.decentralize_ex' %></p>
</div>
<div class="span4">&nbsp;</div>
</div>
Expand All @@ -25,200 +25,192 @@

<div class="row top_spacing">
<div class="span8">
<h2><%= t 'pages.about.this' %></h2>
<h2><%= t '.this' %></h2>
</div>
<div class="span8">
<h2><%= t 'pages.about.notthis' %></h2>
<h2><%= t '.notthis' %></h2>
</div>
</div>

<div class="row minor_top_spacing">
<div class="span8">
<%= image_tag "network-distributed.png", alt: "Network-distributed" %>
</div>
<%= image_tag "network-distributed.png", alt: t('.distributed_network') %>
</div>b
<div class="span8">
<%= image_tag "network-centralized.png", alt: "Network-centralized" %>
<%= image_tag "network-centralized.png", alt: t('.centralized_network') %>
</div>
</div>

<div class="row minor_top_spacing">
<div class="span8">
<p><%= t 'pages.about.this_ex' %></p>
<p><%= t '.this_ex' %></p>
</div>
<div class="span8">
<p><%= t 'pages.about.notthis_ex' %></p>
<p><%= t '.notthis_ex' %></p>
<div id="connect"></div>
</div>
<p class="centre">
<%= t 'pages.about.discl1' %>
<a href="https://code.google.com/p/pubsubhubbub/" target="_blank">PubSubHubub</a>
<%= t 'pages.about.discl2' %>
<a href="http://webfinger.org/" target="_blank">Webfinger</a>
<%= t 'pages.about.discl3' %>
<%= t('.discl', pubsubhubub: link_to('PubSubHubub', 'https://code.google.com/p/pubsubhubbub/'),
webfinger: link_to('Webfinger', 'http://webfinger.org')).html_safe %>
</p>
</div>


<div class="page-header top_spacing">
<h1><%= t 'pages.about.connect' %><br /></h1>
<p><%= t 'pages.about.connect_ex' %></p>
<h1><%= t '.connect' %><br /></h1>
<p><%= t '.connect_ex' %></p>
</div>

<div class="row minor_top_spacing">
<div class="span2">
<%= image_tag "search.png", alt: "Search" %>
<%= image_tag "search.png", alt: t('.search_alt') %>
</div>
<div class="span6">
<h2><%= t 'pages.about.find' %></h2>
<p><%= t 'pages.about.find_ex' %></p>
<h2><%= t '.find' %></h2>
<p><%= t '.find_ex' %></p>
</div>
<div class="span2">
<%= image_tag "plus.png", alt: "Add a contact" %>
<%= image_tag "plus.png", alt: t('.add_a_contact_alt') %>
</div>
<div class="span6">
<h2><%= t 'pages.about.add' %></h2>
<p><%= t 'pages.about.add_ex' %></p>
<h2><%= t '.add' %></h2>
<p><%= t '.add_ex' %></p>
</div>
</div>

<div id="freedom" class="page-header top_spacing">
<h1><%= t 'pages.about.freedom' %>
<small><%= t 'pages.about.freedom_byline' %></small>
<h1><%= t '.freedom' %>
<small><%= t '.freedom_byline' %></small>
</h1>
</div>
<div class="row">
<div class="span-one-third">
<h2><%= t 'pages.about.fdm1' %></h2>
<p><%= t 'pages.about.fdm1_ex' %></p>
<h2><%= t '.fdm1' %></h2>
<p><%= t '.fdm1_ex' %></p>
</div>
<div class="span-one-third">
<h2><%= t 'pages.about.fdm2' %></h2>
<p><%= t 'pages.about.fdm2_ex' %></p>
<h2><%= t '.fdm2' %></h2>
<p><%= t '.fdm2_ex' %></p>
</div>
<div class="span-one-third">
<h2><%= t 'pages.about.fdm3' %></h2>
<p><%= t 'pages.about.fdm3_ex' %></p>
<h2><%= t '.fdm3' %></h2>
<p><%= t '.fdm3_ex' %></p>
<p class="find_out_more">
<%= link_to "Find out more &raquo;".html_safe, get_involved_path, class: "btn primary" %>
<%= link_to t('buttons.find_out_more'), get_involved_path, class: "btn primary" %>
</p>
</div>
</div>

<div id="privacy" class="page-header top_spacing">
<h1>
<%= t 'pages.about.privacy' %>
<small><%= t 'pages.about.privacy_byline' %></small>
<%= t '.privacy' %>
<small><%= t '.privacy_byline' %></small>
</h1>
</div>
<div class="row">
<div class="span-one-third">
<h2><%= t 'pages.about.priv1' %></h2>
<p><%= t 'pages.about.priv1_ex' %></p>
<h2><%= t '.priv1' %></h2>
<p><%= t '.priv1_ex' %></p>
</div>
<div class="span-one-third">
<h2><%= t 'pages.about.priv2' %></h2>
<p><%= t 'pages.about.priv2_ex' %></p>
<h2><%= t '.priv2' %></h2>
<p><%= t '.priv2_ex' %></p>
<p class="find_out_more">
<a href="#host" class="btn primary">Find out more &raquo;</a>
<a href="#host" class="btn primary"><%= t('buttons.find_out_more') %></a>
</p>
</div>
<div class="span-one-third">
<h2><%= t 'pages.about.priv3' %></h2>
<p><%= t 'pages.about.priv3_ex' %></p>
<h2><%= t '.priv3' %></h2>
<p><%= t '.priv3_ex' %></p>
<p class="find_out_more">
<a href="#aspects" class="btn primary"> Find out more &raquo;</a>
<a href="#aspects" class="btn primary"><%= t('buttons.find_out_more') %></a>
</p>
</div>
</div>

<div id="aspects" class="page-header top_spacing">
<h1>
<%= t 'pages.about.aspects' %>
<small><%= t 'pages.about.aspects_byline' %></small>
<%= t '.aspects' %>
<small><%= t '.aspects_byline' %></small>
</h1>
</div>

<div class="row">
<div class="span-one-third">
<h2>
<%= t 'pages.about.asp1' %>
<%= t '.asp1' %>
</h2>
<p><%= t 'pages.about.asp1_ex' %></p>
<p><%= t '.asp1_ex' %></p>
</div>

<div class="span-one-third">
<h2><%= t 'pages.about.asp2' %></h2>
<p><%= t 'pages.about.asp2_ex' %></p>
<h2><%= t '.asp2' %></h2>
<p><%= t '.asp2_ex' %></p>
</div>

<div class="span-one-third">
<h2><%= t 'pages.about.asp3' %></h2>
<p><%= t 'pages.about.asp3_ex' %></p>
<h2><%= t '.asp3' %></h2>
<p><%= t '.asp3_ex' %></p>
</div>
</div>

<div id="features" class="page-header top_spacing">
<h1>
<%= t 'pages.about.features' %>
<small><%= t 'pages.about.features_byline' %></small>
<%= t '.features' %>
<small><%= t '.features_byline' %></small>
</h1>
</div>
<div class='row'>
<div class='span4'><%= image_tag "hashtag.png", alt: "Hashtag" %></div>
<div class='span4'><%= image_tag "reshare.png", alt: "Reshare" %></div>
<div class='span4'><%= image_tag "mention.png", alt: "Mention" %></div>
<div class='span4'><%= image_tag "heart.png", alt: "Heart" %></div>
<div class='span4'><%= image_tag "hashtag.png", alt: t('.hashtag_alt') %></div>
<div class='span4'><%= image_tag "reshare.png", alt: t('.reshare_alt') %></div>
<div class='span4'><%= image_tag "mention.png", alt: t('.mention_alt') %></div>
<div class='span4'><%= image_tag "heart.png", alt: t('.heart_alt') %></div>
</div>

<div class="row">
<div class="span4">
<h4><%= t 'pages.about.hashtags' %></h4>
<p><%= t 'pages.about.hashtags_ex' %></p>
<h4><%= t '.hashtags' %></h4>
<p><%= t '.hashtags_ex' %></p>
</div>

<div class="span4">
<h4><%= t 'pages.about.reshare' %></h4>
<p><%= t 'pages.about.reshare_ex' %></p>
<h4><%= t '.reshare' %></h4>
<p><%= t '.reshare_ex' %></p>
</div>

<div class="span4">
<h4><%= t 'pages.about.mentions' %></h4>
<p><%= t 'pages.about.mentions_ex' %></p>
<h4><%= t '.mentions' %></h4>
<p><%= t '.mentions_ex' %></p>
</div>

<div class="span4">
<h4><%= t 'pages.about.love' %></h4>
<p><%= t 'pages.about.love_ex' %></p>
<h4><%= t '.love' %></h4>
<p><%= t '.love_ex' %></p>
</div>
</div>

<div id="host" class="page-header top_spacing">
<h1>
<%= t 'pages.about.host' %>
<small><%= t 'pages.about.host_byline' %></small>
<%= t '.host' %>
<small><%= t '.host_byline' %></small>
</h1>
</div>

<div class="row">
<div class="span7">
<%= image_tag "network-distributed.png", alt: "Network-distributed", size: "400x161" %>
<%= image_tag "network-distributed.png", alt: t('.distributed_network'), size: "400x161" %>
</div>

<div class="span9">
<p><%= t 'pages.about.host_ex' %></p>
<p><%= t '.host_ex' %></p>
<ul>
<li>
<%= t 'pages.about.hostinst1' %>
<a href="http://wiki.diasporafoundation.org/Installation_guides" target="_blank">
<%= t 'pages.about.hostinst2' %>
</a>
<%= t 'pages.about.hostinst3' %>
<%= t('.hostinst1',
instructions_link: link_to(t('.instructions_link_text'),
'https://wiki.diasporafoundation.org/Installation_guides')).html_safe %>
</li>
<li>
<%= t 'pages.about.hostinst4' %>
<a href="http://podupti.me">
Pod Uptime.
</a>
<%= t('.hostinst2', poduptime: link_to('Pod Uptime', 'http://podupti.me')).html_safe %>
</li>
</ul>
</div>
Expand Down
Loading

0 comments on commit 89c4c6c

Please sign in to comment.