Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added "translation" to necessary lines #7521

Merged
merged 1 commit into from
Feb 24, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions app/views/notes/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
<div class="col-lg-9">
<% if params[:controller] == "search" %>
<h3><%= raw t('notes.index.search_results_for', :params => params[:id]) %> <small>(<a href="/search/advanced/<%= params[:id] %>"><%= t('notes.index.advanced_search') %></a>)</h3>
<h3><%= raw translation('notes.index.search_results_for', :params => params[:id]) %> <small>(<a href="/search/advanced/<%= params[:id] %>"><%= translation('notes.index.advanced_search') %></a>)</h3>

<% elsif params[:controller] == "tag" %>
<h3><%= raw t('notes.index.notes_tagged_with', :params => params[:id]) %></h3>
<h3><%= raw translation('notes.index.notes_tagged_with', :params => params[:id]) %></h3>
<% elsif params[:action] == "popular" %>
<h2><%= t('notes.index.popular_research_notes') %></h2>
<h2><%= translation('notes.index.popular_research_notes') %></h2>
<% elsif params[:action] == "recent" %>
<h2><%= t('notes.index.recent_research_notes') %></h2>
<h2><%= translation('notes.index.recent_research_notes') %></h2>
<% elsif params[:action] == "author_topic" %>
<h3><%= raw t('notes.index.research_on', :tags => @tagnames.join(', '), :url1 => "/people/"[email protected], :user_name => @user.name) %> <br /><small><%= raw t('notes.index.research_notes_and_wiki_edits_with_time', :count => @user.nodes.count, :time => time_ago_in_words(@user.created_at)) %></small></h3>
<h3><%= raw translation('notes.index.research_on', :tags => @tagnames.join(', '), :url1 => "/people/"[email protected], :user_name => @user.name) %> <br /><small><%= raw t('notes.index.research_notes_and_wiki_edits_with_time', :count => @user.nodes.count, :time => time_ago_in_words(@user.created_at)) %></small></h3>
<% elsif params[:action] == "author" %>
<h3><%= raw t('notes.index.research_by', :url1 => "/people/"[email protected], :user_name => @user.name) %> <small><%= raw t('notes.index.research_notes_and_wiki_edits', :count1 => @user.note_count, :word1 => 'note'.pluralize(@user.note_count), :count2 => @user.revisions.count, :word2 => 'edit'.pluralize(@user.revisions.count)) %> <% if @user.notes.length > 0 %><%= raw t('notes.index.starting_time', :time => time_ago_in_words(@user.created_at)) %><% end %></small></h3>
<h3><%= raw translation('notes.index.research_by', :url1 => "/people/"[email protected], :user_name => @user.name) %> <small><%= raw translation('notes.index.research_notes_and_wiki_edits', :count1 => @user.note_count, :word1 => 'note'.pluralize(@user.note_count), :count2 => @user.revisions.count, :word2 => 'edit'.pluralize(@user.revisions.count)) %> <% if @user.notes.length > 0 %><%= raw t('notes.index.starting_time', :time => time_ago_in_words(@user.created_at)) %><% end %></small></h3>
<% else %>
<h2><%= raw t('notes.index.research_notes_ideas_and_documentation') %></h2>
<h2><%= raw translation('notes.index.research_notes_ideas_and_documentation') %></h2>
<% end %>
<% if params[:controller] == "notes" && (params[:action] == "popular" || params[:action] == "index" || params[:action] == "liked" || params[:action] == "recent") %>

Expand All @@ -22,13 +22,13 @@

<ul class="nav nav-tabs" id="tab-bar">
<li class="nav-item">
<a class="nav-link <% if params[:action] == "recent" %> active <% end %>" href="/notes/recent"> <i class="fa fa-clock-o"></i><span class="hidden-sm hidden-xs"> <%= t('notes.index.recent') %></span></a>
<a class="nav-link <% if params[:action] == "recent" %> active <% end %>" href="/notes/recent"> <i class="fa fa-clock-o"></i><span class="hidden-sm hidden-xs"> <%= translation('notes.index.recent') %></span></a>
</li>
<li class="nav-item">
<a class="nav-link <% if params[:action] == "popular" %> active <% end %> " href="/notes/popular/"> <i class="fa fa-bolt"></i><span class="hidden-sm hidden-xs"> <%= t('notes.index.popular') %></span></a>
<a class="nav-link <% if params[:action] == "popular" %> active <% end %> " href="/notes/popular/"> <i class="fa fa-bolt"></i><span class="hidden-sm hidden-xs"> <%= translation('notes.index.popular') %></span></a>
</li>
<li class="nav-item">
<a class="nav-link <% if params[:action] == "liked" %> active <% end %> " href="/notes/liked/"> <i class="fa fa-star-o"></i><span class="hidden-sm hidden-xs"> <%= t('notes.index.liked') %></span></a>
<a class="nav-link <% if params[:action] == "liked" %> active <% end %> " href="/notes/liked/"> <i class="fa fa-star-o"></i><span class="hidden-sm hidden-xs"> <%= translation('notes.index.liked') %></span></a>
</li>
</ul>

Expand Down