[MediaWiki-CVS] SVN: [72840] branches/MwEmbedStandAlone
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/72840 Revision: 72840 Author: dale Date: 2010-09-12 07:24:32 + (Sun, 12 Sep 2010) Log Message: --- * added attributionButton config option as a genneral attribution support type * added jQuery include with player test * added about library link to player menu * added concept of localSettings.js for site config * removed unused wgScriptCacheDir in mwEmbedFrame.php Modified Paths: -- branches/MwEmbedStandAlone/ResourceLoader.php branches/MwEmbedStandAlone/modules/AddMedia/searchLibs/mediaWikiSearch.js branches/MwEmbedStandAlone/modules/EmbedPlayer/EmbedPlayer.i18n.php branches/MwEmbedStandAlone/modules/EmbedPlayer/loader.js branches/MwEmbedStandAlone/modules/EmbedPlayer/mw.EmbedPlayer.js branches/MwEmbedStandAlone/modules/EmbedPlayer/skins/kskin/mw.PlayerSkinKskin.js branches/MwEmbedStandAlone/modules/EmbedPlayer/skins/mw.PlayerControlBuilder.js branches/MwEmbedStandAlone/modules/Sequencer/mw.SequencerTimeline.js branches/MwEmbedStandAlone/modules/SmilPlayer/mw.SmilAnimate.js branches/MwEmbedStandAlone/mwEmbed.js branches/MwEmbedStandAlone/mwEmbedFrame.php Added Paths: --- branches/MwEmbedStandAlone/localSettings.js branches/MwEmbedStandAlone/modules/EmbedPlayer/tests/Player_IncludeJQuery.html Modified: branches/MwEmbedStandAlone/ResourceLoader.php === --- branches/MwEmbedStandAlone/ResourceLoader.php 2010-09-12 05:27:29 UTC (rev 72839) +++ branches/MwEmbedStandAlone/ResourceLoader.php 2010-09-12 07:24:32 UTC (rev 72840) @@ -151,8 +151,16 @@ // Output the current language resource js $this-output .= NamedResourceLoader::getLanguageJs( $this-langCode ); - - // Add the required core mwEmbed style sheets Commted out + + // Output the localSettings.js + $localSettingsJsPath = realpath( dirname( __FILE__ ) ) . '/localSettings.js'; + if( is_file( $localSettingsJsPath ) ){ + wfSuppressWarnings(); + $this-output .= file_get_contents( $localSettingsJsPath ); + wfRestoreWarnings(); + } + + // Add the required core mwEmbed style sheets removed for now // because when creating stand alone packages js package with css // the paths get messed up. /* Added: branches/MwEmbedStandAlone/localSettings.js === --- branches/MwEmbedStandAlone/localSettings.js (rev 0) +++ branches/MwEmbedStandAlone/localSettings.js 2010-09-12 07:24:32 UTC (rev 72840) @@ -0,0 +1,9 @@ +/** +* Local Setting file hosts any per site configuration +* +* This file is automatically included in any resourceLoader or mwEmbed.js request +* +* You can put any mw.setConfig('moduleOption', value ) calls in here. +* +* In a fresh svn checkout this file will always be empty. +*/ Modified: branches/MwEmbedStandAlone/modules/AddMedia/searchLibs/mediaWikiSearch.js === --- branches/MwEmbedStandAlone/modules/AddMedia/searchLibs/mediaWikiSearch.js 2010-09-12 05:27:29 UTC (rev 72839) +++ branches/MwEmbedStandAlone/modules/AddMedia/searchLibs/mediaWikiSearch.js 2010-09-12 07:24:32 UTC (rev 72840) @@ -331,9 +331,6 @@ if ( size.width ) { request['iiurlwidth'] = size.width; } - if( size.height ){ - request['iiurlheight'] = size.height; - } mw.getJSON( this.provider.apiUrl, request, function( data ) { var imObj = { }; Modified: branches/MwEmbedStandAlone/modules/EmbedPlayer/EmbedPlayer.i18n.php === --- branches/MwEmbedStandAlone/modules/EmbedPlayer/EmbedPlayer.i18n.php 2010-09-12 05:27:29 UTC (rev 72839) +++ branches/MwEmbedStandAlone/modules/EmbedPlayer/EmbedPlayer.i18n.php 2010-09-12 07:24:32 UTC (rev 72840) @@ -34,6 +34,9 @@ 'mwe-embedplayer-download' = 'Download', 'mwe-embedplayer-share' = 'Share', 'mwe-embedplayer-credits' = 'Credits', + 'mwe-embedplayer-about-library'= 'About kaltura player', + 'mwe-embedplayer-about-library-desc' = 'Kaltura\'s HTML5 Media Library enables you to take advantage of the html5 lt;videogt; and lt;audiogt; tags
[MediaWiki-CVS] SVN: [72841] trunk/phase3
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/72841 Revision: 72841 Author: ialex Date: 2010-09-12 07:58:00 + (Sun, 12 Sep 2010) Log Message: --- Add `watchlist`.`wl_notificationtimestamp` through addField() instead of duplicating the code in do_watchlist_update() Modified Paths: -- trunk/phase3/includes/installer/MysqlUpdater.php trunk/phase3/maintenance/updaters.inc Modified: trunk/phase3/includes/installer/MysqlUpdater.php === --- trunk/phase3/includes/installer/MysqlUpdater.php2010-09-12 07:24:32 UTC (rev 72840) +++ trunk/phase3/includes/installer/MysqlUpdater.php2010-09-12 07:58:00 UTC (rev 72841) @@ -39,6 +39,7 @@ array( 'addField', 'recentchanges', 'rc_patrolled', 'patch-rc-patrol.sql' ), array( 'addTable', 'logging', 'patch-logging.sql' ), array( 'addField', 'user', 'user_token', 'patch-user_token.sql' ), + array( 'addField', 'watchlist', 'wl_notificationtimestamp', 'patch-email-notification.sql' ), array( 'do_watchlist_update' ), array( 'dropField', 'user', 'user_emailauthenticationtimestamp', 'patch-email-authentication.sql' ), Modified: trunk/phase3/maintenance/updaters.inc === --- trunk/phase3/maintenance/updaters.inc 2010-09-12 07:24:32 UTC (rev 72840) +++ trunk/phase3/maintenance/updaters.inc 2010-09-12 07:58:00 UTC (rev 72841) @@ -56,20 +56,11 @@ function do_watchlist_update() { $dbw = wfGetDB( DB_MASTER ); - if ( $dbw-fieldExists( 'watchlist', 'wl_notificationtimestamp' ) ) { - wfOut( ...the watchlist table is already set up for email notification.\n ); - } else { - wfOut( Adding wl_notificationtimestamp field for email notification management. ); - /* ALTER TABLE watchlist ADD (wl_notificationtimestamp varchar(14) binary NOT NULL default '0'); */ - $dbw-sourceFile( archive( 'patch-email-notification.sql' ) ); - wfOut( ok\n ); - } # Check if we need to add talk page rows to the watchlist $talk = $dbw-selectField( 'watchlist', 'count(*)', 'wl_namespace 1', __METHOD__ ); $nontalk = $dbw-selectField( 'watchlist', 'count(*)', 'NOT (wl_namespace 1)', __METHOD__ ); if ( $talk != $nontalk ) { wfOut( Adding missing watchlist talk page rows... ); - flush(); $dbw-insertSelect( 'watchlist', 'watchlist', array( @@ -278,7 +269,6 @@ wfOut( Converting links and brokenlinks tables to pagelinks... ); $dbw-sourceFile( archive( 'patch-pagelinks.sql' ) ); wfOut( ok\n ); - flush(); global $wgCanonicalNamespaceNames; foreach ( $wgCanonicalNamespaceNames as $ns = $name ) { ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [72842] trunk/phase3
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/72842 Revision: 72842 Author: ialex Date: 2010-09-12 09:07:51 + (Sun, 12 Sep 2010) Log Message: --- * Use Maintenance::runChild() to get the child script instance * Moved do_stats_init() to DatabaseUpdater and call it from doUpdates() for consistency with purgeCache(), this inverts the order of execution with default messages deletion, but I don't think this should break anything * Removed the early return for postgres, which was a leftover from the old do_postgres_updates() crap Modified Paths: -- trunk/phase3/includes/installer/DatabaseUpdater.php trunk/phase3/maintenance/update.php trunk/phase3/maintenance/updaters.inc Modified: trunk/phase3/includes/installer/DatabaseUpdater.php === --- trunk/phase3/includes/installer/DatabaseUpdater.php 2010-09-12 07:58:00 UTC (rev 72841) +++ trunk/phase3/includes/installer/DatabaseUpdater.php 2010-09-12 09:07:51 UTC (rev 72842) @@ -135,6 +135,7 @@ if( $purge ) { $this-purgeCache(); } + $this-checkStats(); } /** @@ -376,4 +377,22 @@ $this-db-delete( 'objectcache', '*', __METHOD__ ); wfOut( done.\n ); } + + /** +* Check the site_stats table is not properly populated. +*/ + protected function checkStats() { + wfOut( Checking site_stats row... ); + $row = $this-db-selectRow( 'site_stats', '*', array( 'ss_row_id' = 1 ), __METHOD__ ); + if ( $row === false ) { + wfOut( data is missing! rebuilding...\n ); + } elseif ( isset( $row-site_stats ) $row-ss_total_pages == -1 ) { + wfOut( missing ss_total_pages, rebuilding...\n ); + } else { + wfOut( done.\n ); + return; + } + SiteStatsInit::doAllAndCommit( false ); + } + } Modified: trunk/phase3/maintenance/update.php === --- trunk/phase3/maintenance/update.php 2010-09-12 07:58:00 UTC (rev 72841) +++ trunk/phase3/maintenance/update.php 2010-09-12 09:07:51 UTC (rev 72842) @@ -59,21 +59,11 @@ $updater = DatabaseUpdater::newForDb( $db, $shared ); $updater-doUpdates( $purge ); - if ( !defined( 'MW_NO_SETUP' ) ) { - define( 'MW_NO_SETUP', true ); - } - foreach( $updater-getPostDatabaseUpdateMaintenance() as $maint ) { - call_user_func_array( array( new $maint, 'execute' ), array() ); + $this-runChild( $maint )-execute(); } - if ( $db-getType() === 'postgres' ) { - return; - } - - do_stats_init(); - - $this-output( Done.\n ); + $this-output( \nDone.\n ); } protected function afterFinalSetup() { Modified: trunk/phase3/maintenance/updaters.inc === --- trunk/phase3/maintenance/updaters.inc 2010-09-12 07:58:00 UTC (rev 72841) +++ trunk/phase3/maintenance/updaters.inc 2010-09-12 09:07:51 UTC (rev 72842) @@ -567,21 +567,6 @@ } } -function do_stats_init() { - // Sometimes site_stats table is not properly populated. - wfOut( \nChecking site_stats row... ); - $row = wfGetDB( DB_MASTER )-selectRow( 'site_stats', '*', array( 'ss_row_id' = 1 ), __METHOD__ ); - if ( $row === false ) { - wfOut( data is missing! rebuilding...\n ); - } elseif ( isset( $row-site_stats ) $row-ss_total_pages == -1 ) { - wfOut( missing ss_total_pages, rebuilding...\n ); - } else { - wfOut( ok.\n ); - return; - } - SiteStatsInit::doAllAndCommit( false ); -} - function do_active_users_init() { $dbw = wfGetDB( DB_MASTER ); $activeUsers = $dbw-selectField( 'site_stats', 'ss_active_users', false, __METHOD__ ); ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [72843] trunk/extensions/Translate/MessageCollection.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/72843 Revision: 72843 Author: nikerabbit Date: 2010-09-12 09:31:46 + (Sun, 12 Sep 2010) Log Message: --- Fix docu Modified Paths: -- trunk/extensions/Translate/MessageCollection.php Modified: trunk/extensions/Translate/MessageCollection.php === --- trunk/extensions/Translate/MessageCollection.php2010-09-12 09:07:51 UTC (rev 72842) +++ trunk/extensions/Translate/MessageCollection.php2010-09-12 09:31:46 UTC (rev 72843) @@ -305,16 +305,12 @@ */ protected function filterOnCondition( array $keys, array $condKeys, $condition = true ) { if ( $condition === true ) { - /** -* Delete $condKeys from $keys -*/ + // Delete $condKeys from $keys foreach ( array_keys( $condKeys ) as $key ) { unset( $keys[$key] ); } } else { - /** -* Keep the keys which are in $condKeys -*/ + // Keep the keys which are in $condKeys foreach ( array_keys( $keys ) as $key ) { if ( !isset( $condKeys[$key] ) ) { unset( $keys[$key] ); ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [72844] trunk/extensions/Translate/groups/StatusNet/StatusNet.yaml
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/72844 Revision: 72844 Author: nikerabbit Date: 2010-09-12 09:32:21 + (Sun, 12 Sep 2010) Log Message: --- Yaml conf for StatusNet Modified Paths: -- trunk/extensions/Translate/groups/StatusNet/StatusNet.yaml Modified: trunk/extensions/Translate/groups/StatusNet/StatusNet.yaml === --- trunk/extensions/Translate/groups/StatusNet/StatusNet.yaml 2010-09-12 09:31:46 UTC (rev 72843) +++ trunk/extensions/Translate/groups/StatusNet/StatusNet.yaml 2010-09-12 09:32:21 UTC (rev 72844) @@ -1,19 +1,25 @@ --- BASIC: - id: out-statusnet + id: out-statusnet-beta label: StatusNet description: {{int:bw-desc-statusnet}} namespace: NS_STATUSNET - display: out/statusnet - class: GettextMessageGroup + display: out/statusnet/ + class: FileBasedMessageGroup FILES: class: GettextFFS - sourcePattern: %GROUPROOT%/locale/%CODE%/LC_MESSAGES/statusnet.po - targetPattern: locale/%CODE%/LC_MESSAGES/statusnet.po + sourcePattern: %GROUPROOT%/statusnet/locale/%CODE%/LC_MESSAGES/statusnet.po + definitionFile: %GROUPROOT%/statusnet/locale/statusnet.pot + targetPattern: statusnet/locale/%CODE%/LC_MESSAGES/statusnet.po codeMap: +no:nb +nl-be: nl_BE en-gb: en_GB -no: nb +en-us: en_US pt-br: pt_BR zh-hans: zh_CN zh-hant: zh_TW + header: | +# This file is distributed under the same license as the StatusNet package. +# \ No newline at end of file ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [72845] trunk/extensions/Translate/ffs/Gettext.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/72845 Revision: 72845 Author: nikerabbit Date: 2010-09-12 09:40:47 + (Sun, 12 Sep 2010) Log Message: --- Fixed Gettext messages parsing and implemented header output for it Modified Paths: -- trunk/extensions/Translate/ffs/Gettext.php Modified: trunk/extensions/Translate/ffs/Gettext.php === --- trunk/extensions/Translate/ffs/Gettext.php 2010-09-12 09:32:21 UTC (rev 72844) +++ trunk/extensions/Translate/ffs/Gettext.php 2010-09-12 09:40:47 UTC (rev 72845) @@ -361,9 +361,7 @@ * @ingroup FFS */ class GettextFFS extends SimpleFFS { - // - // READ - // + public function readFromVariable( $data ) { $authors = array(); @@ -374,9 +372,12 @@ # Then messages and everything else $parsedData = $this-parseGettext( $data ); - $parsedData['MESSAGES'] = $this-group-getMangler()-mangle( $parsedData['MESSAGES'] ); $parsedData['AUTHORS'] = $authors; + foreach ( $parsedData['MESSAGES'] as $key = $value ) { + if ( $value === '' ) unset( $parsedData['MESSAGES'][$key] ); + } + return $parsedData; } @@ -390,6 +391,8 @@ * @todo Refactor method into smaller parts. */ public static function parseGettextData( $data, $useCtxtAsKey = false ) { + $potmode = false; + // Normalise newlines, to make processing easier lates $data = str_replace( \r\n, \n, $data ); @@ -400,7 +403,6 @@ /* First one isn't an actual message. We'll handle it specially below */ $headerSection = array_shift( $sections ); - /* Since this is the header section, we are only interested in the tags * and msgid is empty. Somewhere we should extract the header comments * too */ @@ -408,6 +410,10 @@ if ( $match !== null ) { $headerBlock = self::formatForWiki( $match, 'trim' ); $headers = self::parseHeaderTags( $headerBlock ); + + // Check for pot-mode by checking if the header is fuzzy + $flags = self::parseFlags( $headerSection ); + if ( in_array( 'fuzzy', $flags, true ) ) $potmode = true; } else { throw new MWException( Gettext file header was not found:\n\n$data ); } @@ -501,18 +507,15 @@ } // Parse flags - $matches = array(); - if ( preg_match( '/^#,(.*)$/mu', $section, $matches ) ) { - $flags = array_map( 'trim', explode( ',', $matches[1] ) ); - foreach ( $flags as $key = $flag ) { - if ( $flag === 'fuzzy' ) { - $item['str'] = TRANSLATE_FUZZY . $item['str']; - unset( $flags[$key] ); - } + $flags = self::parseFlags( $section ); + foreach ( $flags as $key = $flag ) { + if ( $flag === 'fuzzy' ) { + $item['str'] = TRANSLATE_FUZZY . $item['str']; + unset( $flags[$key] ); } - $item['flags'] = $flags; } - + $item['flags'] = $flags; + // Rest of the comments $matches = array(); if ( preg_match_all( '/^#(.?) (.*)$/m', $section, $matches, PREG_SET_ORDER ) ) { @@ -529,7 +532,7 @@ $key = self::generateKeyFromItem( $item ); } - $messages[$key] = $item['str']; + $messages[$key] = $potmode ? $item['id'] : $item['str']; $template[$key] = $item; } @@ -541,6 +544,15 @@ ); } + public static function parseFlags( $section ) { + $matches = array(); + if ( preg_match( '/^#,(.*)$/mu', $section, $matches ) ) { + return array_map( 'trim', explode( ',', $matches[1] ) ); + } else { + return array(); + } + } + public static function expectKeyword( $name, $section ) { /* Catches the multiline textblock that comes after keywords msgid, * msgstr, msgid_plural, msgctxt. @@ -613,12 +625,9 @@ // WRITE // protected
[MediaWiki-CVS] SVN: [72846] trunk/phase3/includes/Article.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/72846 Revision: 72846 Author: aaron Date: 2010-09-12 10:02:19 + (Sun, 12 Sep 2010) Log Message: --- Made getUndoText() not use unreliable getContent() function (weird wgRequest dependency) Modified Paths: -- trunk/phase3/includes/Article.php Modified: trunk/phase3/includes/Article.php === --- trunk/phase3/includes/Article.php 2010-09-12 09:40:47 UTC (rev 72845) +++ trunk/phase3/includes/Article.php 2010-09-12 10:02:19 UTC (rev 72846) @@ -321,9 +321,13 @@ * @return mixed string on success, false on failure */ public function getUndoText( Revision $undo, Revision $undoafter = null ) { + $currentRev = Revision::newFromTitle( $this-mTitle ); + if ( !$currentRev ) { + return false; // no page + } $undo_text = $undo-getText(); $undoafter_text = $undoafter-getText(); - $cur_text = $this-getContent(); + $cur_text = $currentRev-getText(); if ( $cur_text == $undo_text ) { # No use doing a merge if it's just a straight revert. ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [72847] trunk/extensions/Translate/ffs/Gettext.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/72847 Revision: 72847 Author: nikerabbit Date: 2010-09-12 10:26:31 + (Sun, 12 Sep 2010) Log Message: --- Implemented Gettext specific file headers Modified Paths: -- trunk/extensions/Translate/ffs/Gettext.php Modified: trunk/extensions/Translate/ffs/Gettext.php === --- trunk/extensions/Translate/ffs/Gettext.php 2010-09-12 10:02:19 UTC (rev 72846) +++ trunk/extensions/Translate/ffs/Gettext.php 2010-09-12 10:26:31 UTC (rev 72847) @@ -625,8 +625,11 @@ // WRITE // protected function writeReal( MessageCollection $collection ) { + global $wgSitename; $output = $this-doHeader( $collection ); + $specs = array(); + $mangler = $this-group-getMangler(); $messages = array(); foreach ( $collection as $key = $m ) { @@ -647,7 +650,7 @@ } protected function doHeader( MessageCollection $collection ) { - global $wgSitename; + global $wgSitename, $wgServer; $code = $collection-code; $name = TranslateUtils::getLanguageName( $code ); $native = TranslateUtils::getLanguageName( $code, true ); @@ -666,6 +669,33 @@ PHP; + /// @todo twn specific + $portal = Title::makeTitle( NS_PORTAL, $code )-getFullUrl(); + + $specs = array(); + + $specs['Project-Id-Version'] = $this-group-getLabel(); + $specs['Report-Msgid-Bugs'] = $wgSitename; + $specs['POT-Creation-Date'] = self::formatTime( $this-getPotTime() ); + $specs['PO-Revision-Date'] = self::formatTime( wfTimestampNow() ); + $specs['Language-Team'] = $name $portal; + $specs['Content-Type'] = 'text/plain; charset=UTF-8'; + $specs['Content-Transfer-Encoding'] = '8bit'; + $specs['X-Generator'] = $this-getGenerator(); + $specs['X-Translation-Project'] = $wgSitename at $wgServer; + $specs['X-Language-Code'] = $code; + // Prepend # so that message import does not think this is a file it can import + $specs['X-Message-Group'] = '#' . $this-group-getId(); + + $output .= 'msgid ' . \n; + $output .= 'msgstr ' . \n; + $output .= '' . \n; + + foreach ( $specs as $k = $v ) { + $output .= self::escape( $k: $v\n ) . \n; + } + + return $output; } @@ -680,4 +710,30 @@ return $output; } + + protected static function formatTime( $time ) { + $lang = Language::factory( 'en' ); + return $lang-sprintfDate( 'xnY-xnm-xnd xnH:xni:xns+', $time ); + } + + protected function getPotTime() { + $defs = new MessageGroupCache( $this-group ); + return $defs-exists() ? $defs-getTimestamp() : wfTimestampNow(); + } + + protected function getGenerator() { + return 'MediaWiki ' . SpecialVersion::getVersion() . + ; Translate extension ( . TRANSLATE_VERSION . ); + } + + protected static function escape( $line ) { + // There may be \ as a last character, for keeping trailing whitespace + $line = preg_replace( '/$/', '', $line ); + $line = addcslashes( $line, '\\' ); + $line = str_replace( \n, '\n', $line ); + $line = '' . $line . ''; + + return $line; + } + } ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [72848] trunk/extensions/Translate/ffs/Gettext.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/72848 Revision: 72848 Author: nikerabbit Date: 2010-09-12 10:29:38 + (Sun, 12 Sep 2010) Log Message: --- Remove unused code from r72847 Modified Paths: -- trunk/extensions/Translate/ffs/Gettext.php Modified: trunk/extensions/Translate/ffs/Gettext.php === --- trunk/extensions/Translate/ffs/Gettext.php 2010-09-12 10:26:31 UTC (rev 72847) +++ trunk/extensions/Translate/ffs/Gettext.php 2010-09-12 10:29:38 UTC (rev 72848) @@ -625,11 +625,8 @@ // WRITE // protected function writeReal( MessageCollection $collection ) { - global $wgSitename; $output = $this-doHeader( $collection ); - $specs = array(); - $mangler = $this-group-getMangler(); $messages = array(); foreach ( $collection as $key = $m ) { ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [72849] trunk/extensions/Translate
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/72849 Revision: 72849 Author: nikerabbit Date: 2010-09-12 10:39:05 + (Sun, 12 Sep 2010) Log Message: --- Read pot and previous translation file if available and use plural header form latter if avaiblable Modified Paths: -- trunk/extensions/Translate/Groups.php trunk/extensions/Translate/ffs/Gettext.php Modified: trunk/extensions/Translate/Groups.php === --- trunk/extensions/Translate/Groups.php 2010-09-12 10:29:38 UTC (rev 72848) +++ trunk/extensions/Translate/Groups.php 2010-09-12 10:39:05 UTC (rev 72849) @@ -209,9 +209,13 @@ $messages = array(); $cache = new MessageGroupCache( $this ); - - foreach ( $cache-getKeys() as $key ) { - $messages[$key] = $cache-get( $key ); + if ( !$cache-exists() ) { + wfWarn( By-passing message group cache ); + $messages = $this-load( 'en' ); + } else { + foreach ( $cache-getKeys() as $key ) { + $messages[$key] = $cache-get( $key ); + } } $definitions = new MessageDefinitions( $namespace, $messages ); Modified: trunk/extensions/Translate/ffs/Gettext.php === --- trunk/extensions/Translate/ffs/Gettext.php 2010-09-12 10:29:38 UTC (rev 72848) +++ trunk/extensions/Translate/ffs/Gettext.php 2010-09-12 10:39:05 UTC (rev 72849) @@ -625,7 +625,9 @@ // WRITE // protected function writeReal( MessageCollection $collection ) { - $output = $this-doHeader( $collection ); + $pot = $this-read( 'en' ); + $template = $this-read( $collection-code ); + $output = $this-doGettextHeader( $collection, $template ); $mangler = $this-group-getMangler(); $messages = array(); @@ -646,7 +648,7 @@ return $output; } - protected function doHeader( MessageCollection $collection ) { + protected function doGettextHeader( MessageCollection $collection, $template ) { global $wgSitename, $wgServer; $code = $collection-code; $name = TranslateUtils::getLanguageName( $code ); @@ -669,10 +671,10 @@ /// @todo twn specific $portal = Title::makeTitle( NS_PORTAL, $code )-getFullUrl(); - $specs = array(); + $specs = isset( $template['HEADERS'] ) ? $template['HEADERS'] : array(); $specs['Project-Id-Version'] = $this-group-getLabel(); - $specs['Report-Msgid-Bugs'] = $wgSitename; + $specs['Report-Msgid-Bugs-To'] = $wgSitename; $specs['POT-Creation-Date'] = self::formatTime( $this-getPotTime() ); $specs['PO-Revision-Date'] = self::formatTime( wfTimestampNow() ); $specs['Language-Team'] = $name $portal; ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [72850] trunk/extensions/Translate/Message.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/72850 Revision: 72850 Author: nikerabbit Date: 2010-09-12 11:34:48 + (Sun, 12 Sep 2010) Log Message: --- Add getTags method to TMessage Modified Paths: -- trunk/extensions/Translate/Message.php Modified: trunk/extensions/Translate/Message.php === --- trunk/extensions/Translate/Message.php 2010-09-12 10:39:05 UTC (rev 72849) +++ trunk/extensions/Translate/Message.php 2010-09-12 11:34:48 UTC (rev 72850) @@ -89,6 +89,14 @@ public function hasTag( $tag ) { return in_array( $tag, $this-tags, true ); } + + /** +* Return all tags for this message; +* @return \list{String} +*/ + public function getTags() { + return $this-tags; + } } /** ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [72851] trunk/extensions/Translate/TranslateTasks.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/72851 Revision: 72851 Author: nikerabbit Date: 2010-09-12 11:35:28 + (Sun, 12 Sep 2010) Log Message: --- Don't do filtering for file exports, let the FFS handle those in a way that is suitable for them Modified Paths: -- trunk/extensions/Translate/TranslateTasks.php Modified: trunk/extensions/Translate/TranslateTasks.php === --- trunk/extensions/Translate/TranslateTasks.php 2010-09-12 11:34:48 UTC (rev 72850) +++ trunk/extensions/Translate/TranslateTasks.php 2010-09-12 11:35:28 UTC (rev 72851) @@ -336,6 +336,12 @@ class ExportMessagesTask extends ViewMessagesTask { protected $id = 'export'; + protected function preinit() { + $code = $this-options-getLanguage(); + $this-collection = $this-group-initCollection( $code ); + $this-collection-setInfile( $this-group-load( $code ) ); + } + // No paging should be done. protected function doPaging() {} @@ -365,7 +371,6 @@ } public function output() { - $this-collection-filter( 'translated', false ); if ( $this-group instanceof FileBasedMessageGroup ) { $ffs = $this-group-getFFS(); $data = $ffs-writeIntoVariable( $this-collection ); ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [72852] trunk/extensions/Translate/ffs/Gettext.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/72852 Revision: 72852 Author: nikerabbit Date: 2010-09-12 11:37:12 + (Sun, 12 Sep 2010) Log Message: --- Bare minimum for Gettext exporter: msg(ctxt,id,str) + flags Modified Paths: -- trunk/extensions/Translate/ffs/Gettext.php Modified: trunk/extensions/Translate/ffs/Gettext.php === --- trunk/extensions/Translate/ffs/Gettext.php 2010-09-12 11:35:28 UTC (rev 72851) +++ trunk/extensions/Translate/ffs/Gettext.php 2010-09-12 11:37:12 UTC (rev 72852) @@ -621,30 +621,26 @@ return $tags; } - // - // WRITE - // protected function writeReal( MessageCollection $collection ) { $pot = $this-read( 'en' ); $template = $this-read( $collection-code ); $output = $this-doGettextHeader( $collection, $template ); - - $mangler = $this-group-getMangler(); - $messages = array(); foreach ( $collection as $key = $m ) { - $key = $mangler-unmangle( $key ); - $value = $m-translation(); - $value = str_replace( TRANSLATE_FUZZY, '', $value ); + $tags = $m-getTags(); + if ( $tags ) { + $output .= #, . implode( ', ', $tags ) . \n; + } - if ( $value === '' ) { - continue; + if ( isset( $pot['TEMPLATE'][$key]['msgctxt'] ) ) { + $output .= 'msgctxt ' . self::escape( $pot['TEMPLATE'][$key]['msgctxt'] ) . \n; } - $messages[$key] = $value; + $translation = str_replace( TRANSLATE_FUZZY, '', $m-translation() ); + + $output .= 'msgid ' . self::escape( $m-definition() ) . \n; + $output .= 'msgstr ' . self::escape( $translation ) . \n\n; } - $output .= TranslateYaml::dump( $messages ); - return $output; } @@ -694,6 +690,7 @@ $output .= self::escape( $k: $v\n ) . \n; } + $output .= \n; return $output; } ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [72853] trunk/extensions/Maps/includes/parserHooks/Maps_DisplayMap.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/72853 Revision: 72853 Author: jeroendedauw Date: 2010-09-12 11:48:21 + (Sun, 12 Sep 2010) Log Message: --- Changes for 0.7 - updated parameter definitions for display_map Modified Paths: -- trunk/extensions/Maps/includes/parserHooks/Maps_DisplayMap.php Modified: trunk/extensions/Maps/includes/parserHooks/Maps_DisplayMap.php === --- trunk/extensions/Maps/includes/parserHooks/Maps_DisplayMap.php 2010-09-12 11:37:12 UTC (rev 72852) +++ trunk/extensions/Maps/includes/parserHooks/Maps_DisplayMap.php 2010-09-12 11:48:21 UTC (rev 72853) @@ -59,21 +59,26 @@ protected function getParameterInfo() { global $egMapsMapWidth, $egMapsMapHeight, $egMapsDefaultServices; - return array_merge( MapsMapper::getCommonParameters(), array( - // TODO - 'mappingservice' = array( - 'default' = $egMapsDefaultServices['display_map'] - ), - 'coordinates' = array( - 'required' = true, - 'tolower' = false, - 'aliases' = array( 'coords', 'location', 'address' ), - 'criteria' = array( - new CriterionIsLocation() - ), - 'output-type' = 'coordinateSet', - ), - ) ); + $params = MapsMapper::getCommonParameters(); + + $params['mappingservice']-default = $egMapsDefaultServices['display_map']; + + $params['coordinates'] = new Parameter( + 'coordinates', + Parameter::TYPE_STRING, + null, + array( 'coords', 'location', 'address' ), + array( + new CriterionIsLocation(), + ) + ); + + $params['coordinates']-lowerCaseValue = false; + + // TODO + $params['coordinates']-outputTypes = array( 'coordinateSet' = array( 'coordinateSet' ) ); + + return $params; } /** ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [72854] trunk/extensions/Maps/Maps.i18n.magic.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/72854 Revision: 72854 Author: jeroendedauw Date: 2010-09-12 11:49:49 + (Sun, 12 Sep 2010) Log Message: --- Changes for 0.7 - removed geocodelat and geocodelon from the magic o_O i18n file Modified Paths: -- trunk/extensions/Maps/Maps.i18n.magic.php Modified: trunk/extensions/Maps/Maps.i18n.magic.php === --- trunk/extensions/Maps/Maps.i18n.magic.php 2010-09-12 11:48:21 UTC (rev 72853) +++ trunk/extensions/Maps/Maps.i18n.magic.php 2010-09-12 11:49:49 UTC (rev 72854) @@ -6,8 +6,6 @@ 'display_map' = array( 0, 'display_map' ), 'display_point' = array( 0, 'display_point', 'display_points' ), 'geocode' = array( 0, 'geocode' ), - 'geocodelat'= array( 0, 'geocodelat' ), - 'geocodelon'= array( 0, 'geocodelon' ), 'geodistance' = array( 0, 'geodistance' ), 'finddestination' = array( 0, 'finddestination' ), 'coordinates' = array( 0, 'coordinates' ), @@ -23,8 +21,6 @@ 'display_map' = array( '0', 'عرض_الخريطة', 'display_map' ), 'display_point' = array( '0', 'نقطة_العرض', 'نقاط_العرض', 'display_point', 'display_points' ), 'geocode' = array( '0', 'كود_جغرافي', 'geocode' ), - 'geocodelat'= array( '0', 'كود_جغرافي_طول', 'geocodelat' ), - 'geocodelon'= array( '0', 'كود_جغرافي_عرض', 'geocodelon' ), 'geodistance' = array( '0', 'مسافة_جغرافية', 'geodistance' ), 'finddestination' = array( '0', 'إيجاد_الوجهة', 'finddestination' ), 'coordinates' = array( '0', 'إحداثيات', 'coordinates' ), @@ -35,8 +31,6 @@ 'display_map' = array( '0', 'عرض_الخريطه', 'عرض_الخريطة', 'display_map' ), 'display_point' = array( '0', 'نقطة_العرض', 'نقاط_العرض', 'display_point', 'display_points' ), 'geocode' = array( '0', 'كود_جغرافي', 'geocode' ), - 'geocodelat'= array( '0', 'كود_جغرافى_طول', 'كود_جغرافي_طول', 'geocodelat' ), - 'geocodelon'= array( '0', 'كود_جغرافى_عرض', 'كود_جغرافي_عرض', 'geocodelon' ), 'geodistance' = array( '0', 'مسافه_جغرافيه', 'مسافة_جغرافية', 'geodistance' ), 'finddestination' = array( '0', 'إيجاد_الوجهه', 'إيجاد_الوجهة', 'finddestination' ), 'coordinates' = array( '0', 'إحداثيات', 'coordinates' ), @@ -45,15 +39,11 @@ $magicWords['ce'] = array( 'display_point' = array( '0', 'гайта_тlадам', 'показать_точку', 'display_point', 'display_points' ), 'geocode' = array( '0', 'геагишар', 'геокод', 'geocode' ), - 'geocodelat'= array( '0', 'геагишаршуьр', 'геокодшир', 'geocodelat' ), - 'geocodelon'= array( '0', 'геагишарйахал', 'геокоддол', 'geocodelon' ), ); $magicWords['es'] = array( 'display_point' = array( '0', 'mostrar_punto', 'display_point', 'display_points' ), 'geocode' = array( '0', 'geocodificar', 'geocode' ), - 'geocodelat'= array( '0', 'geocodificarlat', 'geocodelat' ), - 'geocodelon'= array( '0', 'geocodificarlng', 'geocodificarlong', 'geocodelon' ), ); $magicWords['ig'] = array( @@ -77,8 +67,6 @@ 'display_map' = array( '0', 'kaart_weergeven', 'display_map' ), 'display_point' = array( '0', 'punt_weergeven', 'display_point', 'display_points' ), 'geocode' = array( '0', 'geocoderen', 'geocode' ), - 'geocodelat'= array( '0', 'breedtegeocoderen', 'geocodelat' ), - 'geocodelon'= array( '0', 'lengtegeocoderen', 'geocodelon' ), 'geodistance' = array( '0', 'geoafstand', 'geodistance' ), 'finddestination' = array( '0', 'bestemmingzoeken', 'finddestination' ), 'coordinates' = array( '0', 'coordinaten', 'coordinates' ), @@ -93,8 +81,6 @@ 'display_map' = array( '0', 'mostrar_mapa', 'display_map' ), 'display_point' = array( '0', 'mostrar_ponto', 'mostrar_pontos', 'display_point', 'display_points' ), 'geocode' = array( '0', 'geocódigo', 'geocode' ), - 'geocodelat'= array( '0', 'geocódigolat', 'geocodelat' ), - 'geocodelon'= array( '0', 'geocódigolon', 'geocodelon' ), 'geodistance' = array( '0', 'geodistância', 'geodistance' ), 'finddestination' = array( '0', 'encontrardestino', 'finddestination' ), 'coordinates' = array( '0', 'coordenadas', 'coordinates' ), @@ -105,8 +91,6 @@ 'display_map' = array( '0', 'показать_карту', 'display_map' ), 'display_point' = array( '0', 'показать_точку', 'display_point', 'display_points' ), 'geocode' = array( '0', 'геокод', 'geocode' ), - 'geocodelat'= array( '0', 'геокодшир', 'geocodelat' ), - 'geocodelon'=
[MediaWiki-CVS] SVN: [72855] trunk/extensions/Translate/ffs/Gettext.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/72855 Revision: 72855 Author: nikerabbit Date: 2010-09-12 12:02:57 + (Sun, 12 Sep 2010) Log Message: --- Improve tag/flag handling and clean up the code a bit Modified Paths: -- trunk/extensions/Translate/ffs/Gettext.php Modified: trunk/extensions/Translate/ffs/Gettext.php === --- trunk/extensions/Translate/ffs/Gettext.php 2010-09-12 11:49:49 UTC (rev 72854) +++ trunk/extensions/Translate/ffs/Gettext.php 2010-09-12 12:02:57 UTC (rev 72855) @@ -626,13 +626,23 @@ $template = $this-read( $collection-code ); $output = $this-doGettextHeader( $collection, $template ); foreach ( $collection as $key = $m ) { + $transTemplate = isset( $template['TEMPLATE'][$key] ) ? + $template['TEMPLATE'][$key] : array(); + $potTemplate = isset( $pot['TEMPLATE'][$key] ) ? + $pot['TEMPLATE'][$key] : array(); + $tags = $m-getTags(); - if ( $tags ) { - $output .= #, . implode( ', ', $tags ) . \n; + $flags = isset( $transTemplate['flags'] ) ? $transTemplate['flags'] : array(); + + $outFlags = array_unique( array_merge( $tags, $flags ) ); + + if ( $outFlags ) { + sort( $outFlags ); + $output .= #, . implode( ', ', $outFlags ) . \n; } - if ( isset( $pot['TEMPLATE'][$key]['msgctxt'] ) ) { - $output .= 'msgctxt ' . self::escape( $pot['TEMPLATE'][$key]['msgctxt'] ) . \n; + if ( isset( $potTemplate['msgctxt'] ) ) { + $output .= 'msgctxt ' . self::escape( $potTemplate['msgctxt'] ) . \n; } $translation = str_replace( TRANSLATE_FUZZY, '', $m-translation() ); ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [72857] trunk/phase3/languages/messages/MessagesEn.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/72857 Revision: 72857 Author: raymond Date: 2010-09-12 12:41:39 + (Sun, 12 Sep 2010) Log Message: --- Add a period to this complete sentence. Modified Paths: -- trunk/phase3/languages/messages/MessagesEn.php Modified: trunk/phase3/languages/messages/MessagesEn.php === --- trunk/phase3/languages/messages/MessagesEn.php 2010-09-12 12:28:21 UTC (rev 72856) +++ trunk/phase3/languages/messages/MessagesEn.php 2010-09-12 12:41:39 UTC (rev 72857) @@ -1638,7 +1638,7 @@ 'shown-title' = 'Show $1 {{PLURAL:$1|result|results}} per page', 'viewprevnext' = 'View ($1 {{int:pipe-separator}} $2) ($3)', 'searchmenu-legend'= 'Search options', -'searchmenu-exists'= '''There is a page named \[[:\$1]]\ on this wiki''', +'searchmenu-exists'= '''There is a page named \[[:\$1]]\ on this wiki.''', 'searchmenu-new' = '''Create the page \[[:\$1]]\ on this wiki!''', 'searchmenu-new-nocreate' = '', # do not translate or duplicate this message to other languages 'searchhelp-url' = 'Help:Contents', ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [72858] trunk/phase3/maintenance/tests/phpunit/includes
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/72858 Revision: 72858 Author: platonides Date: 2010-09-12 13:42:41 + (Sun, 12 Sep 2010) Log Message: --- Follow up r72566. Per CR r9132#c9132 these files were intended to explicitely require the files holding the parent classes. Modified Paths: -- trunk/phase3/maintenance/tests/phpunit/includes/UploadFromUrlTest.php trunk/phase3/maintenance/tests/phpunit/includes/api/ApiWatchTest.php trunk/phase3/maintenance/tests/phpunit/includes/search/SearchEngineTest.php Modified: trunk/phase3/maintenance/tests/phpunit/includes/UploadFromUrlTest.php === --- trunk/phase3/maintenance/tests/phpunit/includes/UploadFromUrlTest.php 2010-09-12 12:41:39 UTC (rev 72857) +++ trunk/phase3/maintenance/tests/phpunit/includes/UploadFromUrlTest.php 2010-09-12 13:42:41 UTC (rev 72858) @@ -1,5 +1,6 @@ ?php +require_once 'api/ApiSetup.php'; class UploadFromUrlTest extends ApiTestSetup { Modified: trunk/phase3/maintenance/tests/phpunit/includes/api/ApiWatchTest.php === --- trunk/phase3/maintenance/tests/phpunit/includes/api/ApiWatchTest.php 2010-09-12 12:41:39 UTC (rev 72857) +++ trunk/phase3/maintenance/tests/phpunit/includes/api/ApiWatchTest.php 2010-09-12 13:42:41 UTC (rev 72858) @@ -1,5 +1,7 @@ ?php +require_once 'ApiSetup.php'; + class ApiWatchTest extends ApiTestSetup { function setUp() { Modified: trunk/phase3/maintenance/tests/phpunit/includes/search/SearchEngineTest.php === --- trunk/phase3/maintenance/tests/phpunit/includes/search/SearchEngineTest.php 2010-09-12 12:41:39 UTC (rev 72857) +++ trunk/phase3/maintenance/tests/phpunit/includes/search/SearchEngineTest.php 2010-09-12 13:42:41 UTC (rev 72858) @@ -1,5 +1,7 @@ ?php +require_once dirname(__FILE__) . '/../../bootstrap.php'; + /** * @group Stub */ ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [72860] trunk/extensions/Translate/ffs/Gettext.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/72860 Revision: 72860 Author: nikerabbit Date: 2010-09-12 14:05:18 + (Sun, 12 Sep 2010) Log Message: --- Handle plural rules (not actual plurals yet) and comments on exporting Modified Paths: -- trunk/extensions/Translate/ffs/Gettext.php Modified: trunk/extensions/Translate/ffs/Gettext.php === --- trunk/extensions/Translate/ffs/Gettext.php 2010-09-12 14:04:09 UTC (rev 72859) +++ trunk/extensions/Translate/ffs/Gettext.php 2010-09-12 14:05:18 UTC (rev 72860) @@ -631,6 +631,23 @@ $potTemplate = isset( $pot['TEMPLATE'][$key] ) ? $pot['TEMPLATE'][$key] : array(); + $comments = array(); + if ( isset( $potTemplate['comments'] ) ) { + $comments = $potTemplate['comments']; + } elseif ( isset( $transTemplate['comments'] ) ) { + $comments = $transTemplate['comments']; + } + + $header = ''; + + $header .= self::formatDocumentation( $key ); + foreach ( $comments as $type = $typecomments ) { + foreach ( $typecomments as $comment ) { + if ( strpos( $comment, '[Wiki]' ) === 0 ) continue; + $header .= #$type $comment\n; + } + } + $tags = $m-getTags(); $flags = isset( $transTemplate['flags'] ) ? $transTemplate['flags'] : array(); @@ -638,9 +655,16 @@ if ( $outFlags ) { sort( $outFlags ); - $output .= #, . implode( ', ', $outFlags ) . \n; + $header .= #, . implode( ', ', $outFlags ) . \n; } + if ( $header ) { + $output .= $header; + } else { + // Must be at least empty comment + $output .= #\n; + } + if ( isset( $potTemplate['msgctxt'] ) ) { $output .= 'msgctxt ' . self::escape( $potTemplate['msgctxt'] ) . \n; } @@ -681,8 +705,8 @@ $specs['Project-Id-Version'] = $this-group-getLabel(); $specs['Report-Msgid-Bugs-To'] = $wgSitename; - $specs['POT-Creation-Date'] = self::formatTime( $this-getPotTime() ); $specs['PO-Revision-Date'] = self::formatTime( wfTimestampNow() ); + $specs['X-POT-Import-Date'] = self::formatTime( $this-getPotTime() ); $specs['Language-Team'] = $name $portal; $specs['Content-Type'] = 'text/plain; charset=UTF-8'; $specs['Content-Transfer-Encoding'] = '8bit'; @@ -691,6 +715,12 @@ $specs['X-Language-Code'] = $code; // Prepend # so that message import does not think this is a file it can import $specs['X-Message-Group'] = '#' . $this-group-getId(); + $plural = self::getPluralRule( $code ); + if ( $plural ) { + $specs['Plural-Forms'] = $plural; + } elseif( !isset( $specs['Plural-Forms'] ) ) { + $specs['Plural-Forms'] = 'nplurals=2; plural=(n != 1);'; + } $output .= 'msgid ' . \n; $output .= 'msgstr ' . \n; @@ -732,6 +762,23 @@ ; Translate extension ( . TRANSLATE_VERSION . ); } + protected static function formatDocumentation( $key ) { + global $wgTranslateDocumentationLanguageCode; + + $code = $wgTranslateDocumentationLanguageCode; + if ( !$code ) return ''; + + $documentation = TranslateUtils::getMessageContent( $key, $code ); + if ( !is_string( $documentation ) ) return ''; + + $lines = explode( \n, $documentation ); + $out = ''; + foreach ( $lines as $line ) { + $out .= #. [Wiki] $line\n; + } + return $out; + } + protected static function escape( $line ) { // There may be \ as a last character, for keeping trailing whitespace $line = preg_replace( '/$/', '', $line ); @@ -742,4 +789,20 @@ return $line; } + /** +* Returns plural rule for Gettext. +* @param $code \string Language code. +* @return \string +*/ + public static function getPluralRule( $code ) { +
[MediaWiki-CVS] SVN: [72861] trunk/extensions/CategoryBrowser/CategoryBrowser.i18n.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/72861 Revision: 72861 Author: siebrand Date: 2010-09-12 14:38:16 + (Sun, 12 Sep 2010) Log Message: --- Fix typo. Spotted by Hamilton Abreu. Modified Paths: -- trunk/extensions/CategoryBrowser/CategoryBrowser.i18n.php Modified: trunk/extensions/CategoryBrowser/CategoryBrowser.i18n.php === --- trunk/extensions/CategoryBrowser/CategoryBrowser.i18n.php 2010-09-12 14:05:18 UTC (rev 72860) +++ trunk/extensions/CategoryBrowser/CategoryBrowser.i18n.php 2010-09-12 14:38:16 UTC (rev 72861) @@ -49,7 +49,7 @@ 'cb_ie6_warning' = 'The condition editor does not work in Internet Explorer 6.0 or earlier versions. However, browsing of pre-defined conditions should work normally. Please change or upgrade your browser, if possible.', - 'cb_show_no_parents_only' = 'Show only categories which has no parents', + 'cb_show_no_parents_only' = 'Show only categories which have no parents', 'cb_cat_name_filter' = 'Search for category by name:', 'cb_cat_name_filter_clear' = 'Press to clear category name filter', 'cb_cat_name_filter_ci' = 'Case insensitive', ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [72862] trunk/extensions/Translate/ffs/Gettext.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/72862 Revision: 72862 Author: nikerabbit Date: 2010-09-12 14:56:15 + (Sun, 12 Sep 2010) Log Message: --- Handle plurals properly on export side Modified Paths: -- trunk/extensions/Translate/ffs/Gettext.php Modified: trunk/extensions/Translate/ffs/Gettext.php === --- trunk/extensions/Translate/ffs/Gettext.php 2010-09-12 14:38:16 UTC (rev 72861) +++ trunk/extensions/Translate/ffs/Gettext.php 2010-09-12 14:56:15 UTC (rev 72862) @@ -361,7 +361,12 @@ * @ingroup FFS */ class GettextFFS extends SimpleFFS { + protected $offlineMode = false; + public function setOfflineMode( $value ) { + $this-offlineMode = $value; + } + public function readFromVariable( $data ) { $authors = array(); @@ -520,7 +525,7 @@ $matches = array(); if ( preg_match_all( '/^#(.?) (.*)$/m', $section, $matches, PREG_SET_ORDER ) ) { foreach ( $matches as $match ) { - if ( $match[1] !== ',' ) { + if ( $match[1] !== ',' strpos( $match[1], '[Wiki]' ) !== 0 ) { $item['comments'][$match[1]][] = $match[2]; } } @@ -624,61 +629,22 @@ protected function writeReal( MessageCollection $collection ) { $pot = $this-read( 'en' ); $template = $this-read( $collection-code ); - $output = $this-doGettextHeader( $collection, $template ); + $pluralCount = false; + $output = $this-doGettextHeader( $collection, $template, $pluralCount ); + foreach ( $collection as $key = $m ) { $transTemplate = isset( $template['TEMPLATE'][$key] ) ? $template['TEMPLATE'][$key] : array(); $potTemplate = isset( $pot['TEMPLATE'][$key] ) ? $pot['TEMPLATE'][$key] : array(); - - $comments = array(); - if ( isset( $potTemplate['comments'] ) ) { - $comments = $potTemplate['comments']; - } elseif ( isset( $transTemplate['comments'] ) ) { - $comments = $transTemplate['comments']; - } - - $header = ''; - - $header .= self::formatDocumentation( $key ); - foreach ( $comments as $type = $typecomments ) { - foreach ( $typecomments as $comment ) { - if ( strpos( $comment, '[Wiki]' ) === 0 ) continue; - $header .= #$type $comment\n; - } - } - - $tags = $m-getTags(); - $flags = isset( $transTemplate['flags'] ) ? $transTemplate['flags'] : array(); - $outFlags = array_unique( array_merge( $tags, $flags ) ); - - if ( $outFlags ) { - sort( $outFlags ); - $header .= #, . implode( ', ', $outFlags ) . \n; - } - - if ( $header ) { - $output .= $header; - } else { - // Must be at least empty comment - $output .= #\n; - } - - if ( isset( $potTemplate['msgctxt'] ) ) { - $output .= 'msgctxt ' . self::escape( $potTemplate['msgctxt'] ) . \n; - } - - $translation = str_replace( TRANSLATE_FUZZY, '', $m-translation() ); - - $output .= 'msgid ' . self::escape( $m-definition() ) . \n; - $output .= 'msgstr ' . self::escape( $translation ) . \n\n; + $output .= $this-formatMessageBlock( $key, $m, $transTemplate, $potTemplate, $pluralCount ); } return $output; } - protected function doGettextHeader( MessageCollection $collection, $template ) { + protected function doGettextHeader( MessageCollection $collection, $template, $pluralCount ) { global $wgSitename, $wgServer; $code = $collection-code; $name = TranslateUtils::getLanguageName( $code ); @@ -722,6 +688,10 @@ $specs['Plural-Forms'] = 'nplurals=2; plural=(n != 1);'; } + $match = array(); + preg_match(
[MediaWiki-CVS] SVN: [72863] trunk/extensions
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/72863 Revision: 72863 Author: raymond Date: 2010-09-12 15:07:12 + (Sun, 12 Sep 2010) Log Message: --- Tweak messages a bit for consistency Add extension to Translatewiki. Modified Paths: -- trunk/extensions/ArticleAssessmentPilot/ArticleAssessmentPilot.i18n.php trunk/extensions/Translate/groups/mediawiki-defines.txt Modified: trunk/extensions/ArticleAssessmentPilot/ArticleAssessmentPilot.i18n.php === --- trunk/extensions/ArticleAssessmentPilot/ArticleAssessmentPilot.i18n.php 2010-09-12 14:56:15 UTC (rev 72862) +++ trunk/extensions/ArticleAssessmentPilot/ArticleAssessmentPilot.i18n.php 2010-09-12 15:07:12 UTC (rev 72863) @@ -10,7 +10,7 @@ 'articleassessment' = 'Article assessment', 'articleassessment-desc' = 'Article assessment pilot version', 'articleassessment-yourfeedback' = 'Your feedback', - 'articleassessment-pleaserate' = Please take a moment to rate this page below., + 'articleassessment-pleaserate' = 'Please take a moment to rate this page below.', 'articleassessment-submit' = 'Submit', 'articleassessment-rating-wellsourced' = 'Well-Sourced:', 'articleassessment-rating-neutrality' = 'Neutral:', @@ -21,20 +21,24 @@ 'articleassessment-rating-completeness-tooltip' = 'Do you feel that this article covers the essential topic areas that it should?', 'articleassessment-rating-readability-tooltip' = 'Do you feel that this article is well-organized and well written?', 'articleassessment-articlerating' = 'Article rating', - 'articleassessment-error' = We're sorry! An error has occurred. Please try again later., + 'articleassessment-error' = 'An error has occurred. +Please try again later.', 'articleassessment-thanks' = 'Thanks! Your ratings have been saved.', # This special page doesn't exist yet, but it will soon. 'articleassessment-featurefeedback' = 'Give us [[Special:Article Assessment Feedback|feedback]] about this feature.', 'articleassessment-noratings' = '$1 ($2 {{PLURAL:$2|rating|ratings}})', # Some of these messages are unused in the code as it is but may be in the future depending on performance. They should still be translated. - 'articleassessment-stalemessage-revisioncount' = This article has been ''revised'' '''$1 times''' since you last reviewed it. You may wish to re-rate it., - 'articleassessment-stalemessage-greaterthancount' = This article has been ''revised'' more than $1 times since you last reviewed it. You may wish to re-rate it., - 'articleassessment-stalemessage-norevisioncount' = This article has been ''revised'' since you last reviewed it. You may wish to re-rate it., + 'articleassessment-stalemessage-revisioncount' = This article has been ''revised'' '''$1 times''' since you last reviewed it. +You may wish to re-rate it., + 'articleassessment-stalemessage-greaterthancount' = This article has been ''revised'' more than $1 times since you last reviewed it. +You may wish to re-rate it., + 'articleassessment-stalemessage-norevisioncount' = This article has been ''revised'' since you last reviewed it. +You may wish to re-rate it., # Links get rewritten in javascript. 'articleassessment-results-show' = (Results hidden. [[|Show]] them.), - 'articleassessment-results-hide' = ([[|Hide Results]]), + 'articleassessment-results-hide' = ([[|Hide results]]), ); /** Message documentation (Message documentation) @@ -42,8 +46,10 @@ * @author Brandon Harris */ $messages['qqq'] = array( - 'articleassessment' = 'The title of the feature. It is about reader feedback.', - 'articleassessment-desc' = 'A description of the purpose of this feature', + 'articleassessment' = 'The title of the feature. It is about reader feedback. + +Please visit http://prototype.wikimedia.org/articleassess/Main_Page for a prototype installation.', + 'articleassessment-desc' = '{{desc}}', 'articleassessment-yourfeedback' = 'This is a box or section header. It indicates that the contents of the box are personal to the user.', 'articleassessment-pleaserate' = 'This is a call to action for the user to provide their ratings about the page.', 'articleassessment-submit' = 'This is for when the user submits their ratings to the server.', @@ -64,6 +70,9 @@ 'articleassessment-stalemessage-revisioncount' = 'This is a message shown to the user when their ratings are stale and includes the number of revisions since.', 'articleassessment-stalemessage-greaterthancount' = 'This is a message shown to the user when their ratings are stale. It allows for not looking up the total number of revisions.', 'articleassessment-stalemessage-norevisioncount' = 'This is
[MediaWiki-CVS] SVN: [72864] trunk/phase3
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/72864 Revision: 72864 Author: catrope Date: 2010-09-12 15:15:30 + (Sun, 12 Sep 2010) Log Message: --- (bug 24987) Special:ListUsers does not take external groups into account. Patch by Mathias Ertl Modified Paths: -- trunk/phase3/CREDITS trunk/phase3/RELEASE-NOTES trunk/phase3/includes/specials/SpecialListusers.php Modified: trunk/phase3/CREDITS === --- trunk/phase3/CREDITS2010-09-12 15:07:12 UTC (rev 72863) +++ trunk/phase3/CREDITS2010-09-12 15:15:30 UTC (rev 72864) @@ -102,6 +102,7 @@ * Marcin Cieślak * Marcus Buck * Marooned +* Mathias Ertl * Matthew Britton * mati * Max Sikström Modified: trunk/phase3/RELEASE-NOTES === --- trunk/phase3/RELEASE-NOTES 2010-09-12 15:07:12 UTC (rev 72863) +++ trunk/phase3/RELEASE-NOTES 2010-09-12 15:15:30 UTC (rev 72864) @@ -315,6 +315,7 @@ * (bug 6204) TOC not properly rendered when using $wgMaxTocLevel * (bug 24977) The accesskey in history page now lead directly to the diff instead of alterning focus between the two buttons. +* (bug 24987) Special:ListUsers does not take external groups into account === API changes in 1.17 === * (bug 22738) Allow filtering by action type on query=logevent. Modified: trunk/phase3/includes/specials/SpecialListusers.php === --- trunk/phase3/includes/specials/SpecialListusers.php 2010-09-12 15:07:12 UTC (rev 72863) +++ trunk/phase3/includes/specials/SpecialListusers.php 2010-09-12 15:15:30 UTC (rev 72864) @@ -125,13 +125,12 @@ $userPage = Title::makeTitle( NS_USER, $row-user_name ); $name = $this-getSkin()-link( $userPage, htmlspecialchars( $userPage-getText() ) ); - if( $row-numgroups 1 || ( $this-requestedGroup $row-numgroups == 1 ) ) { + $groups_list = self::getGroups( $row-user_id ); + if( count( $groups_list ) 0 ) { $list = array(); - foreach( self::getGroups( $row-user_id ) as $group ) + foreach( $groups_list as $group ) $list[] = self::buildGroupLink( $group ); $groups = $wgLang-commaList( $list ); - } elseif( $row-numgroups == 1 ) { - $groups = self::buildGroupLink( $row-singlegroup ); } else { $groups = ''; } ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [72866] trunk/phase3
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/72866 Revision: 72866 Author: demon Date: 2010-09-12 15:39:32 + (Sun, 12 Sep 2010) Log Message: --- (bug 24007) Diff pages now mention the number of users having edited intermediate revisions. Also updated MessagesQqq so these are a little more clear Modified Paths: -- trunk/phase3/RELEASE-NOTES trunk/phase3/includes/diff/DifferenceInterface.php trunk/phase3/languages/messages/MessagesEn.php trunk/phase3/languages/messages/MessagesQqq.php trunk/phase3/maintenance/language/messages.inc Modified: trunk/phase3/RELEASE-NOTES === --- trunk/phase3/RELEASE-NOTES 2010-09-12 15:32:30 UTC (rev 72865) +++ trunk/phase3/RELEASE-NOTES 2010-09-12 15:39:32 UTC (rev 72866) @@ -148,6 +148,8 @@ * The parser cache is now shared amongst users whose different settings aren't used in the page. * Any attribute beginning with data- can now be used in wikitext, per HTML5. +* (bug 24007) Diff pages now mention the number of users having edited + intermediate revisions === Bug fixes in 1.17 === * (bug 17560) Half-broken deletion moved image files to deletion archive Modified: trunk/phase3/includes/diff/DifferenceInterface.php === --- trunk/phase3/includes/diff/DifferenceInterface.php 2010-09-12 15:32:30 UTC (rev 72865) +++ trunk/phase3/includes/diff/DifferenceInterface.php 2010-09-12 15:39:32 UTC (rev 72866) @@ -812,10 +812,24 @@ } $n = $this-mTitle-countRevisionsBetween( $oldid, $newid ); - if ( !$n ) + if ( !$n ) { return ''; - - return wfMsgExt( 'diff-multi', array( 'parseinline' ), $n ); + } else { + global $wgLang; + $dbr = wfGetDB( DB_SLAVE ); + $res = $dbr-select( 'revision', 'DISTINCT rev_user_text', + array( + 'rev_page = ' . $this-mOldRev-getPage(), + 'rev_id ' . $this-mOldRev-getId(), + 'rev_id ' . $this-mNewRev-getId() + ), __METHOD__, + array( 'LIMIT' = 101 ) + ); + $numUsers = $dbr-numRows( $res ); + $msg = $numUsers 100 ? 'diff-multi-manyusers' : 'diff-multi'; + return wfMsgExt( $msg, array( 'parseinline' ), $wgLang-formatnum( $n ), + $wgLang-formatnum( $numUsers ) ); + } } Modified: trunk/phase3/languages/messages/MessagesEn.php === --- trunk/phase3/languages/messages/MessagesEn.php 2010-09-12 15:32:30 UTC (rev 72865) +++ trunk/phase3/languages/messages/MessagesEn.php 2010-09-12 15:39:32 UTC (rev 72866) @@ -1617,7 +1617,8 @@ 'compareselectedversions' = 'Compare selected revisions', 'showhideselectedversions' = 'Show/hide selected revisions', 'editundo' = 'undo', -'diff-multi' = '({{PLURAL:$1|One intermediate revision|$1 intermediate revisions}} not shown)', +'diff-multi' = '({{PLURAL:$1|One intermediate revision|$1 intermediate revisions}} by {{PLURAL:$2|one user|$2 users}} not shown)', +'diff-multi-manyusers' = '($1 intermediate revisions intermediate revisions by 100+ users not shown)', # Search results 'search-summary' = '', # do not translate or duplicate this message to other languages Modified: trunk/phase3/languages/messages/MessagesQqq.php === --- trunk/phase3/languages/messages/MessagesQqq.php 2010-09-12 15:32:30 UTC (rev 72865) +++ trunk/phase3/languages/messages/MessagesQqq.php 2010-09-12 15:39:32 UTC (rev 72866) @@ -1154,8 +1154,14 @@ 'showhideselectedversions' = 'Text of the button which brings up the [[mw:RevisionDelete|RevisionDelete]] menu.', 'editundo' = 'Undo link when viewing diffs {{Identical|Undo}}', -'diff-multi' = This message appears in the revision history of a page when comparing two versions which aren't consecutive., +'diff-multi' = This message appears in the revision history of a page when comparing two versions which aren't consecutive. +*Parameter $1 is the number of revisions +*Parameter $2 is the number of users making those revisions, +'diff-multi-manyuser' = This message appears in the revision history of a page when comparing two versions which aren't consecutive, and the intermediate revisions have been edited by 100+ users + +*$1 is the number of revisions, will always be 100 or more, + # Search results
[MediaWiki-CVS] SVN: [72867] trunk/phase3/maintenance/importImages.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/72867 Revision: 72867 Author: ialex Date: 2010-09-12 15:39:49 + (Sun, 12 Sep 2010) Log Message: --- Whitespaces fixes: * use tabs for indentation * removed trailing whitespaces Modified Paths: -- trunk/phase3/maintenance/importImages.php Modified: trunk/phase3/maintenance/importImages.php === --- trunk/phase3/maintenance/importImages.php 2010-09-12 15:39:32 UTC (rev 72866) +++ trunk/phase3/maintenance/importImages.php 2010-09-12 15:39:49 UTC (rev 72867) @@ -61,10 +61,10 @@ $checkUserBlock = false; } - # Get --from + # Get --from $from = @$options['from']; - # Get sleep time. + # Get sleep time. $sleep = @$options['sleep']; if ( $sleep ) $sleep = (int)$sleep; @@ -92,17 +92,17 @@ # Batch upload operation if ( ( $count = count( $files ) ) 0 ) { - + foreach ( $files as $file ) { $base = wfBaseName( $file ); - + # Validate a title $title = Title::makeTitleSafe( NS_FILE, $base ); if ( !is_object( $title ) ) { echo( {$base} could not be imported; a valid title cannot be produced\n ); continue; } - + if ( $from ) { if ( $from == $title-getDBkey() ) { $from = NULL; @@ -149,49 +149,49 @@ $svar = 'added'; } -if ( isset( $options['source-wiki-url'] ) ) { -/* find comment text directly from source wiki, through MW's API */ -$real_comment = getFileCommentFromSourceWiki( $options['source-wiki-url'], $base ); -if ( $real_comment === false ) -$commentText = $comment; -else -$commentText = $real_comment; + if ( isset( $options['source-wiki-url'] ) ) { + /* find comment text directly from source wiki, through MW's API */ + $real_comment = getFileCommentFromSourceWiki( $options['source-wiki-url'], $base ); + if ( $real_comment === false ) + $commentText = $comment; + else + $commentText = $real_comment; -/* find user directly from source wiki, through MW's API */ -$real_user = getFileUserFromSourceWiki( $options['source-wiki-url'], $base ); -if ( $real_user === false ) { -$wgUser = $user; -} else { -$wgUser = User::newFromName( $real_user ); -if ( $wgUser === false ) { -# user does not exist in target wiki -echo ( failed: user '$real_user' does not exist in target wiki. ); -continue; -} -} -} else { -# Find comment text -$commentText = false; + /* find user directly from source wiki, through MW's API */ + $real_user = getFileUserFromSourceWiki( $options['source-wiki-url'], $base ); + if ( $real_user === false ) { + $wgUser = $user; + } else { + $wgUser = User::newFromName( $real_user ); + if ( $wgUser === false ) { + # user does not exist in target wiki + echo ( failed: user '$real_user' does not exist in target wiki. ); + continue; + } + } + } else { + # Find comment text + $commentText = false; -if ( $commentExt ) { -$f = findAuxFile( $file, $commentExt ); -if ( !$f ) { -echo( No comment file with extension {$commentExt} found for {$file}, using default comment. ); -} else { -$commentText = file_get_contents( $f ); -if ( !$f ) { -echo( Failed to load comment file {$f}, using default comment. ); -} -} -} + if
[MediaWiki-CVS] SVN: [72868] trunk/phase3/languages/messages/MessagesQqq.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/72868 Revision: 72868 Author: demon Date: 2010-09-12 15:41:38 + (Sun, 12 Sep 2010) Log Message: --- Typofix Modified Paths: -- trunk/phase3/languages/messages/MessagesQqq.php Modified: trunk/phase3/languages/messages/MessagesQqq.php === --- trunk/phase3/languages/messages/MessagesQqq.php 2010-09-12 15:39:49 UTC (rev 72867) +++ trunk/phase3/languages/messages/MessagesQqq.php 2010-09-12 15:41:38 UTC (rev 72868) @@ -1160,7 +1160,7 @@ *Parameter $2 is the number of users making those revisions, 'diff-multi-manyuser' = This message appears in the revision history of a page when comparing two versions which aren't consecutive, and the intermediate revisions have been edited by 100+ users -*$1 is the number of revisions, will always be 100 or more, +*Parameter $1 is the number of revisions, will always be 100 or more, # Search results 'searchresults-title'= 'Appears as page title in the html header of the search result special page.', ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [72869] trunk/extensions/Translate
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/72869 Revision: 72869 Author: nikerabbit Date: 2010-09-12 15:59:11 + (Sun, 12 Sep 2010) Log Message: --- Move input to last to have a logical order Modified Paths: -- trunk/extensions/Translate/SpecialTranslationStats.php trunk/extensions/Translate/utils/HTMLJsSelectToInputField.php trunk/extensions/Translate/utils/JsSelectToInput.php Modified: trunk/extensions/Translate/SpecialTranslationStats.php === --- trunk/extensions/Translate/SpecialTranslationStats.php 2010-09-12 15:41:38 UTC (rev 72868) +++ trunk/extensions/Translate/SpecialTranslationStats.php 2010-09-12 15:59:11 UTC (rev 72869) @@ -243,8 +243,8 @@ return 'trtd' . $this-eLabel( $name ) . '/tdtd' . + $select-getHtmlAndPrepareJs() . 'br /' . Xml::input( $name, 20, $value, array( 'id' = $name ) ) . - $select-getHtmlAndPrepareJs() . '/td/tr' . \n; } @@ -289,8 +289,8 @@ return 'trtd' . $this-eLabel( $name ) . '/tdtd' . + $select-getHtmlAndPrepareJs() . 'br /' . Xml::input( $name, 20, $value, array( 'id' = $name ) ) . - $select-getHtmlAndPrepareJs() . '/td/tr' . \n; } Modified: trunk/extensions/Translate/utils/HTMLJsSelectToInputField.php === --- trunk/extensions/Translate/utils/HTMLJsSelectToInputField.php 2010-09-12 15:41:38 UTC (rev 72868) +++ trunk/extensions/Translate/utils/HTMLJsSelectToInputField.php 2010-09-12 15:59:11 UTC (rev 72869) @@ -15,7 +15,7 @@ $input = parent::getInputHTML( $value ); if ( isset( $this-mParams['select'] ) ) { - $input .= ' ' . $this-mParams['select']-getHtmlAndPrepareJs(); + $input = $this-mParams['select']-getHtmlAndPrepareJs() . 'br /' . $input; } return $input; Modified: trunk/extensions/Translate/utils/JsSelectToInput.php === --- trunk/extensions/Translate/utils/JsSelectToInput.php2010-09-12 15:41:38 UTC (rev 72868) +++ trunk/extensions/Translate/utils/JsSelectToInput.php2010-09-12 15:59:11 UTC (rev 72869) @@ -82,8 +82,8 @@ } self::injectJs(); - $html = $this-getButton( $this-msg, $this-sourceId, $this-targetId ); - $html .= $this-select-getHtml(); + $html = $this-select-getHtml(); + $html .= $this-getButton( $this-msg, $this-sourceId, $this-targetId ); return $html; } ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [72871] trunk/extensions/CodeReview/CodeReview.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/72871 Revision: 72871 Author: ialex Date: 2010-09-12 16:28:09 + (Sun, 12 Sep 2010) Log Message: --- Follow-up r72870: converted CodeReview's LoadExtensionSchemaUpdates hook to new DatabaseUpdater (specifically for the update_row_exists() method) Modified Paths: -- trunk/extensions/CodeReview/CodeReview.php Modified: trunk/extensions/CodeReview/CodeReview.php === --- trunk/extensions/CodeReview/CodeReview.php 2010-09-12 16:24:03 UTC (rev 72870) +++ trunk/extensions/CodeReview/CodeReview.php 2010-09-12 16:28:09 UTC (rev 72871) @@ -165,25 +165,28 @@ # Schema changes $wgHooks['LoadExtensionSchemaUpdates'][] = 'efCodeReviewSchemaUpdates'; -function efCodeReviewSchemaUpdates() { - global $wgDBtype, $wgExtNewFields, /*$wgExtPGNewFields,*/ $wgExtNewIndexes, $wgExtNewTables, $wgExtModifiedFields; +function efCodeReviewSchemaUpdates( $updater ) { $base = dirname( __FILE__ ); - if ( $wgDBtype == 'mysql' ) { - $wgExtNewTables[] = array( 'code_rev', $base/codereview.sql ); // Initial install tables - $wgExtNewFields[] = array( 'code_rev', 'cr_diff', $base/archives/codereview-cr_diff.sql ); - $wgExtNewIndexes[] = array( 'code_relations', 'repo_to_from', $base/archives/code_relations_index.sql ); + switch ( $updater-getDB()-getType() ) { + case 'mysql': + $updater-addExtensionUpdate( array( 'addTable', 'code_rev', $base/codereview.sql, true ) ); // Initial install tables + $updater-addExtensionUpdate( array( 'addField', 'code_rev', 'cr_diff', $base/archives/codereview-cr_diff.sql, true ) ); + $updater-addExtensionUpdate( array( 'addIndex', 'code_relations', 'repo_to_from', $base/archives/code_relations_index.sql, true ) ); - // $wgExtNewFields[] = array( 'code_rev', $base/archives/codereview-cr_status.sql ); // FIXME FIXME this is a change to options... don't know how + // $updater-addExtensionUpdate( array( 'addField', 'code_rev', 'cr_status', $base/archives/codereview-cr_status.sql, true ) ); // FIXME FIXME this is a change to options... don't know how - if ( !update_row_exists( 'add old to code_rev enum' ) ) { - $wgExtModifiedFields[] = array( 'code_rev', 'cr_status', $base/archives/codereview-cr_old_status.sql ); + if ( !$updater-updateRowExists( 'add old to code_rev enum' ) ) { + $updater-addExtensionUpdate( array( 'modifyField', 'code_rev', 'cr_status', $base/archives/codereview-cr_old_status.sql, true ) ); } - $wgExtNewTables[] = array( 'code_bugs', $base/archives/code_bugs.sql ); - } elseif ( $wgDBtype == 'sqlite' ) { - $wgExtNewTables[] = array( 'code_rev', $base/codereview.sql ); - } elseif ( $wgDBtype == 'postgres' ) { + $updater-addExtensionUpdate( array( 'addTable', 'code_bugs', $base/archives/code_bugs.sql, true ) ); + break; + case 'sqlite': + $updater-addExtensionUpdate( array( 'addTable', 'code_rev', $base/codereview.sql, true ) ); + break; + case 'postgres': // TODO + break; } return true; } ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [72872] trunk/phase3/includes/installer/DatabaseUpdater.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/72872 Revision: 72872 Author: ialex Date: 2010-09-12 16:48:03 + (Sun, 12 Sep 2010) Log Message: --- Let's just kill $wgUpdates since OpenID was converted in r72798. I hope I was the only one that has the idea to use $wgUpdates in an extension :) Modified Paths: -- trunk/phase3/includes/installer/DatabaseUpdater.php Modified: trunk/phase3/includes/installer/DatabaseUpdater.php === --- trunk/phase3/includes/installer/DatabaseUpdater.php 2010-09-12 16:28:09 UTC (rev 72871) +++ trunk/phase3/includes/installer/DatabaseUpdater.php 2010-09-12 16:48:03 UTC (rev 72872) @@ -54,12 +54,9 @@ * something much nicer */ private function initOldGlobals() { - global $wgUpdates, $wgExtNewTables, $wgExtNewFields, $wgExtPGNewFields, + global $wgExtNewTables, $wgExtNewFields, $wgExtPGNewFields, $wgExtPGAlteredFields, $wgExtNewIndexes, $wgExtModifiedFields; - // Deprecated. Do not use, ever. - $wgUpdates = array(); - # For extensions only, should be populated via hooks # $wgDBtype should be checked to specifiy the proper file $wgExtNewTables = array(); // table, dir @@ -197,14 +194,14 @@ } /** -* Before 1.17, we used to handle updates via stuff like $wgUpdates, +* Before 1.17, we used to handle updates via stuff like * $wgExtNewTables/Fields/Indexes. This is nasty :) We refactored a lot * of this in 1.17 but we want to remain back-compatible for awhile. So * load up these old global-based things into our update list. */ protected function getOldGlobalUpdates() { - global $wgUpdates, $wgExtNewFields, $wgExtNewTables, - $wgExtModifiedFields, $wgExtNewIndexes, $wgSharedDB, $wgSharedTables; + global $wgExtNewFields, $wgExtNewTables, $wgExtModifiedFields, + $wgExtNewIndexes, $wgSharedDB, $wgSharedTables; $doUser = $this-shared ? $wgSharedDB in_array( 'user', $wgSharedTables ) : @@ -212,12 +209,6 @@ $updates = array(); - if( isset( $wgUpdates[ $this-db-getType() ] ) ) { - foreach( $wgUpdates[ $this-db-getType() ] as $upd ) { - $updates[] = $upd; - } - } - foreach ( $wgExtNewTables as $tableRecord ) { $updates[] = array( 'addTable', $tableRecord[0], $tableRecord[1], true ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [72873] trunk/phase3/config
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/72873 Revision: 72873 Author: ialex Date: 2010-09-12 17:13:06 + (Sun, 12 Sep 2010) Log Message: --- Fix for r72870: seems I didn't see that updaters.inc was included in the config directory, same for ^demon when he removed do_all_updates() in r72539 ;) Modified Paths: -- trunk/phase3/config/Installer.php trunk/phase3/config/new-index.php Modified: trunk/phase3/config/Installer.php === --- trunk/phase3/config/Installer.php 2010-09-12 16:48:03 UTC (rev 72872) +++ trunk/phase3/config/Installer.php 2010-09-12 17:13:06 UTC (rev 72873) @@ -277,9 +277,6 @@ pAfterwards retry to start the a href=\\setup/a./p ); } - -require_once( $IP/maintenance/updaters.inc ); - class ConfigData { function getEncoded( $data ) { # removing latin1 support, no need... @@ -1236,7 +1233,14 @@ print /ulpre\n; chdir( .. ); flush(); - do_all_updates(); + + define( 'MW_NO_SETUP', true ); + $updater = DatabaseUpdater::newForDb( $wgDatabase, false ); + $updater-doUpdates(); + foreach( $updater-getPostDatabaseUpdateMaintenance() as $maint ) { + call_user_func_array( array( new $maint, 'execute' ), array() ); + } + chdir( config ); print /pre\n; print ulliFinished update checks./li\n; Modified: trunk/phase3/config/new-index.php === --- trunk/phase3/config/new-index.php 2010-09-12 16:48:03 UTC (rev 72872) +++ trunk/phase3/config/new-index.php 2010-09-12 17:13:06 UTC (rev 72873) @@ -9,7 +9,6 @@ chdir( .. ); require( './includes/WebStart.php' ); -require_once( './maintenance/updaters.inc' ); // sigh... $installer = new WebInstaller( $wgRequest ); ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [72874] trunk/extensions/Translate
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/72874 Revision: 72874 Author: nikerabbit Date: 2010-09-12 17:13:32 + (Sun, 12 Sep 2010) Log Message: --- Current implementation of code browser support Modified Paths: -- trunk/extensions/Translate/groups/StatusNet/StatusNet.yaml trunk/extensions/Translate/utils/TranslationHelpers.php Modified: trunk/extensions/Translate/groups/StatusNet/StatusNet.yaml === --- trunk/extensions/Translate/groups/StatusNet/StatusNet.yaml 2010-09-12 17:13:06 UTC (rev 72873) +++ trunk/extensions/Translate/groups/StatusNet/StatusNet.yaml 2010-09-12 17:13:32 UTC (rev 72874) @@ -6,6 +6,7 @@ namespace: NS_STATUSNET display: out/statusnet/ class: FileBasedMessageGroup + codeBrowser: http://gitorious.org/statusnet/mainline/blobs/master/%FILE%#line%LINE% FILES: class: GettextFFS Modified: trunk/extensions/Translate/utils/TranslationHelpers.php === --- trunk/extensions/Translate/utils/TranslationHelpers.php 2010-09-12 17:13:06 UTC (rev 72873) +++ trunk/extensions/Translate/utils/TranslationHelpers.php 2010-09-12 17:13:32 UTC (rev 72874) @@ -660,6 +660,20 @@ $class = 'mw-sp-translate-edit-noinfo'; } + $info .= $this-formatGettextComments(); + $class .= ' mw-sp-translate-message-documentation'; + + $contents = $wgOut-parse( $info ); + // Remove whatever block element wrapup the parser likes to add + $contents = preg_replace( '~^([a-z]+)(.*)/\1$~us', '\2', $contents ); + + return TranslateUtils::fieldset( + wfMsgHtml( 'translate-edit-information', $edit , $page ), $contents, array( 'class' = $class ) + ); + + } + + protected function formatGettextComments() { if ( $this-group instanceof GettextMessageGroup ) { $reader = $this-group-getReader( 'en' ); if ( $reader ) { @@ -670,21 +684,46 @@ $help = trim( GettextFormatWriter::formatComments( @$data[$mykey]['comments'], false, @$data[$mykey]['flags'] ) ); // Do not display an empty comment. That's no help and takes up unnecessary space. if ( $help !== '#:' ) { - $info .= hr /pre$help/pre; + return hr /pre$help/pre; } } } - $class .= ' mw-sp-translate-message-documentation'; + if ( $this-group instanceof FileBasedMessageGroup ) { + $ffs = $this-group-getFFS(); + if ( $ffs instanceof GettextFFS ) { + global $wgContLang; + $mykey = $wgContLang-lcfirst( $this-page ); + $data = $ffs-read( 'en' ); + $help = $data['TEMPLATE'][$mykey]['comments']; + // Do not display an empty comment. That's no help and takes up unnecessary space. + $conf = $this-group-getConfiguration(); + if ( isset( $conf['BASIC']['codeBrowser'] ) ) { + $out = ''; + $pattern = $conf['BASIC']['codeBrowser']; + $pattern = str_replace( '%FILE%', '\1', $pattern ); + $pattern = str_replace( '%LINE%', '\2', $pattern ); + $pattern = [$pattern \\1:\\2]; + foreach ( $help as $type = $lines ) { + if ( $type === ':' ) { + $files = ''; + foreach ( $lines as $index = $line ) { + $files .= ' ' . preg_replace( '/([^ :]+):(\d+)/', $pattern, $line ); + } + $out .= nowiki#:/nowiki $filesbr /; + } else { + foreach ( $lines as $index = $line ) { + $out .= nowiki#$type/nowiki $linebr /; + } + } + } + + } +
[MediaWiki-CVS] SVN: [72875] trunk/extensions/LiquidThreads/classes/NewMessagesController. php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/72875 Revision: 72875 Author: werdna Date: 2010-09-12 17:22:34 + (Sun, 12 Sep 2010) Log Message: --- LiquidThreads: Fix bug where ums_conversation entries were not properly inserted into user_message_state table. Resolves bug 25154 Modified Paths: -- trunk/extensions/LiquidThreads/classes/NewMessagesController.php Modified: trunk/extensions/LiquidThreads/classes/NewMessagesController.php === --- trunk/extensions/LiquidThreads/classes/NewMessagesController.php 2010-09-12 17:13:32 UTC (rev 72874) +++ trunk/extensions/LiquidThreads/classes/NewMessagesController.php 2010-09-12 17:22:34 UTC (rev 72875) @@ -70,12 +70,16 @@ } else { throw new MWException( writeUserMessageState expected User or integer but got $user ); } + + + $conversation = Threads::withId($thread_id)-topmostThread()-id(); $dbw = wfGetDB( DB_MASTER ); $dbw-replace( 'user_message_state', array( array( 'ums_user', 'ums_thread' ) ), array( 'ums_user' = $user_id, 'ums_thread' = $thread_id, - 'ums_read_timestamp' = $timestamp ), __METHOD__ + 'ums_read_timestamp' = $timestamp, 'ums_conversation' = $conversation ), + __METHOD__ ); self::recacheMessageCount( $user_id ); @@ -208,7 +212,8 @@ $insertRows[] = array( 'ums_user' = $u, 'ums_thread' = $t-id(), - 'ums_read_timestamp' = null + 'ums_read_timestamp' = null, + 'ums_conversation' = $t-topmostThread()-id(), ); } ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [72877] trunk/phase3/languages/messages/MessagesEn.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/72877 Revision: 72877 Author: nikerabbit Date: 2010-09-12 17:36:26 + (Sun, 12 Sep 2010) Log Message: --- followup r72866, at least remove the double words Modified Paths: -- trunk/phase3/languages/messages/MessagesEn.php Modified: trunk/phase3/languages/messages/MessagesEn.php === --- trunk/phase3/languages/messages/MessagesEn.php 2010-09-12 17:26:04 UTC (rev 72876) +++ trunk/phase3/languages/messages/MessagesEn.php 2010-09-12 17:36:26 UTC (rev 72877) @@ -1618,7 +1618,7 @@ 'showhideselectedversions' = 'Show/hide selected revisions', 'editundo' = 'undo', 'diff-multi' = '({{PLURAL:$1|One intermediate revision|$1 intermediate revisions}} by {{PLURAL:$2|one user|$2 users}} not shown)', -'diff-multi-manyusers' = '($1 intermediate revisions intermediate revisions by 100+ users not shown)', +'diff-multi-manyusers' = '($1 intermediate revisions by 100+ users not shown)', # Search results 'search-summary' = '', # do not translate or duplicate this message to other languages ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [72878] trunk/phase3/maintenance/sqlite/archives/ patch-categorylinks-better-collation.sql
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/72878 Revision: 72878 Author: maxsem Date: 2010-09-12 17:48:56 + (Sun, 12 Sep 2010) Log Message: --- Follow-up r72870: fixed patch file so that it actually works, switched it to native SQLite types Modified Paths: -- trunk/phase3/maintenance/sqlite/archives/patch-categorylinks-better-collation.sql Modified: trunk/phase3/maintenance/sqlite/archives/patch-categorylinks-better-collation.sql === --- trunk/phase3/maintenance/sqlite/archives/patch-categorylinks-better-collation.sql 2010-09-12 17:36:26 UTC (rev 72877) +++ trunk/phase3/maintenance/sqlite/archives/patch-categorylinks-better-collation.sql 2010-09-12 17:48:56 UTC (rev 72878) @@ -1,7 +1,7 @@ -ALTER TABLE /*_*/categorylinks ADD COLUMN cl_sortkey_prefix TEXT binary NOT NULL default ''; +ALTER TABLE /*_*/categorylinks ADD COLUMN cl_sortkey_prefix TEXT NOT NULL default ''; ALTER TABLE /*_*/categorylinks ADD COLUMN cl_collation BLOB NOT NULL default ''; -ALTER TABLE /*_*/categorylinks ADD COLUMN cl_type ENUM('page', 'subcat', 'file') NOT NULL default 'page'; +ALTER TABLE /*_*/categorylinks ADD COLUMN cl_type TEXT NOT NULL default 'page'; CREATE INDEX cl_collation ON /*_*/categorylinks (cl_collation); DROP INDEX cl_sortkey; CREATE INDEX cl_sortkey ON /*_*/categorylinks (cl_to, cl_type, cl_sortkey, cl_from); -INSERT IGNORE INTO /*_*/updatelog (ul_key) VALUES ('cl_fields_update'); +INSERT OR IGNORE INTO /*_*/updatelog (ul_key) VALUES ('cl_fields_update'); ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [72879] trunk/phase3/maintenance/sqlite/archives/ patch-iw_api_and_wikiid.sql
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/72879 Revision: 72879 Author: maxsem Date: 2010-09-12 18:00:28 + (Sun, 12 Sep 2010) Log Message: --- Follow-up r71118: forgot to re-add the index Modified Paths: -- trunk/phase3/maintenance/sqlite/archives/patch-iw_api_and_wikiid.sql Modified: trunk/phase3/maintenance/sqlite/archives/patch-iw_api_and_wikiid.sql === --- trunk/phase3/maintenance/sqlite/archives/patch-iw_api_and_wikiid.sql 2010-09-12 17:48:56 UTC (rev 72878) +++ trunk/phase3/maintenance/sqlite/archives/patch-iw_api_and_wikiid.sql 2010-09-12 18:00:28 UTC (rev 72879) @@ -15,3 +15,5 @@ INSERT INTO /*_*/interwiki_tmp SELECT iw_prefix, iw_url, '', '', iw_local, iw_trans FROM /*_*/interwiki; DROP TABLE /*_*/interwiki; ALTER TABLE /*_*/interwiki_tmp RENAME TO /*_*/interwiki; + +CREATE UNIQUE INDEX /*i*/iw_prefix ON /*_*/interwiki (iw_prefix); \ No newline at end of file ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [72880] trunk/phase3/languages/messages/MessagesHe.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/72880 Revision: 72880 Author: rotem Date: 2010-09-12 18:27:49 + (Sun, 12 Sep 2010) Log Message: --- Localization update for he. Modified Paths: -- trunk/phase3/languages/messages/MessagesHe.php Modified: trunk/phase3/languages/messages/MessagesHe.php === --- trunk/phase3/languages/messages/MessagesHe.php 2010-09-12 18:00:28 UTC (rev 72879) +++ trunk/phase3/languages/messages/MessagesHe.php 2010-09-12 18:27:49 UTC (rev 72880) @@ -1250,7 +1250,8 @@ 'compareselectedversions' = 'השוואת הגרסאות שנבחרו', 'showhideselectedversions' = 'הצגת/הסתרת הגרסאות שנבחרו', 'editundo' = 'ביטול', -'diff-multi' = '({{PLURAL:$1|גרסת ביניים אחת אינה מוצגת|$1 גרסאות ביניים אינן מוצגות}})', +'diff-multi' = '({{PLURAL:$1|גרסת ביניים אחת|$1 גרסאות ביניים}} של {{PLURAL:$2|משתמש אחד|$2 משתמשים}} {{PLURAL:$1|אינה מוצגת|אינן מוצגות}})', +'diff-multi-manyusers' = '($1 גרסאות ביניים של יותר מ-100 משתמשים אינן מוצגות)', # Search results 'searchresults'= 'תוצאות החיפוש', @@ -1270,8 +1271,8 @@ 'shown-title' = 'הצגת {{PLURAL:$1|תוצאה אחת|$1 תוצאות}} בדף', 'viewprevnext' = 'צפייה ב - ($1 {{int:pipe-separator}} $2) ($3)', 'searchmenu-legend'= 'אפשרויות חיפוש', -'searchmenu-exists'= '''קיים דף בשם \[[:\$1]]\ באתר זה''', -'searchmenu-new' = '''יצירת הדף \[[:\$1]]\ באתר זה''', +'searchmenu-exists'= '''קיים דף בשם \[[:\$1]]\ באתר זה.''', +'searchmenu-new' = '''יצירת הדף \[[:\$1]]\ באתר זה.''', 'searchhelp-url' = 'Help:תפריט ראשי', 'searchmenu-prefix'= '[[Special:PrefixIndex/$1|מציאת דפים עם קידומת זו]]', 'searchprofile-articles' = 'דפי תוכן', ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [72881] trunk/extensions/LiquidThreads/schema-changes/ums_conversation .sql
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/72881 Revision: 72881 Author: ialex Date: 2010-09-12 18:57:28 + (Sun, 12 Sep 2010) Log Message: --- svn:eol-style native Property Changed: trunk/extensions/LiquidThreads/schema-changes/ums_conversation.sql Property changes on: trunk/extensions/LiquidThreads/schema-changes/ums_conversation.sql ___ Added: svn:eol-style + native ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [72883] trunk/phase3/includes/parser/ParserCache.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/72883 Revision: 72883 Author: ialex Date: 2010-09-12 19:26:01 + (Sun, 12 Sep 2010) Log Message: --- Removed trailing spaces Modified Paths: -- trunk/phase3/includes/parser/ParserCache.php Modified: trunk/phase3/includes/parser/ParserCache.php === --- trunk/phase3/includes/parser/ParserCache.php2010-09-12 19:22:55 UTC (rev 72882) +++ trunk/phase3/includes/parser/ParserCache.php2010-09-12 19:26:01 UTC (rev 72883) @@ -37,14 +37,14 @@ } $this-mMemc = $memCached; } - + protected function getParserOutputKey( $article, $hash ) { global $wgRequest; - + // idhash seem to mean 'page id' + 'rendering hash' (r3710) $pageid = $article-getID(); $renderkey = (int)($wgRequest-getVal('action') == 'render'); - + $key = wfMemcKey( 'pcache', 'idhash', {$pageid}-{$renderkey}!{$hash} ); return $key; } @@ -55,17 +55,17 @@ } /** -* Provides an E-Tag suitable for the whole page. Note that $article -* is just the main wikitext. The E-Tag has to be unique to the whole -* page, even if the article itself is the same, so it uses the -* complete set of user options. We don't want to use the preference -* of a different user on a message just because it wasn't used in -* $article. For example give a Chinese interface to a user with -* English preferences. That's why we take into account *all* user +* Provides an E-Tag suitable for the whole page. Note that $article +* is just the main wikitext. The E-Tag has to be unique to the whole +* page, even if the article itself is the same, so it uses the +* complete set of user options. We don't want to use the preference +* of a different user on a message just because it wasn't used in +* $article. For example give a Chinese interface to a user with +* English preferences. That's why we take into account *all* user * options. (r70809 CR) */ function getETag( $article, $popts ) { - return 'W/' . $this-getParserOutputKey( $article, + return 'W/' . $this-getParserOutputKey( $article, $popts-optionsHash( ParserOptions::legacyOptions() ) ) . -- . $article-mTouched . ''; } @@ -80,19 +80,19 @@ /** * Used to provide a unique id for the PoolCounter. -* It would be preferable to have this code in get() +* It would be preferable to have this code in get() * instead of having Article looking in our internals. -* +* * Precondition: $article-checkTouched() has been called. */ public function getKey( $article, $popts, $useOutdated = true ) { global $wgCacheEpoch; - + if( $popts instanceof User ) { wfWarn( Use of outdated prototype ParserCache::getKey( \$article, \$user )\n ); $popts = ParserOptions::newFromUser( $popts ); } - + // Determine the options which affect this article $optionsKey = $this-mMemc-get( $this-getOptionsKey( $article ) ); if ( $optionsKey != false ) { @@ -102,12 +102,12 @@ wfDebug( Parser options key expired, touched {$article-mTouched}, epoch $wgCacheEpoch, cached $cacheTime\n ); return false; } - + $usedOptions = $optionsKey-mUsedOptions; wfDebug( Parser cache options found.\n ); } else { # TODO: Fail here $wgParserCacheExpireTime after deployment unless $useOutdated - + $usedOptions = ParserOptions::legacyOptions(); } @@ -131,7 +131,7 @@ // Having called checkTouched() ensures this will be loaded $touched = $article-mTouched; - + $parserOutputKey = $this-getKey( $article, $popts, $useOutdated ); if ( $parserOutputKey === false ) { wfProfileOut( __METHOD__ ); @@ -147,7 +147,7 @@ } wfDebug( Found.\n ); - + if ( !$useOutdated $value-expired( $touched ) ) { wfIncrStats( pcache_miss_expired ); $cacheTime = $value-getCacheTime(); @@ -168,13 +168,13 @@ public function save( $parserOutput, $article, $popts ) { $expire =
[MediaWiki-CVS] SVN: [72884] trunk/extensions/CheckUser/CheckUser.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/72884 Revision: 72884 Author: ialex Date: 2010-09-12 19:28:05 + (Sun, 12 Sep 2010) Log Message: --- Converted CheckUser extension to use DatabaseUpdater Modified Paths: -- trunk/extensions/CheckUser/CheckUser.php Modified: trunk/extensions/CheckUser/CheckUser.php === --- trunk/extensions/CheckUser/CheckUser.php2010-09-12 19:26:01 UTC (rev 72883) +++ trunk/extensions/CheckUser/CheckUser.php2010-09-12 19:28:05 UTC (rev 72884) @@ -338,38 +338,56 @@ return $squidOnly; } -function efCheckUserSchemaUpdates() { - global $wgDBtype, $wgExtNewIndexes; +function efCheckUserSchemaUpdates( $updater = null ) { + $base = dirname( __FILE__ ); + if ( $updater === null ) { + global $wgDBtype, $wgExtNewIndexes; + efCheckUserCreateTables(); + if ( $wgDBtype == 'mysql' ) { + $wgExtNewIndexes[] = array( + 'cu_changes', 'cuc_ip_hex_time', + $base/archives/patch-cu_changes_indexes.sql + ); + $wgExtNewIndexes[] = array( + 'cu_changes', 'cuc_user_ip_time', + $base/archives/patch-cu_changes_indexes2.sql + ); + } + } else { + $updater-addExtensionUpdate( array( 'efCheckUserCreateTables' ) ); + if ( $updater-getDB()-getType() == 'mysql' ) { + $updater-addExtensionUpdate( array( 'addIndex', 'cu_changes', + 'cuc_ip_hex_time', $base/archives/patch-cu_changes_indexes.sql, true ) ); + $updater-addExtensionUpdate( array( 'addIndex', 'cu_changes', + 'cuc_user_ip_time', $base/archives/patch-cu_changes_indexes2.sql, true ) ); + } + } - # Run install.inc as necessary + return true; +} + +function efCheckUserCreateTables( $updater = null ) { + if ( $updater === null ) { + $db = wfGetDB( DB_MASTER ); + } else { + $db = $updater-getDB(); + } + $base = dirname( __FILE__ ); - $db = wfGetDB( DB_MASTER ); if ( $db-tableExists( 'cu_changes' ) ) { - echo ...cu_changes already exists.\n; + wfOut( ...cu_changes table already exists.\n ); } else { require_once $base/install.inc; create_cu_changes( $db ); } if ( $db-tableExists( 'cu_log' ) ) { - echo ...cu_log already exists.\n; + wfOut( ...cu_log table already exists.\n ); } else { require_once $base/install.inc; create_cu_log( $db ); } - - if ( $wgDBtype == 'mysql' ) { - $wgExtNewIndexes[] = array( - 'cu_changes', 'cuc_ip_hex_time', - $base/archives/patch-cu_changes_indexes.sql - ); - $wgExtNewIndexes[] = array( - 'cu_changes', 'cuc_user_ip_time', - $base/archives/patch-cu_changes_indexes2.sql - ); - } - return true; } /** ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [72885] trunk/extensions/Translate/check-blacklist.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/72885 Revision: 72885 Author: raymond Date: 2010-09-12 19:43:35 + (Sun, 12 Sep 2010) Log Message: --- Update blacklist for Article Assessment Pilot Modified Paths: -- trunk/extensions/Translate/check-blacklist.php Modified: trunk/extensions/Translate/check-blacklist.php === --- trunk/extensions/Translate/check-blacklist.php 2010-09-12 19:28:05 UTC (rev 72884) +++ trunk/extensions/Translate/check-blacklist.php 2010-09-12 19:43:35 UTC (rev 72885) @@ -69,6 +69,14 @@ ) ), array( + 'group' = 'ext-articleassessmentpilot', + 'check' = 'links', + 'message' = array( + 'articleassessment-results-show', // Contains incomplete wiki link that get rewritten by JavaScript + 'articleassessment-results-hide', // Contains incomplete wiki link that get rewritten by JavaScript + ) +), +array( 'group' = 'ext-babel', 'check' = 'variable', 'message' = array( ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [72886] trunk/extensions/ArticleAssessmentPilot/ArticleAssessmentPilot .i18n.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/72886 Revision: 72886 Author: raymond Date: 2010-09-12 19:53:45 + (Sun, 12 Sep 2010) Log Message: --- FIXME: These links are invalid. Translation is impossible because you cannot save pages with such links. The parser strips the pipe and saves as [[Show]]. Even customization in MediaWiki namespace is impossible therefore. Modified Paths: -- trunk/extensions/ArticleAssessmentPilot/ArticleAssessmentPilot.i18n.php Modified: trunk/extensions/ArticleAssessmentPilot/ArticleAssessmentPilot.i18n.php === --- trunk/extensions/ArticleAssessmentPilot/ArticleAssessmentPilot.i18n.php 2010-09-12 19:43:35 UTC (rev 72885) +++ trunk/extensions/ArticleAssessmentPilot/ArticleAssessmentPilot.i18n.php 2010-09-12 19:53:45 UTC (rev 72886) @@ -8,7 +8,7 @@ */ $messages['en'] = array( 'articleassessment' = 'Article assessment', - 'articleassessment-desc' = 'Article assessment pilot version', + 'articleassessment-desc' = 'Article assessment (pilot version)', 'articleassessment-yourfeedback' = 'Your feedback', 'articleassessment-pleaserate' = 'Please take a moment to rate this page below.', 'articleassessment-submit' = 'Submit', @@ -37,6 +37,9 @@ You may wish to re-rate it., # Links get rewritten in javascript. + # FIXME: These links are invalid. Translation is impossible because you cannot save pages with such links. + # The parser strips the pipe and saves as [[Show]]. + # Even customization in MediaWiki namespace is impossible therefore. 'articleassessment-results-show' = (Results hidden. [[|Show]] them.), 'articleassessment-results-hide' = ([[|Hide results]]), ); ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [72887] branches/MwEmbedStandAlone
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/72887 Revision: 72887 Author: dale Date: 2010-09-12 23:32:32 + (Sun, 12 Sep 2010) Log Message: --- some polish on the page helpers. Flattened sequence file pages link to sequencer. Added withJs to 'edit this sequence' link in embed code Modified Paths: -- branches/MwEmbedStandAlone/modules/AddMedia/loader.js branches/MwEmbedStandAlone/modules/AddMedia/mw.RemoteSearchDriver.js branches/MwEmbedStandAlone/modules/EmbedPlayer/skins/kskin/mw.PlayerSkinKskin.js branches/MwEmbedStandAlone/modules/Sequencer/actions/mw.SequencerActionsSequence.js branches/MwEmbedStandAlone/modules/Sequencer/mw.SequencerServer.js branches/MwEmbedStandAlone/modules/Sequencer/remotes/mw.MediaWikiRemoteSequencer.js branches/MwEmbedStandAlone/remotes/mediaWiki.js Modified: branches/MwEmbedStandAlone/modules/AddMedia/loader.js === --- branches/MwEmbedStandAlone/modules/AddMedia/loader.js 2010-09-12 19:53:45 UTC (rev 72886) +++ branches/MwEmbedStandAlone/modules/AddMedia/loader.js 2010-09-12 23:32:32 UTC (rev 72887) @@ -58,9 +58,9 @@ '$j.browserTest', // ( textSelection uses browserTest ) '$j.ui' ], [ - '$j.ui.resizable', + '$j.widget', '$j.ui.mouse', - '$j.widget', + '$j.ui.resizable', '$j.ui.position', '$j.ui.draggable', '$j.ui.dialog', Modified: branches/MwEmbedStandAlone/modules/AddMedia/mw.RemoteSearchDriver.js === --- branches/MwEmbedStandAlone/modules/AddMedia/mw.RemoteSearchDriver.js 2010-09-12 19:53:45 UTC (rev 72886) +++ branches/MwEmbedStandAlone/modules/AddMedia/mw.RemoteSearchDriver.js 2010-09-12 23:32:32 UTC (rev 72887) @@ -2713,7 +2713,7 @@ getTemplateDescription: function( resource ) { // setup the resource description from resource description: // FIXME: i18n, namespace - var description = '{{Information ' + \n; + var description ='{{Information ' + \n; if ( resource.desc ) { description += '|Description= ' + resource.desc + \n; Modified: branches/MwEmbedStandAlone/modules/EmbedPlayer/skins/kskin/mw.PlayerSkinKskin.js === --- branches/MwEmbedStandAlone/modules/EmbedPlayer/skins/kskin/mw.PlayerSkinKskin.js 2010-09-12 19:53:45 UTC (rev 72886) +++ branches/MwEmbedStandAlone/modules/EmbedPlayer/skins/kskin/mw.PlayerSkinKskin.js 2010-09-12 23:32:32 UTC (rev 72887) @@ -88,6 +88,9 @@ $menuBar = $j( 'ul /' ) .addClass( 'k-menu-bar' ); + // dont include about player menu item ( @@ should be moved to a init function ) + delete ctrlObj.supportedMenuItems['aboutPlayerLibrary']; + // Output menu item containers: for ( var menuItem in ctrlObj.supportedMenuItems ) { $menuBar.append( Modified: branches/MwEmbedStandAlone/modules/Sequencer/actions/mw.SequencerActionsSequence.js === --- branches/MwEmbedStandAlone/modules/Sequencer/actions/mw.SequencerActionsSequence.js 2010-09-12 19:53:45 UTC (rev 72886) +++ branches/MwEmbedStandAlone/modules/Sequencer/actions/mw.SequencerActionsSequence.js 2010-09-12 23:32:32 UTC (rev 72887) @@ -356,41 +356,46 @@ }, function(){ // this should be depreciated ( hidden interface bug in mwEmbed ) $j('#publishVideoTarget').parent().show(); - // Start up the render - var foggRender = $j('#publishVideoTarget').firefoggRender({ - 'statusTarget' : '#firefoggStatusTarget', - 'saveToLocalFile' : localFile, - 'onProgress' : function( progress ){ - var progressPrecent = ( Math.round( progress * 1 ) / 100 ); - $j('#firefoggPercentDone').text( - progressPrecent + - '%' - ) -
[MediaWiki-CVS] SVN: [72888] branches/MwEmbedStandAlone
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/72888 Revision: 72888 Author: dale Date: 2010-09-13 00:00:11 + (Mon, 13 Sep 2010) Log Message: --- tab memory ( keeps the selected tab open across default edit actions on clips ) Modified Paths: -- branches/MwEmbedStandAlone/modules/Sequencer/Sequencer.i18n.php branches/MwEmbedStandAlone/modules/Sequencer/mw.Sequencer.js branches/MwEmbedStandAlone/modules/Sequencer/mw.SequencerTools.js branches/MwEmbedStandAlone/remotes/mediaWiki.js Modified: branches/MwEmbedStandAlone/modules/Sequencer/Sequencer.i18n.php === --- branches/MwEmbedStandAlone/modules/Sequencer/Sequencer.i18n.php 2010-09-12 23:32:32 UTC (rev 72887) +++ branches/MwEmbedStandAlone/modules/Sequencer/Sequencer.i18n.php 2010-09-13 00:00:11 UTC (rev 72888) @@ -61,7 +61,7 @@ 'mwe-sequencer-preview-continue' = 'Continue preview', 'mwe-sequencer-apply-changes' = 'Apply changes', 'mwe-sequencer-start-time' = 'Start time', - 'mwe-sequencer-asset-source' = 'Source page', + 'mwe-sequencer-asset-source' = 'Source asset page', 'mwe-sequencer-loading_user_rights' = 'Loading user rights ...', Modified: branches/MwEmbedStandAlone/modules/Sequencer/mw.Sequencer.js === --- branches/MwEmbedStandAlone/modules/Sequencer/mw.Sequencer.js 2010-09-12 23:32:32 UTC (rev 72887) +++ branches/MwEmbedStandAlone/modules/Sequencer/mw.Sequencer.js 2010-09-13 00:00:11 UTC (rev 72888) @@ -15,7 +15,8 @@ return; } var seqContainer = $j( this.selector ).get(0); - // support jquery ui style 'destroy' call + + // Support jquery ui style 'destroy' call if( options == 'destroy' ){ if( seqContainer['sequencer'] ) delete seqContainer['sequencer']; Modified: branches/MwEmbedStandAlone/modules/Sequencer/mw.SequencerTools.js === --- branches/MwEmbedStandAlone/modules/Sequencer/mw.SequencerTools.js 2010-09-12 23:32:32 UTC (rev 72887) +++ branches/MwEmbedStandAlone/modules/Sequencer/mw.SequencerTools.js 2010-09-13 00:00:11 UTC (rev 72888) @@ -718,17 +718,18 @@ this.getCurrentsmilElement() ) ); - mw.log( 'Adding ' + toolSet.length + ' tools for ' + this.sequencer.getSmil().getRefType( this.getCurrentsmilElement() ) ); + mw.log( 'Adding ' + toolSet.length + ' tools for ' + + this.sequencer.getSmil().getRefType( this.getCurrentsmilElement() ) + + ' current tool: ' + _this.getCurrentToolId() + ); + var toolTabIndex = 0; $j.each( toolSet, function( inx, toolId ){ - var tool = _this.tools[ toolId ]; - - // set the currentTool if not already set - if(!_this.currentToolId){ - _this.currentToolId = toolId; + var tool = _this.tools[ toolId ]; + if( _this.getCurrentToolId() == toolId){ + toolTabIndex = inx; } - // Append the title to the ul list $toolsContainer.find( 'ul').append( $j('li /').append( @@ -786,7 +787,12 @@ }); // Add tab bindings - $toolsContainer.tabs(); + $toolsContainer.tabs({ + select: function(event, ui) { + _this.setCurrentToolId( $j( ui.tab ).attr('href').replace('#tooltab_', '') ); + }, + selected : toolTabIndex + }); // Build out global edit Actions buttons after the container for( var editActionId in this.editActions ){ Modified: branches/MwEmbedStandAlone/remotes/mediaWiki.js === --- branches/MwEmbedStandAlone/remotes/mediaWiki.js 2010-09-12 23:32:32 UTC (rev 72887) +++ branches/MwEmbedStandAlone/remotes/mediaWiki.js 2010-09-13 00:00:11 UTC (rev 72888) @@ -162,7 +162,7 @@ window.mwSequencerRemote = new
[MediaWiki-CVS] SVN: [72889] trunk/phase3/includes
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/72889 Revision: 72889 Author: tstarling Date: 2010-09-13 03:10:28 + (Mon, 13 Sep 2010) Log Message: --- Fixed some overly-long lines, mostly from r72023. Modified Paths: -- trunk/phase3/includes/MimeMagic.php trunk/phase3/includes/filerepo/File.php Modified: trunk/phase3/includes/MimeMagic.php === --- trunk/phase3/includes/MimeMagic.php 2010-09-13 00:00:11 UTC (rev 72888) +++ trunk/phase3/includes/MimeMagic.php 2010-09-13 03:10:28 UTC (rev 72889) @@ -430,7 +430,8 @@ function improveTypeFromExtension( $mime, $ext ) { if ( $mime === unknown/unknown ) { if( $this-isRecognizableExtension( $ext ) ) { - wfDebug( __METHOD__. : refusing to guess mime type for .$ext file, we should have recognized it\n ); + wfDebug( __METHOD__. : refusing to guess mime type for .$ext file, . + we should have recognized it\n ); } else { /* Not something we can detect, so simply * trust the file extension */ @@ -443,7 +444,8 @@ * find the proper mime type for that file extension */ $mime = $this-guessTypesForExtension( $ext ); } else { - wfDebug( __METHOD__. : refusing to guess better type for $mime file, .$ext is not a known OPC extension.\n ); + wfDebug( __METHOD__. : refusing to guess better type for $mime file, . + .$ext is not a known OPC extension.\n ); $mime = application/zip; } } @@ -470,7 +472,8 @@ */ function guessMimeType( $file, $ext = true ) { if( $ext ) { # TODO: make $ext default to false. Or better, remove it. - wfDebug( __METHOD__.: WARNING: use of the \$ext parameter is deprecated. Use improveTypeFromExtension(\$mime, \$ext) instead.\n ); + wfDebug( __METHOD__.: WARNING: use of the \$ext parameter is deprecated. . + Use improveTypeFromExtension(\$mime, \$ext) instead.\n ); } $mime = $this-doGuessMimeType( $file, $ext ); @@ -663,7 +666,8 @@ */ function detectZipType( $header, $tail = null, $ext = false ) { if( $ext ) { # TODO: remove $ext param - wfDebug( __METHOD__.: WARNING: use of the \$ext parameter is deprecated. Use improveTypeFromExtension(\$mime, \$ext) instead.\n ); + wfDebug( __METHOD__.: WARNING: use of the \$ext parameter is deprecated. . + Use improveTypeFromExtension(\$mime, \$ext) instead.\n ); } $mime = 'application/zip'; Modified: trunk/phase3/includes/filerepo/File.php === --- trunk/phase3/includes/filerepo/File.php 2010-09-13 00:00:11 UTC (rev 72888) +++ trunk/phase3/includes/filerepo/File.php 2010-09-13 03:10:28 UTC (rev 72889) @@ -1197,8 +1197,10 @@ $ext = strtolower( $i ? substr( $path, $i + 1 ) : '' ); } - $info['file-mime'] = $magic-guessMimeType( $path, false ); # mime type according to file contents - $info['mime'] = $magic-improveTypeFromExtension( $info['file-mime'], $ext ); # logical mime type + # mime type according to file contents + $info['file-mime'] = $magic-guessMimeType( $path, false ); + # logical mime type + $info['mime'] = $magic-improveTypeFromExtension( $info['file-mime'], $ext ); list( $info['major_mime'], $info['minor_mime'] ) = self::splitMime( $info['mime'] ); $info['media_type'] = $magic-getMediaType( $path, $info['mime'] ); ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [72890] trunk/phase3/includes/DefaultSettings.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/72890 Revision: 72890 Author: tstarling Date: 2010-09-13 04:05:20 + (Mon, 13 Sep 2010) Log Message: --- Added some warnings for some upload security issues, such as allowing OpenDocument uploads. Modified Paths: -- trunk/phase3/includes/DefaultSettings.php Modified: trunk/phase3/includes/DefaultSettings.php === --- trunk/phase3/includes/DefaultSettings.php 2010-09-13 03:10:28 UTC (rev 72889) +++ trunk/phase3/includes/DefaultSettings.php 2010-09-13 04:05:20 UTC (rev 72890) @@ -502,6 +502,10 @@ /** * This is the list of preferred extensions for uploading files. Uploading files * with extensions not in this list will trigger a warning. + * + * WARNING: If you add any OpenDocument file formats here, such as odt, ods or + * odp, and untrusted users are allowed to upload files, then your wiki will be + * vulnerable to cross-site request forgery (CSRF). */ $wgFileExtensions = array( 'png', 'gif', 'jpg', 'jpeg' ); @@ -539,12 +543,18 @@ 'application/x-opc+zip', ); -/** This is a flag to determine whether or not to check file extensions on upload. */ +/** + * This is a flag to determine whether or not to check file extensions on upload. + * + * WARNING: setting this to false is insecure for public wikis. + */ $wgCheckFileExtensions = true; /** * If this is turned off, users may override the warning for files not covered * by $wgFileExtensions. + * + * WARNING: setting this to false is insecure for public wikis. */ $wgStrictFileExtensions = true; ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [72891] branches/MwEmbedStandAlone/modules/Sequencer
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/72891 Revision: 72891 Author: dale Date: 2010-09-13 05:40:29 + (Mon, 13 Sep 2010) Log Message: --- stubs for transition edit support Modified Paths: -- branches/MwEmbedStandAlone/modules/Sequencer/Sequencer.i18n.php branches/MwEmbedStandAlone/modules/Sequencer/mw.SequencerTools.js branches/MwEmbedStandAlone/modules/Sequencer/remotes/mw.MediaWikiRemoteSequencer.js Modified: branches/MwEmbedStandAlone/modules/Sequencer/Sequencer.i18n.php === --- branches/MwEmbedStandAlone/modules/Sequencer/Sequencer.i18n.php 2010-09-13 04:05:20 UTC (rev 72890) +++ branches/MwEmbedStandAlone/modules/Sequencer/Sequencer.i18n.php 2010-09-13 05:40:29 UTC (rev 72891) @@ -52,8 +52,8 @@ 'mwe-sequencer-tools-transitions' = 'Transitions', 'mwe-sequencer-tools-transitions-desc' = 'Set in and out Transitions', - 'mwe-sequencer-clip-transin' = 'Transition in', - 'mwe-sequencer-clip-transout' = 'Transition out', + 'mwe-sequencer-tools-transitions-transIn' = 'Transition in', + 'mwe-sequencer-tools-transitions-transOut' = 'Transition out', 'mwe-sequencer-clip-cancel-edit' = 'Cancel clip edit', 'mwe-sequencer-preview' = 'Preview', Modified: branches/MwEmbedStandAlone/modules/Sequencer/mw.SequencerTools.js === --- branches/MwEmbedStandAlone/modules/Sequencer/mw.SequencerTools.js 2010-09-13 04:05:20 UTC (rev 72890) +++ branches/MwEmbedStandAlone/modules/Sequencer/mw.SequencerTools.js 2010-09-13 05:40:29 UTC (rev 72891) @@ -2,7 +2,7 @@ * Handles the tools window top level component driver */ -//Wrap in mw closure to avoid global leakage +// Wrap in mw closure to avoid global leakage ( function( mw ) { mw.SequencerTools = function( sequencer ) { @@ -38,13 +38,13 @@ 'contentTypes': [ 'img'], // xxx todo add video support 'animate' : 'true' }, - 'templateedit':{ - 'editWidgets' : ['edittemplate'], + 'templateedit' : { + 'editWidgets' : ['editTemplate'], 'editableAttributes' : [ 'apititlekey' ], 'contentTypes' : ['mwtemplate'] }, - 'transitions' : { - 'editableAttributes' : [ 'transIn', 'transOut' ], + 'transitions' : { + 'editWidgets' : ['editTransitions'], 'contentTypes': ['video', 'img', 'mwtemplate' ] } }, @@ -68,14 +68,6 @@ 'inputSize' : 30, 'title' : gM('mwe-sequencer-template-name' ) }, - 'transIn' : { - 'type' : 'select', - 'selectValues' : [ 'fadeFromColor' ] - }, - 'transOut' : { - 'type' : 'select', - 'selectValues' : [ 'fadeFromColor', 'crossfade' ] - }, // Special child node type 'param' : { 'type' : 'childParam', @@ -166,8 +158,8 @@ $j( clickButton ) .attr({ 'href': _this.sequencer.getServer().getAssetViewUrl( - $j(smilElement).find(param[name='apiTitleKey']).attr('value') - ) + _this.sequencer.getSmil().getTitleKey( smilElement ) + ) , 'target' : '_new' }) @@ -252,7 +244,167 @@ } }, editWidgets: { - 'edittemplate':{ + 'editTransitions' : { + 'transitionTypes' : { + 'fade':{ + 'type' : { + 'value' : 'fade', + 'editType' : 'hidden' + }, + 'dur' : { + 'value' : '2s', + 'editType' : 'time' + }, + }, + 'fadeColor':{ + 'extends':'fade', + 'fadeColor' : { +