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:
parent
864ac367e8
commit
a4a8b6381e
|
@ -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)
|
||||
]
|
||||
|
|
|
@ -44,6 +44,7 @@ module TimelogHelper
|
|||
|
||||
def entries_to_csv(entries)
|
||||
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
|
||||
|
@ -67,7 +68,7 @@ module TimelogHelper
|
|||
(entry.issue ? entry.issue.id : nil),
|
||||
(entry.issue ? entry.issue.tracker : nil),
|
||||
(entry.issue ? entry.issue.subject : nil),
|
||||
entry.hours,
|
||||
entry.hours.to_s.gsub('.', decimal_separator),
|
||||
entry.comments
|
||||
]
|
||||
csv << fields.collect {|c| begin; ic.iconv(c.to_s); rescue; c.to_s; end }
|
||||
|
|
|
@ -48,6 +48,7 @@ general_text_no: 'не'
|
|||
general_text_yes: 'да'
|
||||
general_lang_name: 'Bulgarian'
|
||||
general_csv_separator: ','
|
||||
general_csv_decimal_separator: '.'
|
||||
general_csv_encoding: UTF-8
|
||||
general_pdf_encoding: UTF-8
|
||||
general_day_names: Понеделник,Вторник,Сряда,Четвъртък,Петък,Събота,Неделя
|
||||
|
|
|
@ -51,6 +51,7 @@ general_text_no: 'ne'
|
|||
general_text_yes: 'ano'
|
||||
general_lang_name: 'Čeština'
|
||||
general_csv_separator: ','
|
||||
general_csv_decimal_separator: '.'
|
||||
general_csv_encoding: UTF-8
|
||||
general_pdf_encoding: UTF-8
|
||||
general_day_names: Pondělí,Úterý,Středa,Čtvrtek,Pátek,Sobota,Neděle
|
||||
|
|
|
@ -48,6 +48,7 @@ general_text_no: 'nej'
|
|||
general_text_yes: 'ja'
|
||||
general_lang_name: 'Danish (Dansk)'
|
||||
general_csv_separator: ','
|
||||
general_csv_decimal_separator: '.'
|
||||
general_csv_encoding: ISO-8859-1
|
||||
general_pdf_encoding: ISO-8859-1
|
||||
general_day_names: Mandag,Tirsdag,Onsdag,Torsdag,Fredag,Lørdag,Søndag
|
||||
|
|
|
@ -48,6 +48,7 @@ general_text_no: 'nein'
|
|||
general_text_yes: 'ja'
|
||||
general_lang_name: 'Deutsch'
|
||||
general_csv_separator: ';'
|
||||
general_csv_decimal_separator: ','
|
||||
general_csv_encoding: ISO-8859-1
|
||||
general_pdf_encoding: ISO-8859-1
|
||||
general_day_names: Montag,Dienstag,Mittwoch,Donnerstag,Freitag,Samstag,Sonntag
|
||||
|
|
|
@ -48,6 +48,7 @@ general_text_no: 'no'
|
|||
general_text_yes: 'yes'
|
||||
general_lang_name: 'English'
|
||||
general_csv_separator: ','
|
||||
general_csv_decimal_separator: '.'
|
||||
general_csv_encoding: ISO-8859-1
|
||||
general_pdf_encoding: ISO-8859-1
|
||||
general_day_names: Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday
|
||||
|
|
|
@ -48,6 +48,7 @@ general_text_no: 'no'
|
|||
general_text_yes: 'sí'
|
||||
general_lang_name: 'Español'
|
||||
general_csv_separator: ';'
|
||||
general_csv_decimal_separator: ','
|
||||
general_csv_encoding: ISO-8859-15
|
||||
general_pdf_encoding: ISO-8859-15
|
||||
general_day_names: Lunes,Martes,Miércoles,Jueves,Viernes,Sábado,Domingo
|
||||
|
|
|
@ -48,6 +48,7 @@ general_text_no: 'ei'
|
|||
general_text_yes: 'kyllä'
|
||||
general_lang_name: 'Finnish (Suomi)'
|
||||
general_csv_separator: ','
|
||||
general_csv_decimal_separator: '.'
|
||||
general_csv_encoding: ISO-8859-1
|
||||
general_pdf_encoding: ISO-8859-1
|
||||
general_day_names: Maanantai,Tiistai,Keskiviikko,Torstai,Perjantai,Lauantai,Sunnuntai
|
||||
|
|
|
@ -48,6 +48,7 @@ general_text_no: 'non'
|
|||
general_text_yes: 'oui'
|
||||
general_lang_name: 'Français'
|
||||
general_csv_separator: ';'
|
||||
general_csv_decimal_separator: ','
|
||||
general_csv_encoding: ISO-8859-1
|
||||
general_pdf_encoding: ISO-8859-1
|
||||
general_day_names: Lundi,Mardi,Mercredi,Jeudi,Vendredi,Samedi,Dimanche
|
||||
|
|
|
@ -48,6 +48,7 @@ general_text_no: 'לא'
|
|||
general_text_yes: 'כן'
|
||||
general_lang_name: 'Hebrew (עברית)'
|
||||
general_csv_separator: ','
|
||||
general_csv_decimal_separator: '.'
|
||||
general_csv_encoding: ISO-8859-8-I
|
||||
general_pdf_encoding: ISO-8859-8-I
|
||||
general_day_names: שני,שלישי,רביעי,חמישי,שישי,שבת,ראשון
|
||||
|
|
|
@ -48,6 +48,7 @@ general_text_no: 'nem'
|
|||
general_text_yes: 'igen'
|
||||
general_lang_name: 'Magyar'
|
||||
general_csv_separator: ','
|
||||
general_csv_decimal_separator: '.'
|
||||
general_csv_encoding: ISO-8859-2
|
||||
general_pdf_encoding: ISO-8859-2
|
||||
general_day_names: Hétfő,Kedd,Szerda,Csütörtök,Péntek,Szombat,Vasárnap
|
||||
|
|
|
@ -48,6 +48,7 @@ general_text_no: 'no'
|
|||
general_text_yes: 'si'
|
||||
general_lang_name: 'Italiano'
|
||||
general_csv_separator: ','
|
||||
general_csv_decimal_separator: '.'
|
||||
general_csv_encoding: ISO-8859-1
|
||||
general_pdf_encoding: ISO-8859-1
|
||||
general_day_names: Lunedì,Martedì,Mercoledì,Giovedì,Venerdì,Sabato,Domenica
|
||||
|
|
|
@ -49,6 +49,7 @@ general_text_no: 'いいえ'
|
|||
general_text_yes: 'はい'
|
||||
general_lang_name: 'Japanese (日本語)'
|
||||
general_csv_separator: ','
|
||||
general_csv_decimal_separator: '.'
|
||||
general_csv_encoding: SJIS
|
||||
general_pdf_encoding: UTF-8
|
||||
general_day_names: 月曜日,火曜日,水曜日,木曜日,金曜日,土曜日,日曜日
|
||||
|
|
|
@ -48,6 +48,7 @@ general_text_no: '아니오'
|
|||
general_text_yes: '예'
|
||||
general_lang_name: 'Korean (한국어)'
|
||||
general_csv_separator: ','
|
||||
general_csv_decimal_separator: '.'
|
||||
general_csv_encoding: CP949
|
||||
general_pdf_encoding: CP949
|
||||
general_day_names: 월요일,화요일,수요일,목요일,금요일,토요일,일요일
|
||||
|
|
|
@ -48,6 +48,7 @@ general_text_no: 'ne'
|
|||
general_text_yes: 'taip'
|
||||
general_lang_name: 'Lithuanian (lietuvių)'
|
||||
general_csv_separator: ','
|
||||
general_csv_decimal_separator: '.'
|
||||
general_csv_encoding: UTF-8
|
||||
general_pdf_encoding: UTF-8
|
||||
general_day_names: pirmadienis,antradienis,trečiadienis,ketvirtadienis,penktadienis,šeštadienis,sekmadienis
|
||||
|
|
|
@ -48,6 +48,7 @@ general_text_no: 'nee'
|
|||
general_text_yes: 'ja'
|
||||
general_lang_name: 'Nederlands'
|
||||
general_csv_separator: ','
|
||||
general_csv_decimal_separator: '.'
|
||||
general_csv_encoding: ISO-8859-1
|
||||
general_pdf_encoding: ISO-8859-1
|
||||
general_day_names: Maandag, Dinsdag, Woensdag, Donderdag, Vrijdag, Zaterdag, Zondag
|
||||
|
|
|
@ -48,6 +48,7 @@ general_text_no: 'nei'
|
|||
general_text_yes: 'ja'
|
||||
general_lang_name: 'Norwegian (Norsk bokmål)'
|
||||
general_csv_separator: ','
|
||||
general_csv_decimal_separator: '.'
|
||||
general_csv_encoding: ISO-8859-1
|
||||
general_pdf_encoding: ISO-8859-1
|
||||
general_day_names: Mandag,Tirsdag,Onsdag,Torsdag,Fredag,Lørdag,Søndag
|
||||
|
|
|
@ -48,6 +48,7 @@ general_text_no: 'nie'
|
|||
general_text_yes: 'tak'
|
||||
general_lang_name: 'Polski'
|
||||
general_csv_separator: ','
|
||||
general_csv_decimal_separator: '.'
|
||||
general_csv_encoding: ISO-8859-2
|
||||
general_pdf_encoding: ISO-8859-2
|
||||
general_day_names: Poniedziałek,Wtorek,Środa,Czwartek,Piątek,Sobota,Niedziela
|
||||
|
|
|
@ -48,6 +48,7 @@ general_text_no: 'não'
|
|||
general_text_yes: 'sim'
|
||||
general_lang_name: 'Português(Brasil)'
|
||||
general_csv_separator: ','
|
||||
general_csv_decimal_separator: '.'
|
||||
general_csv_encoding: ISO-8859-1
|
||||
general_pdf_encoding: ISO-8859-1
|
||||
general_day_names: Segunda,Terça,Quarta,Quinta,Sexta,Sabado,Domingo
|
||||
|
|
|
@ -48,6 +48,7 @@ general_text_no: 'não'
|
|||
general_text_yes: 'sim'
|
||||
general_lang_name: 'Português'
|
||||
general_csv_separator: ','
|
||||
general_csv_decimal_separator: '.'
|
||||
general_csv_encoding: ISO-8859-1
|
||||
general_pdf_encoding: ISO-8859-1
|
||||
general_day_names: Segunda,Terça,Quarta,Quinta,Sexta,Sábado,Domingo
|
||||
|
|
|
@ -48,6 +48,7 @@ general_text_no: 'nu'
|
|||
general_text_yes: 'da'
|
||||
general_lang_name: 'Română'
|
||||
general_csv_separator: ','
|
||||
general_csv_decimal_separator: '.'
|
||||
general_csv_encoding: ISO-8859-1
|
||||
general_pdf_encoding: ISO-8859-1
|
||||
general_day_names: Luni,Marti,Miercuri,Joi,Vineri,Sambata,Duminica
|
||||
|
|
|
@ -48,6 +48,7 @@ general_text_no: 'Нет'
|
|||
general_text_yes: 'Да'
|
||||
general_lang_name: 'Russian (Русский)'
|
||||
general_csv_separator: ','
|
||||
general_csv_decimal_separator: '.'
|
||||
general_csv_encoding: UTF-8
|
||||
general_pdf_encoding: UTF-8
|
||||
general_day_names: Понедельник,Вторник,Среда,Четверг,Пятница,Суббота,Воскресенье
|
||||
|
|
|
@ -48,6 +48,7 @@ general_text_no: 'ne'
|
|||
general_text_yes: 'da'
|
||||
general_lang_name: 'Srpski'
|
||||
general_csv_separator: ','
|
||||
general_csv_decimal_separator: '.'
|
||||
general_csv_encoding: ISO-8859-1
|
||||
general_pdf_encoding: ISO-8859-1
|
||||
general_day_names: Ponedeljak, Utorak, Sreda, četvrtak, Petak, Subota, Nedelja
|
||||
|
|
|
@ -48,6 +48,7 @@ general_text_no: 'nej'
|
|||
general_text_yes: 'ja'
|
||||
general_lang_name: 'Svenska'
|
||||
general_csv_separator: ','
|
||||
general_csv_decimal_separator: '.'
|
||||
general_csv_encoding: ISO-8859-1
|
||||
general_pdf_encoding: ISO-8859-1
|
||||
general_day_names: Måndag,Tisdag,Onsdag,Torsdag,Fredag,Lördag,Söndag
|
||||
|
|
|
@ -48,6 +48,7 @@ general_text_no: 'ไม่'
|
|||
general_text_yes: 'ใช่'
|
||||
general_lang_name: 'Thai (ไทย)'
|
||||
general_csv_separator: ','
|
||||
general_csv_decimal_separator: '.'
|
||||
general_csv_encoding: Windows-874
|
||||
general_pdf_encoding: cp874
|
||||
general_day_names: จันทร์,อังคาร,พุธ,พฤหัสบดี,ศุกร์,เสาร์,อาทิตย์
|
||||
|
|
|
@ -48,6 +48,7 @@ general_text_no: 'Ні'
|
|||
general_text_yes: 'Так'
|
||||
general_lang_name: 'Ukrainian (Українська)'
|
||||
general_csv_separator: ','
|
||||
general_csv_decimal_separator: '.'
|
||||
general_csv_encoding: UTF-8
|
||||
general_pdf_encoding: UTF-8
|
||||
general_day_names: Понеділок,Вівторок,Середа,Четвер,П'ятниця,Субота,Неділя
|
||||
|
|
|
@ -48,6 +48,7 @@ general_text_no: '否'
|
|||
general_text_yes: '是'
|
||||
general_lang_name: 'Traditional Chinese (繁體中文)'
|
||||
general_csv_separator: ','
|
||||
general_csv_decimal_separator: '.'
|
||||
general_csv_encoding: Big5
|
||||
general_pdf_encoding: Big5
|
||||
general_day_names: 星期一,星期二,星期三,星期四,星期五,星期六,星期日
|
||||
|
|
|
@ -48,6 +48,7 @@ general_text_no: '否'
|
|||
general_text_yes: '是'
|
||||
general_lang_name: 'Simplified Chinese (简体中文)'
|
||||
general_csv_separator: ','
|
||||
general_csv_decimal_separator: '.'
|
||||
general_csv_encoding: gb2312
|
||||
general_pdf_encoding: gb2312
|
||||
general_day_names: 星期一,星期二,星期三,星期四,星期五,星期六,星期日
|
||||
|
|
Loading…
Reference in New Issue