diff --git a/Gemfile b/Gemfile index e6db28d8..345b730a 100644 --- a/Gemfile +++ b/Gemfile @@ -1,7 +1,7 @@ # A sample Gemfile source "http://rubygems.org" -gem "rails", '3.0.7' +gem "rails", '3.0.12' gem 'mysql' gem "fastercsv" diff --git a/Gemfile.lock b/Gemfile.lock index 478af5ae..4f0f2bcb 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -8,35 +8,35 @@ GEM remote: http://rubygems.org/ specs: abstract (1.0.0) - actionmailer (3.0.7) - actionpack (= 3.0.7) - mail (~> 2.2.15) - actionpack (3.0.7) - activemodel (= 3.0.7) - activesupport (= 3.0.7) + actionmailer (3.0.12) + actionpack (= 3.0.12) + mail (~> 2.2.19) + actionpack (3.0.12) + activemodel (= 3.0.12) + activesupport (= 3.0.12) builder (~> 2.1.2) erubis (~> 2.6.6) i18n (~> 0.5.0) - rack (~> 1.2.1) + rack (~> 1.2.5) rack-mount (~> 0.6.14) rack-test (~> 0.5.7) tzinfo (~> 0.3.23) - activemodel (3.0.7) - activesupport (= 3.0.7) + activemodel (3.0.12) + activesupport (= 3.0.12) builder (~> 2.1.2) i18n (~> 0.5.0) - activerecord (3.0.7) - activemodel (= 3.0.7) - activesupport (= 3.0.7) - arel (~> 2.0.2) + activerecord (3.0.12) + activemodel (= 3.0.12) + activesupport (= 3.0.12) + arel (~> 2.0.10) tzinfo (~> 0.3.23) - activeresource (3.0.7) - activemodel (= 3.0.7) - activesupport (= 3.0.7) - activesupport (3.0.7) + activeresource (3.0.12) + activemodel (= 3.0.12) + activesupport (= 3.0.12) + activesupport (3.0.12) acts_as_configurable (0.0.8) annotate (2.4.0) - arel (2.0.9) + arel (2.0.10) builder (2.1.2) client_side_validations (3.0.4) activesupport (~> 3.0.0) @@ -55,6 +55,7 @@ GEM jquery-rails (1.0.1) railties (~> 3.0) thor (~> 0.14) + json (1.6.6) mail (2.2.19) activesupport (>= 2.3.6) i18n (>= 0.4.0) @@ -69,9 +70,9 @@ GEM activerecord (~> 3.0.0) activesupport (~> 3.0.0) arel (~> 2.0.7) - mime-types (1.16) + mime-types (1.18) mysql (2.8.1) - polyglot (0.3.1) + polyglot (0.3.3) prawn (0.6.3) prawn-core (>= 0.6.3, < 0.7) prawn-format (>= 0.2.3, < 0.3) @@ -82,34 +83,38 @@ GEM prawn-core prawn-layout (0.3.2) prawn-security (0.1.1) - rack (1.2.2) + rack (1.2.5) rack-mount (0.6.14) rack (>= 1.0.0) rack-test (0.5.7) rack (>= 1.0) - rails (3.0.7) - actionmailer (= 3.0.7) - actionpack (= 3.0.7) - activerecord (= 3.0.7) - activeresource (= 3.0.7) - activesupport (= 3.0.7) + rails (3.0.12) + actionmailer (= 3.0.12) + actionpack (= 3.0.12) + activerecord (= 3.0.12) + activeresource (= 3.0.12) + activesupport (= 3.0.12) bundler (~> 1.0) - railties (= 3.0.7) + railties (= 3.0.12) rails3_acts_as_paranoid (0.0.9) activerecord (~> 3.0) - railties (3.0.7) - actionpack (= 3.0.7) - activesupport (= 3.0.7) + railties (3.0.12) + actionpack (= 3.0.12) + activesupport (= 3.0.12) rake (>= 0.8.7) + rdoc (~> 3.4) thor (~> 0.14.4) - rake (0.8.7) + rake (0.9.2.2) + rdoc (3.12) + json (~> 1.4) responders (0.6.4) sass (3.1.1) simple_form (1.3.1) thor (0.14.6) - treetop (1.4.9) + treetop (1.4.10) + polyglot polyglot (>= 0.3.1) - tzinfo (0.3.27) + tzinfo (0.3.33) wikicloth (0.8.0) builder expression_parser @@ -133,7 +138,7 @@ DEPENDENCIES meta_where mysql prawn (<= 0.6.3) - rails (= 3.0.7) + rails (= 3.0.12) rails3_acts_as_paranoid (= 0.0.9) sass simple_form diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index e1169707..1e12fed1 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -1,3 +1,4 @@ +# encoding: utf-8 class ApplicationController < ActionController::Base protect_from_forgery diff --git a/app/controllers/home_controller.rb b/app/controllers/home_controller.rb index f857992b..16b2dcac 100644 --- a/app/controllers/home_controller.rb +++ b/app/controllers/home_controller.rb @@ -1,3 +1,4 @@ +# encoding: utf-8 class HomeController < ApplicationController def index diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 802ef060..f7e96760 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1,3 +1,5 @@ +# encoding: utf-8 +# # Methods added to this helper will be available to all templates in the application. module ApplicationHelper diff --git a/app/helpers/orders_helper.rb b/app/helpers/orders_helper.rb index 5f9deb04..91f48969 100644 --- a/app/helpers/orders_helper.rb +++ b/app/helpers/orders_helper.rb @@ -1,3 +1,4 @@ +# encoding: utf-8 module OrdersHelper def update_articles_link(order, text, view) diff --git a/app/models/user.rb b/app/models/user.rb index 667fd9e9..f8bef9e2 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -1,3 +1,5 @@ +# encoding: utf-8 + require 'digest/sha1' # specific user rights through memberships (see Group) class User < ActiveRecord::Base diff --git a/app/models/workgroup.rb b/app/models/workgroup.rb index 035b8b54..db914c70 100644 --- a/app/models/workgroup.rb +++ b/app/models/workgroup.rb @@ -1,3 +1,4 @@ +# encoding: utf-8 class Workgroup < Group has_many :tasks diff --git a/app/views/foodcoop/users/_users.html.haml b/app/views/foodcoop/users/_users.html.haml index c814a7c0..8fb1a8e2 100644 --- a/app/views/foodcoop/users/_users.html.haml +++ b/app/views/foodcoop/users/_users.html.haml @@ -20,7 +20,7 @@ - users = params[:sort_by_ordergroups] ? @users.sort { |a,b| a.ordergroup.name <=> b.ordergroup.name } : @users - for user in users %tr{:class => cycle('even','odd', :name => 'users')} - %td= link_to user.nick, new_message_path(:message => {:mail_to => user.id}), :title => _('Send user an email') + %td= link_to user.nick, new_message_path(:message => {:mail_to => user.id}), :title => 'Send user an email' %td=h user.name if @current_user.role_admin? || user.settings["profile.nameIsPublic"] == '1' %td=h user.email if @current_user.role_admin? || user.settings["profile.emailIsPublic"] == '1' %td=h user.phone if @current_user.role_admin? || user.settings["profile.phoneIsPublic"] == '1' diff --git a/app/views/home/index.html.haml b/app/views/home/index.html.haml index fa143804..58fce56c 100644 --- a/app/views/home/index.html.haml +++ b/app/views/home/index.html.haml @@ -17,7 +17,7 @@ %td= format_date task.due_date %td %b= task.name - + - unless @unaccepted_tasks.empty? %h3 Aufgaben übernehmen Du bis für Aufgaben verantwortlich. @@ -74,4 +74,4 @@ - color = ft.amount < 0 ? 'red' : 'black' %td{:style => "color:#{color}; width:5em", :class => "currency"}= number_to_currency(ft.amount) %br/ - = link_to _("mehr ..."), my_ordergroup_path \ No newline at end of file + = link_to "mehr ...", my_ordergroup_path \ No newline at end of file diff --git a/app/views/home/profile.html.haml b/app/views/home/profile.html.haml index 8d50f83a..a41b1fd7 100644 --- a/app/views/home/profile.html.haml +++ b/app/views/home/profile.html.haml @@ -19,4 +19,5 @@ %p = membership.group.name - if membership.group.type != 'Ordergroup' - (#{link_to _("Mitgliedschaft beenden"), { :action => 'cancel_membership', :membership_id => membership }, :confirm => _("Bist Du sicher, dass Du Deine Mitgliedschaft beenden willst?"), :method => :post}) + (#{link_to "Mitgliedschaft beenden", { :action => 'cancel_membership', :membership_id => membership }, + :confirm => "Bist Du sicher, dass Du Deine Mitgliedschaft beenden willst?", :method => :post}) diff --git a/app/views/orders/show.html.haml b/app/views/orders/show.html.haml index 84807aa8..4f1e8ddb 100644 --- a/app/views/orders/show.html.haml +++ b/app/views/orders/show.html.haml @@ -66,7 +66,7 @@ | Faxvorlage: = link_to_pdf(@order, 'faxPdf') - = link_to image_tag("text_file.png", :size => "16x16", :border => "0", :alt => "Textdatei erstellen"), { :action => 'text_fax_template', :id => @order }, { :title => _("Download file") } + = link_to image_tag("text_file.png", :size => "16x16", :border => "0", :alt => "Textdatei erstellen"), { :action => 'text_fax_template', :id => @order }, { :title => "Download file" } | = link_to 'Kommentare', '#comments' diff --git a/app/views/shared/_loginInfo.haml b/app/views/shared/_loginInfo.haml index 692b2398..fa2e60cb 100644 --- a/app/views/shared/_loginInfo.haml +++ b/app/views/shared/_loginInfo.haml @@ -3,7 +3,7 @@ = image_tag 'b_user.png' , :size => '7x10', :border => 0, :alt => "Profil" = link_to h(@current_user.nick), my_profile_path, { :title => "Profil bearbeiten" } - if Foodsoft.config[:homepage] - %li= link_to Foodsoft.config[:name], Foodsoft.config[:homepage], { :title => _("Go to your FoodCoop-Hompage") } + %li= link_to Foodsoft.config[:name], Foodsoft.config[:homepage], { :title => "Go to your FoodCoop-Hompage" } %li= link_to "Hilfe", 'http://dev.foodcoops.net/wiki/FoodsoftDoku' %li= link_to "Feedback", new_feedback_path, :title => "Fehler gefunden? Vorschlag? Idee? Kritik?" %li= link_to "Abmelden", logout_path \ No newline at end of file diff --git a/config/initializers/gettext_helper.rb b/config/initializers/gettext_helper.rb deleted file mode 100644 index 50aabe6a..00000000 --- a/config/initializers/gettext_helper.rb +++ /dev/null @@ -1,26 +0,0 @@ -# Remove this file, when every gettext-method <_("text to translate..")> -# is replaced by rails L18n method: L18n.name.name... - -module ActionView - class Base - def _(text) - text - end - end -end - -module ActiveRecord - class Base - def _(text) - text - end - end -end - -module ActionController - class Base - def _(text) - text - end - end -end diff --git a/config/initializers/session_store.rb b/config/initializers/session_store.rb index a5ca68a1..87c45d71 100644 --- a/config/initializers/session_store.rb +++ b/config/initializers/session_store.rb @@ -4,5 +4,5 @@ Foodsoft::Application.config.session_store :cookie_store, :key => '_foodsoft_ses # Use the database for sessions instead of the cookie-based default, # which shouldn't be used to store highly confidential information -# (create the session table with "rake db:sessions:create") -# FianGroups::Application.config.session_store :active_record_store +# (create the session table with "rails generate session_migration") +# Foodsoft::Application.config.session_store :active_record_store diff --git a/config/locales/de.yml b/config/locales/de.yml index bc0bbd5f..6c567b39 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -5,152 +5,207 @@ de: index: title: Startseite date: + abbr_day_names: + - So + - Mo + - Di + - Mi + - Do + - Fr + - Sa + abbr_month_names: + - + - Jan + - Feb + - Mär + - Apr + - Mai + - Jun + - Jul + - Aug + - Sep + - Okt + - Nov + - Dez + day_names: + - Sonntag + - Montag + - Dienstag + - Mittwoch + - Donnerstag + - Freitag + - Samstag formats: - default: "%d.%m.%Y" - short: "%e. %b" - long: "%e. %B %Y" - only_day: "%e" - - day_names: [Sonntag, Montag, Dienstag, Mittwoch, Donnerstag, Freitag, Samstag] - abbr_day_names: [So, Mo, Di, Mi, Do, Fr, Sa] - month_names: [~, Januar, Februar, März, April, Mai, Juni, Juli, August, September, Oktober, November, Dezember] - abbr_month_names: [~, Jan, Feb, Mär, Apr, Mai, Jun, Jul, Aug, Sep, Okt, Nov, Dez] - order: [ :day, :month, :year ] - - time: - formats: - default: "%A, %d. %B %Y, %H:%M Uhr" - short: "%d. %B, %H:%M Uhr" - long: "%A, %d. %B %Y, %H:%M Uhr" - time: "%H:%M" - - am: "vormittags" - pm: "nachmittags" - + default: ! '%d.%m.%Y' + long: ! '%e. %B %Y' + short: ! '%e. %b' + month_names: + - + - Januar + - Februar + - März + - April + - Mai + - Juni + - Juli + - August + - September + - Oktober + - November + - Dezember + order: + - :day + - :month + - :year datetime: distance_in_words: - half_a_minute: 'eine halbe Minute' - less_than_x_seconds: - one: 'weniger als eine Sekunde' - other: 'weniger als %{count} Sekunden' - x_seconds: - one: 'eine Sekunde' - other: '%{count} Sekunden' - less_than_x_minutes: - one: 'weniger als eine Minute' - other: 'weniger als %{count} Minuten' - x_minutes: - one: 'eine Minute' - other: '%{count} Minuten' about_x_hours: - one: 'etwa eine Stunde' - other: 'etwa %{count} Stunden' - x_days: - one: 'ein Tag' - other: '%{count} Tagen' + one: etwa eine Stunde + other: etwa %{count} Stunden about_x_months: - one: 'etwa ein Monat' - other: 'etwa %{count} Monaten' - x_months: - one: 'ein Monat' - other: '%{count} Monaten' - almost_x_years: - one: 'fast ein Jahr' - other: 'fast %{count} Jahre' + one: etwa ein Monat + other: etwa %{count} Monate about_x_years: - one: 'etwa ein Jahr' - other: 'etwa %{count} Jahren' + one: etwa ein Jahr + other: etwa %{count} Jahre + almost_x_years: + one: fast ein Jahr + other: fast %{count} Jahre + half_a_minute: eine halbe Minute + less_than_x_minutes: + one: weniger als eine Minute + other: weniger als %{count} Minuten + less_than_x_seconds: + one: weniger als eine Sekunde + other: weniger als %{count} Sekunden over_x_years: - one: 'mehr als ein Jahr' - other: 'mehr als %{count} Jahren' + one: mehr als ein Jahr + other: mehr als %{count} Jahre + x_days: + one: ein Tag + other: ! '%{count} Tage' + x_minutes: + one: eine Minute + other: ! '%{count} Minuten' + x_months: + one: ein Monat + other: ! '%{count} Monate' + x_seconds: + one: eine Sekunde + other: ! '%{count} Sekunden' prompts: - second: "Sekunden" - minute: "Minuten" - hour: "Stunden" - day: "Tag" - month: "Monat" - year: "Jahr" - + day: Tag + hour: Stunden + minute: Minuten + month: Monat + second: Sekunden + year: Jahr + errors: &errors + format: ! '%{attribute} %{message}' + messages: + accepted: muss akzeptiert werden + blank: muss ausgefüllt werden + confirmation: stimmt nicht mit der Bestätigung überein + empty: muss ausgefüllt werden + equal_to: muss genau %{count} sein + even: muss gerade sein + exclusion: ist nicht verfügbar + greater_than: muss größer als %{count} sein + greater_than_or_equal_to: muss größer oder gleich %{count} sein + inclusion: ist kein gültiger Wert + invalid: ist nicht gültig + less_than: muss kleiner als %{count} sein + less_than_or_equal_to: muss kleiner oder gleich %{count} sein + not_a_number: ist keine Zahl + not_an_integer: muss ganzzahlig sein + odd: muss ungerade sein + record_invalid: ! 'Gültigkeitsprüfung ist fehlgeschlagen: %{errors}' + taken: ist bereits vergeben + too_long: ist zu lang (nicht mehr als %{count} Zeichen) + too_short: ist zu kurz (nicht weniger als %{count} Zeichen) + wrong_length: hat die falsche Länge (muss genau %{count} Zeichen haben) + template: + body: ! 'Bitte überprüfen Sie die folgenden Felder:' + header: + one: ! 'Konnte %{model} nicht speichern: ein Fehler.' + other: ! 'Konnte %{model} nicht speichern: %{count} Fehler.' + helpers: + select: + prompt: Bitte wählen + submit: + create: ! '%{model} erstellen' + submit: ! '%{model} speichern' + update: ! '%{model} aktualisieren' number: - format: - precision: 2 - separator: ',' - delimiter: '.' currency: format: - unit: '€' - format: '%n %u' - separator: ',' - delimiter: '.' + delimiter: . + format: ! '%n %u' precision: 2 - percentage: - format: - delimiter: "" - precision: - format: - delimiter: "" + separator: ! ',' + significant: false + strip_insignificant_zeros: false + unit: € + format: + delimiter: . + precision: 2 + separator: ! ',' + significant: false + strip_insignificant_zeros: false human: + decimal_units: + format: ! '%n %u' + units: + billion: + one: Milliarde + other: Milliarden + million: Millionen + quadrillion: + one: Billiarde + other: Billiarden + thousand: Tausend + trillion: Billionen + unit: '' format: - delimiter: "" + delimiter: '' precision: 1 + significant: true + strip_insignificant_zeros: true storage_units: - # Storage units output formatting. - # %u is the storage unit, %n is the number (default: 2 MB) - format: "%n %u" + format: ! '%n %u' units: byte: - one: "Byte" - other: "Bytes" - kb: "KB" - mb: "MB" - gb: "GB" - tb: "TB" - + one: Byte + other: Bytes + gb: GB + kb: KB + mb: MB + tb: TB + percentage: + format: + delimiter: '' + precision: + format: + delimiter: '' support: array: - words_connector: ", " - two_words_connector: " und " - last_word_connector: " und " - select: - prompt: "Bitte wählen:" - + last_word_connector: ! ' und ' + two_words_connector: ! ' und ' + words_connector: ! ', ' + time: + am: vormittags + formats: + default: ! '%A, %d. %B %Y, %H:%M Uhr' + long: ! '%A, %d. %B %Y, %H:%M Uhr' + short: ! '%d. %B, %H:%M Uhr' + pm: nachmittags + # remove these aliases after 'activemodel' and 'activerecord' namespaces are removed from Rails repository activemodel: errors: - template: - header: - one: "Konnte %{model} nicht speichern: ein Fehler." - other: "Konnte %{model} nicht speichern: %{count} Fehler." - body: "Bitte überprüfen Sie die folgenden Felder:" - + <<: *errors activerecord: errors: - template: - header: - one: "Konnte %{model} nicht speichern: ein Fehler." - other: "Konnte %{model} nicht speichern: %{count} Fehler." - body: "Bitte überprüfen Sie die folgenden Felder:" - - messages: - inclusion: "ist kein gültiger Wert" - exclusion: "ist nicht verfügbar" - invalid: "ist nicht gültig" - confirmation: "stimmt nicht mit der Bestätigung überein" - accepted: "muss akzeptiert werden" - empty: "muss ausgefüllt werden" - blank: "muss ausgefüllt werden" - too_long: "ist zu lang (nicht mehr als %{count} Zeichen)" - too_short: "ist zu kurz (nicht weniger als %{count} Zeichen)" - wrong_length: "hat die falsche Länge (muss genau %{count} Zeichen haben)" - taken: "ist bereits vergeben" - not_a_number: "ist keine Zahl" - greater_than: "muss größer als %{count} sein" - greater_than_or_equal_to: "muss größer oder gleich %{count} sein" - equal_to: "muss genau %{count} sein" - less_than: "muss kleiner als %{count} sein" - less_than_or_equal_to: "muss kleiner oder gleich %{count} sein" - odd: "muss ungerade sein" - even: "muss gerade sein" - record_invalid: "Gültigkeitsprüfung ist fehlgeschlagen: %{errors}" + <<: *errors models: article: Artikel supplier: Lieferant