Merge "Add Special:MediaStatistics page for file type stats"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Fri, 19 Sep 2014 08:03:42 +0000 (08:03 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Fri, 19 Sep 2014 08:03:42 +0000 (08:03 +0000)
1  2 
includes/AutoLoader.php
includes/specialpage/QueryPage.php
languages/i18n/en.json
languages/i18n/qqq.json

diff --combined includes/AutoLoader.php
@@@ -267,7 -267,6 +267,7 @@@ $wgAutoloadLocalClasses = array
        'ApiQueryAllPages' => 'includes/api/ApiQueryAllPages.php',
        'ApiQueryAllUsers' => 'includes/api/ApiQueryAllUsers.php',
        'ApiQueryBacklinks' => 'includes/api/ApiQueryBacklinks.php',
 +      'ApiQueryBacklinksprop' => 'includes/api/ApiQueryBacklinksprop.php',
        'ApiQueryBase' => 'includes/api/ApiQueryBase.php',
        'ApiQueryBlocks' => 'includes/api/ApiQueryBlocks.php',
        'ApiQueryCategories' => 'includes/api/ApiQueryCategories.php',
        'ApiQueryRandom' => 'includes/api/ApiQueryRandom.php',
        'ApiQueryRecentChanges' => 'includes/api/ApiQueryRecentChanges.php',
        'ApiQueryFileRepoInfo' => 'includes/api/ApiQueryFileRepoInfo.php',
 -      'ApiQueryRedirects' => 'includes/api/ApiQueryRedirects.php',
        'ApiQueryRevisions' => 'includes/api/ApiQueryRevisions.php',
        'ApiQuerySearch' => 'includes/api/ApiQuerySearch.php',
        'ApiQuerySiteinfo' => 'includes/api/ApiQuerySiteinfo.php',
        'LoginForm' => 'includes/specials/SpecialUserlogin.php',
        'LonelyPagesPage' => 'includes/specials/SpecialLonelypages.php',
        'LongPagesPage' => 'includes/specials/SpecialLongpages.php',
+       'MediaStatisticsPage' => 'includes/specials/SpecialMediaStatistics.php',
        'MergeHistoryPager' => 'includes/specials/SpecialMergeHistory.php',
        'MIMEsearchPage' => 'includes/specials/SpecialMIMEsearch.php',
        'MostcategoriesPage' => 'includes/specials/SpecialMostcategories.php',
@@@ -76,6 -76,7 +76,7 @@@ abstract class QueryPage extends Specia
                                array( 'ListredirectsPage', 'Listredirects' ),
                                array( 'LonelyPagesPage', 'Lonelypages' ),
                                array( 'LongPagesPage', 'Longpages' ),
+                               array( 'MediaStatisticsPage', 'MediaStatistics' ),
                                array( 'MIMEsearchPage', 'MIMEsearch' ),
                                array( 'MostcategoriesPage', 'Mostcategories' ),
                                array( 'MostimagesPage', 'Mostimages' ),
                                                        'qc_value' => $value );
                                }
  
 -                              $dbw->begin( __METHOD__ );
 +                              $dbw->startAtomic( __METHOD__ );
                                # Clear out any old cached data
                                $dbw->delete( 'querycache', array( 'qc_type' => $this->getName() ), $fname );
                                # Save results into the querycache table on the master
                                $dbw->insert( 'querycache_info',
                                        array( 'qci_type' => $this->getName(), 'qci_timestamp' => $dbw->timestamp() ),
                                        $fname );
 -                              $dbw->commit( __METHOD__ );
 +                              $dbw->endAtomic( __METHOD__ );
                        }
                } catch ( DBError $e ) {
                        if ( !$ignoreErrors ) {
diff --combined languages/i18n/en.json
        "prefs-tokenwatchlist": "Token",
        "prefs-diffs": "Diffs",
        "prefs-help-prefershttps": "This preference will take effect on your next login.",
 +      "prefswarning-warning": "You've made changes to your preferences that have not been saved yet.\nIf you leave this page without clicking \"$1\" your preferences will not be updated.",
        "prefs-tabs-navigation-hint": "Tip: You can use the left and right arrow keys to navigate between the tabs in the tabs list.",
        "email-address-validity-valid": "Email address appears valid",
        "email-address-validity-invalid": "Enter a valid email address",
        "default-skin-not-found": "Whoops! The default skin for your wiki, defined in <code dir=\"ltr\">$wgDefaultSkin</code> as <code>$1</code>, is not available.\n\nYour installation seems to include the following skins. See [https://www.mediawiki.org/wiki/Manual:Skin_configuration Manual: Skin configuration] for information how to enable them and choose the default.\n\n$2\n\n; If you have just installed MediaWiki:\n: You probably installed from git, or directly from the source code using some other method. This is expected. Try installing some skins from [https://www.mediawiki.org/wiki/Category:All_skins mediawiki.org's skin directory], by:\n:* Downloading the [https://www.mediawiki.org/wiki/Download tarball installer], which comes with several skins and extensions. You can copy and paste the <code>skins/</code> directory from it.\n:* Cloning one of the <code>mediawiki/skins/*</code> repositories via git into the <code dir=\"ltr\">skins/</code> directory of your MediaWiki installation.\n: Doing this should not interfere with your git repository if you're a MediaWiki developer.\n\n; If you have just upgraded MediaWiki:\n: MediaWiki 1.24 and newer no longer automatically enables installed skins (see [https://www.mediawiki.org/wiki/Manual:Skin_autodiscovery Manual: Skin autodiscovery]). You can paste the following lines into <code>LocalSettings.php</code> to enable all currently installed skins:\n\n<pre dir=\"ltr\">$3</pre>\n\n; If you have just modified <code>LocalSettings.php</code>:\n: Double-check the skin names for typos.",
        "default-skin-not-found-no-skins": "Whoops! The default skin for your wiki, defined in <code>$wgDefaultSkin</code> as <code>$1</code>, is not available.\n\nYou have no installed skins.\n\n; If you have just installed or upgraded MediaWiki:\n: You probably installed from git, or directly from the source code using some other method. This is expected. MediaWiki 1.24 and newer doesn't include any skins in the main repository. Try installing some skins from [https://www.mediawiki.org/wiki/Category:All_skins mediawiki.org's skin directory], by:\n:* Downloading the [https://www.mediawiki.org/wiki/Download tarball installer], which comes with several skins and extensions. You can copy and paste the <code>skins/</code> directory from it.\n:* Cloning one of the <code>mediawiki/skins/*</code> repositories via git into the <code dir=\"ltr\">skins/</code> directory of your MediaWiki installation.\n: Doing this should not interfere with your git repository if you're a MediaWiki developer. See [https://www.mediawiki.org/wiki/Manual:Skin_configuration Manual: Skin configuration] for information how to enable skins and choose the default.\n",
        "default-skin-not-found-row-enabled": "* <code>$1</code> / $2 (enabled)",
-       "default-skin-not-found-row-disabled": "* <code>$1</code> / $2 ('''disabled''')"
+       "default-skin-not-found-row-disabled": "* <code>$1</code> / $2 ('''disabled''')",
+       "mediastatistics": "Media statistics",
+       "mediastatistics-summary": "Statistics about uploaded file types. This only includes the most recent version of a file. Old or deleted versions of files are excluded.",
+       "mediastatistics-nfiles": "$1 ($2%)",
+       "mediastatistics-nbytes": "{{PLURAL:$1|$1 byte|$1 bytes}} ($2; $3%)",
+       "mediastatistics-table-mimetype": "MIME type",
+       "mediastatistics-table-extensions": "Possible extensions",
+       "mediastatistics-table-count": "Number of files",
+       "mediastatistics-table-totalbytes": "Combined size",
+       "mediastatistics-header-unknown": "Unknown",
+       "mediastatistics-header-bitmap": "Bitmap images",
+       "mediastatistics-header-drawing": "Drawings (vector images)",
+       "mediastatistics-header-audio": "Audio",
+       "mediastatistics-header-video": "Videos",
+       "mediastatistics-header-multimedia": "Rich media",
+       "mediastatistics-header-office": "Office",
+       "mediastatistics-header-text": "Textual",
+       "mediastatistics-header-executable": "Executables",
+       "mediastatistics-header-archive": "Compressed formats"
  }
diff --combined languages/i18n/qqq.json
        "prefs-tokenwatchlist": "Section heading.\nUsed in [[Special:Preferences]], tab \"Watchlist\".\n{{Identical|Token}}",
        "prefs-diffs": "Used in [[Special:Preferences]], tab \"Misc\".",
        "prefs-help-prefershttps": "Used as help text for the checkbox in [[Special:Preferences]].\n\nThe checkbox has the label {{msg-mw|Tog-prefershttps}}.\n\nSee example: [[mw:Special:Preferences]].",
 +      "prefswarning-warning": "Warning shown (except in Firefox) when attempting to leave [[Special:Preferences]] with unsaved changes.\n\nParameters:\n* $1 - Text of {{msg-mw|saveprefs}}, as <nowiki>{{int:saveprefs}}</nowiki> cannot be used directly.",
        "prefs-tabs-navigation-hint": "Hint message that explains the arrow key navigation for the tabs on [[Special:Preferences]] to screenreader users.",
        "email-address-validity-valid": "Used as hint for {{msg-mw|changeemail-newemail}} field in [[Special:ChangeEmail]], when the provided E-mail address is valid.",
        "email-address-validity-invalid": "Used as warning for {{msg-mw|changeemail-newemail}} field in [[Special:ChangeEmail]], when the provided E-mail address is invalid.",
        "default-skin-not-found": "Message shown when the default skin for this MediaWiki installation can not be found.\n\nParameters:\n* $1: skin identifier for the default skin\n* $2: list of installed skins, composed using {{msg-mw|default-skin-not-found-row-enabled}} and {{msg-mw|default-skin-not-found-row-disabled}}\n* $3: code snippet to use to enable installed skins",
        "default-skin-not-found-no-skins": "Message shown when the default skin for this MediaWiki installation can not be found and the installation has no skins at all.\n\nParameters:\n* $1: name of the default skin",
        "default-skin-not-found-row-enabled": "One row of the list of installed skins shown as a part of the following message (for an enabled skin):\n* {{msg-mw|default-skin-not-found}}\n----\nParameters:\n* $1 - skin identifier\n* $2 - human-readable skin name\nSee also:\n* {{msg-mw|Default-skin-not-found-row-disabled}}",
-       "default-skin-not-found-row-disabled": "One row of the list of installed skins shown as a part of the following message (for a disabled skin):\n* {{msg-mw|default-skin-not-found}}\n----\nParameters:\n* $1 - skin identifier\n* $2 - human-readable skin name\nSee also:\n* {{msg-mw|Default-skin-not-found-row-enabled}}"
+       "default-skin-not-found-row-disabled": "One row of the list of installed skins shown as a part of the following message (for a disabled skin):\n* {{msg-mw|default-skin-not-found}}\n----\nParameters:\n* $1 - skin identifier\n* $2 - human-readable skin name\nSee also:\n* {{msg-mw|Default-skin-not-found-row-enabled}}",
+       "mediastatistics": "{{doc-special|MediaStatistics}}",
+       "mediastatistics-summary": "{{doc-specialpagesummary|MediaStatistics}}\nUsed to explain that this page only does statistics over current versions of files. \"Old\" versions of files and deleted files are not counted.",
+       "mediastatistics-nfiles": "{{optional}}\nEntry in table on [[Special:MediaStatistics]] that gives total number of files. $1 - number of files. $2 - percentage of total files that is this type (percent will be formatted to have about 3 interesting digits. e.g. 0.121 or 10.2)",
+       "mediastatistics-nbytes": "{{optional}}\nCombined space of this type of file. Bytes and \"human units\" are shown so that users can better get a sense of magnitude when making comparisions.\n*$1 - total space in bytes.\n*$2 - total space in \"human units\" (i.e. KB, MB, GB, etc)\n*$3 - What percentage of the space all uploads take up does this file take up. ",
+       "mediastatistics-table-mimetype": "Header for table on Special:MediaStatistics. Column that lists MIME types (The values in this column will look like 'image/jpeg', and be linked to Special:MIMESearch).",
+       "mediastatistics-table-extensions": "Header for column in tables on [[Special:MediaStatistics]] that lists possible extensions for a given file type. (The values in this column will be a comma separated list of file extensions, such as '.webm' or '.png, .apng').",
+       "mediastatistics-table-count": "Column header on Special:MediaStatistics for the number of files column. The headers in this column use {{msg-mw|mediastatistics-nfiles}}.",
+       "mediastatistics-table-totalbytes": "Column header on Special:MediaStatistics for the number of bytes that this file type takes up. Values for this column use {{msg-mw|mediastatistics-nbytes}}",
+       "mediastatistics-header-unknown": "Header on Special:MediaStatistics for file types that are in the unknown category",
+       "mediastatistics-header-bitmap": "Header on [[Special:MediaStatistics]] for file types that are in the bitmap category. This includes raster graphics like PNG, JPEG, XCF, GIF etc. Vector graphics like SVG are considered \"drawings\" ({{msg-mw|mediastatistics-header-drawing}})",
+       "mediastatistics-header-drawing": "Header on [[Special:MediaStatistics]] for file types that are in the drawing category. This includes vector images like SVGs. Some chemical markup formats may also be included here.",
+       "mediastatistics-header-audio": "Header on [[Special:MediaStatistics]] for file types that are in the audio category",
+       "mediastatistics-header-video": "Header on [[Special:MediaStatistics]] for file types that are in the video category",
+       "mediastatistics-header-multimedia": "Header on [[Special:MediaStatistics]] for file types that are in the multimedia category. This does not include plain audio or video files, but more complex multimedia such as flash or vrml. This especially includes scripted multimedia. Ogg files in which MediaWiki cannot determine if it is an audio or video file (or something else) are included here.",
+       "mediastatistics-header-office": "Header on [[Special:MediaStatistics]] for file types that are in the Office category. This includes PDFs, open office files, MSWord files, etc.",
+       "mediastatistics-header-text": "Header on [[Special:MediaStatistics]] for file types that are in the text category. This includes simple text formats, including plain text formats, json, csv, and xml. Source code of compiled programming languages may be included here in the future, but isn't currently.",
+       "mediastatistics-header-executable": "Header on [[Special:MediaStatistics]] for file types that are in the executable category. This includes things like source files for interpreted programming language (Shell scripts, javascript, etc).",
+       "mediastatistics-header-archive": "Header on [[Special:MediaStatistics]] for file types that are in the archive category. Includes things like tar, zip, gzip etc."
  }