diff --git a/redmine/app/controllers/account_controller.rb b/redmine/app/controllers/account_controller.rb index b156bfd5b..bc65622b8 100644 --- a/redmine/app/controllers/account_controller.rb +++ b/redmine/app/controllers/account_controller.rb @@ -41,7 +41,7 @@ class AccountController < ApplicationController self.logged_in_user = user redirect_back_or_default :controller => 'account', :action => 'my_page' else - flash[:notice] = l(:notice_account_invalid_creditentials) + flash.now[:notice] = l(:notice_account_invalid_creditentials) end end end @@ -64,7 +64,7 @@ class AccountController < ApplicationController @user = self.logged_in_user if request.post? and @user.update_attributes(@params[:user]) set_localization - flash[:notice] = l(:notice_account_updated) + flash.now[:notice] = l(:notice_account_updated) self.logged_in_user.reload end end @@ -72,11 +72,12 @@ class AccountController < ApplicationController # Change logged in user's password def change_password @user = self.logged_in_user + flash.now[:notice] = l(:notice_can_t_change_password) and render :action => 'my_account' and return if @user.auth_source_id if @user.check_password?(@params[:password]) @user.password, @user.password_confirmation = params[:new_password], params[:new_password_confirmation] - flash[:notice] = l(:notice_account_password_updated) if @user.save + flash.now[:notice] = l(:notice_account_password_updated) if @user.save else - flash[:notice] = l(:notice_account_wrong_password) + flash.now[:notice] = l(:notice_account_wrong_password) end render :action => 'my_account' end @@ -100,11 +101,16 @@ class AccountController < ApplicationController return else if request.post? - user = User.find_by_mail(params[:mail]) - flash[:notice] = l(:notice_account_unknown_email) and return unless user + user = User.find_by_mail(params[:mail]) + # user not found in db + flash.now[:notice] = l(:notice_account_unknown_email) and return unless user + # user uses an external authentification + flash.now[:notice] = l(:notice_can_t_change_password) and return if user.auth_source_id + # create a new token for password recovery token = Token.new(:user => user, :action => "recovery") if token.save - Mailer.set_language_if_valid(Localization.lang) + # send token to user via email + Mailer.set_language_if_valid(user.language) Mailer.deliver_lost_password(token) flash[:notice] = l(:notice_account_lost_email_sent) redirect_to :action => 'login' @@ -143,7 +149,7 @@ class AccountController < ApplicationController @user.custom_values = @custom_values token = Token.new(:user => @user, :action => "register") if @user.save and token.save - Mailer.set_language_if_valid(Localization.lang) + Mailer.set_language_if_valid(@user.language) Mailer.deliver_register(token) flash[:notice] = l(:notice_account_register_done) redirect_to :controller => '' diff --git a/redmine/app/controllers/application.rb b/redmine/app/controllers/application.rb index adae23550..8acbb0926 100644 --- a/redmine/app/controllers/application.rb +++ b/redmine/app/controllers/application.rb @@ -37,21 +37,19 @@ class ApplicationController < ActionController::Base end def set_localization - Localization.lang = begin - if self.logged_in_user and Localization.langs.keys.include? self.logged_in_user.language + lang = begin + if self.logged_in_user and self.logged_in_user.language and !self.logged_in_user.language.empty? and GLoc.valid_languages.include? self.logged_in_user.language.to_sym self.logged_in_user.language elsif request.env['HTTP_ACCEPT_LANGUAGE'] accept_lang = HTTPUtils.parse_qvalues(request.env['HTTP_ACCEPT_LANGUAGE']).first.split('-').first - if Localization.langs.keys.include? accept_lang + if accept_lang and !accept_lang.empty? and GLoc.valid_languages.include? accept_lang.to_sym accept_lang end end rescue nil end || $RDM_DEFAULT_LANG - - set_language_if_valid(Localization.lang) - + set_language_if_valid(lang) end def require_login diff --git a/redmine/app/controllers/enumerations_controller.rb b/redmine/app/controllers/enumerations_controller.rb index 01664c85e..8e5be0a20 100644 --- a/redmine/app/controllers/enumerations_controller.rb +++ b/redmine/app/controllers/enumerations_controller.rb @@ -38,7 +38,7 @@ class EnumerationsController < ApplicationController def create @enumeration = Enumeration.new(params[:enumeration]) if @enumeration.save - flash[:notice] = 'Enumeration was successfully created.' + flash[:notice] = l(:notice_successful_create) redirect_to :action => 'list', :opt => @enumeration.opt else render :action => 'new' @@ -52,7 +52,7 @@ class EnumerationsController < ApplicationController def update @enumeration = Enumeration.find(params[:id]) if @enumeration.update_attributes(params[:enumeration]) - flash[:notice] = 'Enumeration was successfully updated.' + flash[:notice] = l(:notice_successful_update) redirect_to :action => 'list', :opt => @enumeration.opt else render :action => 'edit' @@ -60,7 +60,8 @@ class EnumerationsController < ApplicationController end def destroy - Enumeration.find(params[:id]).destroy + Enumeration.find(params[:id]).destroy + flash[:notice] = l(:notice_successful_delete) redirect_to :action => 'list' rescue flash[:notice] = "Unable to delete enumeration" diff --git a/redmine/app/controllers/help_controller.rb b/redmine/app/controllers/help_controller.rb index e51d077a1..6fde039d5 100644 --- a/redmine/app/controllers/help_controller.rb +++ b/redmine/app/controllers/help_controller.rb @@ -31,7 +31,7 @@ class HelpController < ApplicationController end end # choose language according to available help translations - lang = (@help_config['langs'].include? Localization.lang) ? Localization.lang : @help_config['langs'].first + lang = (@help_config['langs'].include? current_language) ? current_language : @help_config['langs'].first if template redirect_to "/manual/#{lang}/#{template}" diff --git a/redmine/app/controllers/projects_controller.rb b/redmine/app/controllers/projects_controller.rb index 3c4d806b5..3d45f7268 100644 --- a/redmine/app/controllers/projects_controller.rb +++ b/redmine/app/controllers/projects_controller.rb @@ -227,7 +227,7 @@ class ProjectsController < ApplicationController CSV::Writer.generate(export, ',') do |csv| csv << %w(Id Status Tracker Subject Author Created Updated) @issues.each do |issue| - csv << [issue.id, issue.status.name, issue.tracker.name, issue.subject, issue.author.display_name, _('(time)', issue.created_on), _('(time)', issue.updated_on)] + csv << [issue.id, issue.status.name, issue.tracker.name, issue.subject, issue.author.display_name, l_datetime(issue.created_on), l_datetime(issue.updated_on)] end end export.rewind diff --git a/redmine/app/controllers/roles_controller.rb b/redmine/app/controllers/roles_controller.rb index 657f62e05..0e26ff56c 100644 --- a/redmine/app/controllers/roles_controller.rb +++ b/redmine/app/controllers/roles_controller.rb @@ -37,7 +37,7 @@ class RolesController < ApplicationController redirect_to :action => 'list' end end - @permissions = Permission.find(:all, :order => 'sort ASC') + @permissions = Permission.find(:all, :conditions => ["is_public=?", false], :order => 'sort ASC') end def edit @@ -48,7 +48,7 @@ class RolesController < ApplicationController flash[:notice] = 'Role was successfully updated.' redirect_to :action => 'list' end - @permissions = Permission.find(:all, :order => 'sort ASC') + @permissions = Permission.find(:all, :conditions => ["is_public=?", false], :order => 'sort ASC') end def destroy @@ -61,8 +61,7 @@ class RolesController < ApplicationController redirect_to :action => 'list' end - def workflow - + def workflow @role = Role.find_by_id(params[:role_id]) @tracker = Tracker.find_by_id(params[:tracker_id]) diff --git a/redmine/app/helpers/application_helper.rb b/redmine/app/helpers/application_helper.rb index ddb846073..6e395d3da 100644 --- a/redmine/app/helpers/application_helper.rb +++ b/redmine/app/helpers/application_helper.rb @@ -50,18 +50,18 @@ module ApplicationHelper end def format_date(date) - _('(date)', date) if date + l_date(date) if date end def format_time(time) - _('(time)', time) if time + l_datetime(time) if time end def pagination_links_full(paginator, options={}, html_options={}) html ='' - html << link_to(('« ' + _('Previous') ), { :page => paginator.current.previous }) + ' ' if paginator.current.previous + html << link_to(('« ' + l(:label_previous) ), { :page => paginator.current.previous }) + ' ' if paginator.current.previous html << (pagination_links(paginator, options, html_options) || '') - html << ' ' + link_to((_('Next') + ' »'), { :page => paginator.current.next }) if paginator.current.next + html << ' ' + link_to((l(:label_next) + ' »'), { :page => paginator.current.next }) if paginator.current.next html end @@ -90,4 +90,8 @@ module ApplicationHelper "" end end + + def lang_options_for_select + GLoc.valid_languages.collect {|lang| [ l_lang_name(lang.to_s, lang), lang.to_s]} + end end diff --git a/redmine/app/helpers/search_filter_helper.rb b/redmine/app/helpers/search_filter_helper.rb index 98b281225..62ff5f291 100644 --- a/redmine/app/helpers/search_filter_helper.rb +++ b/redmine/app/helpers/search_filter_helper.rb @@ -58,42 +58,43 @@ module SearchFilterHelper def search_filter_init_list_issues search_filter_criteria('status_id') { - [ [_('[Open]'), "O", ["issue_statuses.is_closed=?", false]], - [_('[All]'), "A", nil] + [ [('['+l(:label_open_issues_plural)+']'), "O", ["issue_statuses.is_closed=?", false]], + [('['+l(:label_closed_issues_plural)+']'), "C", ["issue_statuses.is_closed=?", true]], + [('['+l(:label_all)+']'), "A", nil] ] + IssueStatus.find(:all).collect {|s| [s.name, s.id, ["issues.status_id=?", s.id]] } } search_filter_criteria('tracker_id') { - [ [_('[All]'), "A", nil] + [ [('['+l(:label_all)+']'), "A", nil] ] + Tracker.find(:all).collect {|s| [s.name, s.id, ["issues.tracker_id=?", s.id]] } } search_filter_criteria('priority_id') { - [ [_('[All]'), "A", nil] + [ [('['+l(:label_all)+']'), "A", nil] ] + Enumeration.find(:all, :conditions => ['opt=?','IPRI']).collect {|s| [s.name, s.id, ["issues.priority_id=?", s.id]] } } search_filter_criteria('category_id') { - [ [_('[All]'), "A", nil], - [_('[None]'), "N", ["issues.category_id is null"]] + [ [('['+l(:label_all)+']'), "A", nil], + [('['+l(:label_none)+']'), "N", ["issues.category_id is null"]] ] + @project.issue_categories.find(:all).collect {|s| [s.name, s.id, ["issues.category_id=?", s.id]] } } search_filter_criteria('fixed_version_id') { - [ [_('[All]'), "A", nil], - [_('[None]'), "N", ["issues.fixed_version_id is null"]] + [ [('['+l(:label_all)+']'), "A", nil], + [('['+l(:label_none)+']'), "N", ["issues.fixed_version_id is null"]] ] + @project.versions.collect {|s| [s.name, s.id, ["issues.fixed_version_id=?", s.id]] } } search_filter_criteria('assigned_to_id') { - [ [_('[All]'), "A", nil], - [_('[None]'), "N", ["issues.assigned_to_id is null"]] + [ [('['+l(:label_all)+']'), "A", nil], + [('['+l(:label_none)+']'), "N", ["issues.assigned_to_id is null"]] ] + @project.users.collect {|s| [s.display_name, s.id, ["issues.assigned_to_id=?", s.id]] } } search_filter_criteria('subproject_id') { - [ [_('[None]'), "N", ["issues.project_id=?", @project.id]], - [_('[All]'), "A", ["(issues.project_id=? or projects.parent_id=?)", @project.id, @project.id]] + [ [('['+l(:label_none)+']'), "N", ["issues.project_id=?", @project.id]], + [('['+l(:label_all)+']'), "A", ["(issues.project_id=? or projects.parent_id=?)", @project.id, @project.id]] ] } end diff --git a/redmine/app/models/auth_source_ldap.rb b/redmine/app/models/auth_source_ldap.rb index 9579a1094..895cf1c63 100644 --- a/redmine/app/models/auth_source_ldap.rb +++ b/redmine/app/models/auth_source_ldap.rb @@ -30,7 +30,7 @@ class AuthSourceLdap < AuthSource # get user's DN ldap_con = initialize_ldap_con(self.account, self.account_password) login_filter = Net::LDAP::Filter.eq( self.attr_login, login ) - object_filter = Net::LDAP::Filter.eq( "objectClass", "organizationalPerson" ) + object_filter = Net::LDAP::Filter.eq( "objectClass", "*" ) dn = String.new ldap_con.search( :base => self.base_dn, :filter => object_filter & login_filter, diff --git a/redmine/app/models/enumeration.rb b/redmine/app/models/enumeration.rb index 7f985d2f8..122da15c5 100644 --- a/redmine/app/models/enumeration.rb +++ b/redmine/app/models/enumeration.rb @@ -21,18 +21,14 @@ class Enumeration < ActiveRecord::Base validates_presence_of :opt, :name validates_uniqueness_of :name, :scope => [:opt] - OPTIONS = [ - ["Issue priorities", "IPRI"], - ["Document categories", "DCAT"] - ].freeze + OPTIONS = { + "IPRI" => :enumeration_issue_priorities, + "DCAT" => :enumeration_doc_categories + }.freeze def self.get_values(option) find(:all, :conditions => ['opt=?', option]) end - - def name - _ self.attributes['name'] - end private def check_integrity diff --git a/redmine/app/models/issue_status.rb b/redmine/app/models/issue_status.rb index ef9862092..426580987 100644 --- a/redmine/app/models/issue_status.rb +++ b/redmine/app/models/issue_status.rb @@ -38,10 +38,6 @@ class IssueStatus < ActiveRecord::Base statuses end - def name - _ self.attributes['name'] - end - private def check_integrity raise "Can't delete status" if Issue.find(:first, :conditions => ["status_id=?", self.id]) or IssueHistory.find(:first, :conditions => ["status_id=?", self.id]) diff --git a/redmine/app/models/mailer.rb b/redmine/app/models/mailer.rb index bf4c85dbb..755764dc0 100644 --- a/redmine/app/models/mailer.rb +++ b/redmine/app/models/mailer.rb @@ -45,6 +45,5 @@ class Mailer < ActionMailer::Base @from = 'redmine@somenet.foo' @subject = "redMine account activation" @body['token'] = token - end - + end end diff --git a/redmine/app/models/member.rb b/redmine/app/models/member.rb index d37936561..1214b6443 100644 --- a/redmine/app/models/member.rb +++ b/redmine/app/models/member.rb @@ -16,14 +16,14 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. class Member < ActiveRecord::Base - belongs_to :user - belongs_to :role - belongs_to :project - - validates_presence_of :role, :user, :project + belongs_to :user + belongs_to :role + belongs_to :project + + validates_presence_of :role, :user, :project validates_uniqueness_of :user_id, :scope => :project_id - - def name - self.user.display_name - end + + def name + self.user.display_name + end end diff --git a/redmine/app/models/news.rb b/redmine/app/models/news.rb index c4884ace5..faafa7eef 100644 --- a/redmine/app/models/news.rb +++ b/redmine/app/models/news.rb @@ -16,13 +16,13 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. class News < ActiveRecord::Base - belongs_to :project - belongs_to :author, :class_name => 'User', :foreign_key => 'author_id' - - validates_presence_of :title, :description - - # returns last created news - def self.latest - find(:all, :limit => 5, :include => [ :author, :project ], :order => "news.created_on DESC") - end + belongs_to :project + belongs_to :author, :class_name => 'User', :foreign_key => 'author_id' + + validates_presence_of :title, :description + + # returns last created news + def self.latest + find(:all, :limit => 5, :include => [ :author, :project ], :order => "news.created_on DESC") + end end diff --git a/redmine/app/models/permission.rb b/redmine/app/models/permission.rb index 164ca21b9..620974608 100644 --- a/redmine/app/models/permission.rb +++ b/redmine/app/models/permission.rb @@ -16,27 +16,27 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. class Permission < ActiveRecord::Base - has_and_belongs_to_many :roles - - validates_presence_of :controller, :action, :description - + has_and_belongs_to_many :roles + + validates_presence_of :controller, :action, :description + GROUPS = { - 100 => "Project", - 200 => "Membres", - 300 => "Versions", - 400 => "Issue categories", - 1000 => "Issues", - 1100 => "News", - 1200 => "Documents", - 1300 => "Files", - }.freeze + 100 => :label_project, + 200 => :label_member_plural, + 300 => :label_version_plural, + 400 => :label_issue_category_plural, + 1000 => :label_issue_plural, + 1100 => :label_news_plural, + 1200 => :label_document_plural, + 1300 => :label_attachment_plural, + }.freeze @@cached_perms_for_public = nil @@cached_perms_for_roles = nil - def name - self.controller + "/" + self.action - end + def name + self.controller + "/" + self.action + end def group_id (self.sort / 100)*100 diff --git a/redmine/app/models/role.rb b/redmine/app/models/role.rb index ce880b5cc..6908095e9 100644 --- a/redmine/app/models/role.rb +++ b/redmine/app/models/role.rb @@ -17,13 +17,13 @@ class Role < ActiveRecord::Base before_destroy :check_integrity - has_and_belongs_to_many :permissions + has_and_belongs_to_many :permissions has_many :workflows, :dependent => true has_many :members - - validates_presence_of :name - validates_uniqueness_of :name - + + validates_presence_of :name + validates_uniqueness_of :name + private def check_integrity raise "Can't delete role" if Member.find(:first, :conditions =>["role_id=?", self.id]) diff --git a/redmine/app/models/tracker.rb b/redmine/app/models/tracker.rb index ca37eb939..a4376a351 100644 --- a/redmine/app/models/tracker.rb +++ b/redmine/app/models/tracker.rb @@ -24,10 +24,6 @@ class Tracker < ActiveRecord::Base validates_presence_of :name validates_uniqueness_of :name - def name - _ self.attributes['name'] - end - private def check_integrity raise "Can't delete tracker" if Issue.find(:first, :conditions => ["tracker_id=?", self.id]) diff --git a/redmine/app/models/user.rb b/redmine/app/models/user.rb index ea313483c..ba489ac14 100644 --- a/redmine/app/models/user.rb +++ b/redmine/app/models/user.rb @@ -57,7 +57,7 @@ class User < ActiveRecord::Base # user has an external authentication method return nil unless user.auth_source.authenticate(login, password) else - # local authentication + # authentication with local password return nil unless User.hash_password(password) == user.hashed_password end else @@ -69,6 +69,7 @@ class User < ActiveRecord::Base onthefly.language = $RDM_DEFAULT_LANG if onthefly.save user = find(:first, :conditions => ["login=?", login]) + logger.info("User '#{user.login}' created on the fly.") if logger end end end diff --git a/redmine/app/views/account/my_account.rhtml b/redmine/app/views/account/my_account.rhtml index 097e23181..4aa6e62db 100644 --- a/redmine/app/views/account/my_account.rhtml +++ b/redmine/app/views/account/my_account.rhtml @@ -23,7 +23,7 @@ <%= text_field 'user', 'mail' %>


- <%= select("user", "language", Localization.langs.invert) %>

+ <%= select("user", "language", lang_options_for_select) %>

<%= check_box 'user', 'mail_notification' %>

@@ -34,7 +34,8 @@ -
+
+<% unless @user.auth_source_id %>

<%=l(:field_password)%>

  @@ -51,5 +52,6 @@
<%= submit_tag l(:button_save) %>
<%= end_form_tag %> -
+
+<% end %>
\ No newline at end of file diff --git a/redmine/app/views/account/register.rhtml b/redmine/app/views/account/register.rhtml index 2bdf380f9..3a953a254 100644 --- a/redmine/app/views/account/register.rhtml +++ b/redmine/app/views/account/register.rhtml @@ -1,7 +1,6 @@

<%=l(:label_register)%>

<%= start_form_tag %> - <%= error_messages_for 'user' %>
@@ -25,22 +24,15 @@ <%= text_field 'user', 'mail' %>


-<%= select("user", "language", Localization.langs.invert) %>

+<%= select("user", "language", lang_options_for_select) %>

-<% for custom_value in @custom_values %> -
-

<%= content_tag "label", custom_value.custom_field.name %> - <% if custom_value.custom_field.is_required? %>*<% end %> -
- <%= custom_field_tag custom_value %>

-
+<% for custom_value in @custom_values %> +

<%= custom_field_tag_with_label custom_value %>

<% end %> -
-

<%= check_box 'user', 'mail_notification' %>

- <%= submit_tag l(:button_submit) %> +<%= submit_tag l(:button_submit) %> <%= end_form_tag %> diff --git a/redmine/app/views/admin/info.rhtml b/redmine/app/views/admin/info.rhtml index 03dddafb6..4777a151e 100644 --- a/redmine/app/views/admin/info.rhtml +++ b/redmine/app/views/admin/info.rhtml @@ -1,4 +1,4 @@ -

<%=_('Information')%>

+

<%=l(:label_information_plural)%>

<%=l(:field_version)%>: <%= RDM_APP_NAME %> <%= RDM_APP_VERSION %>

diff --git a/redmine/app/views/custom_fields/list.rhtml b/redmine/app/views/custom_fields/list.rhtml index fba952100..7f45f7a89 100644 --- a/redmine/app/views/custom_fields/list.rhtml +++ b/redmine/app/views/custom_fields/list.rhtml @@ -7,7 +7,7 @@ <%=l(:field_field_format)%> <%=l(:field_is_required)%> <%=l(:field_is_for_all)%> - <%=_('Used by')%> + <%=l(:label_used_by)%> <% for custom_field in @custom_fields %> diff --git a/redmine/app/views/documents/_form.rhtml b/redmine/app/views/documents/_form.rhtml index e4dac38e6..ae56cdd46 100644 --- a/redmine/app/views/documents/_form.rhtml +++ b/redmine/app/views/documents/_form.rhtml @@ -9,7 +9,7 @@


<%= text_field 'document', 'title', :size => 60 %>

-


+


<%= text_area 'document', 'description', :cols => 60, :rows => 5 %>

diff --git a/redmine/app/views/documents/edit.rhtml b/redmine/app/views/documents/edit.rhtml index 2f1e9a94c..059c99d9b 100644 --- a/redmine/app/views/documents/edit.rhtml +++ b/redmine/app/views/documents/edit.rhtml @@ -1,8 +1,8 @@ -

<%=_('Document')%>

+

<%=l(:label_document)%>

<%= start_form_tag :action => 'edit', :id => @document %> <%= render :partial => 'form' %> - <%= submit_tag _('Save') %> + <%= submit_tag l(:button_save) %> <%= end_form_tag %> diff --git a/redmine/app/views/documents/show.rhtml b/redmine/app/views/documents/show.rhtml index 1cadf7c42..136621331 100644 --- a/redmine/app/views/documents/show.rhtml +++ b/redmine/app/views/documents/show.rhtml @@ -1,18 +1,18 @@

<%= @document.title %>

-<%=_('Description')%>: <%= @document.description %>
-<%=_('Category')%>: <%= @document.category.name %>
+<%=l(:field_description)%>: <%= @document.description %>
+<%=l(:field_category)%>: <%= @document.category.name %>

<% if authorize_for('documents', 'edit') %> - <%= start_form_tag ({ :controller => 'documents', :action => 'edit', :id => @document }, :method => 'get' ) %> - <%= submit_tag _('Edit') %> + <%= start_form_tag({ :controller => 'documents', :action => 'edit', :id => @document }, :method => 'get' ) %> + <%= submit_tag l(:button_edit) %> <%= end_form_tag %> <% end %> <% if authorize_for('documents', 'destroy') %> - <%= start_form_tag ({ :controller => 'documents', :action => 'destroy', :id => @document } ) %> - <%= submit_tag _('Delete') %> + <%= start_form_tag({ :controller => 'documents', :action => 'destroy', :id => @document } ) %> + <%= submit_tag l(:button_delete) %> <%= end_form_tag %> <% end %> @@ -24,12 +24,12 @@ <%= link_to attachment.filename, :action => 'download', :id => @document, :attachment_id => attachment %> <%= format_date(attachment.created_on) %> <%= attachment.author.display_name %> - <%= human_size(attachment.filesize) %>
<%= attachment.downloads %> <%=_('download')%>(s) + <%= human_size(attachment.filesize) %>
<%= lwr(:label_download, attachment.downloads) %> <% if authorize_for('documents', 'destroy_attachment') %> <%= start_form_tag :action => 'destroy_attachment', :id => @document, :attachment_id => attachment %> - <%= submit_tag _('Delete'), :class => "button-small" %> + <%= submit_tag l(:button_delete), :class => "button-small" %> <%= end_form_tag %> <% end %> @@ -40,8 +40,8 @@ <% if authorize_for('documents', 'add_attachment') %> <%= start_form_tag ({ :controller => 'documents', :action => 'add_attachment', :id => @document }, :multipart => true) %> - <%=_('Add file')%>
<%= file_field 'attachment', 'file' %> - <%= submit_tag _('Add') %> + <%=l(:label_attachment_new)%>
<%= file_field 'attachment', 'file' %> + <%= submit_tag l(:button_add) %> <%= end_form_tag %> <% end %> diff --git a/redmine/app/views/enumerations/_form.rhtml b/redmine/app/views/enumerations/_form.rhtml index d78dc358c..280eebfbd 100644 --- a/redmine/app/views/enumerations/_form.rhtml +++ b/redmine/app/views/enumerations/_form.rhtml @@ -3,7 +3,7 @@ <%= hidden_field 'enumeration', 'opt' %> -


+


<%= text_field 'enumeration', 'name' %>

diff --git a/redmine/app/views/enumerations/edit.rhtml b/redmine/app/views/enumerations/edit.rhtml index 16bd377f3..5c26414eb 100644 --- a/redmine/app/views/enumerations/edit.rhtml +++ b/redmine/app/views/enumerations/edit.rhtml @@ -1,10 +1,10 @@ -

<%=_('Enumerations')%>

+

<%=l(:label_enumerations)%>

<%= start_form_tag :action => 'update', :id => @enumeration %> <%= render :partial => 'form' %> - <%= submit_tag _('Save') %> + <%= submit_tag l(:button_save) %> <%= end_form_tag %> <%= start_form_tag :action => 'destroy', :id => @enumeration %> - <%= submit_tag _('Delete') %> + <%= submit_tag l(:button_delete) %> <%= end_form_tag %> \ No newline at end of file diff --git a/redmine/app/views/enumerations/list.rhtml b/redmine/app/views/enumerations/list.rhtml index b5ce65c23..15b91c1ac 100644 --- a/redmine/app/views/enumerations/list.rhtml +++ b/redmine/app/views/enumerations/list.rhtml @@ -1,22 +1,21 @@ -

<%=_('Enumerations')%>

+

<%=l(:label_enumerations)%>

-<% for option in Enumeration::OPTIONS %> +<% Enumeration::OPTIONS.each do |option, name| %> - <% if @params[:opt]==option[1] %> + <% if @params[:opt]==option %> -

<%= image_tag 'dir_open' %> <%=_ option[0] %>

+

<%= image_tag 'dir_open' %> <%= l(name) %>

<% else %> -

<%= image_tag 'dir' %> <%= link_to _(option[0]), :opt => option[1] %>

+

<%= image_tag 'dir' %> <%= link_to l(name), :opt => option %>

<% end %> -<% end %> - +<% end %> \ No newline at end of file diff --git a/redmine/app/views/enumerations/new.rhtml b/redmine/app/views/enumerations/new.rhtml index 30048f2fd..87ede016c 100644 --- a/redmine/app/views/enumerations/new.rhtml +++ b/redmine/app/views/enumerations/new.rhtml @@ -1,6 +1,6 @@ -

<%=_('New enumeration')%>

+

<%=l(:label_enumeration_new)%>

<%= start_form_tag :action => 'create' %> <%= render :partial => 'form' %> - <%= submit_tag _('Create') %> + <%= submit_tag l(:button_create) %> <%= end_form_tag %> diff --git a/redmine/app/views/issue_categories/_form.rhtml b/redmine/app/views/issue_categories/_form.rhtml index eba2f1672..fdf0cfda8 100644 --- a/redmine/app/views/issue_categories/_form.rhtml +++ b/redmine/app/views/issue_categories/_form.rhtml @@ -1,7 +1,7 @@ <%= error_messages_for 'issue_category' %> -


+


<%= text_field 'issue_category', 'name' %>

diff --git a/redmine/app/views/issue_categories/edit.rhtml b/redmine/app/views/issue_categories/edit.rhtml index 3afdd1c63..087dd7c1b 100644 --- a/redmine/app/views/issue_categories/edit.rhtml +++ b/redmine/app/views/issue_categories/edit.rhtml @@ -1,6 +1,6 @@ -

Editing issue category

+

<%=l(:label_issue_category)%>

<%= start_form_tag :action => 'edit', :id => @category %> <%= render :partial => 'form' %> - <%= submit_tag _('Save') %> + <%= submit_tag l(:button_save) %> <%= end_form_tag %> diff --git a/redmine/app/views/issue_statuses/_form.rhtml b/redmine/app/views/issue_statuses/_form.rhtml index 7c4d63674..237466a3e 100644 --- a/redmine/app/views/issue_statuses/_form.rhtml +++ b/redmine/app/views/issue_statuses/_form.rhtml @@ -1,16 +1,16 @@ <%= error_messages_for 'issue_status' %> -

*
+

*
<%= text_field 'issue_status', 'name' %>

<%= check_box 'issue_status', 'is_closed' %> -

+

<%= check_box 'issue_status', 'is_default' %> -

+

-

+

#<%= text_field 'issue_status', 'html_color', :maxlength => 6 %> *

diff --git a/redmine/app/views/issue_statuses/edit.rhtml b/redmine/app/views/issue_statuses/edit.rhtml index d3ed92201..140a40d94 100644 --- a/redmine/app/views/issue_statuses/edit.rhtml +++ b/redmine/app/views/issue_statuses/edit.rhtml @@ -1,6 +1,6 @@ -

<%=_('Issue status')%>

+

<%=l(:label_issue_status)%>

<%= start_form_tag :action => 'update', :id => @issue_status %> <%= render :partial => 'form' %> - <%= submit_tag _('Save') %> + <%= submit_tag l(:button_save) %> <%= end_form_tag %> diff --git a/redmine/app/views/issue_statuses/list.rhtml b/redmine/app/views/issue_statuses/list.rhtml index 8c0532263..ce7f8469c 100644 --- a/redmine/app/views/issue_statuses/list.rhtml +++ b/redmine/app/views/issue_statuses/list.rhtml @@ -1,11 +1,11 @@ -

<%=_('Issue statuses')%>

+

<%=l(:label_issue_status_plural)%>

- - - - + + + + @@ -17,7 +17,7 @@ @@ -27,4 +27,4 @@ <%= pagination_links_full @issue_status_pages %>
-<%= link_to '» ' + _('New issue status'), :action => 'new' %> +<%= link_to '» ' + l(:label_issue_status_new), :action => 'new' %> diff --git a/redmine/app/views/issue_statuses/new.rhtml b/redmine/app/views/issue_statuses/new.rhtml index f7ac082e9..1dc61eb85 100644 --- a/redmine/app/views/issue_statuses/new.rhtml +++ b/redmine/app/views/issue_statuses/new.rhtml @@ -1,6 +1,6 @@ -

<%=_('New issue status')%>

+

<%=l(:label_issue_status_new)%>

<%= start_form_tag :action => 'create' %> <%= render :partial => 'form' %> - <%= submit_tag _('Create') %> + <%= submit_tag l(:button_create) %> <%= end_form_tag %> diff --git a/redmine/app/views/issues/_list_simple.rhtml b/redmine/app/views/issues/_list_simple.rhtml index 66b70a1da..bcc05d1e8 100644 --- a/redmine/app/views/issues/_list_simple.rhtml +++ b/redmine/app/views/issues/_list_simple.rhtml @@ -1,28 +1,28 @@ <% if issues.length > 0 %> -
<%=_('Status')%><%=_('Default status')%><%=_('Issue closed')%><%=_('Color')%><%=l(:field_status)%><%=l(:field_is_default)%><%=l(:field_is_closed)%><%=l(:field_html_color)%>
  <%= start_form_tag :action => 'destroy', :id => status %> - <%= submit_tag _('Delete'), :class => "button-small" %> + <%= submit_tag l(:button_delete), :class => "button-small" %> <%= end_form_tag %>
- +
- - - - - - - <% for issue in issues %> - - - - - - <% end %> -
#<%=_('Tracker')%><%=_('Subject')%>
- <%= link_to issue.id, :controller => 'issues', :action => 'show', :id => issue %>
-

<%= issue.project.name %> - <%= issue.tracker.name %>
- <%= issue.status.name %> - <%= format_time(issue.updated_on) %>

-

<%= link_to issue.subject, :controller => 'issues', :action => 'show', :id => issue %>

-
-
+ + + + + + <% end %> +
+ + + + + -
#<%=l(:field_tracker)%><%=l(:field_subject)%>
+ <% for issue in issues %> +
+ <%= link_to issue.id, :controller => 'issues', :action => 'show', :id => issue %>
+

<%= issue.project.name %> - <%= issue.tracker.name %>
+ <%= issue.status.name %> - <%= format_time(issue.updated_on) %>

+

<%= link_to issue.subject, :controller => 'issues', :action => 'show', :id => issue %>

+
+ + + <% else %> - <%=_('No issue')%> + <%=l(:label_no_data)%> <% end %> \ No newline at end of file diff --git a/redmine/app/views/issues/change_status.rhtml b/redmine/app/views/issues/change_status.rhtml index aa85ae249..35494dbb9 100644 --- a/redmine/app/views/issues/change_status.rhtml +++ b/redmine/app/views/issues/change_status.rhtml @@ -1,4 +1,4 @@ -

<%=_('Issue')%> #<%= @issue.id %>: <%= @issue.subject %>

+

<%=l(:label_issue)%> #<%= @issue.id %>: <%= @issue.subject %>

<%= error_messages_for 'history' %> <%= start_form_tag :action => 'change_status', :id => @issue %> @@ -7,26 +7,25 @@ <%= hidden_field 'history', 'status_id' %>
-

<%=_('New status')%>: <%= @history.status.name %>

+

<%=l(:label_issue_status_new)%>: <%= @history.status.name %>

-


+


-


+


-


+


<%= text_area 'history', 'notes', :cols => 60, :rows => 10 %>

- -<%= submit_tag _('Save') %> +<%= submit_tag l(:button_save) %> <%= end_form_tag %> diff --git a/redmine/app/views/issues/edit.rhtml b/redmine/app/views/issues/edit.rhtml index 876542fbe..b8fc6ad4c 100644 --- a/redmine/app/views/issues/edit.rhtml +++ b/redmine/app/views/issues/edit.rhtml @@ -1,21 +1,21 @@ -

<%=_@issue.tracker.name%> #<%= @issue.id %> - <%= @issue.subject %>

+

<%= @issue.tracker.name %> #<%= @issue.id %> - <%= @issue.subject %>

<%= error_messages_for 'issue' %> <%= start_form_tag :action => 'edit', :id => @issue %>
-

<%=_('Status')%>: <%= @issue.status.name %>

+

<%=l(:field_status)%>: <%= @issue.status.name %>

-


+


-


+


<%= options_from_collection_for_select @project.issue_categories, "id", "name", @issue.category_id %>

-

*
+

*
<%= text_field 'issue', 'subject', :size => 60 %>

-

*
+

*
<%= text_area 'issue', 'description', :cols => 60, :rows => 10 %>

+ +


+<%= date_select 'issue', 'due_date', :start_year => Date.today.year, :include_blank => true %>

<% for custom_value in @custom_values %>

<%= custom_field_tag_with_label custom_value %>

<% end %> -


+


<%= options_from_collection_for_select @status_options, "id", "name" %> - <%= submit_tag _ "Update..." %> + <%= submit_tag l(:button_change) %> <%= end_form_tag %>    <% end %> <% if authorize_for('issues', 'destroy') %> <%= start_form_tag ({:controller => 'issues', :action => 'destroy', :id => @issue} ) %> - <%= submit_tag _ "Delete" %> + <%= submit_tag l(:button_delete) %> <%= end_form_tag %>    <% end %> @@ -46,7 +47,7 @@

-

<%=_('History')%>

+

<%=l(:label_history)%>

<% for history in @issue.histories.find(:all, :include => :author) %> @@ -64,7 +65,7 @@
-

<%=_('Attachments')%>

+

<%=l(:label_attachment_plural)%>

<% for attachment in @issue.attachments %> @@ -74,7 +75,7 @@ <% if authorize_for('issues', 'destroy_attachment') %> <% end %> @@ -84,8 +85,8 @@
<% if authorize_for('issues', 'add_attachment') %> <%= start_form_tag ({ :controller => 'issues', :action => 'add_attachment', :id => @issue }, :multipart => true) %> - <%=_('Add file')%>: <%= file_field 'attachment', 'file' %> - <%= submit_tag _('Add') %> + <%=l(:label_attachment_new)%>: <%= file_field 'attachment', 'file' %> + <%= submit_tag l(:button_add) %> <%= end_form_tag %> <% end %> diff --git a/redmine/app/views/layouts/base.rhtml b/redmine/app/views/layouts/base.rhtml index de99a0b4a..dd85ed5c3 100644 --- a/redmine/app/views/layouts/base.rhtml +++ b/redmine/app/views/layouts/base.rhtml @@ -14,33 +14,33 @@
<%= start_form_tag :action => 'destroy_attachment', :id => @issue, :attachment_id => attachment %> - <%= submit_tag _('Delete'), :class => "button-small" %> + <%= submit_tag l(:button_delete), :class => "button-small" %> <%= end_form_tag %>