diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb index e8f21e9a..f42002ec 100644 --- a/app/helpers/issues_helper.rb +++ b/app/helpers/issues_helper.rb @@ -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) ] diff --git a/app/helpers/timelog_helper.rb b/app/helpers/timelog_helper.rb index db13556a..7fd70e74 100644 --- a/app/helpers/timelog_helper.rb +++ b/app/helpers/timelog_helper.rb @@ -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 } diff --git a/lang/bg.yml b/lang/bg.yml index 1339d9a8..fd6e7e6c 100644 --- a/lang/bg.yml +++ b/lang/bg.yml @@ -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: Понеделник,Вторник,Сряда,Четвъртък,Петък,Събота,Неделя diff --git a/lang/cs.yml b/lang/cs.yml index 00d0642d..2c760722 100644 --- a/lang/cs.yml +++ b/lang/cs.yml @@ -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 diff --git a/lang/da.yml b/lang/da.yml index b8546ab2..d51d3081 100644 --- a/lang/da.yml +++ b/lang/da.yml @@ -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 diff --git a/lang/de.yml b/lang/de.yml index 6bc7919f..2bc0a16f 100644 --- a/lang/de.yml +++ b/lang/de.yml @@ -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 diff --git a/lang/en.yml b/lang/en.yml index 7ab73f05..180a7056 100644 --- a/lang/en.yml +++ b/lang/en.yml @@ -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 diff --git a/lang/es.yml b/lang/es.yml index 2615d8f6..44d48190 100644 --- a/lang/es.yml +++ b/lang/es.yml @@ -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 diff --git a/lang/fi.yml b/lang/fi.yml index 51b0c04a..ad719dd6 100644 --- a/lang/fi.yml +++ b/lang/fi.yml @@ -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 diff --git a/lang/fr.yml b/lang/fr.yml index 1fd86dd0..89b0b4c8 100644 --- a/lang/fr.yml +++ b/lang/fr.yml @@ -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 diff --git a/lang/he.yml b/lang/he.yml index 7455fc39..501cfdc9 100644 --- a/lang/he.yml +++ b/lang/he.yml @@ -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: שני,שלישי,רביעי,חמישי,שישי,שבת,ראשון diff --git a/lang/hu.yml b/lang/hu.yml index 1810e93d..6f88eb96 100644 --- a/lang/hu.yml +++ b/lang/hu.yml @@ -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 diff --git a/lang/it.yml b/lang/it.yml index 867c73f9..14dc86ff 100644 --- a/lang/it.yml +++ b/lang/it.yml @@ -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 diff --git a/lang/ja.yml b/lang/ja.yml index aa4320c3..5bdc3b55 100644 --- a/lang/ja.yml +++ b/lang/ja.yml @@ -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: 月曜日,火曜日,水曜日,木曜日,金曜日,土曜日,日曜日 diff --git a/lang/ko.yml b/lang/ko.yml index f945537a..8e0d35ef 100644 --- a/lang/ko.yml +++ b/lang/ko.yml @@ -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: 월요일,화요일,수요일,목요일,금요일,토요일,일요일 diff --git a/lang/lt.yml b/lang/lt.yml index 355f473c..df2e2b47 100644 --- a/lang/lt.yml +++ b/lang/lt.yml @@ -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 diff --git a/lang/nl.yml b/lang/nl.yml index 89b8a573..d1facc7a 100644 --- a/lang/nl.yml +++ b/lang/nl.yml @@ -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 diff --git a/lang/no.yml b/lang/no.yml index 5e4bdcca..bf25a15a 100644 --- a/lang/no.yml +++ b/lang/no.yml @@ -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 diff --git a/lang/pl.yml b/lang/pl.yml index 0b0f87b6..28c5f19d 100644 --- a/lang/pl.yml +++ b/lang/pl.yml @@ -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 diff --git a/lang/pt-br.yml b/lang/pt-br.yml index e2036afd..04c3b347 100644 --- a/lang/pt-br.yml +++ b/lang/pt-br.yml @@ -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 diff --git a/lang/pt.yml b/lang/pt.yml index 543743ca..5a1ffc2e 100644 --- a/lang/pt.yml +++ b/lang/pt.yml @@ -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 diff --git a/lang/ro.yml b/lang/ro.yml index 16c2ea10..3a1696c7 100644 --- a/lang/ro.yml +++ b/lang/ro.yml @@ -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 diff --git a/lang/ru.yml b/lang/ru.yml index 10ea1aad..7d0707f7 100644 --- a/lang/ru.yml +++ b/lang/ru.yml @@ -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: Понедельник,Вторник,Среда,Четверг,Пятница,Суббота,Воскресенье diff --git a/lang/sr.yml b/lang/sr.yml index 83bfdf43..5b8e5d93 100644 --- a/lang/sr.yml +++ b/lang/sr.yml @@ -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 diff --git a/lang/sv.yml b/lang/sv.yml index 375970f3..4c6170f4 100644 --- a/lang/sv.yml +++ b/lang/sv.yml @@ -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 diff --git a/lang/th.yml b/lang/th.yml index acbf146c..e7f276a3 100644 --- a/lang/th.yml +++ b/lang/th.yml @@ -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: จันทร์,อังคาร,พุธ,พฤหัสบดี,ศุกร์,เสาร์,อาทิตย์ diff --git a/lang/uk.yml b/lang/uk.yml index d70916b1..275de0e4 100644 --- a/lang/uk.yml +++ b/lang/uk.yml @@ -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: Понеділок,Вівторок,Середа,Четвер,П'ятниця,Субота,Неділя diff --git a/lang/zh-tw.yml b/lang/zh-tw.yml index 46263357..26ffa946 100644 --- a/lang/zh-tw.yml +++ b/lang/zh-tw.yml @@ -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: 星期一,星期二,星期三,星期四,星期五,星期六,星期日 diff --git a/lang/zh.yml b/lang/zh.yml index f412f848..2bd0880a 100644 --- a/lang/zh.yml +++ b/lang/zh.yml @@ -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: 星期一,星期二,星期三,星期四,星期五,星期六,星期日