I’m trying to make the authenticate button text for an external authentication provider configurable.
However, since the
auth_provider call must be outside of
after_initialize (because it must be loaded before OmniAuth is initialized) I am running into some impediments
I18n is not working.
SiteSetting is not there yet.
I found out that
GlobalSetting is usable at this stage, but I would prefer to use one of the above methods, since those can be changed from within the Admin web interface and a GlobalSetting cannot.
Is there something I can do to be able to use SiteSetting or I18n here?
So I have
auth_provider title: 'with provider'
I can use
auth_provider title: GlobalSetting.try(:name_of_setting)
But I would like to use
auth_provider title: SiteSetting.name_of_setting
auth_provider title: I18n.t('button_text_slug')