Feature #3597 » redmine-upgrade-to-rails-2.3.4.patch
| app/controllers/application.rb | ||
|---|---|---|
|
# redMine - project management software
|
||
|
# Copyright (C) 2006-2007 Jean-Philippe Lang
|
||
|
#
|
||
|
# This program is free software; you can redistribute it and/or
|
||
|
# modify it under the terms of the GNU General Public License
|
||
|
# as published by the Free Software Foundation; either version 2
|
||
|
# of the License, or (at your option) any later version.
|
||
|
#
|
||
|
# This program is distributed in the hope that it will be useful,
|
||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
|
# GNU General Public License for more details.
|
||
|
#
|
||
|
# You should have received a copy of the GNU General Public License
|
||
|
# along with this program; if not, write to the Free Software
|
||
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||
|
require 'uri'
|
||
|
require 'cgi'
|
||
|
class ApplicationController < ActionController::Base
|
||
|
include Redmine::I18n
|
||
|
|
||
|
# In case the cookie store secret changes
|
||
|
rescue_from CGI::Session::CookieStore::TamperedWithCookie do |exception|
|
||
|
render :text => 'Your session was invalid and has been reset. Please, reload this page.', :status => 500
|
||
|
end
|
||
|
|
||
|
layout 'base'
|
||
|
|
||
|
before_filter :user_setup, :check_if_login_required, :set_localization
|
||
|
filter_parameter_logging :password
|
||
|
|
||
|
include Redmine::MenuManager::MenuController
|
||
|
helper Redmine::MenuManager::MenuHelper
|
||
|
|
||
|
REDMINE_SUPPORTED_SCM.each do |scm|
|
||
|
require_dependency "repository/#{scm.underscore}"
|
||
|
end
|
||
|
|
||
|
def user_setup
|
||
|
# Check the settings cache for each request
|
||
|
Setting.check_cache
|
||
|
# Find the current user
|
||
|
User.current = find_current_user
|
||
|
end
|
||
|
|
||
|
# Returns the current user or nil if no user is logged in
|
||
|
# and starts a session if needed
|
||
|
def find_current_user
|
||
|
if session[:user_id]
|
||
|
# existing session
|
||
|
(User.active.find(session[:user_id]) rescue nil)
|
||
|
elsif cookies[:autologin] && Setting.autologin?
|
||
|
# auto-login feature starts a new session
|
||
|
user = User.try_to_autologin(cookies[:autologin])
|
||
|
session[:user_id] = user.id if user
|
||
|
user
|
||
|
elsif params[:format] == 'atom' && params[:key] && accept_key_auth_actions.include?(params[:action])
|
||
|
# RSS key authentication does not start a session
|
||
|
User.find_by_rss_key(params[:key])
|
||
|
end
|
||
|
end
|
||
|
|
||
|
# Sets the logged in user
|
||
|
def logged_user=(user)
|
||
|
if user && user.is_a?(User)
|
||
|
User.current = user
|
||
|
session[:user_id] = user.id
|
||
|
else
|
||
|
User.current = User.anonymous
|
||
|
session[:user_id] = nil
|
||
|
end
|
||
|
end
|
||
|
|
||
|
# check if login is globally required to access the application
|
||
|
def check_if_login_required
|
||
|
# no check needed if user is already logged in
|
||
|
return true if User.current.logged?
|
||
|
require_login if Setting.login_required?
|
||
|
end
|
||
|
|
||
|
def set_localization
|
||
|
lang = nil
|
||
|
if User.current.logged?
|
||
|
lang = find_language(User.current.language)
|
||
|
end
|
||
|
if lang.nil? && request.env['HTTP_ACCEPT_LANGUAGE']
|
||
|
accept_lang = parse_qvalues(request.env['HTTP_ACCEPT_LANGUAGE']).first.downcase
|
||
|
if !accept_lang.blank?
|
||
|
lang = find_language(accept_lang) || find_language(accept_lang.split('-').first)
|
||
|
end
|
||
|
end
|
||
|
lang ||= Setting.default_language
|
||
|
set_language_if_valid(lang)
|
||
|
end
|
||
|
|
||
|
def require_login
|
||
|
if !User.current.logged?
|
||
|
redirect_to :controller => "account", :action => "login", :back_url => url_for(params)
|
||
|
return false
|
||
|
end
|
||
|
true
|
||
|
end
|
||
|
def require_admin
|
||
|
return unless require_login
|
||
|
if !User.current.admin?
|
||
|
render_403
|
||
|
return false
|
||
|
end
|
||
|
true
|
||
|
end
|
||
|
|
||
|
def deny_access
|
||
|
User.current.logged? ? render_403 : require_login
|
||
|
end
|
||
|
# Authorize the user for the requested action
|
||
|
def authorize(ctrl = params[:controller], action = params[:action], global = false)
|
||
|
allowed = User.current.allowed_to?({:controller => ctrl, :action => action}, @project, :global => global)
|
||
|
allowed ? true : deny_access
|
||
|
end
|
||
|
# Authorize the user for the requested action outside a project
|
||
|
def authorize_global(ctrl = params[:controller], action = params[:action], global = true)
|
||
|
authorize(ctrl, action, global)
|
||
|
end
|
||
|
|
||
|
# make sure that the user is a member of the project (or admin) if project is private
|
||
|
# used as a before_filter for actions that do not require any particular permission on the project
|
||
|
def check_project_privacy
|
||
|
if @project && @project.active?
|
||
|
if @project.is_public? || User.current.member_of?(@project) || User.current.admin?
|
||
|
true
|
||
|
else
|
||
|
User.current.logged? ? render_403 : require_login
|
||
|
end
|
||
|
else
|
||
|
@project = nil
|
||
|
render_404
|
||
|
false
|
||
|
end
|
||
|
end
|
||
|
def redirect_back_or_default(default)
|
||
|
back_url = CGI.unescape(params[:back_url].to_s)
|
||
|
if !back_url.blank?
|
||
|
begin
|
||
|
uri = URI.parse(back_url)
|
||
|
# do not redirect user to another host or to the login or register page
|
||
|
if (uri.relative? || (uri.host == request.host)) && !uri.path.match(%r{/(login|account/register)})
|
||
|
redirect_to(back_url) and return
|
||
|
end
|
||
|
rescue URI::InvalidURIError
|
||
|
# redirect to default
|
||
|
end
|
||
|
end
|
||
|
redirect_to default
|
||
|
end
|
||
|
|
||
|
def render_403
|
||
|
@project = nil
|
||
|
render :template => "common/403", :layout => !request.xhr?, :status => 403
|
||
|
return false
|
||
|
end
|
||
|
|
||
|
def render_404
|
||
|
render :template => "common/404", :layout => !request.xhr?, :status => 404
|
||
|
return false
|
||
|
end
|
||
|
|
||
|
def render_error(msg)
|
||
|
flash.now[:error] = msg
|
||
|
render :text => '', :layout => !request.xhr?, :status => 500
|
||
|
end
|
||
|
|
||
|
def render_feed(items, options={})
|
||
|
@items = items || []
|
||
|
@items.sort! {|x,y| y.event_datetime <=> x.event_datetime }
|
||
|
@items = @items.slice(0, Setting.feeds_limit.to_i)
|
||
|
@title = options[:title] || Setting.app_title
|
||
|
render :template => "common/feed.atom.rxml", :layout => false, :content_type => 'application/atom+xml'
|
||
|
end
|
||
|
|
||
|
def self.accept_key_auth(*actions)
|
||
|
actions = actions.flatten.map(&:to_s)
|
||
|
write_inheritable_attribute('accept_key_auth_actions', actions)
|
||
|
end
|
||
|
|
||
|
def accept_key_auth_actions
|
||
|
self.class.read_inheritable_attribute('accept_key_auth_actions') || []
|
||
|
end
|
||
|
|
||
|
# TODO: move to model
|
||
|
def attach_files(obj, attachments)
|
||
|
attached = []
|
||
|
unsaved = []
|
||
|
if attachments && attachments.is_a?(Hash)
|
||
|
attachments.each_value do |attachment|
|
||
|
file = attachment['file']
|
||
|
next unless file && file.size > 0
|
||
|
a = Attachment.create(:container => obj,
|
||
|
:file => file,
|
||
|
:description => attachment['description'].to_s.strip,
|
||
|
:author => User.current)
|
||
|
a.new_record? ? (unsaved << a) : (attached << a)
|
||
|
end
|
||
|
if unsaved.any?
|
||
|
flash[:warning] = l(:warning_attachments_not_saved, unsaved.size)
|
||
|
end
|
||
|
end
|
||
|
attached
|
||
|
end
|
||
|
# Returns the number of objects that should be displayed
|
||
|
# on the paginated list
|
||
|
def per_page_option
|
||
|
per_page = nil
|
||
|
if params[:per_page] && Setting.per_page_options_array.include?(params[:per_page].to_s.to_i)
|
||
|
per_page = params[:per_page].to_s.to_i
|
||
|
session[:per_page] = per_page
|
||
|
elsif session[:per_page]
|
||
|
per_page = session[:per_page]
|
||
|
else
|
||
|
per_page = Setting.per_page_options_array.first || 25
|
||
|
end
|
||
|
per_page
|
||
|
end
|
||
|
# qvalues http header parser
|
||
|
# code taken from webrick
|
||
|
def parse_qvalues(value)
|
||
|
tmp = []
|
||
|
if value
|
||
|
parts = value.split(/,\s*/)
|
||
|
parts.each {|part|
|
||
|
if m = %r{^([^\s,]+?)(?:;\s*q=(\d+(?:\.\d+)?))?$}.match(part)
|
||
|
val = m[1]
|
||
|
q = (m[2] or 1).to_f
|
||
|
tmp.push([val, q])
|
||
|
end
|
||
|
}
|
||
|
tmp = tmp.sort_by{|val, q| -q}
|
||
|
tmp.collect!{|val, q| val}
|
||
|
end
|
||
|
return tmp
|
||
|
rescue
|
||
|
nil
|
||
|
end
|
||
|
|
||
|
# Returns a string that can be used as filename value in Content-Disposition header
|
||
|
def filename_for_content_disposition(name)
|
||
|
request.env['HTTP_USER_AGENT'] =~ %r{MSIE} ? ERB::Util.url_encode(name) : name
|
||
|
end
|
||
|
end
|
||
| app/controllers/application_controller.rb | ||
|---|---|---|
|
# redMine - project management software
|
||
|
# Copyright (C) 2006-2007 Jean-Philippe Lang
|
||
|
#
|
||
|
# This program is free software; you can redistribute it and/or
|
||
|
# modify it under the terms of the GNU General Public License
|
||
|
# as published by the Free Software Foundation; either version 2
|
||
|
# of the License, or (at your option) any later version.
|
||
|
#
|
||
|
# This program is distributed in the hope that it will be useful,
|
||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
|
# GNU General Public License for more details.
|
||
|
#
|
||
|
# You should have received a copy of the GNU General Public License
|
||
|
# along with this program; if not, write to the Free Software
|
||
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||
|
require 'uri'
|
||
|
require 'cgi'
|
||
|
class ApplicationController < ActionController::Base
|
||
|
include Redmine::I18n
|
||
|
layout 'base'
|
||
|
|
||
|
before_filter :user_setup, :check_if_login_required, :set_localization
|
||
|
filter_parameter_logging :password
|
||
|
|
||
|
include Redmine::MenuManager::MenuController
|
||
|
helper Redmine::MenuManager::MenuHelper
|
||
|
|
||
|
REDMINE_SUPPORTED_SCM.each do |scm|
|
||
|
require_dependency "repository/#{scm.underscore}"
|
||
|
end
|
||
|
|
||
|
def user_setup
|
||
|
# Check the settings cache for each request
|
||
|
Setting.check_cache
|
||
|
# Find the current user
|
||
|
User.current = find_current_user
|
||
|
end
|
||
|
|
||
|
# Returns the current user or nil if no user is logged in
|
||
|
# and starts a session if needed
|
||
|
def find_current_user
|
||
|
if session[:user_id]
|
||
|
# existing session
|
||
|
(User.active.find(session[:user_id]) rescue nil)
|
||
|
elsif cookies[:autologin] && Setting.autologin?
|
||
|
# auto-login feature starts a new session
|
||
|
user = User.try_to_autologin(cookies[:autologin])
|
||
|
session[:user_id] = user.id if user
|
||
|
user
|
||
|
elsif params[:format] == 'atom' && params[:key] && accept_key_auth_actions.include?(params[:action])
|
||
|
# RSS key authentication does not start a session
|
||
|
User.find_by_rss_key(params[:key])
|
||
|
end
|
||
|
end
|
||
|
|
||
|
# Sets the logged in user
|
||
|
def logged_user=(user)
|
||
|
if user && user.is_a?(User)
|
||
|
User.current = user
|
||
|
session[:user_id] = user.id
|
||
|
else
|
||
|
User.current = User.anonymous
|
||
|
session[:user_id] = nil
|
||
|
end
|
||
|
end
|
||
|
|
||
|
# check if login is globally required to access the application
|
||
|
def check_if_login_required
|
||
|
# no check needed if user is already logged in
|
||
|
return true if User.current.logged?
|
||
|
require_login if Setting.login_required?
|
||
|
end
|
||
|
|
||
|
def set_localization
|
||
|
lang = nil
|
||
|
if User.current.logged?
|
||
|
lang = find_language(User.current.language)
|
||
|
end
|
||
|
if lang.nil? && request.env['HTTP_ACCEPT_LANGUAGE']
|
||
|
accept_lang = parse_qvalues(request.env['HTTP_ACCEPT_LANGUAGE']).first.downcase
|
||
|
if !accept_lang.blank?
|
||
|
lang = find_language(accept_lang) || find_language(accept_lang.split('-').first)
|
||
|
end
|
||
|
end
|
||
|
lang ||= Setting.default_language
|
||
|
set_language_if_valid(lang)
|
||
|
end
|
||
|
|
||
|
def require_login
|
||
|
if !User.current.logged?
|
||
|
redirect_to :controller => "account", :action => "login", :back_url => url_for(params)
|
||
|
return false
|
||
|
end
|
||
|
true
|
||
|
end
|
||
|
def require_admin
|
||
|
return unless require_login
|
||
|
if !User.current.admin?
|
||
|
render_403
|
||
|
return false
|
||
|
end
|
||
|
true
|
||
|
end
|
||
|
|
||
|
def deny_access
|
||
|
User.current.logged? ? render_403 : require_login
|
||
|
end
|
||
|
# Authorize the user for the requested action
|
||
|
def authorize(ctrl = params[:controller], action = params[:action], global = false)
|
||
|
allowed = User.current.allowed_to?({:controller => ctrl, :action => action}, @project, :global => global)
|
||
|
allowed ? true : deny_access
|
||
|
end
|
||
|
# Authorize the user for the requested action outside a project
|
||
|
def authorize_global(ctrl = params[:controller], action = params[:action], global = true)
|
||
|
authorize(ctrl, action, global)
|
||
|
end
|
||
|
|
||
|
# make sure that the user is a member of the project (or admin) if project is private
|
||
|
# used as a before_filter for actions that do not require any particular permission on the project
|
||
|
def check_project_privacy
|
||
|
if @project && @project.active?
|
||
|
if @project.is_public? || User.current.member_of?(@project) || User.current.admin?
|
||
|
true
|
||
|
else
|
||
|
User.current.logged? ? render_403 : require_login
|
||
|
end
|
||
|
else
|
||
|
@project = nil
|
||
|
render_404
|
||
|
false
|
||
|
end
|
||
|
end
|
||
|
def redirect_back_or_default(default)
|
||
|
back_url = CGI.unescape(params[:back_url].to_s)
|
||
|
if !back_url.blank?
|
||
|
begin
|
||
|
uri = URI.parse(back_url)
|
||
|
# do not redirect user to another host or to the login or register page
|
||
|
if (uri.relative? || (uri.host == request.host)) && !uri.path.match(%r{/(login|account/register)})
|
||
|
redirect_to(back_url) and return
|
||
|
end
|
||
|
rescue URI::InvalidURIError
|
||
|
# redirect to default
|
||
|
end
|
||
|
end
|
||
|
redirect_to default
|
||
|
end
|
||
|
|
||
|
def render_403
|
||
|
@project = nil
|
||
|
render :template => "common/403", :layout => !request.xhr?, :status => 403
|
||
|
return false
|
||
|
end
|
||
|
|
||
|
def render_404
|
||
|
render :template => "common/404", :layout => !request.xhr?, :status => 404
|
||
|
return false
|
||
|
end
|
||
|
|
||
|
def render_error(msg)
|
||
|
flash.now[:error] = msg
|
||
|
render :text => '', :layout => !request.xhr?, :status => 500
|
||
|
end
|
||
|
|
||
|
def render_feed(items, options={})
|
||
|
@items = items || []
|
||
|
@items.sort! {|x,y| y.event_datetime <=> x.event_datetime }
|
||
|
@items = @items.slice(0, Setting.feeds_limit.to_i)
|
||
|
@title = options[:title] || Setting.app_title
|
||
|
render :template => "common/feed.atom.rxml", :layout => false, :content_type => 'application/atom+xml'
|
||
|
end
|
||
|
|
||
|
def self.accept_key_auth(*actions)
|
||
|
actions = actions.flatten.map(&:to_s)
|
||
|
write_inheritable_attribute('accept_key_auth_actions', actions)
|
||
|
end
|
||
|
|
||
|
def accept_key_auth_actions
|
||
|
self.class.read_inheritable_attribute('accept_key_auth_actions') || []
|
||
|
end
|
||
|
|
||
|
# TODO: move to model
|
||
|
def attach_files(obj, attachments)
|
||
|
attached = []
|
||
|
unsaved = []
|
||
|
if attachments && attachments.is_a?(Hash)
|
||
|
attachments.each_value do |attachment|
|
||
|
file = attachment['file']
|
||
|
next unless file && file.size > 0
|
||
|
a = Attachment.create(:container => obj,
|
||
|
:file => file,
|
||
|
:description => attachment['description'].to_s.strip,
|
||
|
:author => User.current)
|
||
|
a.new_record? ? (unsaved << a) : (attached << a)
|
||
|
end
|
||
|
if unsaved.any?
|
||
|
flash[:warning] = l(:warning_attachments_not_saved, unsaved.size)
|
||
|
end
|
||
|
end
|
||
|
attached
|
||
|
end
|
||
|
# Returns the number of objects that should be displayed
|
||
|
# on the paginated list
|
||
|
def per_page_option
|
||
|
per_page = nil
|
||
|
if params[:per_page] && Setting.per_page_options_array.include?(params[:per_page].to_s.to_i)
|
||
|
per_page = params[:per_page].to_s.to_i
|
||
|
session[:per_page] = per_page
|
||
|
elsif session[:per_page]
|
||
|
per_page = session[:per_page]
|
||
|
else
|
||
|
per_page = Setting.per_page_options_array.first || 25
|
||
|
end
|
||
|
per_page
|
||
|
end
|
||
|
# qvalues http header parser
|
||
|
# code taken from webrick
|
||
|
def parse_qvalues(value)
|
||
|
tmp = []
|
||
|
if value
|
||
|
parts = value.split(/,\s*/)
|
||
|
parts.each {|part|
|
||
|
if m = %r{^([^\s,]+?)(?:;\s*q=(\d+(?:\.\d+)?))?$}.match(part)
|
||
|
val = m[1]
|
||
|
q = (m[2] or 1).to_f
|
||
|
tmp.push([val, q])
|
||
|
end
|
||
|
}
|
||
|
tmp = tmp.sort_by{|val, q| -q}
|
||
|
tmp.collect!{|val, q| val}
|
||
|
end
|
||
|
return tmp
|
||
|
rescue
|
||
|
nil
|
||
|
end
|
||
|
|
||
|
# Returns a string that can be used as filename value in Content-Disposition header
|
||
|
def filename_for_content_disposition(name)
|
||
|
request.env['HTTP_USER_AGENT'] =~ %r{MSIE} ? ERB::Util.url_encode(name) : name
|
||
|
end
|
||
|
end
|
||
| app/controllers/repositories_controller.rb | ||
|---|---|---|
|
def graph_commits_per_author(repository)
|
||
|
commits_by_author = repository.changesets.count(:all, :group => :committer)
|
||
|
commits_by_author.sort! {|x, y| x.last <=> y.last}
|
||
|
commits_by_author.to_a.sort! {|x, y| x.last <=> y.last}
|
||
|
changes_by_author = repository.changes.count(:all, :group => :committer)
|
||
|
h = changes_by_author.inject({}) {|o, i| o[i.first] = i.last; o}
|
||
| app/views/settings/_authentication.rhtml | ||
|---|---|---|
|
<div class="box tabular settings">
|
||
|
<p><label><%= l(:setting_login_required) %></label>
|
||
|
<%= check_box_tag 'settings[login_required]', 1, Setting.login_required? %><%= hidden_field_tag 'settings[login_required]', 0 %></p>
|
||
|
<%= hidden_field_tag 'settings[login_required]', 0 %>
|
||
|
<%= check_box_tag 'settings[login_required]', 1, Setting.login_required? %>
|
||
|
</p>
|
||
|
<p><label><%= l(:setting_autologin) %></label>
|
||
|
<%= select_tag 'settings[autologin]', options_for_select( [[l(:label_disabled), "0"]] + [1, 7, 30, 365].collect{|days| [l('datetime.distance_in_words.x_days', :count => days), days.to_s]}, Setting.autologin) %></p>
|
||
| ... | ... | |
|
<%= text_field_tag 'settings[password_min_length]', Setting.password_min_length, :size => 6 %></p>
|
||
|
<p><label><%= l(:label_password_lost) %></label>
|
||
|
<%= check_box_tag 'settings[lost_password]', 1, Setting.lost_password? %><%= hidden_field_tag 'settings[lost_password]', 0 %></p>
|
||
|
<%= hidden_field_tag 'settings[lost_password]', 0 %>
|
||
|
<%= check_box_tag 'settings[lost_password]', 1, Setting.lost_password? %>
|
||
|
</p>
|
||
|
<p><label><%= l(:setting_openid) %></label>
|
||
|
<%= check_box_tag 'settings[openid]', 1, Setting.openid?, :disabled => !Object.const_defined?(:OpenID) %><%= hidden_field_tag 'settings[openid]', 0 %></p>
|
||
|
<%= hidden_field_tag 'settings[openid]', 0 %>
|
||
|
<%= check_box_tag 'settings[openid]', 1, Setting.openid?, :disabled => !Object.const_defined?(:OpenID) %>
|
||
|
</p>
|
||
|
</div>
|
||
|
<div style="float:right;">
|
||
| app/views/settings/_display.rhtml | ||
|---|---|---|
|
<%= select_tag 'settings[user_format]', options_for_select( @options[:user_format], Setting.user_format.to_s ) %></p>
|
||
|
<p><label><%= l(:setting_gravatar_enabled) %></label>
|
||
|
<%= check_box_tag 'settings[gravatar_enabled]', 1, Setting.gravatar_enabled? %><%= hidden_field_tag 'settings[gravatar_enabled]', 0 %></p>
|
||
|
<%= hidden_field_tag 'settings[gravatar_enabled]', 0 %>
|
||
|
<%= check_box_tag 'settings[gravatar_enabled]', 1, Setting.gravatar_enabled? %>
|
||
|
</p>
|
||
|
</div>
|
||
|
<%= submit_tag l(:button_save) %>
|
||
| app/views/settings/_issues.rhtml | ||
|---|---|---|
|
<div class="box tabular settings">
|
||
|
<p><label><%= l(:setting_cross_project_issue_relations) %></label>
|
||
|
<%= check_box_tag 'settings[cross_project_issue_relations]', 1, Setting.cross_project_issue_relations? %><%= hidden_field_tag 'settings[cross_project_issue_relations]', 0 %></p>
|
||
|
<%= hidden_field_tag 'settings[cross_project_issue_relations]', 0 %>
|
||
|
<%= check_box_tag 'settings[cross_project_issue_relations]', 1, Setting.cross_project_issue_relations? %>
|
||
|
</p>
|
||
|
<p><label><%= l(:setting_display_subprojects_issues) %></label>
|
||
|
<%= check_box_tag 'settings[display_subprojects_issues]', 1, Setting.display_subprojects_issues? %><%= hidden_field_tag 'settings[display_subprojects_issues]', 0 %></p>
|
||
|
<%= hidden_field_tag 'settings[display_subprojects_issues]', 0 %>
|
||
|
<%= check_box_tag 'settings[display_subprojects_issues]', 1, Setting.display_subprojects_issues? %>
|
||
|
</p>
|
||
|
<p><label><%= l(:setting_issues_export_limit) %></label>
|
||
|
<%= text_field_tag 'settings[issues_export_limit]', Setting.issues_export_limit, :size => 6 %></p>
|
||
| app/views/settings/_mail_handler.rhtml | ||
|---|---|---|
|
<div class="box tabular settings">
|
||
|
<p><label><%= l(:setting_mail_handler_api_enabled) %></label>
|
||
|
<%= hidden_field_tag 'settings[mail_handler_api_enabled]', 0 %>
|
||
|
<%= check_box_tag 'settings[mail_handler_api_enabled]', 1, Setting.mail_handler_api_enabled?,
|
||
|
:onclick => "if (this.checked) { Form.Element.enable('settings_mail_handler_api_key'); } else { Form.Element.disable('settings_mail_handler_api_key'); }" %>
|
||
|
<%= hidden_field_tag 'settings[mail_handler_api_enabled]', 0 %></p>
|
||
|
</p>
|
||
|
<p><label><%= l(:setting_mail_handler_api_key) %></label>
|
||
|
<%= text_field_tag 'settings[mail_handler_api_key]', Setting.mail_handler_api_key,
|
||
| app/views/settings/_notifications.rhtml | ||
|---|---|---|
|
<%= text_field_tag 'settings[mail_from]', Setting.mail_from, :size => 60 %></p>
|
||
|
<p><label><%= l(:setting_bcc_recipients) %></label>
|
||
|
<%= hidden_field_tag 'settings[bcc_recipients]', 0 %>
|
||
|
<%= check_box_tag 'settings[bcc_recipients]', 1, Setting.bcc_recipients? %>
|
||
|
<%= hidden_field_tag 'settings[bcc_recipients]', 0 %></p>
|
||
|
</p>
|
||
|
<p><label><%= l(:setting_plain_text_mail) %></label>
|
||
|
<%= hidden_field_tag 'settings[plain_text_mail]', 0 %>
|
||
|
<%= check_box_tag 'settings[plain_text_mail]', 1, Setting.plain_text_mail? %>
|
||
|
<%= hidden_field_tag 'settings[plain_text_mail]', 0 %></p>
|
||
|
</p>
|
||
|
</div>
|
||
|
<fieldset class="box" id="notified_events"><legend><%=l(:text_select_mail_notifications)%></legend>
|
||
| app/views/settings/_projects.rhtml | ||
|---|---|---|
|
<div class="box tabular settings">
|
||
|
<p><label><%= l(:setting_default_projects_public) %></label>
|
||
|
<%= check_box_tag 'settings[default_projects_public]', 1, Setting.default_projects_public? %><%= hidden_field_tag 'settings[default_projects_public]', 0 %></p>
|
||
|
<%= hidden_field_tag 'settings[default_projects_public]', 0 %>
|
||
|
<%= check_box_tag 'settings[default_projects_public]', 1, Setting.default_projects_public? %>
|
||
|
</p>
|
||
|
<p><label><%= l(:setting_sequential_project_identifiers) %></label>
|
||
|
<%= check_box_tag 'settings[sequential_project_identifiers]', 1, Setting.sequential_project_identifiers? %><%= hidden_field_tag 'settings[sequential_project_identifiers]', 0 %></p>
|
||
|
<%= hidden_field_tag 'settings[sequential_project_identifiers]', 0 %>
|
||
|
<%= check_box_tag 'settings[sequential_project_identifiers]', 1, Setting.sequential_project_identifiers? %>
|
||
|
</p>
|
||
|
<p><label><%= l(:setting_new_project_user_role_id) %></label>
|
||
|
<%= select_tag('settings[new_project_user_role_id]', options_for_select([["--- #{l(:actionview_instancetag_blank_option)} ---", '']] + Role.find_all_givable.collect {|r| [r.name, r.id]}, Setting.new_project_user_role_id.to_i)) %></p>
|
||
| app/views/settings/_repositories.rhtml | ||
|---|---|---|
|
<div class="box tabular settings">
|
||
|
<p><label><%= l(:setting_autofetch_changesets) %></label>
|
||
|
<%= check_box_tag 'settings[autofetch_changesets]', 1, Setting.autofetch_changesets? %><%= hidden_field_tag 'settings[autofetch_changesets]', 0 %></p>
|
||
|
<%= hidden_field_tag 'settings[autofetch_changesets]', 0 %>
|
||
|
<%= check_box_tag 'settings[autofetch_changesets]', 1, Setting.autofetch_changesets? %>
|
||
|
</p>
|
||
|
<p><label><%= l(:setting_sys_api_enabled) %></label>
|
||
|
<%= check_box_tag 'settings[sys_api_enabled]', 1, Setting.sys_api_enabled? %><%= hidden_field_tag 'settings[sys_api_enabled]', 0 %></p>
|
||
|
<%= hidden_field_tag 'settings[sys_api_enabled]', 0 %>
|
||
|
<%= check_box_tag 'settings[sys_api_enabled]', 1, Setting.sys_api_enabled? %>
|
||
|
</p>
|
||
|
<p><label><%= l(:setting_enabled_scm) %></label>
|
||
|
<% REDMINE_SUPPORTED_SCM.each do |scm| -%>
|
||
| config/boot.rb | ||
|---|---|---|
|
# Don't change this file!
|
||
|
# Configure your app in config/environment.rb and config/environments/*.rb
|
||
|
RAILS_ROOT = File.expand_path("#{File.dirname(__FILE__)}/..") unless defined?(RAILS_ROOT)
|
||
|
RAILS_ROOT = "#{File.dirname(__FILE__)}/.." unless defined?(RAILS_ROOT)
|
||
|
module Rails
|
||
|
class << self
|
||
| ... | ... | |
|
def load_initializer
|
||
|
require "#{RAILS_ROOT}/vendor/rails/railties/lib/initializer"
|
||
|
Rails::Initializer.run(:install_gem_spec_stubs)
|
||
|
Rails::GemDependency.add_frozen_gem_path
|
||
|
end
|
||
|
end
|
||
| ... | ... | |
|
end
|
||
|
def load_rubygems
|
||
|
min_version = '1.3.2'
|
||
|
require 'rubygems'
|
||
|
min_version = '1.3.1'
|
||
|
unless rubygems_version >= min_version
|
||
|
$stderr.puts %Q(Rails requires RubyGems >= #{min_version} (you have #{rubygems_version}). Please `gem update --system` and try again.)
|
||
|
exit 1
|
||
| config/environment.rb | ||
|---|---|---|
|
# ENV['RAILS_ENV'] ||= 'production'
|
||
|
# Specifies gem version of Rails to use when vendor/rails is not present
|
||
|
RAILS_GEM_VERSION = '2.2.2' unless defined? RAILS_GEM_VERSION
|
||
|
RAILS_GEM_VERSION = '2.3.4' unless defined? RAILS_GEM_VERSION
|
||
|
# Bootstrap the Rails environment, frameworks, and default configuration
|
||
|
require File.join(File.dirname(__FILE__), 'boot')
|
||
| config/initializers/10-patches.rb | ||
|---|---|---|
|
end
|
||
|
else
|
||
|
attr_name = @base.class.human_attribute_name(attr)
|
||
|
full_messages << attr_name + ' ' + message
|
||
|
full_messages << attr_name + ' ' + message.to_s
|
||
|
end
|
||
|
end
|
||
|
end
|
||
| config/initializers/backtrace_silencers.rb | ||
|---|---|---|
|
# Be sure to restart your server when you modify this file.
|
||
|
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
|
||
|
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
|
||
|
# You can also remove all the silencers if you're trying do debug a problem that might steem from framework code.
|
||
|
# Rails.backtrace_cleaner.remove_silencers!
|
||
| config/initializers/inflections.rb | ||
|---|---|---|
|
# Be sure to restart your server when you modify this file.
|
||
|
# Add new inflection rules using the following format
|
||
|
# (all these examples are active by default):
|
||
|
# ActiveSupport::Inflector.inflections do |inflect|
|
||
|
# inflect.plural /^(ox)$/i, '\1en'
|
||
|
# inflect.singular /^(ox)en/i, '\1'
|
||
|
# inflect.irregular 'person', 'people'
|
||
|
# inflect.uncountable %w( fish sheep )
|
||
|
# end
|
||
| config/locales/bg.yml | ||
|---|---|---|
|
over_x_years:
|
||
|
one: "over 1 year"
|
||
|
other: "over {{count}} years"
|
||
|
number:
|
||
|
human:
|
||
|
format:
|
||
|
precision: 1
|
||
|
delimiter: ""
|
||
|
storage_units:
|
||
|
format: "%n %u"
|
||
|
units:
|
||
|
kb: KB
|
||
|
tb: TB
|
||
|
gb: GB
|
||
|
byte:
|
||
|
one: Byte
|
||
|
other: Bytes
|
||
|
mb: 'MB'
|
||
|
|
||
|
# Used in array.to_sentence.
|
||
|
support:
|
||
| ... | ... | |
|
text_journal_changed: "{{label}} changed from {{old}} to {{new}}"
|
||
|
text_journal_set_to: "{{label}} set to {{value}}"
|
||
|
text_journal_deleted: "{{label}} deleted"
|
||
| config/locales/bs.yml | ||
|---|---|---|
|
format:
|
||
|
delimiter: ""
|
||
|
precision: 1
|
||
|
storage_units:
|
||
|
format: "%n %u"
|
||
|
units:
|
||
|
byte:
|
||
|
one: "Byte"
|
||
|
other: "Bytes"
|
||
|
kb: "KB"
|
||
|
mb: "MB"
|
||
|
gb: "GB"
|
||
|
tb: "TB"
|
||
|
|
||
|
# Used in array.to_sentence.
|
||
|
support:
|
||
| config/locales/ca.yml | ||
|---|---|---|
|
over_x_years:
|
||
|
one: "més d'un any"
|
||
|
other: "més de {{count}} anys"
|
||
|
number:
|
||
|
human:
|
||
|
format:
|
||
|
delimiter: ""
|
||
|
precision: 1
|
||
|
storage_units:
|
||
|
format: "%n %u"
|
||
|
units:
|
||
|
byte:
|
||
|
one: "Byte"
|
||
|
other: "Bytes"
|
||
|
kb: "KB"
|
||
|
mb: "MB"
|
||
|
gb: "GB"
|
||
|
tb: "TB"
|
||
|
|
||
|
# Used in array.to_sentence.
|
||
|
support:
|
||
| config/locales/cs.yml | ||
|---|---|---|
|
over_x_years:
|
||
|
one: "více než 1 rok"
|
||
|
other: "více než {{count}} roky"
|
||
|
number:
|
||
|
human:
|
||
|
format:
|
||
|
precision: 1
|
||
|
delimiter: ""
|
||
|
storage_units:
|
||
|
format: "%n %u"
|
||
|
units:
|
||
|
kb: KB
|
||
|
tb: TB
|
||
|
gb: GB
|
||
|
byte:
|
||
|
one: Byte
|
||
|
other: Bytes
|
||
|
mb: MB
|
||
|
|
||
|
# Used in array.to_sentence.
|
||
|
support:
|
||
| config/locales/da.yml | ||
|---|---|---|
|
# separator:
|
||
|
delimiter: ""
|
||
|
precision: 1
|
||
|
storage_units: [Bytes, KB, MB, GB, TB]
|
||
|
storage_units:
|
||
|
format: "%n %u"
|
||
|
units:
|
||
|
byte:
|
||
|
one: "Byte"
|
||
|
other: "Bytes"
|
||
|
kb: "KB"
|
||
|
mb: "MB"
|
||
|
gb: "GB"
|
||
|
tb: "TB"
|
||
|
percentage:
|
||
|
format:
|
||
|
# separator:
|
||
| config/locales/de.yml | ||
|---|---|---|
|
format:
|
||
|
delimiter: ""
|
||
|
precision: 1
|
||
|
storage_units:
|
||
|
format: "%n %u"
|
||
|
units:
|
||
|
byte:
|
||
|
one: "Byte"
|
||
|
other: "Bytes"
|
||
|
kb: "KB"
|
||
|
mb: "MB"
|
||
|
gb: "GB"
|
||
|
tb: "TB"
|
||
|
support:
|
||
|
array:
|
||
| config/locales/el.yml | ||
|---|---|---|
|
one: "πάνω από 1 χρόνο"
|
||
|
other: "πάνω από {{count}} χρόνια"
|
||
|
|
||
|
number:
|
||
|
human:
|
||
|
format:
|
||
|
precision: 1
|
||
|
delimiter: ""
|
||
|
storage_units:
|
||
|
format: "%n %u"
|
||
|
units:
|
||
|
kb: KB
|
||
|
tb: TB
|
||
|
gb: GB
|
||
|
byte:
|
||
|
one: Byte
|
||
|
other: Bytes
|
||
|
mb: MB
|
||
|
# Used in array.to_sentence.
|
||
|
support:
|
||
|
array:
|
||
| config/locales/en.yml | ||
|---|---|---|
|
over_x_years:
|
||
|
one: "over 1 year"
|
||
|
other: "over {{count}} years"
|
||
|
number:
|
||
|
human:
|
||
|
format:
|
||
|
delimiter: ""
|
||
|
precision: 1
|
||
|
storage_units:
|
||
|
format: "%n %u"
|
||
|
units:
|
||
|
byte:
|
||
|
one: "Byte"
|
||
|
other: "Bytes"
|
||
|
kb: "KB"
|
||
|
mb: "MB"
|
||
|
gb: "GB"
|
||
|
tb: "TB"
|
||
|
|
||
|
# Used in array.to_sentence.
|
||
|
support:
|
||
| config/locales/es.yml | ||
|---|---|---|
|
# separator:
|
||
|
delimiter: ""
|
||
|
precision: 1
|
||
|
storage_units:
|
||
|
format: "%n %u"
|
||
|
units:
|
||
|
byte:
|
||
|
one: "Byte"
|
||
|
other: "Bytes"
|
||
|
kb: "KB"
|
||
|
mb: "MB"
|
||
|
gb: "GB"
|
||
|
tb: "TB"
|
||
|
# Used in distance_of_time_in_words(), distance_of_time_in_words_to_now(), time_ago_in_words()
|
||
|
datetime:
|
||
| config/locales/fi.yml | ||
|---|---|---|
|
format:
|
||
|
delimiter: ""
|
||
|
precision: 1
|
||
|
storage_units: [Tavua, KB, MB, GB, TB]
|
||
|
storage_units:
|
||
|
format: "%n %u"
|
||
|
units:
|
||
|
byte:
|
||
|
one: "Tavua"
|
||
|
other: "Tavua"
|
||
|
kb: "KB"
|
||
|
mb: "MB"
|
||
|
gb: "GB"
|
||
|
tb: "TB"
|
||
|
|
||
|
datetime:
|
||
|
distance_in_words:
|
||
| config/locales/fr.yml | ||
|---|---|---|
|
human:
|
||
|
format:
|
||
|
precision: 2
|
||
|
storage_units: [ Octet, ko, Mo, Go, To ]
|
||
|
storage_units:
|
||
|
format: "%n %u"
|
||
|
units:
|
||
|
byte:
|
||
|
one: "Octet"
|
||
|
other: "Octet"
|
||
|
kb: "ko"
|
||
|
mb: "Mo"
|
||
|
gb: "Go"
|
||
|
tb: "To"
|
||
|
|
||
|
support:
|
||
|
array:
|
||
| config/locales/gl.yml | ||
|---|---|---|
|
# separator:
|
||
|
delimiter: ""
|
||
|
precision: 1
|
||
|
storage_units:
|
||
|
format: "%n %u"
|
||
|
units:
|
||
|
byte:
|
||
|
one: "Byte"
|
||
|
other: "Bytes"
|
||
|
kb: "KB"
|
||
|
mb: "MB"
|
||
|
gb: "GB"
|
||
|
tb: "TB"
|
||
|
|
||
|
|
||
|
date:
|
||
| config/locales/he.yml | ||
|---|---|---|
|
unit: 'שח'
|
||
|
precision: 2
|
||
|
format: '%u %n'
|
||
|
human:
|
||
|
storage_units:
|
||
|
format: "%n %u"
|
||
|
units:
|
||
|
byte:
|
||
|
one: "Byte"
|
||
|
other: "Bytes"
|
||
|
kb: "KB"
|
||
|
mb: "MB"
|
||
|
gb: "GB"
|
||
|
tb: "TB"
|
||
|
|
||
|
support:
|
||
|
array:
|
||
| config/locales/hu.yml | ||
|---|---|---|
|
format:
|
||
|
delimiter: ""
|
||
|
precision: 1
|
||
|
storage_units: [bájt, KB, MB, GB, TB]
|
||
|
storage_units:
|
||
|
format: "%n %u"
|
||
|
units:
|
||
|
byte:
|
||
|
one: "bájt"
|
||
|
other: "bájt"
|
||
|
kb: "KB"
|
||
|
mb: "MB"
|
||
|
gb: "GB"
|
||
|
tb: "TB"
|
||
|
support:
|
||
|
array:
|
||
| config/locales/it.yml | ||
|---|---|---|
|
unit: '€'
|
||
|
precision: 2
|
||
|
format: '%n %u'
|
||
|
human:
|
||
|
storage_units:
|
||
|
format: "%n %u"
|
||
|
units:
|
||
|
byte:
|
||
|
one: "Byte"
|
||
|
other: "Bytes"
|
||
|
kb: "KB"
|
||
|
mb: "MB"
|
||
|
gb: "GB"
|
||
|
tb: "TB"
|
||
|
|
||
|
support:
|
||
|
array:
|
||
| config/locales/ja.yml | ||
|---|---|---|
|
format:
|
||
|
delimiter: ""
|
||
|
precision: 1
|
||
|
storage_units:
|
||
|
format: "%n %u"
|
||
|
units:
|
||
|
byte:
|
||
|
one: "Byte"
|
||
|
other: "Bytes"
|
||
|
kb: "KB"
|
||
|
mb: "MB"
|
||
|
gb: "GB"
|
||
|
tb: "TB"
|
||
|
activerecord:
|
||
|
errors:
|
||
| config/locales/ko.yml | ||
|---|---|---|
|
# separator:
|
||
|
delimiter: ""
|
||
|
precision: 1
|
||
|
storage_units: [Bytes, KB, MB, GB, TB]
|
||
|
storage_units:
|
||
|
format: "%n %u"
|
||
|
units:
|
||
|
byte:
|
||
|
one: "Byte"
|
||
|
other: "Bytes"
|
||
|
kb: "KB"
|
||
|
mb: "MB"
|
||
|
gb: "GB"
|
||
|
tb: "TB"
|
||
|
# Used in array.to_sentence.
|
||
|
support:
|
||
| config/locales/lt.yml | ||
|---|---|---|
|
format:
|
||
|
delimiter: ""
|
||
|
precision: 1
|
||
|
storage_units: [baitai, KB, MB, GB, TB]
|
||
|
storage_units:
|
||
|
format: "%n %u"
|
||
|
units:
|
||
|
byte:
|
||
|
one: "baitai"
|
||
|
other: "baitai"
|
||
|
kb: "KB"
|
||
|
mb: "MB"
|
||
|
gb: "GB"
|
||
|
tb: "TB"
|
||
|
datetime:
|
||
|
distance_in_words:
|
||
| config/locales/nl.yml | ||
|---|---|---|
|
over_x_years:
|
||
|
one: "over 1 jaar"
|
||
|
other: "over {{count}} jaren"
|
||
|
number:
|
||
|
human:
|
||
|
format:
|
||
|
precision: 1
|
||
|
delimiter: ""
|
||
|
storage_units:
|
||
|
format: "%n %u"
|
||
|
units:
|
||
|
kb: KB
|
||
|
tb: TB
|
||
|
gb: GB
|
||
|
byte:
|
||
|
one: Byte
|
||
|
other: Bytes
|
||
|
mb: MB
|
||
|
|
||
|
# Used in array.to_sentence.
|
||
|
support:
|
||
| config/locales/no.yml | ||
|---|---|---|
|
format:
|
||
|
delimiter: ""
|
||
|
precision: 4
|
||
|
human:
|
||
|
storage_units:
|
||
|
format: "%n %u"
|
||
|
units:
|
||
|
byte:
|
||
|
one: "Byte"
|
||
|
other: "Bytes"
|
||
|
kb: "KB"
|
||
|
mb: "MB"
|
||
|
gb: "GB"
|
||
|
tb: "TB"
|
||
|
activerecord:
|
||
|
errors:
|
||
|
template:
|
||
| config/locales/pl.yml | ||
|---|---|---|
|
format:
|
||
|
delimiter: ""
|
||
|
precision: 1
|
||
|
storage_units: [B, KB, MB, GB, TB]
|
||
|
storage_units:
|
||
|
format: "%n %u"
|
||
|
units:
|
||
|
byte:
|
||
|
one: "B"
|
||
|
other: "B"
|
||
|
kb: "KB"
|
||
|
mb: "MB"
|
||
|
gb: "GB"
|
||
|
tb: "TB"
|
||
|
date:
|
||
|
formats:
|
||
| config/locales/pt-BR.yml | ||
|---|---|---|
|
format:
|
||
|
precision: 1
|
||
|
delimiter: '.'
|
||
|
storage_units:
|
||
|
format: "%n %u"
|
||
|
units:
|
||
|
byte:
|
||
|
one: "Byte"
|
||
|
other: "Bytes"
|
||
|
kb: "KB"
|
||
|
mb: "MB"
|
||
|
gb: "GB"
|
||
|
tb: "TB"
|
||
|
support:
|
||
|
array:
|
||
|
sentence_connector: "e"
|
||
| config/locales/pt.yml | ||
|---|---|---|
|
format:
|
||
|
precision: 1
|
||
|
delimiter: ''
|
||
|
storage_units:
|
||
|
format: "%n %u"
|
||
|
units:
|
||
|
byte:
|
||
|
one: "Byte"
|
||
|
other: "Bytes"
|
||
|
kb: "KB"
|
||
|
mb: "MB"
|
||
|
gb: "GB"
|
||
|
tb: "TB"
|
||
|
activerecord:
|
||
|
errors:
|
||
| config/locales/ro.yml | ||
|---|---|---|
|
over_x_years:
|
||
|
one: "peste un an"
|
||
|
other: "peste {{count}} ani"
|
||
|
number:
|
||
|
human:
|
||
|
format:
|
||
|
precision: 1
|
||
|
delimiter: ""
|
||
|
storage_units:
|
||
|
format: "%n %u"
|
||
|
units:
|
||
|
kb: KB
|
||
|
tb: TB
|
||
|
gb: GB
|
||
|
byte:
|
||
|
one: Byte
|
||
|
other: Bytes
|
||
|
mb: MB
|
||
|
|
||
|
# Used in array.to_sentence.
|
||
|
support:
|
||
| config/locales/sk.yml | ||
|---|---|---|
|
text_journal_changed: "{{label}} changed from {{old}} to {{new}}"
|
||
|
text_journal_set_to: "{{label}} set to {{value}}"
|
||
|
text_journal_deleted: "{{label}} deleted"
|
||
|
number:
|
||
|
human:
|
||
|
format:
|
||
|
precision: 1
|
||
|
delimiter: ""
|
||
|
storage_units:
|
||
|
format: "%n %u"
|
||
|
units:
|
||
|
kb: KB
|
||
|
tb: TB
|
||
|
gb: GB
|
||
|
byte:
|
||
|
one: Byte
|
||
|
other: Bytes
|
||
|
mb: MB
|
||
| config/locales/sl.yml | ||
|---|---|---|
|
over_x_years:
|
||
|
one: "over 1 year"
|
||
|
other: "over {{count}} years"
|
||
|
number:
|
||
|
human:
|
||
|
format:
|
||
|
precision: 1
|
||
|
delimiter: ""
|
||
|
storage_units:
|
||
|
format: "%n %u"
|
||
|
units:
|
||
|
kb: KB
|
||
|
tb: TB
|
||
|
gb: GB
|
||
|
byte:
|
||
|
one: Byte
|
||
|
other: Bytes
|
||
|
mb: MB
|
||
|
|
||
|
# Used in array.to_sentence.
|
||
|
support:
|
||
| config/locales/sr.yml | ||
|---|---|---|
|
unit: 'ДИН'
|
||
|
precision: 2
|
||
|
format: '%n %u'
|
||
|
human:
|
||
|
storage_units:
|
||
|
format: "%n %u"
|
||
|
units:
|
||
|
byte:
|
||
|
one: "Byte"
|
||
|
other: "Bytes"
|
||
|
kb: "KB"
|
||
|
mb: "MB"
|
||
|
gb: "GB"
|
||
|
tb: "TB"
|
||
|
support:
|
||
|
array:
|
||
| config/locales/sv.yml | ||
|---|---|---|
|
# separator:
|
||
|
delimiter: ""
|
||
|
# precision: 1
|
||
|
storage_units: [Byte, KB, MB, GB, TB]
|
||
|
storage_units:
|
||
|
format: "%n %u"
|
||
|
units:
|
||
|
byte:
|
||
|
one: "Byte"
|
||
|
other: "Bytes"
|
||
|
kb: "KB"
|
||
|
mb: "MB"
|
||
|
gb: "GB"
|
||
|
tb: "TB"
|
||
|
# Used in distance_of_time_in_words(), distance_of_time_in_words_to_now(), time_ago_in_words()
|
||
|
datetime:
|
||
| config/locales/th.yml | ||
|---|---|---|
|
over_x_years:
|
||
|
one: "over 1 year"
|
||
|
other: "over {{count}} years"
|
||
|
number:
|
||
|
human:
|
||
|
format:
|
||
|
precision: 1
|
||
|
delimiter: ""
|
||
|
storage_units:
|
||
|
format: "%n %u"
|
||
|
units:
|
||
|
kb: KB
|
||
|
tb: TB
|
||
|
gb: GB
|
||
|
byte:
|
||
|
one: Byte
|
||
|
other: Bytes
|
||
|
mb: MB
|
||
|
|
||
|
# Used in array.to_sentence.
|
||
|
support:
|
||
| config/locales/tr.yml | ||
|---|---|---|
|
delimiter: '.'
|
||
|
separator: ','
|
||
|
precision: 2
|
||
|
storage_units:
|
||
|
format: "%n %u"
|
||
|
units:
|
||
|
byte:
|
||
|
one: "Byte"
|
||
|
other: "Bytes"
|
||
|
kb: "KB"
|
||
|
mb: "MB"
|
||
|
gb: "GB"
|
||
|
tb: "TB"
|
||
|
support:
|
||
|
array:
|
||
| config/locales/uk.yml | ||
|---|---|---|
|
over_x_years:
|
||
|
one: "over 1 year"
|
||
|
other: "over {{count}} years"
|
||
|
number:
|
||
|
human:
|
||
|
format:
|
||
|
precision: 1
|
||
|
delimiter: ""
|
||
|
storage_units:
|
||
|
format: "%n %u"
|
||
|
units:
|
||
|
kb: KB
|
||
|
tb: TB
|
||
|
gb: GB
|
||
|
byte:
|
||
|
one: Byte
|
||
|
other: Bytes
|
||
|
mb: MB
|
||
|
|
||
|
# Used in array.to_sentence.
|
||
|
support:
|
||