Skip to content

Commit

Permalink
Update _header.html.erb (#7744)
Browse files Browse the repository at this point in the history
Changed function t to translation.
  • Loading branch information
WaldenJosh authored Mar 29, 2020
1 parent 5fbd630 commit 320949e
Showing 1 changed file with 23 additions and 23 deletions.
46 changes: 23 additions & 23 deletions app/views/layouts/_header.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<div class="collapse navbar-collapse" id="header-navbar-collapse">
<form class="form-inline mr-3" id="searchform" autocomplete="off">
<div class="input-group">
<input type="text" id="searchform_input" class="form-control search-query typeahead" role="search" qryType="tags" placeholder="<%= t('layout._header.search') %>" value="<%= params[:query] %>" required>
<input type="text" id="searchform_input" class="form-control search-query typeahead" role="search" qryType="tags" placeholder="<%= translation('layout._header.search') %>" value="<%= params[:query] %>" required>
<div class="input-group-append">
<button class="btn btn-light" type="submit"><i class="fa fa-search"></i></button>
</div>
Expand Down Expand Up @@ -67,21 +67,21 @@

<li class="nav-item dropdown" style="min-width:80px;">
<a class="nav-link" data-toggle="dropdown" href="#">
<%= t('layout._header.about.about_title') %>
<%= translation('layout._header.about.about_title') %>
</a>
<div class="dropdown-menu">
<a class="dropdown-item" href="/about"><%= t('layout._header.about.about_public_lab') %></a>
<a class="dropdown-item" href="/blog"><%= t('layout._header.about.blog') %></a>
<a class="dropdown-item" href="/newsletter"><%= t('Newsletter') %></a>
<a class="dropdown-item" href="/wiki/contact"><%= t('layout._header.about.contact') %></a>
<a class="dropdown-item" href="/about"><%= translation('layout._header.about.about_public_lab') %></a>
<a class="dropdown-item" href="/blog"><%= translation('layout._header.about.blog') %></a>
<a class="dropdown-item" href="/newsletter"><%= translation('Newsletter') %></a>
<a class="dropdown-item" href="/wiki/contact"><%= translation('layout._header.about.contact') %></a>
</div>
</li>

<li class="nav-item d-sm-none d-lg-inline" style="padding:0 10px;">
<a class="nav-link btn btn-outline-secondary" target="_blank" href="//store.publiclab.org"><%= t('layout._header.store') %></a>
<a class="nav-link btn btn-outline-secondary" target="_blank" href="//store.publiclab.org"><%= translation('layout._header.store') %></a>
</li>
<li class="nav-item d-sm-none d-lg-inline" style="padding:0 10px;">
<a class="nav-link btn btn-outline-secondary" href="/donate"><%= t('layout._header.donate') %></a>
<a class="nav-link btn btn-outline-secondary" href="/donate"><%= translation('layout._header.donate') %></a>
</li>

<!-- end navbar feature -->
Expand All @@ -91,12 +91,12 @@
<ul class="navbar-nav mr-lg-5">
<% if current_user %>
<li class="nav-item d-sm-none d-xl-inline">
<a rel="tooltip" class="nav-link" title="<%= t('layout._header.your_dashboard') %>" data-placement="bottom" href="/dashboard">Dashboard</a>
<a rel="tooltip" class="nav-link" title="<%= translation('layout._header.your_dashboard') %>" data-placement="bottom" href="/dashboard">Dashboard</a>
</li>
<% else %>
<li class="d-md-none d-xl-inline nav-item"> <!-- signup button -->
<a rel="tooltip" class="nav-link signupToggle" title="<%= t('layout._header.become_part_community') %>" href="#">
<%= t('layout._header.join') %>
<a rel="tooltip" class="nav-link signupToggle" title="<%= translation('layout._header.become_part_community') %>" href="#">
<%= translation('layout._header.join') %>
</a>
</li>
<% end %>
Expand All @@ -121,13 +121,13 @@
<% end %>
</h5>

<a class="dropdown-item" href="/profile/<%= current_user.username %>"><%= t('layout._header.profile') %></a>
<a class="dropdown-item" href="/profile/edit"><%= t('layout._header.edit_profile') %></a>
<a class="dropdown-item" href="/profile/<%= current_user.username %>"><%= translation('layout._header.profile') %></a>
<a class="dropdown-item" href="/profile/edit"><%= translation('layout._header.edit_profile') %></a>
<a class="dropdown-item" href="/settings" >Notifications</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="/subscriptions"><%= t('layout._header.subscriptions') %></a>
<a class="dropdown-item" href="/subscriptions"><%= translation('layout._header.subscriptions') %></a>
<a class="dropdown-item" href="/subscriptions/digest">Your digest</a>
<a class="dropdown-item" href="/profile/<%= current_user.username %>/likes"><%= t('layout._header.notes_liked') %></a>
<a class="dropdown-item" href="/profile/<%= current_user.username %>/likes"><%= translation('layout._header.notes_liked') %></a>
<div class="dropdown-divider"></div>
<% if logged_in_as(['admin']) %>
<a class="dropdown-item" href="/useremail">Email search</a>
Expand All @@ -136,14 +136,14 @@
<a class="dropdown-item" href="/people">Contributors</a>
<div class="dropdown-divider"></div>
<% end %>
<%= link_to t('layout._header.logout'), logout_path, class: "dropdown-item" %>
<%= link_to translation('layout._header.logout'), logout_path, class: "dropdown-item" %>
<a class="dropdown-item" href="/logoutRemotely">Logout from all devices</a>
</div>
</li>
<% else %> <!-- Login button -->
<li class="nav-item">
<a class="nav-link loginToggle" href="#">
<%= t('layout._header.login.login_title') %>
<%= translation('layout._header.login.login_title') %>
</a>
</li>
<% end %>
Expand All @@ -152,13 +152,13 @@
<li id="md-ham" class="d-lg-none dropdown">
<a href="#" class="btn btn-dark" data-toggle="dropdown"><span class="fa fa-white" style="vertical-align: middle;"></span></a>
<div class="dropdown-menu dropdown-menu-right">
<a class="dropdown-item d-lg-none" href="//store.publiclab.org"><%= t('layout._header.store') %></a>
<a class="dropdown-item d-lg-none" href="/donate"><%= t('layout._header.donate') %></a>
<a class="dropdown-item d-lg-none" href="//store.publiclab.org"><%= translation('layout._header.store') %></a>
<a class="dropdown-item d-lg-none" href="/donate"><%= translation('layout._header.donate') %></a>
<!--These menu items will only appear in the "More" dropdown menu. -->
<% if current_user %>
<a class="dropdown-item d-xl-none" rel="tooltip" title="<%= t('layout._header.your_dashboard') %>" data-placement="bottom" href="/dashboard">Dashboard</a>
<a class="dropdown-item d-xl-none" rel="tooltip" title="<%= translation('layout._header.your_dashboard') %>" data-placement="bottom" href="/dashboard">Dashboard</a>
<% else %>
<a class="dropdown-item d-xl-none" rel="tooltip" title="<%= t('layout._header.become_part_community') %>" href="/signup"><%= t('layout._header.join') %></a>
<a class="dropdown-item d-xl-none" rel="tooltip" title="<%= translation('layout._header.become_part_community') %>" href="/signup"><%= translation('layout._header.join') %></a>
<% end %>
</div>
</li>
Expand All @@ -167,8 +167,8 @@

<div class="body-container container">
<div class="visible-print">
<% if params[:controller] == "notes" %><h1>Public Lab <small><%= t('layout._header.research_note') %></small></h1><% end %>
<% if params[:controller] == "wiki" %><h1>Public Lab <small><%= t('layout._header.wiki_doc') %></small></h1><% end %>
<% if params[:controller] == "notes" %><h1>Public Lab <small><%= translation('layout._header.research_note') %></small></h1><% end %>
<% if params[:controller] == "wiki" %><h1>Public Lab <small><%= translation('layout._header.wiki_doc') %></small></h1><% end %>
<hr />
</div>
<script>
Expand Down

0 comments on commit 320949e

Please sign in to comment.