Dynamic I18n labels in Active Admin filters render as Proc objects instead of translated strings #8718
Replies: 1 comment 10 replies
-
Hello, To address your question:
|
Beta Was this translation helpful? Give feedback.
8000
-
Hello, To address your question:
|
Beta Was this translation helpful? Give feedback.
-
Active Admin Version: [
3.3
]Rails Version: [
7.2
]Description:
The label for a filter in Active Admin, when attempting to be dynamically translated using either a
Proc
or a lambda (->
) that callsI18n.t
, does not update dynamically when the application's locale is changed at runtime. Instead of the translated string, the rawProc
or lambda object is rendered as the filter label in the user interface until the Rails server is restarted.Steps to Reproduce:
Using a Proc:
Using a Lambda:
Expected Behavior:
The filter label defined using a
Proc
or a lambda (->
) that callsI18n.t
should be evaluated on each request and update dynamically to reflect the currently selected locale.Actual Behavior:
The filter label is rendered as the string representation of the
Proc
or lambda object.Beta Was this translation helpful? Give feedback.
All reactions