finish layouts i18n, use help url from config, use html language from locale

This commit is contained in:
wvengen 2013-02-05 12:11:29 +01:00
parent 5b53749fe6
commit 39812bef99
7 changed files with 38 additions and 21 deletions

View file

@ -1,10 +1,10 @@
!!! 5
%html(lang="en")
%html(lang='#{I18n.locale}')
%head
%meta(charset="utf-8")
%meta(http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1")
%meta(name="viewport" content="width=device-width, initial-scale=1.0")
%title= ["Foodsoft", yield(:title)].join(" - ")
%title= [t('layouts.foodsoft'), yield(:title)].join(" - ")
= csrf_meta_tags
= stylesheet_link_tag "application", :media => "all"
%link(href="images/apple-touch-icon-144x144.png" rel="apple-touch-icon-precomposed" sizes="144x144")
@ -23,4 +23,4 @@
\==================================================
/ Placed at the end of the document so the pages load faster
= javascript_include_tag "application"
= yield(:javascript)
= yield(:javascript)

View file

@ -1,19 +1,19 @@
= render layout: 'layouts/header' do
.logo
<span>food</span>soft
= t('layouts.logo').html_safe
%ul.nav.nav-pills.pull-right
%li.dropdown
%a.dropdown-toggle(data-toggle="dropdown" href="#")
= current_user.nick
%b.caret
%ul.dropdown-menu
%li= link_to "Profil bearbeiten", my_profile_path
%li= link_to "Meine Bestellgruppe", my_ordergroup_path
%li= link_to "Abmelden", logout_path
%li= link_to t('.profile'), my_profile_path
%li= link_to t('.ordergroup'), my_ordergroup_path
%li= link_to t('.logout'), logout_path
%li{class: ('disabled' if FoodsoftConfig.config[:homepage].blank?)}
= link_to FoodsoftConfig.config[:name], FoodsoftConfig.config[:homepage]
%li= link_to "Hilfe", 'https://github.com/bennibu/foodsoft/wiki/Doku'
%li= link_to "Feedback", new_feedback_path, title: "Fehler gefunden? Vorschlag? Idee? Kritik?"
%li= link_to t('.help'), FoodsoftConfig.config[:help_url]
%li= link_to t('.feedback.title'), new_feedback_path, title: t('.feedback.desc')
.clearfix
.navbar
@ -49,6 +49,5 @@
= yield
%footer
%p
Foodsoft, open source software to manage a non-profit food coop.
%p= t '.footer'
#modalContainer.modal.hide.fade(tabindex="-1" role="dialog")

View file

@ -2,7 +2,7 @@
%html
%head
%meta{"http-equiv" => "content-type", :content => "text/html;charset=UTF-8"}
%title= "FoodSoft - " + (yield(:title) or controller.controller_name)
%title= t '.title', title: (yield(:title) or controller.controller_name)
= stylesheet_link_tag 'application'
= stylesheet_link_tag "print", :media => "print"
<!--[if lte IE 7]>
@ -17,7 +17,7 @@
#header
#logo
= link_to root_path do
<span>food</span>soft
= t('layouts.logo').html_safe
%span{:style => "color:white; font-size:45%; letter-spacing: -1px;"}= FoodsoftConfig[:name]
#nav= render :partial => 'layouts/main_tabnav'

View file

@ -1,6 +1,3 @@
= yield
\
\--
FoodSoft: #{root_url}
Foodcoop-Homepage: #{FoodsoftConfig[:homepage]}
Hilfe/Help: #{FoodsoftConfig[:help_url]}
= t '.footer', foodsoft: root_url, foodcoop: FoodsoftConfig[:homepage], help: FoodsoftConfig[:help_url]

View file

@ -9,5 +9,4 @@
= yield
%footer
%p
Foodsoft, open source software to manage a non-profit food coop.
%p= t '.footer'

View file

@ -29,7 +29,7 @@ default: &defaults
homepage: http://www.fctest.de
# foodsoft documentation URL
help_url: http://foodsoft.fcschinke09.de/trac/wiki/FoodsoftDoku
help_url: https://github.com/bennibu/foodsoft/wiki/Doku
# price markup in percent
price_markup: 2.0
@ -89,4 +89,4 @@ test:
<<: *defaults
production:
<<: *defaults
<<: *defaults

View file

@ -0,0 +1,22 @@
de:
layouts:
foodsoft: 'Foodsoft'
logo: '<span>food</span>soft'
header:
profile: 'Profil bearbeiten'
ordergroup: 'Meine Bestellgruppe'
logout: 'Abmelden'
help: 'Hilfe'
feedback:
title: 'Feedback'
desc: 'Fehler gefunden? Vorschlag? Idee? Kritik?'
footer: 'Foodsoft, open source software to manage a non-profit food coop.'
email:
footer: '
--
Foodsoft: %{foodsoft}
Foodcoop-Homepage: %{foodcoop}
Hilfe/Help: %{help}
'
application1:
title: 'Foodsoft - %{title}'