* (bug 7556) Time zone names in signatures lack i18n
authorNiklas Laxström <nikerabbit@users.mediawiki.org>
Sat, 31 Jan 2009 17:34:47 +0000 (17:34 +0000)
committerNiklas Laxström <nikerabbit@users.mediawiki.org>
Sat, 31 Jan 2009 17:34:47 +0000 (17:34 +0000)
RELEASE-NOTES
includes/DefaultSettings.php
includes/parser/Parser.php

index 7f9976c..0f4c86b 100644 (file)
@@ -76,6 +76,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * The {{NAMESPACE}}, {{TALKSPACE}}, and {{SUBJECTSPACE}} magic words can now be
   used as parser functions to return the desired namespace for a given title.
 * Styled #mw-data-after-content in cologneblue.css to match the rest of the font (bug 17110)
+* (bug 7556) Time zone names in signatures lack i18n
 
 === Bug fixes in 1.15 ===
 * (bug 16968) Special:Upload no longer throws useless warnings.
index a31ecd6..7012e1f 100644 (file)
@@ -2737,6 +2737,9 @@ $wgBrowserBlackList = array(
  *
  * This variable is currently used ONLY for signature formatting, not for
  * anything else.
+ *
+ * Timezones can be translated by editing MediaWiki messages of type
+ * timezone-nameinlowercase like timezone-utc.
  */
 # $wgLocaltimezone = 'GMT';
 # $wgLocaltimezone = 'PST8PDT';
index f2a8447..76161b2 100644 (file)
@@ -3715,6 +3715,15 @@ class Parser
                        putenv( 'TZ='.$wgLocaltimezone );
                        $ts = date( 'YmdHis', $unixts );
                        $tz = date( 'T', $unixts );  # might vary on DST changeover!
+
+                       /* Allow translation of timezones trough wiki. date() can return
+                        * whatever crap the system uses, localised or not, so we cannot
+                        * ship premade translations.
+                        */
+                       $key = 'timezone-' . strtolower( trim( $tz ) );
+                       $value = wfMsgForContent( $key );
+                       if ( !wfEmptyMsg( $key, $value ) ) $tz = $value;
+
                        putenv( 'TZ='.$oldtz );
                }