Adds a key in lang files (general_csv_decimal_separator) to set the decimal separator (point or comma) in csv exports (#1372).

git-svn-id: http://redmine.rubyforge.org/svn/trunk@1591 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang committed 2008-06-26 19:46:57 +00:00
1 parent 864ac367e8
commit a4a8b6381e
29 files changed
+31 -2

No files matched your search

+2 -1
View File
@@ -126,6 +126,7 @@ module IssuesHelper
def issues_to_csv(issues, project = nil)
ic = Iconv.new(l(:general_csv_encoding), 'UTF-8')
decimal_separator = l(:general_csv_decimal_separator)
export = StringIO.new
CSV::Writer.generate(export, l(:general_csv_separator)) do |csv|
# csv header fields
@@ -168,7 +169,7 @@ module IssuesHelper
format_date(issue.start_date),
format_date(issue.due_date),
issue.done_ratio,
issue.estimated_hours,
issue.estimated_hours.to_s.gsub('.', decimal_separator),
format_time(issue.created_on),
format_time(issue.updated_on)
]