- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
Permier!
Admin
Some programmers, when they think of solving a problem with regular expressions, can't remember the French for 'regular expression'.
Now they have three problems.
Admin
I love it when the introduction is 3 times longer than the core of the story...
TRWTF is validating email addresses client side.
Admin
TRWTF is using a regex for validating emails. That or blindly translating page content instead of marking areas for translation. Shouldn't it be translating <head> to <tête> too?
Captcha: refoveo - I refoveo to validate clientside
Admin
Admin
the problem lies in using programming languages where instructions are named in English.
Use Brainfuck :-)
++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.
Admin
Captcha: modo - as in Quasi-modo...
Admin
This is a WTF?
Online.net makes you agree to a French version of their ToS, despite an English version existing... An English version, with a more recent date...
Their documentation also has some glaring discrepancies.
Admin
Admin
True WTF the timing? Must be really late night ... doesn't make much sense: we're ahead 6 or 7 hours, so even midnight is really early in the Euro morning, NY AM is comfortable PM in France.
Admin
Especially since the translation of "regular expression" in french is a troll in itself. Some (including me) argue for "expression rationnelle", other argues for "expression régulière" (which sort of translates to "recurring expression").
Admin
TRWTF is French. There, I said it, so sue me if it's wrong. My wife, who's French and a lawyer, doesn't seem to disagree with me.
Admin
They can, but getting it right is difficult (also it might not do exactly what you want). See http://www.regular-expressions.info/email.html
I'm willing to bet that almost every hand-rolled email address validator doesn't really conform.
Captcha: letatio - if you use your own half-baked regex to validate email addresses you won't be getting any letatio from me later
Admin
Admin
TRWTF is employing monkeys. Or was Yvonne just being condescending?
Admin
Je… Quand… Enfin… Comment… Pourquoi… Qui a pu… Et même…
Arghhhhhhhhhhh!
Admin
The only thing that you can truly rely on is that a valid email address will contain "@" somewhere. Everything else is ... optionalish. You can have the hostname part be without a dot, you can have almost anything in the username part. You can try to check the hostname by running a DNS query (unless it is an IP address already), but the only real way of checking the username part is to ask the SMTP server on the client side if ti would accept emails for that user. Sure, most email hosts will only recognise US-ASCII usernames and host names, but strictly speaking that is not a hard limit too. http://en.wikipedia.org/wiki/International_email#International_email_address
Admin
As any professional translator will tell you, automatic translation systems can't even translate the text portions of content – properly.
This is okay if the user requests the automatic translation. In that case, the user knows they're requesting garbled, retarded monkey speak. The're getting what they asked for by heading over to Google translate.
OTOH, it's completely, unacceptable when the site does this on its own. This makes the site owners look like garbled, retarded monkeys - and their brand, too.
Don't do automatic translations for any texts that are even remotely marketing related!
Peter G. Bouillon
Admin
Admin
Shouldn't for "(var i = 1; i < a.length; i++) {"
come out as
pour (il est je = 1; je < un.lonueur; je++) {
Interestingly, google translates it into french as
for (var i = 1; i < a.length; i++) {
Admin
My guess is it was at least smart enough to only translate content in side of tags, but using some automatic translate API on a website is pretty ballsy and I would say pretty dumb. I mean I can see creating localized versions of your content using a tool like that, but you read the output ( or find someone who can ) and make sure its reasonable. Having it happen live I'd be pretty worried the results are going to change at some point and might say something really embarrassing. Its also clear from the story the testers don't actually look at the other language pages.
Also yea trying to 'validate' e-mail address with regex is probably broken; the only correct way to do it really is to send a confirmation message and see if the user can reply.
Admin
Admin
Admin
Admin
Even if every page is NOT a PHP monstrosity including everything inline, which seems pretty likely here, this is pretty much a failure on the translation service's side for not recognizing HTML as well as Google did ten years ago, if they support web pages, or else the company's for not asking what the translation service supported.
Admin
YES, TRWTF is relying on a "magic" automatic runtime translation service -- that is obviously somewhat brain-dead. Sensible people should ask, "Who imposed this inane and inappropriate architecture on the project?" Obviously, it wasn't anyone who had a clue about the standard industry patterns for doing internationalization and localization.
Andre is probably the victim here (unless he, himself, is the idiot who put this inappropriate architecture in place). He probably violated some ill-documented "programming standard" of theirs like, "one must not use <script> tags, because our magic runtime auto-translate software is brain-dead and will vandalize your ECMA-script code at random."
Admin
That's not even a WTF let alone TRWTF, validation client side is good practise so long as it's not the only validation, it's more responsive and can prevent pointless rubbish from hitting your servers in the first place.
Admin
Admin
"expression norme" or "expression canonique" may be appropriate.
Although now its etymology has been called into question, I now wonder what's so "regular" about a "regular expression".
Admin
Once again an Erik Gern story embellished beyond making any sense!
What has Andres Email validation change to do with the failed deployment?
Why does it work for Andre, who shirley has set his language setting to french, given his bad understanding of english language? Half the users in Germany have set their language settings to english? WTF?!? They expected to see a Javascript code-snippet, that does not look like it belongs to Andres email-validation.So there was other Javascript on the page as well. Why did this translation issue never happen before?
Erik, have you ever considered handing out your articles for proofreading before publishing them on this side?
Or do you just publish anything that goes through your head?
Admin
J'ondule mes parties intimes à votre tante. Je pète à votre direction générale.
Admin
This.
Although I do feel a certain amount of anguish on behalf of the poor person for whom [email protected] is their email address.
Admin
Admin
Admin
Admin
Admin
Admin
Depending on the website and its target group, that's entirely plausible. Why get the out-of-date, incomplete, garbled versions of everthing when you understand English just fine? There is a whole lot of localized software where to understand what the hell was intended you have to guess how exactly the expression in question got translated literally back from English.
Admin
Really? I would love to see your code that assuming that it rejects only invalid email addresses. All email validation normally achieves is to prevent users with perfectly legal email addresses from being accepted.
Admin
Or "length" isn't detected as a word in "a.length". I guess the translation algorithm break the text into space separated "words".
Admin
And believe me, your customers will thank you for telling them that it's "foobar@gmail.com" instead of just silently ignoring "foobar@gmail".
A good read on the subject is https://en.wikipedia.org/wiki/Email_address
Admin
The only good thing in France are the women and even some of them aren't so great in the bedroom
Admin
Try this regex buddy:
[a-zA-Z0-9._-]+@(?:[a-zA-Z0-9-]+\.)+[a-zA-Z]{2,6}
Admin
Admin
And that was just after a quick glimpse at the regex.
Admin
Admin
This must be Microsoft.
I think it was Frontpage 98 when Microsoft translated parts of CSS to german: the generic font-family "sans-serif" (name is part of css spec) was translated to "Ohne Serifen" in the output of german Frontpage. IE (at least the german IE) was the only Browser that understood this translated font Name. All other Browsers showed the content of the page in standard font.
In Outlook the "Re:" prefix in E-Mails was translated to "AW:", so conversations across countries led to subject lines like
Hello! Re: AW: Hello! Re: AW: Re: AW: Hello! Re: AW: Re: AW: Re: AW: Hello! Re: AW: Re: AW: Re: AW: Re: AW: Hello! Re: AW: Re: AW: Re: AW: Re: AW: Re: AW: Hello! Re: AW: Re: AW: Re: AW: Re: AW: Re: AW: Re: AW: Hello!
When they realized that this was a bad idea Outlook (next version?) began to omit everything before the last colon what wasn't a godd idea either...
Admin
Fails on [email protected] which is valid (I use this for auto-tagging emails in gmail via rules)
Admin
And given their online real-time translation, it should not be surprising that to find that the translations are so bad that most users (and possibly even some of the developers) would prefer to use a poorly-understood foreign language (English) rather than a really bad translation of English into their native language.
Admin
There are lots of other issues with that regex. If you're going to validate external email addresses, there is something to be said for consulting the standards documentation (and other such resources).
http://en.wikipedia.org/wiki/Email_address#Syntax