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

[#62319] PDF Export: Templates selection not translated

as-op0f92f75739ca
diff --git a/app/models/type/pdf_export_templates.rb b/app/models/type/pdf_export_templates.rb
index 96dce81c6ca..21a7a11a4be 100644
--- a/app/models/type/pdf_export_templates.rb
+++ b/app/models/type/pdf_export_templates.rb
@@ -84,10 +84,4 @@ class Type::PdfExportTemplates
ordered_template_ids.insert(position, template_id)
@type.export_templates_order = ordered_template_ids
end
-
- private
-
- def built_in_templates
- ::WorkPackage::PDFExport::Templates::TEMPLATES
- end
end
diff --git a/app/models/work_package/pdf_export/templates.rb b/app/models/work_package/pdf_export/templates.rb
index d99c887e679..46515824e67 100644
--- a/app/models/work_package/pdf_export/templates.rb
+++ b/app/models/work_package/pdf_export/templates.rb
@@ -29,16 +29,18 @@
#++
module WorkPackage::PDFExport::Templates
- TEMPLATES = [
- {
- id: "attributes",
- label: I18n.t("pdf_generator.template_attributes.label"),
- caption: I18n.t("pdf_generator.template_attributes.caption")
- },
- {
- id: "contract",
- label: I18n.t("pdf_generator.template_contract.label"),
- caption: I18n.t("pdf_generator.template_contract.caption")
- }
- ].freeze
+ def built_in_templates
+ [
+ {
+ id: "attributes",
+ label: I18n.t("pdf_generator.template_attributes.label"),
+ caption: I18n.t("pdf_generator.template_attributes.caption")
+ },
+ {
+ id: "contract",
+ label: I18n.t("pdf_generator.template_contract.label"),
+ caption: I18n.t("pdf_generator.template_contract.caption")
+ }
+ ]
+ end
end