mirror of
https://github.com/diaspora/diaspora.git
synced 2026-04-29 03:01:03 -04:00
Added translations to photos and registrations controllers
This commit is contained in:
@@ -40,15 +40,15 @@ class PhotosController < ApplicationController
|
||||
end
|
||||
|
||||
rescue TypeError
|
||||
message = "Photo upload failed. Are you sure an image was added?"
|
||||
message = I18n.t 'photos.create.type_error'
|
||||
respond_with :location => album, :error => message
|
||||
|
||||
rescue CarrierWave::IntegrityError
|
||||
message = "Photo upload failed. Are you sure that was an image?"
|
||||
message = I18n.t 'photos.create.integrity_error'
|
||||
respond_with :location => album, :error => message
|
||||
|
||||
rescue RuntimeError => e
|
||||
message = "Photo upload failed. Are you sure that your seatbelt is fastened?"
|
||||
message = I18n.t 'photos.create.runtime_error'
|
||||
respond_with :location => album, :error => message
|
||||
raise e
|
||||
end
|
||||
@@ -63,7 +63,7 @@ class PhotosController < ApplicationController
|
||||
def destroy
|
||||
@photo = Photo.find_by_id params[:id]
|
||||
@photo.destroy
|
||||
flash[:notice] = "Photo deleted."
|
||||
flash[:notice] = I18n.t 'photos.destroy.notice'
|
||||
respond_with :location => @photo.album
|
||||
end
|
||||
|
||||
@@ -84,10 +84,10 @@ class PhotosController < ApplicationController
|
||||
def update
|
||||
@photo = Photo.find_by_id params[:id]
|
||||
if @photo.update_attributes params[:photo]
|
||||
flash[:notice] = "Photo successfully updated."
|
||||
flash[:notice] = I18n.t 'photos.update.notice'
|
||||
respond_with @photo
|
||||
else
|
||||
flash[:error] = "Failed to edit photo."
|
||||
flash[:error] = I18n.t 'photos.update.error'
|
||||
render :action => :edit
|
||||
end
|
||||
end
|
||||
|
||||
@@ -16,7 +16,7 @@ class RegistrationsController < Devise::RegistrationsController
|
||||
end
|
||||
if user
|
||||
#set_flash_message :notice, :signed_up
|
||||
flash[:notice] = "You've joined Diaspora!"
|
||||
flash[:notice] = I18n.t 'registrations.create.success'
|
||||
#redirect_to root_url
|
||||
sign_in_and_redirect(:user, user)
|
||||
else
|
||||
|
||||
@@ -137,9 +137,20 @@ de:
|
||||
new_photo: "Foto erstellen"
|
||||
back_to_list: "Zurück zur Liste"
|
||||
post_it: "Hochladen"
|
||||
create:
|
||||
runtime_error: "Photo upload failed. Are you sure that your seatbelt is fastened?"
|
||||
integrity_error: "Photo upload failed. Are you sure that was an image?"
|
||||
type_error: "Photo upload failed. Are you sure an image was added?"
|
||||
update:
|
||||
notice: "Photo successfully updated."
|
||||
error: "Failed to edit photo."
|
||||
destroy:
|
||||
notice: "Photo deleted."
|
||||
registrations:
|
||||
new:
|
||||
sign_up: "Anmelden"
|
||||
create:
|
||||
success: "You've joined Diaspora!"
|
||||
status_messages:
|
||||
new_status_message:
|
||||
tell_me_something_good: "Erzähl' mir was schönes!"
|
||||
|
||||
@@ -136,9 +136,20 @@ en:
|
||||
new_photo: "New Photo"
|
||||
back_to_list: "Back to List"
|
||||
post_it: "post it!"
|
||||
create:
|
||||
runtime_error: "Photo upload failed. Are you sure that your seatbelt is fastened?"
|
||||
integrity_error: "Photo upload failed. Are you sure that was an image?"
|
||||
type_error: "Photo upload failed. Are you sure an image was added?"
|
||||
update:
|
||||
notice: "Photo successfully updated."
|
||||
error: "Failed to edit photo."
|
||||
destroy:
|
||||
notice: "Photo deleted."
|
||||
registrations:
|
||||
new:
|
||||
sign_up: "Sign up"
|
||||
create:
|
||||
success: "You've joined Diaspora!"
|
||||
status_messages:
|
||||
new_status_message:
|
||||
tell_me_something_good: "tell me something good"
|
||||
|
||||
@@ -137,9 +137,20 @@ es:
|
||||
new_photo: "Nueva Foto"
|
||||
back_to_list: "Devuelta a la lista"
|
||||
post_it: "post it!"
|
||||
create:
|
||||
runtime_error: "Photo upload failed. Are you sure that your seatbelt is fastened?"
|
||||
integrity_error: "Photo upload failed. Are you sure that was an image?"
|
||||
type_error: "Photo upload failed. Are you sure an image was added?"
|
||||
update:
|
||||
notice: "Photo successfully updated."
|
||||
error: "Failed to edit photo."
|
||||
destroy:
|
||||
notice: "Photo deleted."
|
||||
registrations:
|
||||
new:
|
||||
sign_up: "Registrate"
|
||||
create:
|
||||
success: "Esta registrado en Diaspora!"
|
||||
status_messages:
|
||||
new_status_message:
|
||||
tell_me_something_good: "dime algo bueno"
|
||||
|
||||
@@ -128,9 +128,20 @@ fr:
|
||||
new_photo: "Nouvelle photo"
|
||||
back_to_list: "Retour à la liste"
|
||||
post_it: "postez le !"
|
||||
create:
|
||||
runtime_error: "Photo upload failed. Are you sure that your seatbelt is fastened?"
|
||||
integrity_error: "Photo upload failed. Are you sure that was an image?"
|
||||
type_error: "Photo upload failed. Are you sure an image was added?"
|
||||
update:
|
||||
notice: "Photo successfully updated."
|
||||
error: "Failed to edit photo."
|
||||
destroy:
|
||||
notice: "Photo deleted."
|
||||
registrations:
|
||||
new:
|
||||
sign_up: "Enregistrement"
|
||||
create:
|
||||
success: "You've joined Diaspora!"
|
||||
status_messages:
|
||||
new_status_message:
|
||||
tell_me_something_good: "Dites quelque-chose de bien"
|
||||
|
||||
Reference in New Issue
Block a user