File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,7 +6,9 @@ class Base < Phlex::HTML
66
77 # Include any helpers you want to be available across all components
88 include Phlex ::Rails ::Helpers ::Routes
9- include Phlex ::Rails ::Helpers ::Translate
9+
10+ register_value_helper :t
11+ register_value_helper :translate
1012
1113 register_value_helper :current_user
1214 register_value_helper :policy
Original file line number Diff line number Diff line change @@ -35,13 +35,13 @@ def render?
3535 def before_template
3636 case @following
3737 when :pending
38- @i18n_key = ".pending" # i18n-tasks-use t('components.follow_button.pending')
38+ @i18n_key = "components.follow_button .pending" # i18n-tasks-use t('components.follow_button.pending')
3939 @icon = "hourglass-split"
4040 when :accepted
41- @i18n_key = ".unfollow" # i18n-tasks-use t('components.follow_button.unfollow')
41+ @i18n_key = "components.follow_button .unfollow" # i18n-tasks-use t('components.follow_button.unfollow')
4242 @icon = "person-x-fill"
4343 else
44- @i18n_key = ".follow" # i18n-tasks-use t('components.follow_button.follow')
44+ @i18n_key = "components.follow_button .follow" # i18n-tasks-use t('components.follow_button.follow')
4545 @icon = "person-plus-fill"
4646 end
4747 if @signed_out
You can’t perform that action at this time.
0 commit comments