Closed (outdated)
Project:
Drupal core
Version:
7.x-dev
Component:
locale.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
11 May 2011 at 08:47 UTC
Updated:
15 May 2012 at 08:52 UTC
Jump to comment: Most recent
Comments
Comment #1
plachAre you sure this is a core issue? Would you please report in which context the string to translate appear?
Comment #2
ts145nera commentedI've created a new date format: D, d M Y
this is the displayed date: Mer, 11 Maggio 2011
If I try to add this date format: D, d F Y
I've the same displayed date (Mer, 11 Maggio 2011)
Comment #3
plachOk, we might want to use different string contexts here.
Comment #4
damien tournoud commentedWe do, we have always done.
http://api.drupal.org/api/drupal/includes--common.inc/function/_format_d...
Comment #5
plach@Damien Tournoud: so it's just a translation issue, right?
Comment #6
ts145nera commentedyes, in .po files there's two entry:
msgid "May"
msgstr "Mag"
msgctxt "Long month name"
msgid "May"
msgstr "Maggio"
so I think that always take the second
Comment #7
gábor hojtsyYes, this is already solved in Drupal core, as detailed above by multiple people. Drupal 7 uses contexts, Drupal 6 uses s !long-month-name special prefix on the string.
Comment #8
netdreamer commentedHi, I confirm that there is still something wrong with the translation of May.
I created a small view that pick a date field and show it using 'M' as date format, then I verified values at the end of function _format_date_callback (includes/common.inc), just before the "return", and got this:
What I got is:
As you can see, the $options array correctly doesn't contain the ['context'] = 'Long month name', so it should pick the standard short one... but the string that is picked is still the one with the context 'Long month name'!
It happens only for May, because it is the only month with the abbreviated form equal to the long one...