administrate icon indicating copy to clipboard operation
administrate copied to clipboard

Has one translations

Open pablobm opened this issue 2 years ago • 1 comments

Fixes #2185.

The template app/views/fields/has_one/_show.html.erb wasn't using the correct i18n key to translate the field names of the associated record.

This PR includes a heavy revamp of spec/administrate/views/fields/has_one/_show_spec.rb, which needed some TLC in order to work with it.

The diff for lib/administrate/field/associative.rb looks a bit misleading. The actual change is that I moved the definition of associated_class_name to be above the private declaration.

pablobm avatar May 26 '22 14:05 pablobm

@pablobm, do you think you could rebase this? I merged in #1941 and I can't work out how to combine them!

nickcharlton avatar Aug 08 '22 11:08 nickcharlton

@nickcharlton I think this is ready now. That was tricky! :sweat: There has to be a better way to test this stuff...

pablobm avatar Aug 11 '22 09:08 pablobm

Yeah, they're pretty rough! I didn't even know where to start when I tried myself!

nickcharlton avatar Aug 11 '22 09:08 nickcharlton