Skip to content
Snippets Groups Projects
Commit 0ea2741b authored by Marcela Ribeiro de Oliveira's avatar Marcela Ribeiro de Oliveira
Browse files

add translation in .yml

parent c1ca6219
No related branches found
No related tags found
No related merge requests found
...@@ -60,7 +60,7 @@ class CollectionsController < ApplicationController ...@@ -60,7 +60,7 @@ class CollectionsController < ApplicationController
respond_to do |format| respond_to do |format|
if @collection.save if @collection.save
format.html { redirect_to :back, notice: 'Coleção criada com sucesso.' } format.html { redirect_to :back, notice: t('activerecord.attributes.collection.create.notice.successfully_created') }
else else
format.html { render :new } format.html { render :new }
end end
...@@ -72,7 +72,7 @@ class CollectionsController < ApplicationController ...@@ -72,7 +72,7 @@ class CollectionsController < ApplicationController
def update def update
respond_to do |format| respond_to do |format|
if Collection.update(collection_params) if Collection.update(collection_params)
format.html { redirect_to @collection, notice: 'Coleção atualizada com sucesso.' } format.html { redirect_to @collection, notice: t('activerecord.attributes.collection.update.notice.successfully_updated') }
else else
format.html { render :edit } format.html { render :edit }
end end
...@@ -85,7 +85,7 @@ class CollectionsController < ApplicationController ...@@ -85,7 +85,7 @@ class CollectionsController < ApplicationController
Collection.destroy @collection Collection.destroy @collection
respond_to do |format| respond_to do |format|
format.html { redirect_to user_path(current_user), notice: 'Coleção excluida com sucesso.' } format.html { redirect_to user_path(current_user), notice: t('activerecord.attributes.collection.destroy.notice.successfully_destroy') }
end end
end end
......
...@@ -10,9 +10,9 @@ class ComplaintsController < ApplicationController ...@@ -10,9 +10,9 @@ class ComplaintsController < ApplicationController
respond_to do |format| respond_to do |format|
if complaint.save if complaint.save
format.html { redirect_to :back, notice: 'Denúncia realizada com sucesso.' } format.html { redirect_to :back, notice: t('activerecord.attributes.complaint.create.notice.sucess') }
else else
format.html { redirect_to :back, alert: 'Objeto já foi denunciado por você.' } format.html { redirect_to :back, alert: t('activerecord.attributes.complaint.create.alert.fail') }
end end
end end
end end
......
...@@ -32,7 +32,7 @@ class FeedbacksController < ApplicationController ...@@ -32,7 +32,7 @@ class FeedbacksController < ApplicationController
respond_to do |format| respond_to do |format|
if feedback_service.report_bug @bug if feedback_service.report_bug @bug
format.html { redirect_to :back, notice: 'Problema relatado com sucesso!' } format.html { redirect_to :back, notice: t('activerecord.attributes.feedback.report_bug.notice.success') }
end end
end end
end end
......
...@@ -40,7 +40,7 @@ class LearningObjectsController < ApplicationController ...@@ -40,7 +40,7 @@ class LearningObjectsController < ApplicationController
# go to file submission page # go to file submission page
format.html { success_redirect @learning_object } format.html { success_redirect @learning_object }
else else
format.html { render :new, notice: 'Não foi possível criar o objeto.' } format.html { render :new, notice: t('activerecord.attributes.learning_object.create.notice.failure') }
end end
end end
...@@ -64,7 +64,7 @@ class LearningObjectsController < ApplicationController ...@@ -64,7 +64,7 @@ class LearningObjectsController < ApplicationController
LearningObject.destroy @learning_object LearningObject.destroy @learning_object
respond_to do |format| respond_to do |format|
format.html { redirect_to learning_objects_url, notice: 'Objeto educacional excluído com sucesso.' } format.html { redirect_to learning_objects_url, notice: t('activerecord.attributes.learning_object.destroy.notice.successfully_destroy') }
end end
end end
...@@ -121,7 +121,7 @@ class LearningObjectsController < ApplicationController ...@@ -121,7 +121,7 @@ class LearningObjectsController < ApplicationController
def success_redirect(learning_object) def success_redirect(learning_object)
#if 'Website externo' == learning_object.object_type.name #if 'Website externo' == learning_object.object_type.name
redirect_to learning_object_build_path(learning_object, :upload_attachments), notice: 'Seu objeto foi criado com sucesso!' redirect_to learning_object_build_path(learning_object, :upload_attachments), notice: t('activerecord.attributes.learning_object.success_redirect.notice.successfully_created')
end end
def set_form_objects def set_form_objects
......
...@@ -137,8 +137,45 @@ pt-BR: ...@@ -137,8 +137,45 @@ pt-BR:
object_type: "Tipo do objeto" object_type: "Tipo do objeto"
language: "Idioma" language: "Idioma"
author: "Autor" author: "Autor"
create:
notice:
failure: "Não foi possível criar o objeto."
destroy:
notice:
successfully_destroy: "Objeto educacional excluído com sucesso."
success_redirect:
notice:
successfully_created: "Seu objeto educacional foi criado com sucesso!"
collection:
create:
notice:
successfully_created: "Coleção criada com sucesso."
update:
notice:
sucessfully_updated: "Coleção atualizada com sucesso."
destroy:
notice:
successfully_destroy: "Coleção excluída com sucesso."
complaint:
create:
notice:
sucess: "Denúncia realizada com sucesso."
alert:
fail: "Objeto foi denunciado por você."
feedback:
report_bug:
notice:
sucess: "Problema relatado com sucesso!"
institution: institution:
name: "Nome" create:
notice:
successfully_created: "Instituição criada com sucesso."
update:
notice:
sucessfully_updated: "Instituição atualizada com sucesso."
destroy:
notice:
successfully_destroy: "Instituição excluída com sucesso."
review: review:
create: create:
notice: notice:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment