Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
i've a problem with month name translation. May is the same in short and long name!
It's the same issue of http://drupal.org/node/306466 for drupal 6
may --> maggio (long version)
may --> mag (short version)
How I can fix it?
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 CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: 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...