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 !!! 5
%html(lang="en") %html(lang='#{I18n.locale}')
%head %head
%meta(charset="utf-8") %meta(charset="utf-8")
%meta(http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1") %meta(http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1")
%meta(name="viewport" content="width=device-width, initial-scale=1.0") %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 = csrf_meta_tags
= stylesheet_link_tag "application", :media => "all" = stylesheet_link_tag "application", :media => "all"
%link(href="images/apple-touch-icon-144x144.png" rel="apple-touch-icon-precomposed" sizes="144x144") %link(href="images/apple-touch-icon-144x144.png" rel="apple-touch-icon-precomposed" sizes="144x144")

View file

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

View file

@ -2,7 +2,7 @@
%html %html
%head %head
%meta{"http-equiv" => "content-type", :content => "text/html;charset=UTF-8"} %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 'application'
= stylesheet_link_tag "print", :media => "print" = stylesheet_link_tag "print", :media => "print"
<!--[if lte IE 7]> <!--[if lte IE 7]>
@ -17,7 +17,7 @@
#header #header
#logo #logo
= link_to root_path do = 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] %span{:style => "color:white; font-size:45%; letter-spacing: -1px;"}= FoodsoftConfig[:name]
#nav= render :partial => 'layouts/main_tabnav' #nav= render :partial => 'layouts/main_tabnav'

View file

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

View file

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

View file

@ -29,7 +29,7 @@ default: &defaults
homepage: http://www.fctest.de homepage: http://www.fctest.de
# foodsoft documentation URL # 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 in percent
price_markup: 2.0 price_markup: 2.0

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}'