From cc401c9bf20995bc4e02ba835847a7578e727d0c Mon Sep 17 00:00:00 2001 From: hukl Date: Thu, 10 Sep 2009 12:50:41 +0200 Subject: going back to raisl 2.3.3 as 2.3.4 has weird issues when translationg active record validation errors also changing the german error messages to english as the interface is english only so far --- app/controllers/nodes_controller.rb | 1 - app/views/nodes/new.html.erb | 2 +- config/environment.rb | 2 +- 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 @node.draft.update_attributes(:title => params[:title]) redirect_to(edit_node_path(@node)) else - @node.errors.add_to_base("Titel zu kurz") if @node.errors["slug"] render :new end 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 @@

Create new node

-<%= error_messages_for :node %> +<%= error_messages_for( :node ).gsub("Slug", "Title") %>

What kind of node do you want to create?

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 @@ # Be sure to restart your server when you modify this file # Specifies gem version of Rails to use when vendor/rails is not present -RAILS_GEM_VERSION = '2.3.4' unless defined? RAILS_GEM_VERSION +RAILS_GEM_VERSION = '2.3.3' unless defined? RAILS_GEM_VERSION # Bootstrap the Rails environment, frameworks, and default configuration 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: activerecord: errors: template: - header: - one: "Konnte dieses {{model}} Objekt nicht speichern: 1 Fehler." - other: "Konnte dieses {{model}} Objekt nicht speichern: {{count}} Fehler." - body: "Bitte überprüfen Sie die folgenden Felder:" + header: + one: 1 error prohibited this {{model}} from being saved + other: "{{count}} errors prohibited this {{model}} from being saved" + body: "There were problems with the following fields:" 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" \ No newline at end of file + inclusion: "is not included in the list" + exclusion: "is reserved" + invalid: "is invalid" + confirmation: "doesn't match confirmation" + accepted: "must be accepted" + empty: "can't be empty" + blank: "can't be blank" + too_long: "is too long (maximum is {{count}} characters)" + too_short: "is too short (minimum is {{count}} characters)" + wrong_length: "is the wrong length (should be {{count}} characters)" + taken: "has already been taken" + not_a_number: "is not a number" + greater_than: "must be greater than {{count}}" + greater_than_or_equal_to: "must be greater than or equal to {{count}}" + equal_to: "must be equal to {{count}}" + less_than: "must be less than {{count}}" + less_than_or_equal_to: "must be less than or equal to {{count}}" + odd: "must be odd" + even: "must be even" \ No newline at end of file -- cgit v1.3