“I recall there being a method to ensure Rails treats the translations in my de.yml file as definitive, without altering them. Does anyone have knowledge on how to implement this?”
what I mean is this:
<%= form.label t("facilities.form.facility_is_combined_label") %>
calls this translation entry:
facility_is_combined_label: "Teil einer Kompakt-/Kombianlage"
and renders this in the form:
Teil einer kompakt-/kombianlage
Is there any way to tell rails not to do that? (7.1.2) read this: https://guides.rubyonrails.org/i18n.html no luck. Tried some fixes that worked in 2013, no luck. Searching but can’t find a fix. Some helpful helper method calls humanize it seems but how to turn that off…
Dude
put this into /config/initializers/active_record_overrides.rb :
module ActiveRecord
class Base
def self.human_attribute_name(attribute, options = {})
I18n.t("activerecord.attributes.#{model_name.i18n_key}.#{attribute}", **options, default: attribute.to_s)
end
end
end