translations
This commit is contained in:
parent
028887f1a2
commit
58a556378f
@ -1,14 +1,14 @@
|
||||
<% opts = { data: { url: url_for, remote: true, method: :get } }
|
||||
content_for :latest_filter do %>
|
||||
<div class="form-group">
|
||||
<%= label_tag "sort", "Sort by" %>
|
||||
<%= label_tag "sort", t(:sort_by) %>
|
||||
<label class="radio-inline">
|
||||
<%= radio_button_tag "sort", "latest", @preference.sort == "latest",opts %>
|
||||
Date
|
||||
<%= t :sort_by_date %>
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<%= radio_button_tag "sort", "alpha", @preference.sort == "alpha", opts %>
|
||||
Name
|
||||
<%= t :sort_by_name %>
|
||||
</label>
|
||||
</div>
|
||||
<% end %>
|
||||
@ -17,9 +17,9 @@ content_for :latest_filter do %>
|
||||
<%= will_paginate class: "center" %>
|
||||
<table class="table table-striped authors">
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Authors</th>
|
||||
<th>Serie</th>
|
||||
<th><%= t :col_book_title %></th>
|
||||
<th><%= t :col_book_authors %></th>
|
||||
<th><%= t :col_book_serie %></th>
|
||||
</tr>
|
||||
<% @books.each do |book| %>
|
||||
<tr>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-success dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<span class="glyphicon glyphicon-download-alt"></span>
|
||||
Download <span class="caret"></span>
|
||||
<%= t :download %> <span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<% @book.data.each do |d| %>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<%= link_to "#filterContent", { class: "collapsed", data: { toggle: "collapse" } } do %>
|
||||
<h3 class="panel-title">
|
||||
<span class="glyphicon filterToggle" aria-hidden="true"/>
|
||||
Filter
|
||||
<%= t :filter %>
|
||||
</h3>
|
||||
<% end %>
|
||||
</div>
|
||||
@ -13,9 +13,9 @@
|
||||
<%= form_tag({}, {method: :get, remote: true}) do %>
|
||||
<div class="input-group">
|
||||
<span class="input-group-btn">
|
||||
<%= button_tag "Search", class: "btn btn-default" %>
|
||||
<%= button_tag t(:search), class: "btn btn-default" %>
|
||||
</span>
|
||||
<%= search_field_tag(:term, @preference.term, placeholder: "Search for...", class: "form-control") %>
|
||||
<%= search_field_tag(:term, @preference.term, placeholder: t(:search_ph), class: "form-control") %>
|
||||
</div>
|
||||
<% end %>
|
||||
<%= render'layouts/perpage' %>
|
||||
|
@ -1,9 +1,8 @@
|
||||
<% initials = ['0'] + ('A'..'Z').to_a %>
|
||||
<div class="center">
|
||||
<ul class="pagination pagination-sm" title="Initial letter">
|
||||
<ul class="pagination pagination-sm" title="<%= t :initial_tooltip %>">
|
||||
<% initials.each do |i|
|
||||
is_cur = (i == @preference.initial)
|
||||
%>
|
||||
is_cur = (i == @preference.initial) %>
|
||||
<%= content_tag :li, class: (is_cur ? "active": nil) do %>
|
||||
<%= link_to i, url_for(initial: ( is_cur ? "reset" : i)), remote: true %>
|
||||
<% end %>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<div class="center">
|
||||
<ul class="pagination pagination-sm" title="Items per page">
|
||||
<ul class="pagination pagination-sm" title="<%= t :per_page %>">
|
||||
<% [10,20,50,100].each do |p| %>
|
||||
<%= content_tag :li, class: (p == @preference.per_page ? "active": nil) do %>
|
||||
<%= link_to p, url_for(per_page: p), remote: true %>
|
||||
|
@ -1,2 +1,2 @@
|
||||
<h1>About</h1>
|
||||
<p>Bouquins is a web frontend for calibre e-book manager</p>
|
||||
<h1><%= t :about %></h1>
|
||||
<p><%= t :about_descr %></p>
|
||||
|
@ -3,9 +3,9 @@
|
||||
<h2><%= t :welcome_count, count: @books_count %></h2>
|
||||
|
||||
<p>
|
||||
<%= link_to "Books", books_path, class: "btn btn-lg btn-primary", remote: true %>
|
||||
<%= link_to "Authors", authors_path, class: "btn btn-lg btn-primary", remote: true %>
|
||||
<%= link_to "Series", series_path, class: "btn btn-lg btn-primary", remote: true %>
|
||||
<%= link_to t(:books), books_path, class: "btn btn-lg btn-primary", remote: true %>
|
||||
<%= link_to t(:authors), authors_path, class: "btn btn-lg btn-primary", remote: true %>
|
||||
<%= link_to t(:series), series_path, class: "btn btn-lg btn-primary", remote: true %>
|
||||
</p>
|
||||
</div>
|
||||
<div class="container-fluid" id="items">
|
||||
|
@ -18,7 +18,7 @@ module BouquinsRor
|
||||
|
||||
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
||||
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
||||
# config.i18n.default_locale = :de
|
||||
config.i18n.default_locale = :fr
|
||||
|
||||
# Do not swallow errors in after_commit/after_rollback callbacks.
|
||||
config.active_record.raise_in_transactional_callbacks = true
|
||||
|
@ -1,25 +1,20 @@
|
||||
# Files in the config/locales directory are used for internationalization
|
||||
# and are automatically loaded by Rails. If you want to use locales other
|
||||
# than English, add the necessary files in this directory.
|
||||
#
|
||||
# To use the locales, use `I18n.t`:
|
||||
#
|
||||
# I18n.t 'hello'
|
||||
#
|
||||
# In views, this is aliased to just `t`:
|
||||
#
|
||||
# <%= t('hello') %>
|
||||
#
|
||||
# To use a different locale, set it with `I18n.locale`:
|
||||
#
|
||||
# I18n.locale = :es
|
||||
#
|
||||
# This would use the information in config/locales/es.yml.
|
||||
#
|
||||
# To learn more, please read the Rails Internationalization guide
|
||||
# available at http://guides.rubyonrails.org/i18n.html.
|
||||
|
||||
en:
|
||||
hello: "Hello world"
|
||||
library: "Library"
|
||||
welcome_count: "Browse %{count} books"
|
||||
books: "Books"
|
||||
authors: "Authors"
|
||||
series: "Series"
|
||||
about: "About"
|
||||
about_descr: "Bouquins is a web frontend for calibre e-book manager"
|
||||
download: "Télécharger"
|
||||
initial_tooltip: "Initiale"
|
||||
filter: "Filter"
|
||||
filter: "Filtre"
|
||||
search: "Search"
|
||||
search_ph: "Search for..."
|
||||
per_page: "Items per page"
|
||||
sort_by_date: "Date"
|
||||
sort_by_name: "Name"
|
||||
col_book_title: "Title"
|
||||
col_book_authors: "Authors"
|
||||
col_book_serie: "Serie"
|
||||
|
@ -1,4 +1,20 @@
|
||||
fr:
|
||||
hello: "Bonjour"
|
||||
library: "Bibliothèque"
|
||||
welcome_count: "Parcourir les %{count} livres"
|
||||
library: "Bibliothèque"
|
||||
welcome_count: "Parcourir les %{count} livres"
|
||||
books: "Livres"
|
||||
authors: "Auteurs"
|
||||
series: "Series"
|
||||
about: "A propos"
|
||||
about_descr: "Bouquins est une interface web pour le gestionnaire d'e-books calibre"
|
||||
download: "Download"
|
||||
initial_tooltip: "Initial letter"
|
||||
filter: "Filtre"
|
||||
search: "Rechercher"
|
||||
search_ph: "Rechercher..."
|
||||
per_page: "Eléments par page"
|
||||
sort_by: "Trier par"
|
||||
sort_by_date: "Date"
|
||||
sort_by_name: "Nom"
|
||||
col_book_title: "Titre"
|
||||
col_book_authors: "Auteurs"
|
||||
col_book_serie: "Serie"
|
||||
|
Loading…
Reference in New Issue
Block a user