From 2d0602371bf8cfe8303275920f1cad8148bfa9da Mon Sep 17 00:00:00 2001 From: Enderson Maia Date: Sun, 1 Mar 2009 16:48:21 -0300 Subject: [PATCH] Added i18n vars for issue/new errors. --- app/controllers/issues_controller.rb | 4 ++-- config/locales/en.yml | 2 ++ config/locales/pt-BR.yml | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index 0af5f19..0e3e4f7 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -120,7 +120,7 @@ class IssuesController < ApplicationController # Tracker must be set before custom field values @issue.tracker ||= @project.trackers.find((params[:issue] && params[:issue][:tracker_id]) || params[:tracker_id] || :first) if @issue.tracker.nil? - render_error 'No tracker is associated to this project. Please check the Project settings.' + render_error l(:error_no_tracker_in_project) return end if params[:issue].is_a?(Hash) @@ -131,7 +131,7 @@ class IssuesController < ApplicationController default_status = IssueStatus.default unless default_status - render_error 'No default issue status is defined. Please check your configuration (Go to "Administration -> Issue statuses").' + render_error l(:error_no_default_issue_status) return end @issue.status = default_status diff --git a/config/locales/en.yml b/config/locales/en.yml index 0548843..7b4670a 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -136,6 +136,8 @@ en: error_scm_command_failed: "An error occurred when trying to access the repository: {{value}}" error_scm_annotate: "The entry does not exist or can not be annotated." error_issue_not_found_in_project: 'The issue was not found or does not belong to this project' + error_no_tracker_in_project: 'No tracker is associated to this project. Please check the Project settings.' + error_no_default_issue_status: 'No default issue status is defined. Please check your configuration (Go to "Administration -> Issue statuses").' warning_attachments_not_saved: "{{count}} file(s) could not be saved." diff --git a/config/locales/pt-BR.yml b/config/locales/pt-BR.yml index 3c6fb38..2b48f08 100644 --- a/config/locales/pt-BR.yml +++ b/config/locales/pt-BR.yml @@ -172,6 +172,8 @@ pt-BR: error_scm_command_failed: "Ocorreu um erro ao tentar acessar o repositório: {{value}}" error_scm_annotate: "Esta entrada não existe ou não pode ser anotada." error_issue_not_found_in_project: 'A tarefa não foi encontrada ou não pertence a este projeto' + error_no_tracker_in_project: 'Não há um tipo de tarefa associado a este projeto. favor verificar as configurações do projeto.' + error_no_default_issue_status: 'A situação padrão para tarefa não está definida. Favor verificar sua configuração (Vá em "Administração -> Situação da tarefa").' mail_subject_lost_password: "Sua senha do {{value}}." mail_body_lost_password: 'Para mudar sua senha, clique no link abaixo:' -- 1.5.5.4