From dd01d0e630151849241b923a268ca5276db71053 Mon Sep 17 00:00:00 2001 From: Ewoud Kohl van Wijngaarden Date: Fri, 7 Jul 2023 18:26:20 +0200 Subject: [PATCH] Refs #36575 - [WIP] Avoid i18n during startup --- app/services/input_type/base.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/services/input_type/base.rb b/app/services/input_type/base.rb index b30588d3e1c..2f5ec330d63 100644 --- a/app/services/input_type/base.rb +++ b/app/services/input_type/base.rb @@ -52,8 +52,11 @@ def self.attributes(*attrs) def self.api_params_for_input_group(context) attributes.each do |attr| + # TODO: humanized_name is translated, but that can't work context.param attr, String, required: false, - desc: format(N_('%{input_type_attr_name}, used when input type is %{input_type}'), input_type_attr_name: attr.to_s.humanize, input_type: humanized_name) + desc: format(N_('%{input_type_attr_name}, used when input type is %{input_type}'), + input_type_attr_name: ->() { attr.to_s.humanize }, + input_type: ->() { humanized_name }) end end