Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted June 13, 20222 yr This is the English message that appears on screen right after registering (in language bits it’s reg_confirm_email_desc) Quote We sent an email to <strong>%s</strong>. It contains a link you need to click in order to confirm your account. The problem is that on my forum, after registering, that’s exactly what appears. The %s is not replaced by the person’s email. Thoughts? Thanks.
June 13, 20222 yr Community Expert I see thats a translated string there. If you revert this to its default, does this then work?
June 13, 20222 yr Author Indeed, that was it. I removed the translated string. Note, however, that the only thing ‘off’ about the translated string was that it mentioned the email address a second time. Anyway, I’ll just leave it as is for now. Eventually, see if you can replicate?
June 13, 20222 yr Community Expert Could you please confirm exactly what you were trying to add? I have tagged our developers in the meantime to see if this is something that would work or not, with you trying to use the variable twice
June 13, 20222 yr If you are adding the same variable twice you can use the following format; %1$s e.g. "This is your email %1$s, and so is this %1$s. Neat!" Where there are two replacements already in a string you can use this to alter the order. e.g. "This is the second item %2$s, but this is the first %1$s"
June 13, 20222 yr Author 22 minutes ago, Andy Millne said: If you are adding the same variable twice you can use the following format; %1$s e.g. "This is your email %1$s, and so is this %1$s. Neat!" Where there are two replacements already in a string you can use this to alter the order. e.g. "This is the second item %2$s, but this is the first %1$s" Thanks Andy. I tried but failed 😞 I entered: We sent an email to <strong>%1$s</strong>. It contains a link you need to click in order to confirm your account. In the future, when you log in, you can either do so with your Callsign (or user name) or with your %2$s email. It gave me what you see above without the variable replacement. What did I do wrong?
June 13, 20222 yr Solution Just now, Giray said: What did I do wrong? If the original untranslated string only has one %s then %2$s will not exist. You need to use %1$s for both times you want the replacement to occur.