Fix form labels #1004

Merged
tonyvince merged 4 commits from fix-#1001 into main 2024-07-22 22:04:55 +08:00
tonyvince commented 2024-07-21 03:20:58 +08:00 (Migrated from github.com)

Fix #1001

Fix #1001
zachgoll (Migrated from github.com) reviewed 2024-07-22 21:29:45 +08:00
zachgoll (Migrated from github.com) left a comment

Really nice solution here!

I like this as our fallback, but I think we need to provide an explicit label in order to leverage I18n translations correct? Or is there a more automated way to handle that via model translations that you know of?

Really nice solution here! I like this as our fallback, but I think we need to provide an explicit label in order to leverage I18n translations correct? Or is there a more automated way to handle that via model translations that you know of?
tonyvince commented 2024-07-22 21:52:47 +08:00 (Migrated from github.com)

I think we need to provide an explicit label in order to leverage I18n translations correct? Or is there a more automated way to handle that via model translations that you know of?

Not sure I understand what you mean fully but label: true as we have here is the automaded way of handling them via model translation. A custom label like label: t(".email") will still work with this solution

> I think we need to provide an explicit label in order to leverage I18n translations correct? Or is there a more automated way to handle that via model translations that you know of? Not sure I understand what you mean fully but `label: true` as we have [here](https://github.com/maybe-finance/maybe/blob/main/app/views/accounts/accountables/_investment.html.erb#L1) is the [automaded](https://api.rubyonrails.org/v7.1.3.4/classes/ActionView/Helpers/FormHelper.html#method-i-label) way of handling them via model translation. A custom label like `label: t(".email")` will still work with this solution
zachgoll commented 2024-07-22 22:04:50 +08:00 (Migrated from github.com)

@tonyvince my bad, I see what you mean now! I had missed that piece of logic when updating the forms.

@tonyvince my bad, I see what you mean now! I had missed that piece of logic when updating the forms.
Sign in to join this conversation.