Unable to customize invalid email domain message


(Joshua Rosenfeld) #1

Attempting to customize the text of invalid email domain message. I’ve tried changing every other text block on both the login page and popup, and everything else works. Not sure if this is a bug, or somehow possibly related to a subfolder install (highly doubt it).




(Rafael dos Santos Silva) #2

The key is user.email.not_allowed


(Joshua Rosenfeld) #3

Right, look at screenshot 1 (zoomed in for screenshot 2) above, I changed that key.


(Simon Cossar) #4

There was something like this with some other text that couldn’t be translated. The problem then was that the I18n.t function was being passed a symbol instead of a string. Maybe that’s what is happening here. Doing a search for user.email.not_allowed shows that it is being passed as a symbol.

# email_validator.rb
...
    if record.errors[attribute].blank? && value && ScreenedEmail.should_block?(value)
      record.errors.add(attribute, I18n.t(:'user.email.blocked'))
    end

(Régis Hanol) #5

Just pushed a fix to support both string and symbol as key for translations :banana:

@jomaxro would you mind updating to latest and trying again?


(Joshua Rosenfeld) #6

Updating now…one moment please!


Thanks @zogstrip, looks good!


(Régis Hanol) #7