Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Respect month locale in Gantt pdf export

Alexanderabb5c2340a75
diff --git a/app/models/work_package/pdf_export/export/gantt/gantt_builder.rb b/app/models/work_package/pdf_export/export/gantt/gantt_builder.rb
index 1af1b7ee16a..4e726f2f424 100644
--- a/app/models/work_package/pdf_export/export/gantt/gantt_builder.rb
+++ b/app/models/work_package/pdf_export/export/gantt/gantt_builder.rb
@@ -317,7 +317,7 @@ module WorkPackage::PDFExport::Export::Gantt
build_header_cells_parts(columns, top, height,
->(date) { [date.year, date.month] },
->(date, month_tuple) { date.year == month_tuple[0] && date.month == month_tuple[1] },
- ->(month_tuple) { Date.new(month_tuple[0], month_tuple[1], 1).strftime("%b") })
+ ->(month_tuple) { I18n.l(Date.new(month_tuple[0], month_tuple[1], 1), format: "%b") })
end
def build_header_cells_weeks(top, height, columns)