From 5628256e6979335a58e7f9f873037873f24dae27 Mon Sep 17 00:00:00 2001 From: Dries Buytaert <dries@buytaert.net> Date: Tue, 14 Dec 2004 06:46:08 +0000 Subject: [PATCH] - Patch #14288 by Goba: "the archive module calendar indexes the array used to build up the header cells by the short names of the days. In Hungary, we have both Wednesday and Sunday start with the same two letters, so if I translate the short versions with the same two letters, the second associative array index will overwrite the first. The obvious soluion was to swap the array, and index by the full day name, which is expected to be unique in all languages." --- modules/archive.module | 4 ++-- modules/archive/archive.module | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/archive.module b/modules/archive.module index 557e201ba617..0853bfdee08a 100644 --- a/modules/archive.module +++ b/modules/archive.module @@ -97,12 +97,12 @@ function archive_calendar($original = 0) { $firstcolumn = mktime(0, 0, 0, 3, 20 + $weekstart, 1994); $output .= " <tr class=\"header-week\">\n"; - $days = array(t('Su') => t('Sunday'), t('Mo') => t('Monday'), t('Tu') => t('Tuesday'), t('We') => t('Wednesday'), t('Th') => t('Thursday'), t('Fr') => t('Friday'), t('Sa') => t('Saturday')); + $days = array(t('Sunday') => t('Su'), t('Monday') => t('Mo'), t('Tuesday') => t('Tu'), t('Wednesday') => t('We'), t('Thursday') => t('Th'), t('Friday') => t('Fr'), t('Saturday') => t('Sa')); if ($weekstart) { $days = array_merge(array_slice($days, $weekstart), array_slice($days, 0, $weekstart)); } - foreach ($days as $name => $fullname) { + foreach ($days as $fullname => $name) { $output .= ' <th abbr="'. $fullname .'">'. $name . "</th>\n"; } $output .= "</tr>\n"; diff --git a/modules/archive/archive.module b/modules/archive/archive.module index 557e201ba617..0853bfdee08a 100644 --- a/modules/archive/archive.module +++ b/modules/archive/archive.module @@ -97,12 +97,12 @@ function archive_calendar($original = 0) { $firstcolumn = mktime(0, 0, 0, 3, 20 + $weekstart, 1994); $output .= " <tr class=\"header-week\">\n"; - $days = array(t('Su') => t('Sunday'), t('Mo') => t('Monday'), t('Tu') => t('Tuesday'), t('We') => t('Wednesday'), t('Th') => t('Thursday'), t('Fr') => t('Friday'), t('Sa') => t('Saturday')); + $days = array(t('Sunday') => t('Su'), t('Monday') => t('Mo'), t('Tuesday') => t('Tu'), t('Wednesday') => t('We'), t('Thursday') => t('Th'), t('Friday') => t('Fr'), t('Saturday') => t('Sa')); if ($weekstart) { $days = array_merge(array_slice($days, $weekstart), array_slice($days, 0, $weekstart)); } - foreach ($days as $name => $fullname) { + foreach ($days as $fullname => $name) { $output .= ' <th abbr="'. $fullname .'">'. $name . "</th>\n"; } $output .= "</tr>\n"; -- GitLab