[zanata-devel] Garbled French messages sent to Zanata admins

Sean Flanigan sflaniga at redhat.com
Tue Jan 13 04:29:04 UTC 2015


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 <no-reply at redhat.com>
Reply-To: 	XYZ
To: 	Administrateur Zanata <XYZ>



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 <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: <http://listman.redhat.com/archives/zanata-devel/attachments/20150113/d5bab594/attachment.sig>


More information about the zanata-devel mailing list