1
0
mirror of https://github.com/projekteuler/projekteuler.git synced 2025-12-10 08:46:41 +01:00

Translate problems index

This commit is contained in:
Philipp Fischbeck 2015-01-02 11:52:20 +01:00
parent de4d33879f
commit 6dfdcffc69
2 changed files with 12 additions and 5 deletions

View File

@ -1,11 +1,11 @@
<h1>Listing Problems</h1> <h1><%= Problem.model_name.human(count: 2) %></h1>
<%= render 'problem_pagination' %> <%= render 'problem_pagination' %>
<table class="table table-striped table-bordered"> <table class="table table-striped table-bordered">
<thead> <thead>
<tr> <tr>
<th>ID</th> <th><%= Problem.human_attribute_name(:id) %></th>
<th>Title</th> <th><%= Problem.human_attribute_name(:title) %></th>
</tr> </tr>
</thead> </thead>
@ -17,9 +17,9 @@
<% if problem.is_translated? %> <% if problem.is_translated? %>
<%= link_to problem.title, problem %> <%= link_to problem.title, problem %>
<% else %> <% else %>
<i>Dieses Problem wurde noch nicht übersetzt.</i> <i><%= t '.not_yet_translated' %></i>
<%= link_to new_problem_translation_path(problem), class: 'btn btn-default btn-xs' do %> <%= link_to new_problem_translation_path(problem), class: 'btn btn-default btn-xs' do %>
<%= icon :pencil %> Übersetzung vorschlagen <%= icon :pencil %> <%= t '.suggest_translation' %>
<% end %> <% end %>
<% end %> <% end %>

View File

@ -0,0 +1,7 @@
# ruby encoding: utf-8
de:
problems:
index:
not_yet_translated: 'Dieses Problem wurde noch nicht übersetzt.'
suggest_translation: 'Übersetzung vorschlagen'