translations

This commit is contained in:
Meutel 2015-08-08 23:12:16 +02:00
parent 58a556378f
commit 995b7a2039
5 changed files with 46 additions and 17 deletions

View File

@ -15,7 +15,7 @@
<% end %> <% end %>
<h2> <h2>
<span class="glyphicon glyphicon-user"></span> <span class="glyphicon glyphicon-user"></span>
<%= "Author".pluralize(@book.authors.count) %> <%= t(:book_authors, count: @book.authors.count) %>
</h2> </h2>
<ul> <ul>
<% @book.authors.each do |author| %> <% @book.authors.each do |author| %>
@ -25,7 +25,7 @@
<% if @book.serie %> <% if @book.serie %>
<h2> <h2>
<span class="glyphicon glyphicon-list"></span> <span class="glyphicon glyphicon-list"></span>
Serie <%= t :book_serie %>
</h2> </h2>
<div> <div>
<%= link_to @book.serie.name, @book.serie %> <%= link_to @book.serie.name, @book.serie %>
@ -34,7 +34,7 @@
<% end %> <% end %>
<h2> <h2>
<span class="glyphicon glyphicon-globe"></span> <span class="glyphicon glyphicon-globe"></span>
<%= "Language".pluralize(@book.languages.count) %> <%= t(:book_lang, count: @book.languages.count) %>
</h2> </h2>
<div> <div>
<% @book.languages.each do |language| %> <% @book.languages.each do |language| %>
@ -43,26 +43,26 @@
</div> </div>
<h2> <h2>
<span class="glyphicon glyphicon-tags"></span> <span class="glyphicon glyphicon-tags"></span>
<%= "Tag".pluralize(@book.tags.count) %> <%= t(:book_tag, count: @book.tags.count) %>
</h2> </h2>
<div> <div>
<% @book.tags.each do |tag| %> <% @book.tags.each do |tag| %>
<span class="label label-info"><%= tag.name %></span> <span class="label label-info"><%= tag.name %></span>
<% end %> <% end %>
</div> </div>
<h2>Details</h2> <h2><%= t :book_detail %></h2>
<ul> <ul>
<% if @book.pubdate %> <% if @book.pubdate %>
<li><strong>Publishing date</strong> <%= @book.pubdate.to_formatted_s(:date) %></li> <li><strong><%= t :book_pubdate %></strong> <%= @book.pubdate.to_formatted_s(:date) %></li>
<% end %> <% end %>
<% if @book.publisher %> <% if @book.publisher %>
<li><strong>Publisher</strong> <%= @book.publisher.name %></li> <li><strong><%= t :book_publisher %></strong> <%= @book.publisher.name %></li>
<% end %> <% end %>
</ul> </ul>
</div> </div>
<% if @book.has_cover? %> <% if @book.has_cover? %>
<div class="col-xs-12 col-md-6"> <div class="col-xs-12 col-md-6">
<%= image_tag(cover_book_path(@book), alt: "No cover", class: "img-responsive img-rounded") %> <%= image_tag(cover_book_path(@book), alt: t(:no_cover), class: "img-responsive img-rounded") %>
</div> </div>
<% end %> <% end %>
</div> </div>

View File

@ -4,7 +4,7 @@ btn_class = is_single ? "btn btn-success" : nil
%> %>
<%= link_to book_data_path(id: d.book, data_format: d.format), class: btn_class do %> <%= link_to book_data_path(id: d.book, data_format: d.format), class: btn_class do %>
<% if is_single %> <% if is_single %>
<span class="glyphicon glyphicon-download-alt"></span> Download <span class="glyphicon glyphicon-download-alt"></span> <%= t :download %>
<% end %> <% end %>
<%= d.format %> (<%= number_to_human_size(d.uncompressed_size) %>) <%= d.format %> (<%= number_to_human_size(d.uncompressed_size) %>)
<% end %> <% end %>

View File

@ -12,8 +12,8 @@
<%= link_to "Bouquins", '#', id: "logo" %> <%= link_to "Bouquins", '#', id: "logo" %>
<nav> <nav>
<ul class="nav navbar-nav navbar-right"> <ul class="nav navbar-nav navbar-right">
<li><%= link_to "Home", root_path %></li> <li><%= link_to t(:home), root_path %></li>
<li><%= link_to "About", about_path %></li> <li><%= link_to t(:about), about_path %></li>
</ul> </ul>
</nav> </nav>
</div> </div>

View File

@ -1,14 +1,14 @@
en: en:
home: "Home"
library: "Library" library: "Library"
welcome_count: "Browse %{count} books" welcome_count: "Browse %{count} books"
books: "Books" books: "Books"
authors: "Authors" authors: "Author"
series: "Series" series: "Series"
about: "About" about: "About"
about_descr: "Bouquins is a web frontend for calibre e-book manager" about_descr: "Bouquins is a web frontend for calibre e-book manager"
download: "Télécharger" download: "Download"
initial_tooltip: "Initiale" initial_tooltip: "Initial letter"
filter: "Filter"
filter: "Filtre" filter: "Filtre"
search: "Search" search: "Search"
search_ph: "Search for..." search_ph: "Search for..."
@ -18,3 +18,17 @@ en:
col_book_title: "Title" col_book_title: "Title"
col_book_authors: "Authors" col_book_authors: "Authors"
col_book_serie: "Serie" col_book_serie: "Serie"
book_authors:
one: "Author"
other: "Authors"
book_serie: "Serie"
book_lang:
one: "Language"
other: "Languages"
book_tag:
one: "Tag"
other: "Tags"
book_detail: "Details"
book_pubdate: "Publishing date"
book_publisher: "Publisher"
no_cover: "No cover"

View File

@ -1,4 +1,5 @@
fr: fr:
home: "Accueil"
library: "Bibliothèque" library: "Bibliothèque"
welcome_count: "Parcourir les %{count} livres" welcome_count: "Parcourir les %{count} livres"
books: "Livres" books: "Livres"
@ -6,8 +7,8 @@ fr:
series: "Series" series: "Series"
about: "A propos" about: "A propos"
about_descr: "Bouquins est une interface web pour le gestionnaire d'e-books calibre" about_descr: "Bouquins est une interface web pour le gestionnaire d'e-books calibre"
download: "Download" download: "Télécharger"
initial_tooltip: "Initial letter" initial_tooltip: "Initiale"
filter: "Filtre" filter: "Filtre"
search: "Rechercher" search: "Rechercher"
search_ph: "Rechercher..." search_ph: "Rechercher..."
@ -18,3 +19,17 @@ fr:
col_book_title: "Titre" col_book_title: "Titre"
col_book_authors: "Auteurs" col_book_authors: "Auteurs"
col_book_serie: "Serie" col_book_serie: "Serie"
book_authors:
one: "Auteur"
other: "Auteurs"
book_serie: "Serie"
book_lang:
one: "Langue"
other: "Langues"
book_tag:
one: "Tag"
other: "Tags"
book_detail: "Détails"
book_pubdate: "Date de publication"
book_publisher: "Editeur"
no_cover: "Pas de couverture"