diff options
| -rw-r--r-- | app/controllers/nodes_controller.rb | 1 | ||||
| -rw-r--r-- | app/views/nodes/new.html.erb | 2 | ||||
| -rw-r--r-- | config/environment.rb | 2 | ||||
| -rw-r--r-- | config/locales/de.yml | 46 |
4 files changed, 25 insertions, 26 deletions
diff --git a/app/controllers/nodes_controller.rb b/app/controllers/nodes_controller.rb index cfc9e7b..538e2f6 100644 --- a/app/controllers/nodes_controller.rb +++ b/app/controllers/nodes_controller.rb | |||
| @@ -38,7 +38,6 @@ class NodesController < ApplicationController | |||
| 38 | @node.draft.update_attributes(:title => params[:title]) | 38 | @node.draft.update_attributes(:title => params[:title]) |
| 39 | redirect_to(edit_node_path(@node)) | 39 | redirect_to(edit_node_path(@node)) |
| 40 | else | 40 | else |
| 41 | @node.errors.add_to_base("Titel zu kurz") if @node.errors["slug"] | ||
| 42 | render :new | 41 | render :new |
| 43 | end | 42 | end |
| 44 | end | 43 | end |
diff --git a/app/views/nodes/new.html.erb b/app/views/nodes/new.html.erb index e11030e..850207b 100644 --- a/app/views/nodes/new.html.erb +++ b/app/views/nodes/new.html.erb | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | <h1>Create new node</h1> | 1 | <h1>Create new node</h1> |
| 2 | 2 | ||
| 3 | <%= error_messages_for :node %> | 3 | <%= error_messages_for( :node ).gsub("Slug", "Title") %> |
| 4 | 4 | ||
| 5 | 5 | ||
| 6 | <p>What kind of node do you want to create?</p> | 6 | <p>What kind of node do you want to create?</p> |
diff --git a/config/environment.rb b/config/environment.rb index 4f94304..ff2b5ae 100644 --- a/config/environment.rb +++ b/config/environment.rb | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | # Be sure to restart your server when you modify this file | 1 | # Be sure to restart your server when you modify this file |
| 2 | 2 | ||
| 3 | # Specifies gem version of Rails to use when vendor/rails is not present | 3 | # Specifies gem version of Rails to use when vendor/rails is not present |
| 4 | RAILS_GEM_VERSION = '2.3.4' unless defined? RAILS_GEM_VERSION | 4 | RAILS_GEM_VERSION = '2.3.3' unless defined? RAILS_GEM_VERSION |
| 5 | 5 | ||
| 6 | # Bootstrap the Rails environment, frameworks, and default configuration | 6 | # Bootstrap the Rails environment, frameworks, and default configuration |
| 7 | require File.join(File.dirname(__FILE__), 'boot') | 7 | require File.join(File.dirname(__FILE__), 'boot') |
diff --git a/config/locales/de.yml b/config/locales/de.yml index f6bb1b7..ce0b578 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml | |||
| @@ -92,28 +92,28 @@ de: | |||
| 92 | activerecord: | 92 | activerecord: |
| 93 | errors: | 93 | errors: |
| 94 | template: | 94 | template: |
| 95 | header: | 95 | header: |
| 96 | one: "Konnte dieses {{model}} Objekt nicht speichern: 1 Fehler." | 96 | one: 1 error prohibited this {{model}} from being saved |
| 97 | other: "Konnte dieses {{model}} Objekt nicht speichern: {{count}} Fehler." | 97 | other: "{{count}} errors prohibited this {{model}} from being saved" |
| 98 | body: "Bitte überprüfen Sie die folgenden Felder:" | 98 | body: "There were problems with the following fields:" |
| 99 | 99 | ||
| 100 | messages: | 100 | messages: |
| 101 | inclusion: "ist kein gültiger Wert" | 101 | inclusion: "is not included in the list" |
| 102 | exclusion: "ist nicht verfügbar" | 102 | exclusion: "is reserved" |
| 103 | invalid: "ist nicht gültig" | 103 | invalid: "is invalid" |
| 104 | confirmation: "stimmt nicht mit der Bestätigung überein" | 104 | confirmation: "doesn't match confirmation" |
| 105 | accepted: "muss akzeptiert werden" | 105 | accepted: "must be accepted" |
| 106 | empty: "muss ausgefüllt werden" | 106 | empty: "can't be empty" |
| 107 | blank: "muss ausgefüllt werden" | 107 | blank: "can't be blank" |
| 108 | too_long: "ist zu lang (nicht mehr als {{count}} Zeichen)" | 108 | too_long: "is too long (maximum is {{count}} characters)" |
| 109 | too_short: "ist zu kurz (nicht weniger als {{count}} Zeichen)" | 109 | too_short: "is too short (minimum is {{count}} characters)" |
| 110 | wrong_length: "hat die falsche Länge (muss genau {{count}} Zeichen haben)" | 110 | wrong_length: "is the wrong length (should be {{count}} characters)" |
| 111 | taken: "ist bereits vergeben" | 111 | taken: "has already been taken" |
| 112 | not_a_number: "ist keine Zahl" | 112 | not_a_number: "is not a number" |
| 113 | greater_than: "muss größer als {{count}} sein" | 113 | greater_than: "must be greater than {{count}}" |
| 114 | greater_than_or_equal_to: "muss größer oder gleich {{count}} sein" | 114 | greater_than_or_equal_to: "must be greater than or equal to {{count}}" |
| 115 | equal_to: "muss genau {{count}} sein" | 115 | equal_to: "must be equal to {{count}}" |
| 116 | less_than: "muss kleiner als {{count}} sein" | 116 | less_than: "must be less than {{count}}" |
| 117 | less_than_or_equal_to: "muss kleiner oder gleich {{count}} sein" | 117 | less_than_or_equal_to: "must be less than or equal to {{count}}" |
| 118 | odd: "muss ungerade sein" | 118 | odd: "must be odd" |
| 119 | even: "muss gerade sein" \ No newline at end of file | 119 | even: "must be even" \ No newline at end of file |
