* (bug 3817) Use localized date formats in preferences; 'no preference' option
authorBrion Vibber <brion@users.mediawiki.org>
Tue, 8 Nov 2005 00:57:09 +0000 (00:57 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Tue, 8 Nov 2005 00:57:09 +0000 (00:57 +0000)
  localizable as 'datedefault' message. Tweaked lots of languages files...

35 files changed:
RELEASE-NOTES
includes/SpecialPreferences.php
languages/Language.php
languages/LanguageBe.php
languages/LanguageCa.php
languages/LanguageCs.php
languages/LanguageDe.php
languages/LanguageEo.php
languages/LanguageEs.php
languages/LanguageEt.php
languages/LanguageFi.php
languages/LanguageFr.php
languages/LanguageFy.php
languages/LanguageGa.php
languages/LanguageIa.php
languages/LanguageIs.php
languages/LanguageIt.php
languages/LanguageJa.php
languages/LanguageKo.php
languages/LanguageLa.php
languages/LanguageLi.php
languages/LanguageNds.php
languages/LanguageNl.php
languages/LanguageNn.php
languages/LanguageNo.php
languages/LanguageOc.php
languages/LanguagePl.php
languages/LanguagePt.php
languages/LanguageSc.php
languages/LanguageSk.php
languages/LanguageSr.php
languages/LanguageSv.php
languages/LanguageTr.php
languages/LanguageVi.php
languages/LanguageZh_cn.php

index dfa0091..a5e1582 100644 (file)
@@ -210,6 +210,9 @@ fully support the editing toolbar, but was found to be too confusing.
 * Allow $wgFeedCacheTimeout of 0 to disable feed caching
 * Fix WebRequest::getRequestURL() to strip off the host bits squid prepends
 * Require POST for action=purge, to stop bots from purging the cache
+* (bug 3817) Use localized date formats in preferences; 'no preference' option
+  localizable as 'datedefault' message. Tweaked lots of languages files...
+
 
 === Caveats ===
 
index 838e43e..77e7a2b 100644 (file)
@@ -745,10 +745,16 @@ class PreferencesForm {
                if ($dateopts) {
                        $wgOut->addHTML( "<fieldset>\n<legend>" . wfMsg( 'dateformat' ) . "</legend>\n" );
                        $idCnt = 0;
+                       $epoch = '20010115161234';
                        foreach($dateopts as $key => $option) {
+                               if( $key == MW_DATE_DEFAULT ) {
+                                       $formatted = wfMsgHtml( 'datedefault' );
+                               } else {
+                                       $formatted = htmlspecialchars( $wgLang->timeanddate( $epoch, false, $key ) );
+                               }
                                ($key == $this->mDate) ? $checked = ' checked="checked"' : $checked = '';
                                $wgOut->addHTML( "<div><input type='radio' name=\"wpDate\" id=\"wpDate$idCnt\" ".
-                                       "value=\"$key\"$checked /> <label for=\"wpDate$idCnt\">$option</label></div>\n" );
+                                       "value=\"$key\"$checked /> <label for=\"wpDate$idCnt\">$formatted</label></div>\n" );
                                $idCnt++;
                        }
                        $wgOut->addHTML( "</fieldset>\n" );
index 7ec4669..3343e9f 100644 (file)
@@ -108,12 +108,22 @@ if(isset($wgExtraNamespaces)) {
        MW_MATH_MATHML => 'mw_math_mathml'
 );
 
-# Whether to use user or default setting in Language::date()
-
-/* private */ $wgDateFormatsEn = array(
+/**
+ * Whether to use user or default setting in Language::date()
+ *
+ * NOTE: the array string values are no longer important!
+ * The actual date format functions are now called for the selection in
+ * Special:Preferences, and the 'datedefault' message for MW_DATE_DEFAULT.
+ *
+ * The array keys make up the set of formats which this language allows
+ * the user to select. It's exposed via Language::getDateFormats().
+ *
+ * @access private
+ */
+$wgDateFormatsEn = array(
        MW_DATE_DEFAULT => 'No preference',
-       MW_DATE_MDY => '16:12, January 15, 2001',
        MW_DATE_DMY => '16:12, 15 January 2001',
+       MW_DATE_MDY => '16:12, January 15, 2001',
        MW_DATE_YMD => '16:12, 2001 January 15',
        MW_DATE_ISO => '2001-01-15 16:12:34'
 );
@@ -873,6 +883,7 @@ $2 List redirects &nbsp; Search for $3 $9",
 'skin'                 => 'Skin',
 'math'                 => 'Math',
 'dateformat'           => 'Date format',
+'datedefault'          => 'No preference',
 'datetime'             => 'Date and time',
 'math_failure'         => 'Failed to parse',
 'math_unknown_error'   => 'unknown error',
@@ -2467,17 +2478,23 @@ class Language {
         * [...]
         *</code>
         *
-        * @param bool $usePrefs: if false, the site/language default is used
+        * @param mixed $usePrefs: if true, the user's preference is used
+        *                         if false, the site/language default is used
+        *                         if int/string, assumed to be a format.
         * @return string
         */
        function dateFormat( $usePrefs = true ) {
                global $wgUser, $wgAmericanDates;
 
-               if( $usePrefs ) {
-                       $datePreference = $wgUser->getOption( 'date' );
+               if( is_bool( $usePrefs ) ) {
+                       if( $usePrefs ) {
+                               $datePreference = $wgUser->getOption( 'date' );
+                       } else {
+                               $options = $this->getDefaultUserOptions();
+                               $datePreference = (string)$options['date'];
+                       }
                } else {
-                       $options = $this->getDefaultUserOptions();
-                       $datePreference = (string)$options['date'];
+                       $datePreference = (string)$usePrefs;
                }
 
                if( $datePreference == MW_DATE_DEFAULT || $datePreference == '' ) {
@@ -2492,7 +2509,7 @@ class Language {
         *               date('YmdHis') format with wfTimestamp(TS_MW,$ts)
         * @param bool   $adj whether to adjust the time output according to the
         *               user configured offset ($timecorrection)
-        * @param bool   $format true to use user's date format preference
+        * @param mixed  $format true to use user's date format preference
         * @param string $timecorrection the time offset as returned by
         *               validateTimeZone() in Special:Preferences
         * @return string
@@ -2504,8 +2521,8 @@ class Language {
 
                $datePreference = $this->dateFormat( $format );
 
-               $month = $this->getMonthName( substr( $ts, 4, 2 ) );
-               $day = $this->formatNum( 0 + substr( $ts, 6, 2 ) );
+               $month = $this->formatMonth( substr( $ts, 4, 2 ), $datePreference );
+               $day = $this->formatDay( substr( $ts, 6, 2 ), $datePreference );
                $year = $this->formatNum( substr( $ts, 0, 4 ), true );
 
                switch( $datePreference ) {
@@ -2522,7 +2539,7 @@ class Language {
        *               date('YmdHis') format with wfTimestamp(TS_MW,$ts)
        * @param bool   $adj whether to adjust the time output according to the
        *               user configured offset ($timecorrection)
-       * @param bool   $format true to use user's date format preference
+       * @param mixed  $format true to use user's date format preference
        * @param string $timecorrection the time offset as returned by
        *               validateTimeZone() in Special:Preferences
        * @return string
@@ -2532,14 +2549,54 @@ class Language {
 
                if ( $adj ) { $ts = $this->userAdjust( $ts, $timecorrection ); }
                $datePreference = $this->dateFormat( $format );
-
-               $t = substr( $ts, 8, 2 ) . ':' . substr( $ts, 10, 2 );
+               
+               $sep = ($datePreference == MW_DATE_ISO)
+                       ? ':'
+                       : $this->timeSeparator( $format );
+               
+               $t = substr( $ts, 8, 2 ) . $sep . substr( $ts, 10, 2 );
 
                if ( $datePreference == MW_DATE_ISO ) {
-                       $t .= ':' . substr( $ts, 12, 2 );
+                       $t .= $sep . substr( $ts, 12, 2 );
                }
                return $this->formatNum( $t );
        }
+       
+       /**
+        * Default separator character between hours, minutes, and seconds.
+        * Will be used by Language::time() for non-ISO formats.
+        * (ISO will always use a colon.)
+        * @return string
+        */
+       function timeSeparator( $format ) {
+               return ':';
+       }
+       
+       /**
+        * String to insert between the time and the date in a combined
+        * string. Should include any relevant whitespace.
+        * @return string
+        */
+       function timeDateSeparator( $format ) {
+               return ', ';
+       }
+       
+       /**
+        * Return true if the time should display before the date.
+        * @return bool
+        * @access private
+        */
+       function timeBeforeDate() {
+               return true;
+       }
+
+       function formatMonth( $month, $format ) {
+               return $this->getMonthName( $month );
+       }
+       
+       function formatDay( $day, $format ) {
+               return $this->formatNum( 0 + $day );
+       }
 
        /**
        * @access public
@@ -2547,7 +2604,7 @@ class Language {
        *               date('YmdHis') format with wfTimestamp(TS_MW,$ts)
        * @param bool   $adj whether to adjust the time output according to the
        *               user configured offset ($timecorrection)
-       * @param bool   $format true to use user's date format preference
+       * @param mixed  $format true to use user's date format preference
        * @param string $timecorrection the time offset as returned by
        *               validateTimeZone() in Special:Preferences
        * @return string
@@ -2559,8 +2616,13 @@ class Language {
                switch ( $datePreference ) {
                        case MW_DATE_ISO: return $this->date( $ts, $adj, $format, $timecorrection ) . ' ' .
                                $this->time( $ts, $adj, $format, $timecorrection );
-                       default: return $this->time( $ts, $adj, $format, $timecorrection ) . ', ' .
-                               $this->date( $ts, $adj, $format, $timecorrection );
+                       default:
+                               $time = $this->time( $ts, $adj, $format, $timecorrection );
+                               $sep = $this->timeDateSeparator( $datePreference );
+                               $date = $this->date( $ts, $adj, $format, $timecorrection );
+                               return $this->timeBeforeDate( $datePreference )
+                                       ? $time . $sep . $date
+                                       : $date . $sep . $time;
                }
        }
 
index 53092a8..c242e48 100644 (file)
@@ -553,24 +553,26 @@ class LanguageBe extends LanguageUtf8 {
                global $wgMagicWordsBe;
                return $wgMagicWordsBe;
        }
-
-       // The date and time format
-       function date( $ts, $adj = false ) {
-               if ( $adj ) { $ts = $this->userAdjust( $ts ); } # Adjust based on the timezone setting.
-               // 20050310001506 => 10.03.2005
-               $date = (substr( $ts, 6, 2 )) . '.' . substr( $ts, 4, 2 ) . '.' . substr( $ts, 0, 4 );
-               return $date;
-       }
-
-       function time( $ts, $adj = false ) {
-               if ( $adj ) { $ts = $this->userAdjust( $ts ); }
-               // 20050310001506 => 00:15
-               $time = substr( $ts, 8, 2 ) . ':' . substr( $ts, 10, 2 );
-               return $time;
+       
+       function getDateFormats() {
+               return $wgDateFormatsBe = array(
+                       MW_DATE_DEFAULT => MW_DATE_DEFAULT,
+                       '16:12, 15.01.2001' => '16:12, 15.01.2001',
+                       MW_DATE_ISO => MW_DATE_ISO
+               );
        }
 
-       function timeanddate( $ts, $adj = false ) {
-               return $this->time( $ts, $adj ) . ', ' .$this->date( $ts, $adj );
+       // The date and time format
+       function date( $ts, $adj = false, $format = true, $timecorrection = false ) {
+               $datePreference = $this->dateFormat( $format );
+               if( $datePreference == MW_DATE_ISO ) {
+                       return parent::date( $ts, $adj, $datePreference, $timecorrection );
+               } else {
+                       if ( $adj ) { $ts = $this->userAdjust( $ts, $timecorrection ); } # Adjust based on the timezone setting.
+                       // 20050310001506 => 10.03.2005
+                       $date = (substr( $ts, 6, 2 )) . '.' . substr( $ts, 4, 2 ) . '.' . substr( $ts, 0, 4 );
+                       return $date;
+               }
        }
 
        function getMessage( $key ) {
index 6b6c931..a4182ab 100644 (file)
@@ -820,32 +820,8 @@ class LanguageCa extends LanguageUtf8 {
                return $wgSkinNamesCa;
        }
 
-
-       function shortdate( $ts, $adj = false ) {
-               if ( $adj ) { $ts = $this->userAdjust( $ts ); }
-
-               $d = (0 + substr( $ts, 6, 2 )) . " " .$this->getMonthAbbreviation( substr( $ts, 4, 2 ) ) . ", " .
-                 substr( $ts, 0, 4 );
-               return $d;
-       }
-
-       function date( $ts, $adj = false ) {
-               if ( $adj ) { $ts = $this->userAdjust( $ts ); }
-
-               $d = (0 + substr( $ts, 6, 2 )) . " de " .$this->getMonthName( substr( $ts, 4, 2 ) ) . ", " .
-                 substr( $ts, 0, 4 );
-               return $d;
-       }
-
-       function time( $ts, $adj = false ) {
-               if ( $adj ) { $ts = $this->userAdjust( $ts ); }
-
-               $t = substr( $ts, 8, 2 ) . ":" . substr( $ts, 10, 2 );
-               return $t;
-       }
-
-       function timeanddate( $ts, $adj = false ) {
-               return $this->time( $ts, $adj ) . " " . $this->shortdate( $ts, $adj );
+       function formatMonth( $month, $format ) {
+               return $this->getMonthAbbreviation( $month );
        }
 
        function getMessage( $key ) {
index f51a4f4..761bfc6 100644 (file)
@@ -1831,14 +1831,12 @@ class LanguageCs extends LanguageUtf8 {
 
        # Datové a časové funkce možno upřesnit podle jazyka
        # TODO: Umožnit nastavování formátu data a času.
-       function date( $ts, $adj = false ) {
-               if ( $adj ) { $ts = $this->userAdjust( $ts ); }
-
-               $d = (0 + substr( $ts, 6, 2 )) . '. ' .
-               $this->getMonthAbbreviation( substr( $ts, 4, 2 ) ) .
-                 ' ' .
-                 substr( $ts, 0, 4 );
-               return $d;
+       function formatMonth( $month, $format ) {
+               return intval( $month ) . '.';
+       }
+       
+       function formatDay( $day, $format ) {
+               return intval( $day ) . '.';
        }
 
        function getMessage( $key ) {
index 5438d08..d2d0a2d 100644 (file)
@@ -1247,15 +1247,13 @@ class LanguageDe extends LanguageUtf8 {
                global $wgSkinNamesDe;
                return $wgSkinNamesDe;
        }
-
-       function date( $ts, $adj = false ) {
-               if ( $adj ) { $ts = $this->userAdjust( $ts ); }
-
-               $d = (0 + substr( $ts, 6, 2 )) . ". " .
-               $this->getMonthAbbreviation( substr( $ts, 4, 2 ) ) .
-                 " " .
-                 substr( $ts, 0, 4 );
-               return $d;
+       
+       function formatMonth( $month, $format ) {
+               return $this->getMonthAbbreviation( $month );
+       }
+       
+       function formatDay( $day, $format ) {
+               return parent::formatDay( $day, $format ) . '.';
        }
 
        function getMessage( $key ) {
index ff0c713..443d245 100644 (file)
@@ -924,14 +924,12 @@ class LanguageEo extends LanguageUtf8 {
        }
 
        # La dato- kaj tempo-funkciojn oni povas precizigi laŭ lingvo
-       function date( $ts, $adj = false ) {
-               if ( $adj ) { $ts = $this->userAdjust( $ts ); }
-
-               $d = (0 + substr( $ts, 6, 2 )) . '. ' .
-               $this->getMonthAbbreviation( substr( $ts, 4, 2 ) ) .
-                 ' ' .
-                 substr( $ts, 0, 4 );
-               return $d;
+       function formatMonth( $month, $format ) {
+               return $this->getMonthAbbreviation( $month );
+       }
+       
+       function formatDay( $day, $format ) {
+               return parent::formatDay( $day, $format ) . '.';
        }
 
        function getMessage( $key ) {
index 782c54e..55949eb 100644 (file)
@@ -1044,33 +1044,15 @@ class LanguageEs extends LanguageUtf8 {
                global $wgSkinNamesEs;
                return $wgSkinNamesEs;
        }
-
-       function shortdate( $ts, $adj = false ) {
-               if ( $adj ) { $ts = $this->userAdjust( $ts ); }
-
-               $d = (0 + substr( $ts, 6, 2 )) . " " .$this->getMonthAbbreviation( substr( $ts, 4, 2 ) ) . ", " .
-                 substr( $ts, 0, 4 );
-               return $d;
-       }
-
-       function date( $ts, $adj = false ) {
-               if ( $adj ) { $ts = $this->userAdjust( $ts ); }
-
-               $d = (0 + substr( $ts, 6, 2 )) . " de " .$this->getMonthName( substr( $ts, 4, 2 ) ) . ", " .
-                 substr( $ts, 0, 4 );
-               return $d;
+       
+       function formatMonth( $month, $format ) {
+               return $this->getMonthAbbreviation( $month );
        }
-
-       function time( $ts, $adj = false ) {
-               if ( $adj ) { $ts = $this->userAdjust( $ts ); }
-
-               $t = substr( $ts, 8, 2 ) . ":" . substr( $ts, 10, 2 );
-               return $t;
-       }
-
-       function timeanddate( $ts, $adj = false ) {
-               return $this->time( $ts, $adj ) . " " . $this->shortdate( $ts, $adj );
+       
+       function timeDateSeparator( $format ) {
+               return ' ';
        }
+       
 
        function getMessage( $key ) {
                global $wgAllMessagesEs;
index 057a698..30031f5 100644 (file)
@@ -570,6 +570,7 @@ Teie sisemine ID-number on $2.",
 "skin"                 => "Nahk",
 "math"                 => "Valemite näitamine",
 "dateformat"            => "Kuupäeva formaat",
+'datedefault' => 'Eelistus puudub',
 "math_failure"         => "Arusaamatu süntaks",
 "math_unknown_error"   => "Tundmatu viga",
 "math_unknown_function"        => "Tundmatu funktsioon ",
index 2026a09..453771c 100644 (file)
@@ -558,6 +558,7 @@ Sivun lähdekoodi:',
 'skin'                => 'Ulkonäkö',
 'math'                => 'Matematiikka',
 'dateformat'          => 'Päiväyksen muoto',
+'datedefault' => 'Ei valintaa',
 'datetime'            => 'Aika ja päiväys',
 'math_failure'        => 'Jäsentäminen epäonnistui',
 'math_unknown_error'  => 'Tuntematon virhe',
index 367ef96..bd974d8 100644 (file)
@@ -45,7 +45,6 @@ require_once( 'LanguageUtf8.php' );
        'chapitre.com'  => 'http://www.chapitre.com/frame_rec.asp?isbn=$1',
 );
 
-
 /* private */ $wgAllMessagesFr = array(
 
 # User Toggles
@@ -1209,18 +1208,13 @@ class LanguageFr extends LanguageUtf8 {
                global $wgSkinNamesFr;
                return $wgSkinNamesFr;
        }
-
-       function date( $ts, $adj = false ) {
-               if ( $adj ) { $ts = $this->userAdjust( $ts ); }
-
-               $d = (0 + substr( $ts, 6, 2 )) . ' ' .
-                 $this->getMonthAbbreviation( substr( $ts, 4, 2 ) ) .
-                 ' ' . substr( $ts, 0, 4 );
-               return $d;
+       
+       function timeBeforeDate( $format ) {
+               return false;
        }
-
-       function timeanddate( $ts, $adj = false ) {
-               return $this->date( $ts, $adj ) . ' à ' . $this->time( $ts, $adj );
+       
+       function timeDateSeparator( $format ) {
+               return " à ";
        }
 
        var $digitTransTable = array(
index 1a488b0..88ee93d 100644 (file)
@@ -440,6 +440,7 @@ Jo Wiki-nûmer is $2.
 "skin"                 => "Side-oansjen",
 "math"                 => "Formules",
 "dateformat"           => "Datum",
+'datedefault' => 'Gjin foarkar',
 "math_failure"         => "Untsjutbere formule",
 "math_unknown_error"   => "Unbekinde fout",
 "math_unknown_function"        => "Unbekinde funksje",
index c2dbb86..07210ad 100755 (executable)
@@ -745,6 +745,7 @@ Féach ar [[{{ns:4}}:Cabhair do sainroghanna úsáideora]] chun cabhair a fháil
 "skin"   => "Craiceann",
 "math"   => "Ag aistriú na matamaitice",
 "dateformat"    => "Formáid dáta",
+'datedefault' => 'Is cuma liom',
 "math_failure"      => "Theip anailís an fhoirmle",
 "math_unknown_error"    => "earráid anaithnid",
 "math_unknown_function" => "foirmle anaithnid ",
index 19f5dde..a76789b 100644 (file)
@@ -858,19 +858,6 @@ class LanguageIa extends LanguageUtf8 {
                return $wgSkinNamesIa;
        }
 
-       function date( $ts, $adj = false ) {
-               if ( $adj ) { $ts = $this->userAdjust( $ts ); }
-
-               $d = $this->getMonthAbbreviation( substr( $ts, 4, 2 ) ) .
-                 " " . (0 + substr( $ts, 6, 2 )) . ", " .
-                 substr( $ts, 0, 4 );
-               return $d;
-       }
-
-       function timeanddate( $ts, $adj = false ) {
-               return $this->time( $ts, $adj ) . " " . $this->date( $ts, $adj );
-       }
-
        function getMessage( $key ) {
                global $wgAllMessagesIa, $wgAllMessagesEn;
                $m = $wgAllMessagesIa[$key];
index 1711840..8903a3a 100644 (file)
@@ -216,6 +216,7 @@ the list of currently operational bans and blocks.",
 'currentrevisionlink' => "núverandi útgáfa",
 'databaseerror' => "Gagnagrunnsvilla",
 'dateformat' => "Tímasnið",
+'datedefault' => 'Sjálfgefið',
 'deadendpages' => "Botnlangar",
 'debug' => "Aflúsa",
 'dec' => "des",
index 91520c3..bfa1a91 100644 (file)
@@ -716,14 +716,9 @@ class LanguageIt extends LanguageUtf8 {
                global $wgQuickbarSettingsIt;
                return $wgQuickbarSettingsIt;
        }
-
-       function date( $ts, $adj = false ) {
-               if ( $adj ) { $ts = $this->userAdjust( $ts ); }
-
-               $d = $this->getMonthAbbreviation( substr( $ts, 4, 2 ) ) .
-                 " " . (0 + substr( $ts, 6, 2 )) . ", " .
-                 substr( $ts, 0, 4 );
-               return $d;
+       
+       function formatMonth( $month, $format ) {
+               return $this->getMonthAbbreviation( $month );
        }
 
        function getMessage( $key ) {
index 8454085..3a81a6c 100644 (file)
@@ -597,6 +597,7 @@ $2リダイレクトを含める &nbsp; &nbsp; &nbsp; $3 $9',
 'skin' => '外装',
 'math' => '数式の表記方法',
 'dateformat' => '日付の書式',
+'datedefault' => '2001年1月15日 16:12 (デフォルト)',
 'math_failure' => '構文解析失敗',
 'math_unknown_error' => '不明なエラー',
 'math_unknown_function' => '不明な関数',
index b8370f8..63bab92 100644 (file)
@@ -645,6 +645,10 @@ class LanguageKo extends LanguageUtf8 {
                global $wgSkinNamesKo;
                return $wgSkinNamesKo;
        }
+       
+       function getDateFormats() {
+               return false;
+       }
 
        function date( $ts, $adj = false ) {
                global $wgWeekdayAbbreviationsKo;
index 3dbf45a..90b3866 100644 (file)
@@ -137,19 +137,6 @@ class LanguageLa extends LanguageUtf8 {
                return $wgSkinNamesLa;
        }
 
-       function date( $ts, $adj = false ) {
-               if ( $adj ) { $ts = $this->userAdjust( $ts ); }
-
-               $d = $this->getMonthAbbreviation( substr( $ts, 4, 2 ) ) .
-                 " " . (0 + substr( $ts, 6, 2 )) . ", " .
-                 substr( $ts, 0, 4 );
-               return $d;
-       }
-
-       function timeanddate( $ts, $adj = false ) {
-               return $this->time( $ts, $adj ) . " " . $this->date( $ts, $adj );
-       }
-
        function getMessage( $key ) {
                global $wgAllMessagesLa;
                if( isset( $wgAllMessagesLa[$key] ) ) {
index 401c008..d751fed 100644 (file)
@@ -882,20 +882,19 @@ class LanguageLi extends LanguageUtf8 {
                global $wgSkinNamesLi;
                return $wgSkinNamesLi;
        }
-
-       function date( $ts, $adj = false ) {
-               if ( $adj ) { $ts = $this->userAdjust( $ts ); }
-
-               $d = (0 + substr( $ts, 6, 2 )) . " " .
-               $this->getMonthAbbreviation( substr( $ts, 4, 2 ) ) . " " .
-               substr( $ts, 0, 4 );
-               return $d;
+       
+       function timeBeforeDate( $format ) {
+               return false;
        }
-
-       function timeanddate( $ts, $adj = false ) {
-               return $this->date( $ts, $adj ) . " " . $this->time( $ts, $adj );
+       
+       function timeDateSeparator( $format ) {
+               return ' ';
        }
-
+       
+       function formatMonth( $month, $format ) {
+               return $this->getMonthAbbreviation( $month );
+       }
+       
        function getMessage( $key ) {
                global $wgAllMessagesLi;
                if( isset( $wgAllMessagesLi[$key] ) ) {
index 48e2d80..50e988e 100644 (file)
@@ -1283,14 +1283,12 @@ class LanguageNds extends LanguageUtf8 {
                return $wgSkinNamesNds;
        }
 
-       function date( $ts, $adj = false ) {
-               if ( $adj ) { $ts = $this->userAdjust( $ts ); }
-
-               $d = (0 + substr( $ts, 6, 2 )) . '. ' .
-               $this->getMonthAbbreviation( substr( $ts, 4, 2 ) ) .
-                 ' ' .
-                 substr( $ts, 0, 4 );
-               return $d;
+       function formatMonth( $month, $format ) {
+               return $this->getMonthAbbreviation( $month );
+       }
+       
+       function formatDay( $day, $format ) {
+               return parent::formatDay( $day, $format ) . '.';
        }
 
        function getMessage( $key ) {
index 634ad44..09a7cb7 100644 (file)
@@ -767,19 +767,18 @@ class LanguageNl extends LanguageUtf8 {
                return $wgSkinNamesNl;
        }
 
-       function date( $ts, $adj = false ) {
-               if ( $adj ) { $ts = $this->userAdjust( $ts ); }
-
-               $d = (0 + substr( $ts, 6, 2 )) . " " .
-               $this->getMonthAbbreviation( substr( $ts, 4, 2 ) ) . " " .
-               substr( $ts, 0, 4 );
-               return $d;
+       function timeBeforeDate( $format ) {
+               return false;
        }
-
-       function timeanddate( $ts, $adj = false ) {
-               return $this->date( $ts, $adj ) . " " . $this->time( $ts, $adj );
+       
+       function timeDateSeparator( $format ) {
+               return ' ';
        }
-
+       
+       function formatMonth( $month, $format ) {
+               return $this->getMonthAbbreviation( $month );
+       }
+       
        function getMessage( $key ) {
                global $wgAllMessagesNl;
                if( isset( $wgAllMessagesNl[$key] ) ) {
index d8b5838..e43f88f 100644 (file)
@@ -608,6 +608,7 @@ Sjå [[Help:Brukarinnstillingar|Hjelp]] for ei forklaring på dei ulike innstill
 'skin'                 => 'Drakt',
 'math'                 => 'Matematiske formlar',
 'dateformat'            => 'Datoformat',
+'datedefault' => 'Standard',
 'math_failure'             => 'Klarte ikkje å tolke formelen',
 'math_unknown_error'   => 'ukjend feil',
 'math_unknown_function'        => 'ukjend funksjon ',
index 3a58c93..efffdd8 100644 (file)
@@ -953,26 +953,24 @@ class LanguageNo extends LanguageUtf8 {
                global $wgSkinNamesNo;
                return $wgSkinNamesNo;
        }
-
-
-       function date( $ts, $adj = false ) {
-               if ( $adj ) { $ts = $this->userAdjust( $ts ); }
-
-               $d = (0 + substr( $ts, 6, 2 )) . ". " .
-                 $this->getMonthAbbreviation( substr( $ts, 4, 2 ) ) . " " .
-                 substr( $ts, 0, 4 );
-               return $d;
+       
+       function formatMonth( $month, $format ) {
+               return $this->getMonthAbbreviation( $month );
        }
-
-       function time( $ts, $adj = false ) {
-               if ( $adj ) { $ts = $this->userAdjust( $ts ); }
-
-               $t = substr( $ts, 8, 2 ) . ":" . substr( $ts, 10, 2 );
-               return $t;
+       
+       function formatDay( $day, $format ) {
+               return parent::formatDay( $day, $format ) . '.';
        }
-
-       function timeanddate( $ts, $adj = false ) {
-               return $this->date( $ts, $adj ) . " kl." . $this->time( $ts, $adj );
+       
+       function timeanddate( $ts, $adj = false, $format = false, $timecorrection = false ) {
+               $format = $this->dateFormat( $format );
+               if( $format == MW_DATE_ISO ) {
+                       return parent::timeanddate( $ts, $adj, $format, $timecorrection );
+               } else {
+                       return $this->date( $ts, $adj, $format, $timecorrection ) .
+                               " kl." .
+                               $this->time( $ts, $adj, $format, $timecorrection );
+               }
        }
 
        function formatNum( $number ) {
index 06c06ad..3926352 100644 (file)
@@ -844,17 +844,16 @@ class LanguageOc extends LanguageUtf8{
                return $wgSkinNamesOc;
        }
 
-       function date( $ts, $adj = false ) {
-               if ( $adj ) { $ts = $this->userAdjust( $ts ); }
-
-               $d = (0 + substr( $ts, 6, 2 )) . " " .
-                 $this->getMonthAbbreviation( substr( $ts, 4, 2 ) ) .
-                 " " . substr( $ts, 0, 4 );
-               return $d;
+       function formatMonth( $month, $format ) {
+               return $this->getMonthAbbreviation( $month );
        }
-
-       function timeanddate( $ts, $adj = false ) {
-               return $this->date( $ts, $adj ) . " à " . $this->time( $ts, $adj );
+       
+       function timeBeforeDate( $format ) {
+               return false;
+       }
+       
+       function timeDateSeparator( $format ) {
+               return " à ";
        }
 
        function getMessage( $key ) {
index fab2111..ba1f6d9 100644 (file)
@@ -972,14 +972,9 @@ class LanguagePl extends LanguageUtf8 {
                global $wgMonthNamesGenEn;
                return wfMsg( $wgMonthNamesGenEn[$key-1] );
        }
-
-       function date( $ts, $adj = false ) {
-               if ( $adj ) { $ts = $this->userAdjust( $ts ); }
-
-               $d = (0 + substr( $ts, 6, 2 )) .
-                 " " . $this->getMonthAbbreviation( substr( $ts, 4, 2 ) ) .
-                 " " . substr( $ts, 0, 4 );
-               return $d;
+       
+       function formatMonth( $month, $format ) {
+               return $this->getMonthAbbreviation( $month );
        }
 
        function getMessage( $key ) {
index 763a9ec..99cece8 100644 (file)
@@ -763,6 +763,7 @@ Note que os índices do conteúdo da {{SITENAME}} destes sites podem estar desac
 'skin'                  => 'Tema',
 'math'                  => 'Matemática',
 'dateformat'            => 'Formato da data',
+'datedefault' => 'Sem preferência',
 'datetime'              => 'Data e hora',
 'math_failure'          => 'Falhou ao verificar gramática',
 'math_unknown_error'    => 'Erro desconhecido',
index d59afa6..a92c2b4 100644 (file)
@@ -705,13 +705,8 @@ class LanguageSc extends LanguageUtf8 {
                return $wgQuickbarSettingsSc;
        }
 
-       function date( $ts, $adj = false ) {
-               if ( $adj ) { $ts = $this->userAdjust( $ts ); }
-
-               $d = $this->getMonthAbbreviation( substr( $ts, 4, 2 ) ) .
-                 " " . (0 + substr( $ts, 6, 2 )) . ", " .
-                 substr( $ts, 0, 4 );
-               return $d;
+       function formatMonth( $month, $format ) {
+               return $this->getMonthAbbreviation( $month );
        }
 
        function getMessage( $key ) {
index 98fe71d..8eceb6a 100644 (file)
@@ -648,6 +648,7 @@ Pozri [[m:Help:Preferences|Nastavenia]] na vysvetlenie volieb.",
 'skin' => 'Vzhľad',
 'math' => 'Matematika',
 'dateformat' => 'Formát dátumu',
+'datedefault' => 'Default',
 'math_failure' => 'Syntaktická analýza (parsing) neúspešná',
 'math_unknown_error' => 'neznáma chyba',
 'math_unknown_function' => 'neznáma funkcia ',
index 4735509..f2c178b 100644 (file)
@@ -330,6 +330,7 @@ $3
 'data' => 'Подаци',
 'databaseerror' => 'Грешка у бази',
 'dateformat' => 'Формат датума',
+'datedefault' => 'Није битно',
 'dberrortext' => 'Десила се синтаксна грешка упита базе.
 Ово је могуће због илегалног упита,
 или могуће грешке у софтверу.
index 2af84b1..f646607 100644 (file)
@@ -909,26 +909,21 @@ class LanguageSv extends LanguageUtf8 {
                return $wgSkinNamesSv;
        }
 
-       function date( $ts, $adj = false ) {
-               if ( $adj ) { $ts = $this->userAdjust( $ts ); }
-
-               $d = (0 + substr( $ts, 6, 2 )) . " " .
-               $this->getMonthName( substr( $ts, 4, 2 ) ) . " " .
-               substr( $ts, 0, 4 );
-               return $d;
-       }
-
        // "." is used as the character to separate the
        // hours from the minutes in the date output
-       function time( $ts, $adj = false ) {
-               if ( $adj ) { $ts = $this->userAdjust( $ts ); }
-
-               $t = substr( $ts, 8, 2 ) . "." . substr( $ts, 10, 2 );
-               return $t;
+       function timeSeparator() {
+               return '.';
        }
 
-       function timeanddate( $ts, $adj = false ) {
-               return $this->date( $ts, $adj ) . " kl." . $this->time( $ts, $adj );
+       function timeanddate( $ts, $adj = false, $format = false, $timecorrection = false ) {
+               $format = $this->dateFormat( $format );
+               if( $format == MW_DATE_ISO ) {
+                       return parent::timeanddate( $ts, $adj, $format, $timecorrection );
+               } else {
+                       return $this->date( $ts, $adj, $format, $timecorrection ) .
+                               " kl." .
+                               $this->time( $ts, $adj, $format, $timecorrection );
+               }
        }
 
        function getMessage( $key ) {
index 85b295a..c9358fb 100644 (file)
@@ -449,6 +449,7 @@ Ayrıca, buraya katkıda bulunarak, bu katkının kendiniz tarafından yazıldı
 'currentrev' => 'Güncel sürüm',
 'currentrevisionlink' => 'en güncel halini göster',
 'dateformat' => 'Tarih gösterimi',
+'datedefault' => 'Tercih yok',
 'datetime' => 'Tarih ve saat',
 'deadendpages' => 'Başka sayfalara bağlantısı olmayan sayfalar',
 'default' => 'orjinal',
index e603249..6895f2f 100644 (file)
@@ -557,6 +557,7 @@ Xem thêm [[{{ns:4}}:Trợ giúp cho Lựa chọn cá nhân]].",
 'skin'              => 'Ngoại hình',
 'math'                         => 'Công thức toán',
 'dateformat'           => 'Ngày tháng',
+'datedefault' => 'Không lựa chọn',
 'math_failure'         => 'Lỗi toán',
 'math_unknown_error'   => 'lỗi chưa rõ',
 'math_unknown_function'        => 'hàm chưa rõ',
index 03c148f..561190a 100644 (file)
@@ -924,6 +924,10 @@ class LanguageZh_cn extends LanguageUtf8 {
                global $wgSkinNamesZh_cn;
                return $wgSkinNamesZh_cn;
        }
+       
+       function getDateFormats() {
+               return false;
+       }
 
        function date( $ts, $adj = false ) {
                if ( $adj ) { $ts = $this->userAdjust( $ts ); }