- Patch #5613 by Goba: fixed translation issue with archive module and removed
some locale module code that is now part of extractor.php.4.4.x
parent
1afcfd1007
commit
bc8057df38
|
@ -83,10 +83,10 @@ function archive_calendar($original = 0) {
|
|||
$output .= "\n<!-- calendar -->\n";
|
||||
$output .= "<div class=\"calendar\">";
|
||||
$output .= "<table>\n";
|
||||
$output .= " <tr><td colspan=\"7\" class=\"header-month\">". l("«", "archive/". date("Y/m/d", $prev)) ." ". t(date("F", $requested)) . date(" Y", $requested) ." ". ($nextmonth <= time() ? l("»", "archive/". date("Y/m/d", $next)) : " ") ."</td></tr>\n";
|
||||
$output .= " <tr><td colspan=\"7\" class=\"header-month\">". l("«", "archive/". date("Y/m/d", $prev)) ." ". format_date($requested, "custom", "F") . date(" Y", $requested) ." ". ($nextmonth <= time() ? l("»", "archive/". date("Y/m/d", $next)) : " ") ."</td></tr>\n";
|
||||
|
||||
// First day of week (0 => Sunday, 1 => Monday, ...)
|
||||
$weekstart = variable_get("default_firstday", 0);
|
||||
$cday = $weekstart = variable_get("default_firstday", 0);
|
||||
|
||||
// Last day of week
|
||||
($weekstart - 1 == -1) ? $lastday = 6 : $lastday = $weekstart - 1;
|
||||
|
@ -95,8 +95,10 @@ function archive_calendar($original = 0) {
|
|||
$firstcolumn = mktime(0, 0, 0, 3, 20 + $weekstart, 1994);
|
||||
|
||||
$output .= " <tr class=\"header-week\">";
|
||||
$days = array(t('Su'), t('Mo'), t('Tu'), t('We'), t('Th'), t('Fr'), t('Sa'));
|
||||
for ($i = 0; $i < 7; $i++) {
|
||||
$output .= "<td>". t(substr(ucfirst(date("l", $firstcolumn + $i * 86400)), 0, 2)) ."</td>";
|
||||
$output .= "<td>". $days[$cday] . "</td>";
|
||||
$cday = ($cday < 6 : $cday+1 : 0);
|
||||
}
|
||||
$output .= "</tr>\n";
|
||||
|
||||
|
|
|
@ -83,10 +83,10 @@ function archive_calendar($original = 0) {
|
|||
$output .= "\n<!-- calendar -->\n";
|
||||
$output .= "<div class=\"calendar\">";
|
||||
$output .= "<table>\n";
|
||||
$output .= " <tr><td colspan=\"7\" class=\"header-month\">". l("«", "archive/". date("Y/m/d", $prev)) ." ". t(date("F", $requested)) . date(" Y", $requested) ." ". ($nextmonth <= time() ? l("»", "archive/". date("Y/m/d", $next)) : " ") ."</td></tr>\n";
|
||||
$output .= " <tr><td colspan=\"7\" class=\"header-month\">". l("«", "archive/". date("Y/m/d", $prev)) ." ". format_date($requested, "custom", "F") . date(" Y", $requested) ." ". ($nextmonth <= time() ? l("»", "archive/". date("Y/m/d", $next)) : " ") ."</td></tr>\n";
|
||||
|
||||
// First day of week (0 => Sunday, 1 => Monday, ...)
|
||||
$weekstart = variable_get("default_firstday", 0);
|
||||
$cday = $weekstart = variable_get("default_firstday", 0);
|
||||
|
||||
// Last day of week
|
||||
($weekstart - 1 == -1) ? $lastday = 6 : $lastday = $weekstart - 1;
|
||||
|
@ -95,8 +95,10 @@ function archive_calendar($original = 0) {
|
|||
$firstcolumn = mktime(0, 0, 0, 3, 20 + $weekstart, 1994);
|
||||
|
||||
$output .= " <tr class=\"header-week\">";
|
||||
$days = array(t('Su'), t('Mo'), t('Tu'), t('We'), t('Th'), t('Fr'), t('Sa'));
|
||||
for ($i = 0; $i < 7; $i++) {
|
||||
$output .= "<td>". t(substr(ucfirst(date("l", $firstcolumn + $i * 86400)), 0, 2)) ."</td>";
|
||||
$output .= "<td>". $days[$cday] . "</td>";
|
||||
$cday = ($cday < 6 : $cday+1 : 0);
|
||||
}
|
||||
$output .= "</tr>\n";
|
||||
|
||||
|
|
|
@ -257,7 +257,6 @@ function locale_admin() {
|
|||
$edit =& $_POST["edit"];
|
||||
|
||||
if (user_access('administer locales')) {
|
||||
locale_admin_initialize();
|
||||
|
||||
if (empty($op)) {
|
||||
$op = arg(2);
|
||||
|
@ -305,31 +304,6 @@ function locale_admin() {
|
|||
}
|
||||
}
|
||||
|
||||
function locale_admin_initialize() {
|
||||
/*
|
||||
** This function inserts common strings into the locale table (eg.
|
||||
** names of months and days). We use $revision and a stored variable
|
||||
** to track if the locale table is up-to-date.
|
||||
*/
|
||||
|
||||
$revision = 1;
|
||||
|
||||
if (variable_get("locale_initialize_revision", 0) < $revision) {
|
||||
variable_set("locale_initialize_revision", $revision);
|
||||
for ($i = 1; $i <= 12; $i++) {
|
||||
$stamp = mktime(0, 0, 0, $i, 1, 1971);
|
||||
t(date("F", $stamp));
|
||||
t(date("M", $stamp));
|
||||
}
|
||||
|
||||
for ($i = 0; $i <= 7; $i++) {
|
||||
$stamp = $i * 86400;
|
||||
t(date("D", $stamp));
|
||||
t(date("l", $stamp));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function locale($string) {
|
||||
global $locale;
|
||||
static $locale_t;
|
||||
|
|
|
@ -257,7 +257,6 @@ function locale_admin() {
|
|||
$edit =& $_POST["edit"];
|
||||
|
||||
if (user_access('administer locales')) {
|
||||
locale_admin_initialize();
|
||||
|
||||
if (empty($op)) {
|
||||
$op = arg(2);
|
||||
|
@ -305,31 +304,6 @@ function locale_admin() {
|
|||
}
|
||||
}
|
||||
|
||||
function locale_admin_initialize() {
|
||||
/*
|
||||
** This function inserts common strings into the locale table (eg.
|
||||
** names of months and days). We use $revision and a stored variable
|
||||
** to track if the locale table is up-to-date.
|
||||
*/
|
||||
|
||||
$revision = 1;
|
||||
|
||||
if (variable_get("locale_initialize_revision", 0) < $revision) {
|
||||
variable_set("locale_initialize_revision", $revision);
|
||||
for ($i = 1; $i <= 12; $i++) {
|
||||
$stamp = mktime(0, 0, 0, $i, 1, 1971);
|
||||
t(date("F", $stamp));
|
||||
t(date("M", $stamp));
|
||||
}
|
||||
|
||||
for ($i = 0; $i <= 7; $i++) {
|
||||
$stamp = $i * 86400;
|
||||
t(date("D", $stamp));
|
||||
t(date("l", $stamp));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function locale($string) {
|
||||
global $locale;
|
||||
static $locale_t;
|
||||
|
|
Loading…
Reference in New Issue