Use Drupal's date_format function to theme dates in mails

towlie - February 17, 2009 - 20:13
Project:Webform
Version:6.x-2.7
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

Hi everyone,

I'm using a german translation of Drupal. Webform is fully translated, the months are showing up right, but in the E-Mail confirmation the months aren't translated. I tried "Locale" and "String Overrides" - no success. Anyone any suggestion?

Greetings from Germany,

towlie

Don't forget to bring a towel!

#1

mglanznig - February 18, 2009 - 10:41
Title:Wrong language in E-Mail» Use Drupal's date_format function to theme dates in mails
Version:6.x-2.4» 6.x-2.6
Component:Translation» Code
Status:active» needs review

I believe that's the same issue I stumbled upon. However, it can be resolved with a simple patch. In date.inc (theme_webform_mail_date) instead of using PHP's date() function Drupal's date_format() function should be used. Patch file is attached, please review. Thanks.

AttachmentSize
date.inc_.patch 510 bytes

#2

towlie - February 18, 2009 - 11:53
Status:needs review» fixed

Works great! Thanks a lot!
Should be added to the next release. (Maybe someone should check it in an english version as well.)

#3

quicksketch - February 19, 2009 - 18:44
Status:fixed» reviewed & tested by the community

Ah, great. Thanks mglanznig! I'm moving this to patch, RTBC, so I remember to add it.

#4

towlie - June 6, 2009 - 22:54
Version:6.x-2.6» 6.x-2.7
Status:reviewed & tested by the community» active

Same problem now in the new version. I fixed the date.inc again but the patch doesn't work...

#5

djalloway - June 7, 2009 - 00:35

The code is good, but the patch file seems to be broken.
It is trying to remove the correct line and adding the old one.
Try this patch, should work fine.

AttachmentSize
webform-375874-5.patch 722 bytes

#6

towlie - June 7, 2009 - 09:42
Status:active» fixed

It works fine :)
Thanks!

#7

djalloway - June 7, 2009 - 15:28
Status:fixed» reviewed & tested by the community

The patch still needs to be committed, so we'll leave the status as RTBC for now.

#8

quicksketch - November 6, 2009 - 00:53
Status:reviewed & tested by the community» fixed

Committed to all versions.

#9

System Message - November 20, 2009 - 01:00
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.