From sflaniga at redhat.com Tue Jan 13 04:29:04 2015 From: sflaniga at redhat.com (Sean Flanigan) Date: Tue, 13 Jan 2015 14:29:04 +1000 Subject: [zanata-devel] Garbled French messages sent to Zanata admins In-Reply-To: <1719549986.1205.1420980473787.JavaMail.jboss@zanata-org.app.mwc.hst.phx2.redhat.com> References: <1719549986.1205.1420980473787.JavaMail.jboss@zanata-org.app.mwc.hst.phx2.redhat.com> Message-ID: <54B49F10.30207@redhat.com> See the attached (forwarded) message. It looks like we're getting garbled French messages sent to Zanata admins who are probably expecting English. This is a combination of two problems: 1. Zanata should be sending messages in a) English only, not the sender's language b) or (better) the preferred language of a given recipient, if we add a feature for that. I think part of the problem is receivedReason in EmailServiceImpl, and the rest is probably inside EmailBuilder and the various EmailStrategy implementations. (NB: Before the Velocity-based email implementation, we didn't have the ability to translate the email templates, which is why this didn't come up before.) 2. We have a number of French (and Breton) [1] translations which use single apostrophes instead of double apostrophes (as required by MessageFormat). This is why the variable reference {0} appears as-is in the subject line. The French subject line should have been: E-mail d'utilisateur Zanata de ? XYZ ? : Remove account not E-mail dutilisateur Zanata de ? {0} ? : Remove account This second problem should have been detected by the MessageFormat validator. Looking at the project settings on translate.zanata.org, we have Java variables validation enabled, but only in Warning mode. If we were to change JavaVariablesValidation so that it ignores source strings which don't contain {0} (and thus are probably not handled by MessageFormat), I think we could safely set it to generate Error, thus rejecting malformed translations. [1] This should find the offending strings: $ egrep "('[^'].*\{0\})|(\{0\}.*'[^'])" zanata-war/src/main/resources/**/*_*.properties -------- Forwarded Message -------- Subject: [zanata-org-admin] E-mail dutilisateur Zanata de ? {0} ? : Remove account Date: Sun, 11 Jan 2015 07:47:53 -0500 From: Zanata Reply-To: XYZ To: Administrateur Zanata Cher administrateur, Lutilisateur Zanata ??? {0}? ?? avec lidentifiant ??? XYZ ?? a envoy?? le message suivant? : ------------------------------------------------------------------------ Please remove that account ------------------------------------------------------------------------ Vous pouvez r??pondre ? XYZ ------------------------------------------------------------------------ Vous recevez ce courrier parce que? : Vous ??tes administrateur de la configuration syst??me Ce message est cr???? par Zanata s'ex??cutant ? ? : https://translate.zanata.org/zanata -------------- next part -------------- _______________________________________________ zanata-org-admin mailing list -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 213 bytes Desc: OpenPGP digital signature URL: From damason at redhat.com Mon Jan 19 01:19:43 2015 From: damason at redhat.com (David Mason) Date: Sun, 18 Jan 2015 20:19:43 -0500 (EST) Subject: [zanata-devel] Garbled French messages sent to Zanata admins In-Reply-To: <54B49F10.30207@redhat.com> References: <1719549986.1205.1420980473787.JavaMail.jboss@zanata-org.app.mwc.hst.phx2.redhat.com> <54B49F10.30207@redhat.com> Message-ID: <1680386910.10150299.1421630383736.JavaMail.zimbra@redhat.com> I just filed a report for this issue, before I saw this email: https://bugzilla.redhat.com/show_bug.cgi?id=1183412 Cheers, David Mason Software Engineer L10n Engineering Red Hat, Asia-Pacific Pty Ltd Level 1, 193 North Quay Brisbane 4000 ----- Original Message ----- > From: "Sean Flanigan" > To: "zanata-devel" > Sent: Tuesday, 13 January, 2015 2:29:04 PM > Subject: [zanata-devel] Garbled French messages sent to Zanata admins > > See the attached (forwarded) message. It looks like we're getting > garbled French messages sent to Zanata admins who are probably expecting > English. > > This is a combination of two problems: > > 1. Zanata should be sending messages in > > a) English only, not the sender's language > b) or (better) the preferred language of a given recipient, if we add a > feature for that. > > I think part of the problem is receivedReason in EmailServiceImpl, and > the rest is probably inside EmailBuilder and the various EmailStrategy > implementations. > > (NB: Before the Velocity-based email implementation, we didn't have the > ability to translate the email templates, which is why this didn't come > up before.) > > > 2. We have a number of French (and Breton) [1] translations which use > single apostrophes instead of double apostrophes (as required by > MessageFormat). This is why the variable reference {0} appears as-is in > the subject line. The French subject line should have been: > > E-mail d'utilisateur Zanata de ? XYZ ? : Remove account > > not > > E-mail dutilisateur Zanata de ? {0} ? : Remove account > > This second problem should have been detected by the MessageFormat > validator. Looking at the project settings on translate.zanata.org, we > have Java variables validation enabled, but only in Warning mode. If we > were to change JavaVariablesValidation so that it ignores source strings > which don't contain {0} (and thus are probably not handled by > MessageFormat), I think we could safely set it to generate Error, thus > rejecting malformed translations. > > > [1] This should find the offending strings: > > $ egrep "('[^'].*\{0\})|(\{0\}.*'[^'])" > zanata-war/src/main/resources/**/*_*.properties > > > -------- Forwarded Message -------- > Subject: [zanata-org-admin] E-mail dutilisateur Zanata de ? {0} ? : > Remove account > Date: Sun, 11 Jan 2015 07:47:53 -0500 > From: Zanata > Reply-To: XYZ > To: Administrateur Zanata > > > > Cher administrateur, > > Lutilisateur Zanata ??? {0}? ?? avec lidentifiant ??? XYZ ?? a > envoy?? le message suivant? : > > ------------------------------------------------------------------------ > > Please remove that account > > ------------------------------------------------------------------------ > > Vous pouvez r??pondre ? XYZ > > ------------------------------------------------------------------------ > > Vous recevez ce courrier parce que? : > Vous ??tes administrateur de la configuration syst??me > > Ce message est cr???? par Zanata s'ex??cutant ? ? : > https://translate.zanata.org/zanata > > > > > _______________________________________________ > zanata-devel mailing list > zanata-devel at redhat.com > https://www.redhat.com/mailman/listinfo/zanata-devel