Page MenuHomePhabricator

Japanese language form & TY page, but English TY email: recent tests
Open, Needs TriagePublic

Description

Seilo and @Pcoombe have both reported receiving English-language TY emails from Civi, while otherwise testing the Japanese donation flow entirely in Japanese.

Here are Seilo's screenshots for his June 3rd donation made using this mobile large banner,
https://ja.m.wikipedia.org/w/index.php?title=%E3%82%A2%E3%83%A1%E3%83%AA%E3%82%AB%E8%88%AA%E7%A9%BA%E5%AE%87%E5%AE%99%E5%B1%80&banner=hnordeen_jaJP_m_p1_lg_txt_LastBest&country=JP
which created this donation: cid=26034374, Invoice Reference 102192660.1|recur-1622762943

Seilo1.png (608×1 px, 652 KB)

Seilo2.jpg (706×1 px, 114 KB)

Seilo3.png (734×1 px, 446 KB)

Seilo4.png (652×1 px, 434 KB)

Peter reports receiving the same (preexisting) cid=1058777 in his TY emails, so one theory would be that when Civi dedupes these incoming donations it may not carry over a new language preference, if there is already an English-language CID in Civi?

I think it is fair to assume that if a donor changes languages from one year to the next we would want Civi to prioritize the most recent as the preferred one. If this turns out to be a dedupe issue, can we check to make sure that Civi grabs the language preference from the most recent donations?

Event Timeline

I could use more information from @Pcoombe I see many GBP donations and a few JPY. Are you saying you didn't get any Japanese TY emails for the two most recent JPY donations? There are several GBP donations which are more recent and could have set his language back to english. So it's hard to peel back the layers here and investigate.

Ok it turns out we don't update language if a new donation comes in under a different language. This has been the case probably forever and this is not a big complaint at the moment. This shouldn't be a blocker for Japan or France.

@Ejegg also notes in IRC:
hmm, and if we start doing that, we'd want to be cautious about not overwriting non-english languages with english. I think if the donation info has no language associated, we set it to 'en' in a first 'normalization' pass before we check if it matches an existing donor

like for some imports

so if someone donates in a non-en language then we import something with zero lang info, that second one would have language set to 'en' by the time it hits the code that updates existing contacts

Thanks for the context @Ejegg

I feel this is new, however, as we didn't see these things before. So it made me wonder if dedupe is now happening before the TY email is deployed? As we noticed the CIDs on the TY emails were all the same - previously new donations would herald a different CID and then the donor record would be merged (it used to lead to confusion with donation look up as the CID on the TY receipt would have disappeared - this doesn't seem to be the case anymore).

So perhaps a dedupe change has led to this? @Eileenmcnaughton any ideas?

Thanks all!

@krobinson so late last year we made a change - if the first_name, last_name AND email all match an existing contact then we will match the donation to that contact at the point of import. Anything other than an exact match (even something resolvable like first_name = last_name & last_name = first_name) will create a new contact and the merge will happen when the job runs

Aha - so my theory was right then. Good to know this is new and we weren't all going bonkers.

Is there any way to make it so the language can be imported and override old, so the TY email is received in the language that matches the donation flow?

Also adding @CDenes_WMF and @TomaszGorski for visibility, as this feels localization related to an extent.

@krobinson yeah that's possible - - we just need to parse the concerns in https://phabricator.wikimedia.org/T284608#7144220 & come up with what safeguards we need (if any)

I have a feeling that earlier behaviour would have adopted the lanugage of the most recent donor which I *think* would have the same outcome as 'always update'