Merge "Change delimiter for multiple namespaces and tags"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Tue, 9 May 2017 11:41:48 +0000 (11:41 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Tue, 9 May 2017 11:41:48 +0000 (11:41 +0000)
62 files changed:
.mailmap
RELEASE-NOTES-1.30
docs/hooks.txt
includes/Preferences.php
includes/Title.php
includes/api/ApiParse.php
includes/api/ApiQueryRevisions.php
includes/api/i18n/de.json
includes/api/i18n/en.json
includes/api/i18n/fr.json
includes/api/i18n/he.json
includes/api/i18n/hu.json
includes/api/i18n/it.json
includes/api/i18n/qqq.json
includes/api/i18n/zh-hans.json
includes/cache/MessageCache.php
includes/changetags/ChangeTags.php
includes/installer/i18n/hi.json
includes/installer/i18n/nl.json
includes/parser/Parser.php
includes/parser/ParserOptions.php
includes/specialpage/ChangesListSpecialPage.php
includes/specials/SpecialRecentchanges.php
languages/i18n/be-tarask.json
languages/i18n/bs.json
languages/i18n/en.json
languages/i18n/eu.json
languages/i18n/fi.json
languages/i18n/fr.json
languages/i18n/gl.json
languages/i18n/he.json
languages/i18n/ja.json
languages/i18n/kn.json
languages/i18n/lv.json
languages/i18n/qqq.json
maintenance/cleanupInvalidDbKeys.php
resources/Resources.php
resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FiltersViewModel.js
resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.SavedQueriesModel.js [new file with mode: 0644]
resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.SavedQueryItemModel.js [new file with mode: 0644]
resources/src/mediawiki.rcfilters/images/clip.svg [new file with mode: 0644]
resources/src/mediawiki.rcfilters/images/pushPin.svg [new file with mode: 0644]
resources/src/mediawiki.rcfilters/images/unClip.svg [new file with mode: 0644]
resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js
resources/src/mediawiki.rcfilters/mw.rcfilters.init.js
resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.FilterTagMultiselectWidget.less
resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.SaveFiltersPopupButtonWidget.less [new file with mode: 0644]
resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.SavedLinksListItemWidget.less [new file with mode: 0644]
resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.SavedLinksListWidget.less [new file with mode: 0644]
resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.less
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterTagMultiselectWidget.js
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterWrapperWidget.js
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.SaveFiltersPopupButtonWidget.js [new file with mode: 0644]
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.SavedLinksListItemWidget.js [new file with mode: 0644]
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.SavedLinksListWidget.js [new file with mode: 0644]
tests/parser/ParserTestRunner.php
tests/parser/parserTests.txt
tests/phpunit/includes/ExtraParserTest.php
tests/phpunit/includes/content/WikitextContentTest.php
tests/phpunit/includes/page/WikiPageTest.php
tests/phpunit/includes/parser/TagHooksTest.php
tests/qunit/suites/resources/mediawiki.rcfilters/dm.FiltersViewModel.test.js

index 7fcf3da..ae18878 100644 (file)
--- a/.mailmap
+++ b/.mailmap
@@ -412,8 +412,8 @@ Sucheta Ghoshal <sghoshal@wikimedia.org>
 Sumit Asthana <asthana.sumit23@gmail.com>
 TerraCodes <terracodes@tools.wmflabs.org>
 Thalia Chan <thalia@cantorion.org>
-Thiemo Mättig (WMDE) <thiemo.maettig@wikimedia.de>
-Thiemo Mättig (WMDE) <thiemo.maettig@wikimedia.de> <mr.heat@gmx.de>
+Thiemo Mättig <thiemo.maettig@wikimedia.de>
+Thiemo Mättig <thiemo.maettig@wikimedia.de> <mr.heat@gmx.de>
 This, that and the other <at.light@live.com.au>
 tholam <t.lam@lamsinfosystem.com>
 Thomas Bleher <ThomasBleher@gmx.de> <tbleher@users.mediawiki.org>
index cdf8ba4..590dc2c 100644 (file)
@@ -14,7 +14,11 @@ production.
   documentation of $wgShellLocale for details.
 
 === New features in 1.30 ===
-* …
+* (T37247) Output from Parser::parse() will now be wrapped in a div with
+  class="mw-parser-output" by default. This may be changed or disabled using
+  ParserOptions::setWrapOutputClass().
+* Added 'ChangeTagsAllowedAdd' hook, enabling extensions to allow software-
+  specific tags to be added by users.
 
 === External library changes in 1.30 ===
 
@@ -31,7 +35,9 @@ production.
 * …
 
 === Action API changes in 1.30 ===
-* …
+* (T37247) action=parse output will be wrapped in a div with
+  class="mw-parser-output" by default. This may be changed or disabled using
+  the new 'wrapoutputclass' parameter.
 
 === Action API internal changes in 1.30 ===
 * …
index 7c09a55..d95e39b 100644 (file)
@@ -1070,6 +1070,13 @@ $params: tag params
 $rc: RecentChange being tagged when the tagging accompanies the action or null
 $user: User who performed the tagging when the tagging is subsequent to the action or null
 
+'ChangeTagsAllowedAdd': Called when checking if a user can add tags to a change.
+&$allowedTags: List of all the tags the user is allowed to add. Any tags the
+  user wants to add ($addTags) that are not in this array will cause it to fail.
+  You may add or remove tags to this array as required.
+$addTags: List of tags user intends to add.
+$user: User who is adding the tags.
+
 'ChangeUserGroups': Called before user groups are changed.
 $performer: The User who will perform the change
 $user: The User whose groups will be changed
index b428e87..4017619 100644 (file)
@@ -915,6 +915,9 @@ class Preferences {
                        'label-message' => 'tog-hideminor',
                        'section' => 'rc/advancedrc',
                ];
+               $defaultPreferences['rcfilters-saved-queries'] = [
+                       'type' => 'api',
+               ];
 
                if ( $config->get( 'RCWatchCategoryMembership' ) ) {
                        $defaultPreferences['hidecategorization'] = [
index e460cda..a8cfad8 100644 (file)
@@ -3994,29 +3994,52 @@ class Title implements LinkTarget {
        }
 
        /**
-        * Get the revision ID of the previous revision
-        *
+        * Get next/previous revision ID relative to another revision ID
         * @param int $revId Revision ID. Get the revision that was before this one.
         * @param int $flags Title::GAID_FOR_UPDATE
-        * @return int|bool Old revision ID, or false if none exists
-        */
-       public function getPreviousRevisionID( $revId, $flags = 0 ) {
-               /* This function and getNextRevisionID have bad performance when
-                  used on a page with many revisions on mysql. An explicit extended
-                  primary key may help in some cases, if the PRIMARY KEY is banned:
-                  T159319 */
+        * @param string $dir 'next' or 'prev'
+        * @return int|bool New revision ID, or false if none exists
+        */
+       private function getRelativeRevisionID( $revId, $flags, $dir ) {
+               $revId = (int)$revId;
+               if ( $dir === 'next' ) {
+                       $op = '>';
+                       $sort = 'ASC';
+               } elseif ( $dir === 'prev' ) {
+                       $op = '<';
+                       $sort = 'DESC';
+               } else {
+                       throw new InvalidArgumentException( '$dir must be "next" or "prev"' );
+               }
+
                if ( $flags & self::GAID_FOR_UPDATE ) {
                        $db = wfGetDB( DB_MASTER );
                } else {
                        $db = wfGetDB( DB_REPLICA, 'contributions' );
                }
+
+               // Intentionally not caring if the specified revision belongs to this
+               // page. We only care about the timestamp.
+               $ts = $db->selectField( 'revision', 'rev_timestamp', [ 'rev_id' => $revId ], __METHOD__ );
+               if ( $ts === false ) {
+                       $ts = $db->selectField( 'archive', 'ar_timestamp', [ 'ar_rev_id' => $revId ], __METHOD__ );
+                       if ( $ts === false ) {
+                               // Or should this throw an InvalidArgumentException or something?
+                               return false;
+                       }
+               }
+               $ts = $db->addQuotes( $ts );
+
                $revId = $db->selectField( 'revision', 'rev_id',
                        [
                                'rev_page' => $this->getArticleID( $flags ),
-                               'rev_id < ' . intval( $revId )
+                               "rev_timestamp $op $ts OR (rev_timestamp = $ts AND rev_id $op $revId)"
                        ],
                        __METHOD__,
-                       [ 'ORDER BY' => 'rev_id DESC', 'IGNORE INDEX' => 'PRIMARY' ]
+                       [
+                               'ORDER BY' => "rev_timestamp $sort, rev_id $sort",
+                               'IGNORE INDEX' => 'rev_timestamp', // Probably needed for T159319
+                       ]
                );
 
                if ( $revId === false ) {
@@ -4026,6 +4049,17 @@ class Title implements LinkTarget {
                }
        }
 
+       /**
+        * Get the revision ID of the previous revision
+        *
+        * @param int $revId Revision ID. Get the revision that was before this one.
+        * @param int $flags Title::GAID_FOR_UPDATE
+        * @return int|bool Old revision ID, or false if none exists
+        */
+       public function getPreviousRevisionID( $revId, $flags = 0 ) {
+               return $this->getRelativeRevisionID( $revId, $flags, 'prev' );
+       }
+
        /**
         * Get the revision ID of the next revision
         *
@@ -4034,25 +4068,7 @@ class Title implements LinkTarget {
         * @return int|bool Next revision ID, or false if none exists
         */
        public function getNextRevisionID( $revId, $flags = 0 ) {
-               if ( $flags & self::GAID_FOR_UPDATE ) {
-                       $db = wfGetDB( DB_MASTER );
-               } else {
-                       $db = wfGetDB( DB_REPLICA, 'contributions' );
-               }
-               $revId = $db->selectField( 'revision', 'rev_id',
-                       [
-                               'rev_page' => $this->getArticleID( $flags ),
-                               'rev_id > ' . intval( $revId )
-                       ],
-                       __METHOD__,
-                       [ 'ORDER BY' => 'rev_id', 'IGNORE INDEX' => 'PRIMARY' ]
-               );
-
-               if ( $revId === false ) {
-                       return false;
-               } else {
-                       return intval( $revId );
-               }
+               return $this->getRelativeRevisionID( $revId, $flags, 'next' );
        }
 
        /**
@@ -4069,8 +4085,8 @@ class Title implements LinkTarget {
                                [ 'rev_page' => $pageId ],
                                __METHOD__,
                                [
-                                       'ORDER BY' => 'rev_timestamp ASC',
-                                       'IGNORE INDEX' => 'rev_timestamp'
+                                       'ORDER BY' => 'rev_timestamp ASC, rev_id ASC',
+                                       'IGNORE INDEX' => 'rev_timestamp', // See T159319
                                ]
                        );
                        if ( $row ) {
index d648968..7d22d9c 100644 (file)
@@ -478,6 +478,9 @@ class ApiParse extends ApiBase {
                if ( $params['disabletidy'] ) {
                        $popts->setTidy( false );
                }
+               $popts->setWrapOutputClass(
+                       $params['wrapoutputclass'] === '' ? false : $params['wrapoutputclass']
+               );
 
                $reset = null;
                $suppressCache = false;
@@ -788,6 +791,7 @@ class ApiParse extends ApiBase {
                                        'parsetree' => [ 'apihelp-parse-paramvalue-prop-parsetree', CONTENT_MODEL_WIKITEXT ],
                                ],
                        ],
+                       'wrapoutputclass' => 'mw-parser-output',
                        'pst' => false,
                        'onlypst' => false,
                        'effectivelanglinks' => false,
index 7b8394f..b0a8468 100644 (file)
@@ -218,10 +218,75 @@ class ApiQueryRevisions extends ApiQueryRevisionsBase {
                                );
                        }
 
-                       $this->addTimestampWhereRange( 'rev_timestamp', $params['dir'],
-                               $params['start'], $params['end'] );
-                       $this->addWhereRange( 'rev_id', $params['dir'],
-                               $params['startid'], $params['endid'] );
+                       // Convert startid/endid to timestamps (T163532)
+                       if ( $params['startid'] !== null || $params['endid'] !== null ) {
+                               $ids = [
+                                       (int)$params['startid'] => true,
+                                       (int)$params['endid'] => true,
+                               ];
+                               unset( $ids[0] ); // null
+                               $ids = array_keys( $ids );
+
+                               $db = $this->getDB();
+                               $sql = $db->unionQueries( [
+                                       $db->selectSQLText(
+                                               'revision',
+                                               [ 'id' => 'rev_id', 'ts' => 'rev_timestamp' ],
+                                               [ 'rev_id' => $ids ],
+                                               __METHOD__
+                                       ),
+                                       $db->selectSQLText(
+                                               'archive',
+                                               [ 'id' => 'ar_rev_id', 'ts' => 'ar_timestamp' ],
+                                               [ 'ar_rev_id' => $ids ],
+                                               __METHOD__
+                                       ),
+                               ], false );
+                               $res = $db->query( $sql, __METHOD__ );
+                               foreach ( $res as $row ) {
+                                       if ( (int)$row->id === (int)$params['startid'] ) {
+                                               $params['start'] = $row->ts;
+                                       }
+                                       if ( (int)$row->id === (int)$params['endid'] ) {
+                                               $params['end'] = $row->ts;
+                                       }
+                               }
+                               if ( $params['startid'] !== null && $params['start'] === null ) {
+                                       $p = $this->encodeParamName( 'startid' );
+                                       $this->dieWithError( [ 'apierror-revisions-badid', $p ], "badid_$p" );
+                               }
+                               if ( $params['endid'] !== null && $params['end'] === null ) {
+                                       $p = $this->encodeParamName( 'endid' );
+                                       $this->dieWithError( [ 'apierror-revisions-badid', $p ], "badid_$p" );
+                               }
+
+                               if ( $params['start'] !== null ) {
+                                       $op = ( $params['dir'] === 'newer' ? '>' : '<' );
+                                       $ts = $db->addQuotes( $db->timestampOrNull( $params['start'] ) );
+                                       if ( $params['startid'] !== null ) {
+                                               $this->addWhere( "rev_timestamp $op $ts OR "
+                                                       . "rev_timestamp = $ts AND rev_id $op= " . intval( $params['startid'] ) );
+                                       } else {
+                                               $this->addWhere( "rev_timestamp $op= $ts" );
+                                       }
+                               }
+                               if ( $params['end'] !== null ) {
+                                       $op = ( $params['dir'] === 'newer' ? '<' : '>' ); // Yes, opposite of the above
+                                       $ts = $db->addQuotes( $db->timestampOrNull( $params['end'] ) );
+                                       if ( $params['endid'] !== null ) {
+                                               $this->addWhere( "rev_timestamp $op $ts OR "
+                                                       . "rev_timestamp = $ts AND rev_id $op= " . intval( $params['endid'] ) );
+                                       } else {
+                                               $this->addWhere( "rev_timestamp $op= $ts" );
+                                       }
+                               }
+                       } else {
+                               $this->addTimestampWhereRange( 'rev_timestamp', $params['dir'],
+                                       $params['start'], $params['end'] );
+                       }
+
+                       $sort = ( $params['dir'] === 'newer' ? '' : 'DESC' );
+                       $this->addOption( 'ORDER BY', [ "rev_timestamp $sort", "rev_id $sort" ] );
 
                        // There is only one ID, use it
                        $ids = array_keys( $pageSet->getGoodTitles() );
index 074d69e..fee1fa3 100644 (file)
        "apihelp-parse-paramvalue-prop-wikitext": "Gibt den originalen Wikitext zurück, der geparst wurde.",
        "apihelp-parse-paramvalue-prop-properties": "Gibt verschiedene Eigenschaften zurück, die im geparsten Wikitext definiert sind.",
        "apihelp-parse-paramvalue-prop-parsewarnings": "Gibt die Warnungen aus, die beim Parsen des Inhalts aufgetreten sind.",
+       "apihelp-parse-param-wrapoutputclass": "Zu verwendende CSS-Klasse, in der die Parserausgabe verpackt werden soll.",
        "apihelp-parse-param-section": "Parst nur den Inhalt dieser Abschnittsnummer.\n\nFalls <kbd>new</kbd>, parst <var>$1text</var> und <var>$1sectiontitle</var>, als ob ein neuer Abschnitt der Seite hinzugefügt wird.\n\n<kbd>new</kbd> ist nur erlaubt mit der Angabe <var>text</var>.",
        "apihelp-parse-param-sectiontitle": "Überschrift des neuen Abschnittes, wenn <var>section</var> = <kbd>new</kbd> ist.\n\nAnders als beim Bearbeiten der Seite wird der Parameter nicht durch die <var>summary</var> ersetzt, wenn er weggelassen oder leer ist.",
        "apihelp-parse-param-disablepp": "Benutze <var>$1disablelimitreport</var> stattdessen.",
        "apierror-pagelang-disabled": "Das Ändern der Sprache von Seiten ist auf diesem Wiki nicht erlaubt.",
        "apierror-protect-invalidaction": "Ungültiger Schutztyp „$1“.",
        "apierror-readonly": "Das Wiki ist derzeit im schreibgeschützten Modus.",
+       "apierror-revisions-badid": "Für den Parameter <var>$1</var> wurde keine Version gefunden.",
        "apierror-revwrongpage": "Die Version $1 ist keine Version von $2.",
        "apierror-sectionreplacefailed": "Der aktualisierte Abschnitt konnte nicht zusammengeführt werden.",
        "apierror-stashinvalidfile": "Ungültige gespeicherte Datei.",
index 7a04caf..c3c7bd4 100644 (file)
        "apihelp-parse-paramvalue-prop-limitreporthtml": "Gives the HTML version of the limit report. Gives no data, when <var>$1disablelimitreport</var> is set.",
        "apihelp-parse-paramvalue-prop-parsetree": "The XML parse tree of revision content (requires content model <code>$1</code>)",
        "apihelp-parse-paramvalue-prop-parsewarnings": "Gives the warnings that occurred while parsing content.",
+       "apihelp-parse-param-wrapoutputclass": "CSS class to use to wrap the parser output.",
        "apihelp-parse-param-pst": "Do a pre-save transform on the input before parsing it. Only valid when used with text.",
        "apihelp-parse-param-onlypst": "Do a pre-save transform (PST) on the input, but don't parse it. Returns the same wikitext, after a PST has been applied. Only valid when used with <var>$1text</var>.",
        "apihelp-parse-param-effectivelanglinks": "Includes language links supplied by extensions (for use with <kbd>$1prop=langlinks</kbd>).",
 
        "apihelp-query+revisions-description": "Get revision information.\n\nMay be used in several ways:\n# Get data about a set of pages (last revision), by setting titles or pageids.\n# Get revisions for one given page, by using titles or pageids with start, end, or limit.\n# Get data about a set of revisions by setting their IDs with revids.",
        "apihelp-query+revisions-paraminfo-singlepageonly": "May only be used with a single page (mode #2).",
-       "apihelp-query+revisions-param-startid": "From which revision ID to start enumeration.",
-       "apihelp-query+revisions-param-endid": "Stop revision enumeration on this revision ID.",
+       "apihelp-query+revisions-param-startid": "Start enumeration from this revision's timestamp. The revision must exist, but need not belong to this page.",
+       "apihelp-query+revisions-param-endid": "Stop enumeration at this revision's timestamp. The revision must exist, but need not belong to this page.",
        "apihelp-query+revisions-param-start": "From which revision timestamp to start enumeration.",
        "apihelp-query+revisions-param-end": "Enumerate up to this timestamp.",
        "apihelp-query+revisions-param-user": "Only include revisions made by user.",
        "apierror-revdel-mutuallyexclusive": "The same field cannot be used in both <var>hide</var> and <var>show</var>.",
        "apierror-revdel-needtarget": "A target title is required for this RevDel type.",
        "apierror-revdel-paramneeded": "At least one value is required for <var>hide</var> and/or <var>show</var>.",
+       "apierror-revisions-badid": "No revision was found for parameter <var>$1</var>.",
        "apierror-revisions-norevids": "The <var>revids</var> parameter may not be used with the list options (<var>$1limit</var>, <var>$1startid</var>, <var>$1endid</var>, <kbd>$1dir=newer</kbd>, <var>$1user</var>, <var>$1excludeuser</var>, <var>$1start</var>, and <var>$1end</var>).",
        "apierror-revisions-singlepage": "<var>titles</var>, <var>pageids</var> or a generator was used to supply multiple pages, but the <var>$1limit</var>, <var>$1startid</var>, <var>$1endid</var>, <kbd>$1dir=newer</kbd>, <var>$1user</var>, <var>$1excludeuser</var>, <var>$1start</var>, and <var>$1end</var> parameters may only be used on a single page.",
        "apierror-revwrongpage": "r$1 is not a revision of $2.",
index 3a47b63..35de672 100644 (file)
        "apihelp-parse-paramvalue-prop-limitreporthtml": "Fournit la version HTML du rapport de limite. Ne fournit aucune donnée, si <var>$1disablelimitreport</var> est positionné.",
        "apihelp-parse-paramvalue-prop-parsetree": "L’arbre d’analyse XML du contenu de la révision (nécessite le modèle de contenu <code>$1</code>)",
        "apihelp-parse-paramvalue-prop-parsewarnings": "Fournit les messages d'avertissement qui sont apparus lors de l'analyse de contenu.",
+       "apihelp-parse-param-wrapoutputclass": "classe CSS à utiliser pour formater la sortie de l'analyseur.",
        "apihelp-parse-param-pst": "Faire une transformation avant enregistrement de l’entrée avant de l’analyser. Valide uniquement quand utilisé avec du texte.",
        "apihelp-parse-param-onlypst": "Faire une transformation avant enregistrement (PST) de l’entrée, mais ne pas l’analyser. Renvoie le même wikitexte, après que la PST a été appliquée. Valide uniquement quand utilisé avec <var>$1text</var>.",
        "apihelp-parse-param-effectivelanglinks": "Inclut les liens de langue fournis par les extensions (à utiliser avec <kbd>$1prop=langlinks</kbd>).",
        "apihelp-query+redirects-example-generator": "Obtenir des informations sur toutes les redirections vers [[Main Page]]",
        "apihelp-query+revisions-description": "Obtenir des informations sur la révision.\n\nPeut être utilisé de différentes manières :\n# Obtenir des données sur un ensemble de pages (dernière révision), en mettant les titres ou les ids de page.\n# Obtenir les révisions d’une page donnée, en utilisant les titres ou les ids de page avec rvstart, rvend ou rvlimit.\n# Obtenir des données sur un ensemble de révisions en donnant leurs IDs avec revids.",
        "apihelp-query+revisions-paraminfo-singlepageonly": "Utilisable uniquement avec une seule page (mode #2).",
-       "apihelp-query+revisions-param-startid": "À quel ID de révision démarrer l’énumération.",
-       "apihelp-query+revisions-param-endid": "Arrêter l’énumération des révisions à cet ID.",
+       "apihelp-query+revisions-param-startid": "Commencer l'énumération à partir de la date de cette revue. La revue doit exister, mais ne concerne pas forcément cette page.",
+       "apihelp-query+revisions-param-endid": "Arrêter l’énumération à la date de cette revue. La revue doit exister mais ne concerne pas forcément cette page.",
        "apihelp-query+revisions-param-start": "À quel horodatage de révision démarrer l’énumération.",
        "apihelp-query+revisions-param-end": "Énumérer jusqu’à cet horodatage.",
        "apihelp-query+revisions-param-user": "Inclure uniquement les révisions faites par l’utilisateur.",
        "apierror-revdel-mutuallyexclusive": "Le même champ ne peut pas être utilisé à la fois en <var>hide</var> et <var>show</var>.",
        "apierror-revdel-needtarget": "Un titre cible est nécessaire pour ce type RevDel.",
        "apierror-revdel-paramneeded": "Au moins une valeur est nécessaire pour <var>hide</var> ou <var>show</var>.",
+       "apierror-revisions-badid": "Pas de correction trouvée pour le paramètre <var>$1</var>.",
        "apierror-revisions-norevids": "Le paramètre <var>revids</var> ne peut pas être utilisé avec les options de liste (<var>$1limit</var>, <var>$1startid</var>, <var>$1endid</var>, <kbd>$1dir=newer</kbd>, <var>$1user</var>, <var>$1excludeuser</var>, <var>$1start</var>, et <var>$1end</var>).",
        "apierror-revisions-singlepage": "<var>titles</var>, <var>pageids</var> ou un générateur a été utilisé pour fournir plusieurs pages, mais les paramètres <var>$1limit</var>, <var>$1startid</var>, <var>$1endid</var>, <kbd>$1dir=newer</kbd>, <var>$1user</var>, <var>$1excludeuser</var>, <var>$1start</var> et <var>$1end</var> ne peuvent être utilisés que sur une seule page.",
        "apierror-revwrongpage": "r$1 n'est pas une révision de $2.",
index a948c85..cc16214 100644 (file)
        "apihelp-parse-paramvalue-prop-limitreporthtml": "נותן את גרסת ה־HTML של דו\"ח ההגבלות. לא נותן שום נתונים כאשר מוגדר <var>$1disablelimitreport</var>.",
        "apihelp-parse-paramvalue-prop-parsetree": "עץ פענוח XML של תוכן הגרסה (דורש מודל תוכן <code>$1</code>)",
        "apihelp-parse-paramvalue-prop-parsewarnings": "נותן אזהרות שאירעו בזמן פענוח התוכן.",
+       "apihelp-parse-param-wrapoutputclass": "מחלקה של CSS שתשמש לעטיפת פלט המפענח.",
        "apihelp-parse-param-pst": "לעשות התמרה לפני שמירה על הקלט לפני פענוחו. תקין רק בשימוש עם טקסט.",
        "apihelp-parse-param-onlypst": "לעשות התמרה לפני שמירה (pre-save transform‏, PST) על הקלט, אבל לא לפענח אותו. מחזיר את אותו קוד הוויקי אחרי החלת PST. תקף רק בשימוש עם <var>$1text</var>.",
        "apihelp-parse-param-effectivelanglinks": "כולל קישור שפה שמספקות הרחבות (לשימוש עם <kbd>$1prop=langlinks</kbd>).",
        "apihelp-query+redirects-example-generator": "קבלת מידע על כל ההפניות ל־[[Main Page]].",
        "apihelp-query+revisions-description": "קבלת מידע על גרסה.\n\nיכול לשמש במספר דרכים:\n# קבלת נתונים על ערכת דפים (גרסה אחרונה), באמצעות כותרות או מזהי דף.\n# קבלת גרסאות עבור דף נתון אחד, באמצעות שימוש בכותרות או במזהי דף עם start‏, end או limit.\n# קבלת נתונים על ערכת גרסאות באמצעות הגדרת המזהים שלהם עם revid־ים.",
        "apihelp-query+revisions-paraminfo-singlepageonly": "יכול לשמש רק עם דף בודד (mode #2).",
-       "apihelp-query+revisions-param-startid": "×\9e×\90×\99×\96×\94 ×\9e×\96×\94×\94 ×\92רס×\94 ×\9c×\94ת×\97×\99×\9c ×\9c×\9e× ×\95ת.",
-       "apihelp-query+revisions-param-endid": "×\91×\90×\99×\96×\94 ×\9e×\96×\94×\94 ×\92רס×\94 ×\9c×\94פס×\99ק ×\90ת ×\9e× ×\99×\99ת ×\94×\92רס×\90×\95ת.",
+       "apihelp-query+revisions-param-startid": "×\9c×\94ת×\97×\99×\9c ×\9c×\9e× ×\95ת ×\9e×\97×\95ת×\9d ×\94×\96×\9e×\9f ×©×\9c ×\94×\92רס×\94 ×\94×\96×\90ת. ×\94×\92רס×\94 ×¦×¨×\99×\9b×\94 ×\9c×\94×\99×\95ת ×§×\99×\99×\9eת, ×\90×\91×\9c ×\9c×\90 ×\97×\99×\99×\91ת ×\9c×\94×\99×\95ת ×©×\99×\99×\9bת ×\9c×\93×£ ×\94×\96×\94.",
+       "apihelp-query+revisions-param-endid": "×\9c×\94פס×\99ק ×\9c×\9e× ×\95ת ×\9e×\97×\95ת×\9d ×\94×\96×\9e×\9f ×©×\9c ×\94×\92רס×\94 ×\94×\96×\90ת. ×\94×\92רס×\94 ×¦×¨×\99×\9b×\94 ×\9c×\94×\99×\95ת ×§×\99×\99×\9eת, ×\90×\91×\9c ×\9c×\90 ×\97×\99×\99×\91ת ×\9c×\94×\99×\95ת ×©×\99×\99×\9bת ×\9c×\93×£ ×\94×\96×\94.",
        "apihelp-query+revisions-param-start": "מאיזה חותם־זמן של גרסה להתחיל למנות.",
        "apihelp-query+revisions-param-end": "למנות עד חותם־הזמן הזה.",
        "apihelp-query+revisions-param-user": "לכלול רק גרסאות מאת משתמש.",
        "apierror-revdel-mutuallyexclusive": "אותו השדה אינו יכול לשמש עם <var>hide</var> ועם <var>show</var>.",
        "apierror-revdel-needtarget": "כותרת יעד נחוצה בשביל סוג ה־RevDel הזה.",
        "apierror-revdel-paramneeded": "לפחות ערך אחד נחוץ בשביל <var>hide</var> או <var>show</var>.",
+       "apierror-revisions-badid": "לא נמצאה גרסה לפרמטר <var>$1</var>.",
        "apierror-revisions-norevids": "הפרמטר <var>revids</var> אינו יכול לשמש עם אפשרויות הרשימה (<var>$1limit</var>‏, <var>$1startid</var>‏, <var>$1endid</var>‏, <kbd>$1dir=newer</kbd>‏, <var>$1user</var>‏, <var>$1excludeuser</var>‏, <var>$1start</var>, ו־<var>$1end</var>).",
        "apierror-revisions-singlepage": "<var>titles</var>‏, <var>pageids</var> או מחולל שימשו לאספקת דפים מרובים, אבל הפרמטרים <var>$1limit</var>‏, <var>$1startid</var>‏, <var>$1endid</var>‏, <kbd>$1dir=newer</kbd>‏, <var>$1user</var>‏, <var>$1excludeuser</var>‏, <var>$1start</var>, ו־<var>$1end</var> יכולים לשמש רק בדף בודד.",
        "apierror-revwrongpage": "הגרסה $1 אינה גרסה של $2.",
index 8892638..160bfa7 100644 (file)
        "apihelp-login-example-login": "Bejelentkezés.",
        "apihelp-logout-description": "Kijelentkezés és munkamenetadatok törlése.",
        "apihelp-logout-example-logout": "Aktuális felhasználó kijelentkeztetése.",
+       "apihelp-managetags-description": "A változtatáscímkék kezelése.",
+       "apihelp-managetags-param-operation": "A végrehajtandó feladat:\n;create: Új változtatáscímke létrehozása kézi használatra.\n;delete: Egy változtatáscímke eltávolítása az adatbázisból, beleértve az eltávolítását minden lapváltozatról, frissváltoztatások-bejegyzésről és naplóbejegyzésről, ahol használatban van.\n;activate: Egy változtatáscímke aktiválása, lehetővé téve a felhasználóknak a kézi használatát.\n;deactivate: Egy változtatáscímke deaktiválása, a felhasználók megakadályozása a kézi használatban.",
+       "apihelp-managetags-param-tag": "A létrehozandó, törlendő, aktiválandó vagy deaktiválandó címke. Létrehozás esetén adott nevű címke nem létezhet. Törlés esetén a címkének léteznie kell. Aktiválás esetén a címkének léteznie kell, és nem használhatja más kiterjesztés. Deaktiválás esetén a címkének aktívnak és kézzel definiáltnak  kell lennie.",
+       "apihelp-managetags-param-reason": "Opcionális indoklás a címke létrehozásához, törléséhez, aktiválásához vagy deaktiválásához.",
+       "apihelp-managetags-param-ignorewarnings": "Figyelmeztetések figyelmen kívül hagyása a művelet közben.",
+       "apihelp-managetags-example-create": "<kbd>spam</kbd> címke létrehozása <kbd>For use in edit patrolling</kbd> indoklással",
+       "apihelp-managetags-example-delete": "<kbd>vandlaism</kbd> címke törlése <kbd>Misspelt</kbd> indoklással",
+       "apihelp-managetags-example-activate": "<kbd>spam</kbd> címke aktiválása <kbd>For use in edit patrolling</kbd> indoklással",
+       "apihelp-managetags-example-deactivate": "<kbd>spam</kbd> címke deaktiválása <kbd>No longer required</kbd> indoklással",
        "apihelp-mergehistory-description": "Laptörténetek egyesítése",
        "apihelp-mergehistory-param-reason": "Laptörténet egyesítésének oka.",
        "apihelp-move-description": "Egy lap átnevezése.",
+       "apihelp-move-param-from": "Az átnevezendő lap címe. Nem használható együtt a <var>$1fromid</var> paraméterrel.",
+       "apihelp-move-param-fromid": "Az átnevezendő lap lapazonosítója. Nem használható együtt a <var>$1from</var> paraméterrel.",
+       "apihelp-move-param-to": "A lap új címe.",
        "apihelp-move-param-reason": "Az átnevezés oka.",
        "apihelp-move-param-movetalk": "Nevezd át a vitalapot is, ha létezik.",
        "apihelp-move-param-movesubpages": "Nevezd át az allapokat is, ha lehetséges.",
        "apihelp-move-param-noredirect": "Ne készíts átirányítást.",
+       "apihelp-move-param-watch": "A lap és az átirányítás hozzáadása a jelenlegi felhasználó figyelőlistájához.",
+       "apihelp-move-param-unwatch": "A lap és az átirányítás eltávolítása a jelenlegi felhasználó figyelőlistájáról.",
+       "apihelp-move-param-watchlist": "A lap hozzáadása a figyelőlistához vagy eltávolítása onnan feltétel nélkül, a beállítások használata vagy a figyelőlista érintetlenül hagyása.",
        "apihelp-move-param-ignorewarnings": "Figyelmeztetések figyelmen kívül hagyása.",
+       "apihelp-move-example-move": "<kbd>Badtitle</kbd> átnevezése <kbd>Goodtitle</kbd> címre átirányítás készítése nélkül.",
+       "apihelp-opensearch-description": "Keresés a wikin az OpenSearch protokoll segítségével.",
+       "apihelp-opensearch-param-search": "A keresőkifejezés.",
        "apihelp-opensearch-param-limit": "Találatok maximális száma.",
+       "apihelp-opensearch-param-namespace": "A keresendő névterek.",
+       "apihelp-opensearch-param-suggest": "Ne csináljon semmit, ha a <var>[[mw:Special:MyLanguage/Manual:$wgEnableOpenSearchSuggest|$wgEnableOpenSearchSuggest]]</var> hamis.",
+       "apihelp-opensearch-param-redirects": "Hogyan kezelje az átirányításokat:\n;return: Magának az átirányításnak a visszaadása.\n;resolve: A céllap visszaadása. Lehet, hogy kevesebb mint <var>$1limit</var> találatot ad vissza.\nTörténeti okokból az alapértelmezés „return” <kbd>$1format=json</kbd> esetén és „resolve” más formátumoknál.",
+       "apihelp-opensearch-param-format": "A kimenet formátuma.",
+       "apihelp-opensearch-example-te": "<kbd>Te</kbd>-vel kezdődő lapok keresése.",
+       "apihelp-options-description": "A jelenlegi felhasználó beállításainak módosítása.\n\nCsak a MediaWiki vagy kiterjesztései által kínált, valamint a <code>userjs-</code> előtagú (felhasználói parancsfájloknak szánt) beállítások állíthatók be.",
+       "apihelp-options-param-reset": "Beállítások visszaállítása a wiki alapértelmezéseire.",
+       "apihelp-options-param-resetkinds": "A visszaállítandó beállítások típusa(i) a <var>$1reset</var> paraméter használatakor.",
+       "apihelp-options-param-change": "Változtatások listája név=érték formátumban (pl. <kbd>skin=vector</kbd>). Ha nincs érték megadva (egyenlőségjel sem szerepel – pl. <kbd>beállítás|másik|…</kbd>), a beállítások visszaállnak az alapértelmezett értékre. Ha bármilyen érték tartalmaz függőleges vonal karaktert (<kbd>|</kbd>), használd az [[Special:ApiHelp/main#main/datatypes|alternatív elválasztókaraktert]] a megfelelő működéshez.",
+       "apihelp-options-param-optionname": "Az <var>$1optionvalue</var> értékre állítandó beállítás neve.",
+       "apihelp-options-param-optionvalue": "Az <var>$1optionname</var> beállítás értéke.",
        "apihelp-options-example-reset": "Minden beállítás visszaállítása",
+       "apihelp-options-example-change": "A <kbd>skin</kbd> és a <kbd>hideminor</kbd> beállítások módosítása.",
+       "apihelp-options-example-complex": "Minden beállítás visszaállítása, majd a <kbd>skin</kbd> és a <kbd>nickname</kbd> beállítása.",
        "apihelp-parse-paramvalue-prop-parsewarnings": "A tartalom feldolgozása közben előforduló hibák visszaadása.",
        "apihelp-protect-example-protect": "Lap levédése.",
        "apihelp-query+allcategories-param-dir": "A rendezés iránya.",
index 22b23f0..0cc154f 100644 (file)
        "apihelp-query+redirects-param-namespace": "Includi solo le pagine in questi namespace.",
        "apihelp-query+redirects-param-limit": "Quanti reindirizzamenti restituire.",
        "apihelp-query+redirects-example-simple": "Ottieni un elenco di redirect a [[Main Page]].",
-       "apihelp-query+revisions-param-startid": "L'ID versione da cui iniziare l'elenco.",
+       "apihelp-query+revisions-param-startid": "Inizia l'elenco dal timestamp di questa versione. La versione deve esistere, ma non necessariamente deve appartenere a questa pagina.",
        "apihelp-query+revisions-param-start": "Il timestamp della versione da cui iniziare l'elenco.",
        "apihelp-query+revisions-param-tag": "Elenca solo le versioni etichettate con questa etichetta.",
        "apihelp-query+revisions+base-paramvalue-prop-ids": "L'ID della versione.",
index 6e70653..da0b22d 100644 (file)
        "apihelp-parse-paramvalue-prop-limitreporthtml": "{{doc-apihelp-paramvalue|parse|prop|limitreporthtml}}",
        "apihelp-parse-paramvalue-prop-parsetree": "{{doc-apihelp-paramvalue|parse|prop|parsetree|params=* $1 - Value of the constant CONTENT_MODEL_WIKITEXT|paramstart=2}}",
        "apihelp-parse-paramvalue-prop-parsewarnings": "{{doc-apihelp-paramvalue|parse|prop|parsewarnings}}",
+       "apihelp-parse-param-wrapoutputclass": "{{doc-apihelp-param|parse|wrapoutputclass}}",
        "apihelp-parse-param-pst": "{{doc-apihelp-param|parse|pst}}",
        "apihelp-parse-param-onlypst": "{{doc-apihelp-param|parse|onlypst}}",
        "apihelp-parse-param-effectivelanglinks": "{{doc-apihelp-param|parse|effectivelanglinks}}",
        "apierror-revdel-mutuallyexclusive": "{{doc-apierror}}",
        "apierror-revdel-needtarget": "{{doc-apierror}}",
        "apierror-revdel-paramneeded": "{{doc-apierror}}",
+       "apierror-revisions-badid": "{{doc-apierror}}\n\nParameters:\n* $1 - Parameter in question, e.g. \"rvstartid\".",
        "apierror-revisions-norevids": "{{doc-apierror}}\n\nParameters:\n* $1 - Module parameter prefix, e.g. \"bl\".",
        "apierror-revisions-singlepage": "{{doc-apierror}}\n\nParameters:\n* $1 - Module parameter prefix, e.g. \"bl\".",
        "apierror-revwrongpage": "{{doc-apierror}}\n\nParameters:\n* $1 - Revision ID number.\n* $2 - Page title.",
index 152f1df..8c3c652 100644 (file)
        "apihelp-parse-paramvalue-prop-limitreporthtml": "提供限制报告的HTML版本。当<var>$1disablelimitreport</var>被设置时不会提供数据。",
        "apihelp-parse-paramvalue-prop-parsetree": "修订内容的XML解析树(需要内容模型<code>$1</code>)",
        "apihelp-parse-paramvalue-prop-parsewarnings": "在解析内容时提供发生的警告",
+       "apihelp-parse-param-wrapoutputclass": "要用于包裹解析输出的CSS类。",
        "apihelp-parse-param-pst": "在解析输入前,对输入做一次保存前变换处理。仅当使用文本时有效。",
        "apihelp-parse-param-onlypst": "在输入内容中执行预保存转换(PST),但不解析它。在PST被应用后返回相同的wiki文本。只当与<var>$1text</var>一起使用时有效。",
        "apihelp-parse-param-effectivelanglinks": "包含由扩展提供的语言链接(用于与<kbd>$1prop=langlinks</kbd>一起使用)。",
index 355aff4..8f88ee9 100644 (file)
@@ -193,6 +193,7 @@ class MessageCache {
                                $po = ParserOptions::newFromAnon();
                                $po->setEditSection( false );
                                $po->setAllowUnsafeRawHtml( false );
+                               $po->setWrapOutputClass( false );
                                return $po;
                        }
 
@@ -202,6 +203,11 @@ class MessageCache {
                        // from malicious sources. As a precaution, disable
                        // the <html> parser tag when parsing messages.
                        $this->mParserOptions->setAllowUnsafeRawHtml( false );
+                       // Wrapping messages in an extra <div> is probably not expected. If
+                       // they're outside the content area they probably shouldn't be
+                       // targeted by CSS that's targeting the parser output, and if
+                       // they're inside they already are from the outer div.
+                       $this->mParserOptions->setWrapOutputClass( false );
                }
 
                return $this->mParserOptions;
@@ -458,7 +464,11 @@ class MessageCache {
        protected function loadFromDB( $code, $mode = null ) {
                global $wgMaxMsgCacheEntrySize, $wgLanguageCode, $wgAdaptiveMessageCache;
 
-               $dbr = wfGetDB( ( $mode == self::FOR_UPDATE ) ? DB_MASTER : DB_REPLICA );
+               // (T164666) The query here performs really poorly on WMF's
+               // contributions replicas. We don't have a way to say "any group except
+               // contributions", so for the moment let's specify 'api'.
+               // @todo: Get rid of this hack.
+               $dbr = wfGetDB( ( $mode == self::FOR_UPDATE ) ? DB_MASTER : DB_REPLICA, 'api' );
 
                $cache = [];
 
@@ -509,15 +519,18 @@ class MessageCache {
 
                # Conditions to load the remaining pages with their contents
                $smallConds = $conds;
-               $smallConds[] = 'page_latest=rev_id';
-               $smallConds[] = 'rev_text_id=old_id';
                $smallConds[] = 'page_len <= ' . intval( $wgMaxMsgCacheEntrySize );
 
                $res = $dbr->select(
                        [ 'page', 'revision', 'text' ],
                        [ 'page_title', 'old_id', 'old_text', 'old_flags' ],
                        $smallConds,
-                       __METHOD__ . "($code)-small"
+                       __METHOD__ . "($code)-small",
+                       [],
+                       [
+                               'revision' => [ 'JOIN', 'page_latest=rev_id' ],
+                               'text' => [ 'JOIN', 'rev_text_id=old_id' ],
+                       ]
                );
 
                foreach ( $res as $row ) {
index a07d3c9..9bde056 100644 (file)
@@ -404,8 +404,8 @@ class ChangeTags {
                }
 
                // to be applied, a tag has to be explicitly defined
-               // @todo Allow extensions to define tags that can be applied by users...
                $allowedTags = self::listExplicitlyDefinedTags();
+               Hooks::run( 'ChangeTagsAllowedAdd', [ &$allowedTags, $tags, $user ] );
                $disallowedTags = array_diff( $tags, $allowedTags );
                if ( $disallowedTags ) {
                        return self::restrictedTagError( 'tags-apply-not-allowed-one',
index 41ef4cb..c12123d 100644 (file)
        "config-localsettings-badkey": "आपकी दी गई कुंजी ग़लत है।",
        "config-your-language": "आपकी भाषा:",
        "config-your-language-help": "स्थापन के लिए भाषा चुनें",
-       "config-wiki-language": "विà¤\95à¥\80 भाषा:",
+       "config-wiki-language": "विà¤\95ि भाषा:",
        "config-wiki-language-help": "भाषा चुनें जिस  में अधिकतर लेख लिखा जाएगा",
        "config-back": "← वापस",
        "config-continue": "आगे बढ़ें →",
        "config-page-language": "भाषा",
-       "config-page-welcome": "मà¥\80डियाविà¤\95à¥\80 à¤ªà¤° आपका स्वागत है!",
-       "config-page-dbconnect": "डà¥\87à¤\9fाबà¥\87स à¤¸à¥\87 à¤\9cà¥\81ड़ें",
+       "config-page-welcome": "मà¥\80डियाविà¤\95ि à¤®à¥\87à¤\82 आपका स्वागत है!",
+       "config-page-dbconnect": "डà¥\87à¤\9fाबà¥\87स à¤¸à¥\87 à¤\9cà¥\8bड़ें",
        "config-page-upgrade": "मौजूदा स्थापना का नवीनीकरण",
-       "config-page-dbsettings": "डà¥\87à¤\9fाबà¥\87स à¤µà¤°à¤¿à¤¯à¤¤à¤¾à¤¯à¥\87à¤\82",
+       "config-page-dbsettings": "डà¥\87à¤\9fाबà¥\87स à¤¸à¥\87à¤\9fिà¤\82à¤\97 (पसà¤\82द)",
        "config-page-name": "नाम",
        "config-page-options": "विकल्प",
        "config-page-install": "स्थापित करें",
        "config-page-existingwiki": "मौजूदा विकि",
        "config-restart": "हाँ, इसे पुनः आरंभ करें",
        "config-env-php": "PHP $1 स्थापित किया गया है।",
+       "config-env-hhvm": "एचएचवीएम $1 स्थापित किया गया है।",
        "config-memory-raised": "पीएचपी की <code>memory_limit</code> सीमा $1 है, जो $2 तक बढ़ गई है।",
+       "config-xcache": "[http://xcache.lighttpd.net/ एक्सकैश] स्थापित है।",
+       "config-apc": "[http://www.php.net/apc एपीसी] स्थापित है।",
+       "config-apcu": "[http://www.php.net/apcu एपीसीयू] स्थापित है।",
+       "config-wincache": "[http://www.iis.net/download/WinCacheForPhp विनकैश] स्थापित है।",
        "config-db-type": "डेटाबेस प्रकार:",
        "config-db-host": "डेटाबेस होस्ट:",
        "config-db-host-oracle": "डेटाबेस टीएनएस:",
        "config-db-wiki-settings": "इस विकि को पहचानें",
        "config-db-name": "डेटाबेस का नाम:",
-       "config-db-install-account": "à¤\87à¤\82सà¥\8dà¤\9fालà¥\87शन à¤\95à¥\87 à¤²à¤¿à¤\8f à¤\89पयà¥\8bà¤\97à¤\95रà¥\8dता खाता",
+       "config-db-install-account": "à¤\87सà¥\87 à¤¸à¥\8dथापित à¤\95रनà¥\87 à¤¹à¥\87तà¥\81 à¤¸à¤¦à¤¸à¥\8dय खाता",
        "config-db-username": "डेटाबेस सदस्यनाम:",
        "config-db-password": "डेटाबेस पासवर्ड:",
        "config-db-port": "डेटाबेस पोर्ट:",
        "config-type-mssql": "माइक्रोसॉफ़्ट एसक्यूएल सर्वर",
        "config-invalid-db-type": "अमान्य डेटाबेस प्रकार",
        "config-regenerate": "LocalSettings.php फिर से निर्मित करें →",
+       "config-db-web-account": "वेब पहुँच हेतु डेटाबेस खाता",
+       "config-mysql-innodb": "इनोडीबी",
+       "config-mysql-binary": "बाइनरी",
        "config-mysql-utf8": "UTF-8",
        "config-mssql-auth": "प्रमाणन प्रकार:",
        "config-mssql-sqlauth": "SQL सर्वर प्रमाणन",
@@ -66,6 +74,7 @@
        "config-admin-name": "आपका उपयोगकर्ता नाम:",
        "config-admin-password": "कूटशब्द:",
        "config-admin-password-confirm": "फिर से कूटशब्द:",
+       "config-admin-name-blank": "प्रबन्धक का सदस्य नाम लिखें।",
        "config-admin-email": "ईमेल पता:",
        "config-optional-continue": "मुझसे और सवाल पूछें।",
        "config-optional-skip": "मैं पहले से ही ऊब चुका हूँ, बस विकि स्थापित करें।",
        "config-license-cc-by": "क्रिएटिव कॉमन्स ऍट्रीब्यूशन",
        "config-license-pd": "सार्वजनिक डोमैन",
        "config-email-watchlist": "ध्यानसूची अधिसूचना को सक्षम करें",
+       "config-upload-enable": "फ़ाइल अपलोड सक्रिय करें",
+       "config-upload-help": "यदि आप अपने सर्वर में फ़ाइल अपलोड की सेवा दे रहे हैं तो आपको सुरक्षा से समझौता करना पड़ सकता है।\n\nअधिक जानकारी के लिए मार्गदर्शक में [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Security सुरक्षा अनुभाग] देखें।\n\nयदि आप फ़ाइल अपलोड को सक्रिय करना चाहते हैं तो आपको मीडियाविकि के फोंल्डर के <code>images</code> फोंल्डर में जाने के बाद उसे सर्वर द्वारा लिखने लायक बनाना होगा।\nउसके बाद ही आप इस विकल्प को सक्रिय कर सकते हैं।",
+       "config-logo": "''लोगो'' का पता:",
+       "config-instantcommons": "''कॉमन्स'' सक्रिय करें",
+       "config-instantcommons-help": "[https://www.mediawiki.org/wiki/InstantCommons कॉमन्स] एक प्रकार की विशेषता प्रदान करता है, जिससे आप विकि में [https://commons.wikimedia.org/ विकिमीडिया कॉमन्स] साइट के किसी भी तस्वीर, आवाज या अन्य फ़ाइल का उपयोग अपने मीडियाविकि में कर सकते हैं। इसके लिए मीडियाविकि को इंटरनेट से जुड़ा होना चाहिए।\n\nइस विशेषता की अधिक जानकारी के लिए और इसे किस प्रकार आप अपने विकि में सक्रिय कर सकते हैं आदि जानने के लिए [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:$wgForeignFileRepos मार्गदर्शक] देखें।",
        "config-extensions": "एक्सटेंशन",
+       "config-skins": "त्वचा",
        "config-install-step-done": "पूरा हुआ",
        "config-install-step-failed": "विफल हुआ",
        "config-install-user-alreadyexists": "सदस्य \"$1\" पहले से उपस्थित है।",
        "config-install-user-create-failed": "सदस्य \"$1\" का निर्माण विफल हुआ: $2",
+       "config-install-keys": "गुप्त कुंजी बना रहा",
+       "config-install-sysop": "प्रबन्धक सदस्य खाता बना रहा",
        "config-download-localsettings": "<code>LocalSettings.php</code> को डाउनलोड करें।",
        "config-help": "सहायता",
        "config-help-tooltip": "विस्तार हेतु क्लिक करें",
        "config-nofile": "फ़ाइल \"$1\" नहीं पाई जा सकी। क्या इसे हटा दिया गया है?",
-       "mainpagetext": "'''मीडियाविकिका इन्स्टॉलेशन पूरा हो गया हैं ।'''",
-       "mainpagedocfooter": "विà¤\95ि à¤¸à¥\89फà¥\8dà¤\9fवà¥\87यरà¤\95à¥\87 à¤\87सà¥\8dतà¥\87माल à¤\95à¥\87 à¤²à¤¿à¤¯à¥\87 [https://meta.wikimedia.org/wiki/Help:Contents à¤\89पयà¥\8bà¤\97à¤\95रà¥\8dता à¤\97ाà¤\88ड] à¤¦à¥\87à¤\96à¥\87à¤\82 à¥¤\n\n== à¤¶à¥\81रà¥\81वात à¤\95रà¥\87à¤\82 ==\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Configuration_settings à¤\95à¥\89नà¥\8dफिà¤\97रà¥\87शन à¤¸à¥\87à¤\9fà¥\80à¤\82à¤\97à¤\95à¥\80 à¤¸à¥\82à¤\9aà¥\80]\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ à¤®à¥\80डियाविà¤\95िà¤\95à¥\87 à¤¬à¤¾à¤°à¥\87 à¤®à¥\87à¤\82 à¤ªà¥\8dराय: à¤ªà¥\82à¤\9bà¥\87 à¤\9cानà¥\87 à¤µà¤¾à¤²à¥\87 à¤¸à¤µà¤¾à¤²]\n* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce à¤®à¥\80डियाविà¤\95ि à¤®à¥\87लिà¤\82à¤\97 à¤²à¤¿à¤¸à¥\8dà¤\9f]"
+       "mainpagetext": "<strong>मीडियाविकि का अब स्थापित हो चुका है।</strong>",
+       "mainpagedocfooter": "à¤\87स à¤µà¤¿à¤\95ि à¤¸à¥\89फà¥\8dà¤\9fवà¥\87यर à¤\95ा à¤\95िस à¤ªà¥\8dरà¤\95ार à¤\86प à¤\87सà¥\8dतà¥\87माल à¤\95र à¤¸à¤\95तà¥\87 à¤¹à¥\88à¤\82, à¤\87सà¤\95à¥\80 à¤\9cानà¤\95ारà¥\80 à¤\95à¥\87 à¤²à¤¿à¤\8f [https://meta.wikimedia.org/wiki/Help:Contents à¤\89पयà¥\8bà¤\97 à¤®à¤¾à¤°à¥\8dà¤\97दरà¥\8dशà¤\95] à¤¦à¥\87à¤\96à¥\87à¤\82।\n== à¤¶à¥\81रà¥\81à¤\86त à¤\95रà¥\87à¤\82 ==\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Configuration_settings à¤µà¤¿à¤\95ि à¤®à¥\87à¤\82 à¤¬à¤¦à¤²à¤¾à¤µ à¤\95à¥\80 à¤¸à¥\82à¤\9aà¥\80]\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ à¤®à¥\80डियाविà¤\95ि à¤\95à¥\87 à¤¬à¤¾à¤°à¥\87 à¤®à¥\87à¤\82 à¤ªà¥\8dराय: à¤ªà¥\82à¤\9bà¥\87 à¤\9cानà¥\87 à¤µà¤¾à¤²à¥\87 à¤¸à¤µà¤¾à¤²]\n* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce à¤®à¥\80डियाविà¤\95ि à¤\95à¥\80 à¤®à¥\87ल à¤¸à¥\82à¤\9aà¥\80]\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Localisation#Translation_resources à¤®à¥\80डियाविà¤\95ि à¤\95ा à¤\86पà¤\95à¥\87 à¤­à¤¾à¤·à¤¾ à¤®à¥\87à¤\82 à¤\85नà¥\81वाद]\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Combating_spam à¤\85पनà¥\87 à¤µà¤¿à¤\95ि à¤\95à¥\8b à¤\95िस à¤ªà¥\8dरà¤\95ार à¤¸à¥\87 à¤µà¤¿à¤\9cà¥\8dà¤\9eापन à¤¡à¤¾à¤²à¤¨à¥\87 à¤µà¤¾à¤²à¥\87 à¤\94र à¤¬à¤°à¥\8dबरता à¤\95रनà¥\87 à¤µà¤¾à¤²à¥\8bà¤\82 à¤¸à¥\87 à¤¬à¤\9aा à¤¸à¤\95तà¥\87 à¤¹à¥\88à¤\82]"
 }
index a499553..ca02841 100644 (file)
        "config-unknown-collation": "'''Waarschuwing:''' de database gebruikt een collatie die niet wordt herkend.",
        "config-db-web-account": "Databaseaccount voor webtoegang",
        "config-db-web-help": "Selecteer de gebruikersnaam en het wachtwoord die de webserver gebruikt om verbinding te maken met de databaseserver na de installatie.",
-       "config-db-web-account-same": "Dezelfde account gebruiken als voor de installatie",
+       "config-db-web-account-same": "Hetzelfde account gebruiken als voor de installatie",
        "config-db-web-create": "Maak de gebruiker aan als deze nog niet bestaat",
        "config-db-web-no-create-privs": "De gebruiker die u hebt opgegeven voor de installatie heeft niet voldoende rechten om een gebruiker aan te maken.\nDe gebruiker die u hier opgeeft moet al bestaan.",
        "config-mysql-engine": "Opslagmethode:",
index 5b1e86d..ecee0e2 100644 (file)
@@ -589,6 +589,14 @@ class Parser {
                                        $this->mTitle->getPrefixedDBkey() );
                        }
                }
+
+               # Wrap non-interface parser output in a <div> so it can be targeted
+               # with CSS (T37247)
+               $class = $this->mOptions->getWrapOutputClass();
+               if ( $class !== false && !$this->mOptions->getInterfaceMessage() ) {
+                       $text = Html::rawElement( 'div', [ 'class' => $class ], $text );
+               }
+
                $this->mOutput->setText( $text );
 
                $this->mRevisionId = $oldRevisionId;
index 2cdd8c7..d4d1042 100644 (file)
@@ -258,6 +258,12 @@ class ParserOptions {
         */
        private $allowUnsafeRawHtml = true;
 
+       /**
+        * CSS class to use to wrap output from Parser::parse().
+        * @var string|false
+        */
+       private $wrapOutputClass = 'mw-parser-output';
+
        public function getInterwikiMagic() {
                return $this->mInterwikiMagic;
        }
@@ -481,6 +487,15 @@ class ParserOptions {
                return $this->allowUnsafeRawHtml;
        }
 
+       /**
+        * Class to use to wrap output from Parser::parse()
+        * @since 1.30
+        * @return string|bool
+        */
+       public function getWrapOutputClass() {
+               return $this->wrapOutputClass;
+       }
+
        public function setInterwikiMagic( $x ) {
                return wfSetVar( $this->mInterwikiMagic, $x );
        }
@@ -629,6 +644,19 @@ class ParserOptions {
                return wfSetVar( $this->allowUnsafeRawHtml, $x );
        }
 
+       /**
+        * CSS class to use to wrap output from Parser::parse()
+        * @since 1.30
+        * @param string|bool $className Set false to disable wrapping.
+        * @return string|bool Current value
+        */
+       public function setWrapOutputClass( $className ) {
+               if ( $className === true ) { // DWIM, they probably want the default class name
+                       $className = 'mw-parser-output';
+               }
+               return wfSetVar( $this->wrapOutputClass, $className );
+       }
+
        /**
         * Set the redirect target.
         *
index 51212ba..6e3971f 100644 (file)
@@ -973,13 +973,17 @@ abstract class ChangesListSpecialPage extends SpecialPage {
         * @return bool True if any option was reset
         */
        private function fixContradictoryOptions( FormOptions $opts ) {
-               $contradictorySets = [];
-
                $fixed = $this->fixBackwardsCompatibilityOptions( $opts );
 
                foreach ( $this->filterGroups as $filterGroup ) {
                        if ( $filterGroup instanceof ChangesListBooleanFilterGroup ) {
                                $filters = $filterGroup->getFilters();
+
+                               if ( count( $filters ) === 1 ) {
+                                       // legacy boolean filters should not be considered
+                                       continue;
+                               }
+
                                $allInGroupEnabled = array_reduce(
                                        $filters,
                                        function ( $carry, $filter ) use ( $opts ) {
@@ -990,7 +994,7 @@ abstract class ChangesListSpecialPage extends SpecialPage {
 
                                if ( $allInGroupEnabled ) {
                                        foreach ( $filters as $filter ) {
-                                               $opts->reset( $filter->getName() );
+                                               $opts[ $filter->getName() ] = false;
                                        }
 
                                        $fixed = true;
index f09dae7..5553218 100644 (file)
@@ -619,7 +619,11 @@ class SpecialRecentChanges extends ChangesListSpecialPage {
                if ( !$message->isDisabled() ) {
                        $this->getOutput()->addWikiText(
                                Html::rawElement( 'div',
-                                       [ 'lang' => $wgContLang->getHtmlCode(), 'dir' => $wgContLang->getDir() ],
+                                       [
+                                               'class' => 'mw-recentchanges-toplinks',
+                                               'lang' => $wgContLang->getHtmlCode(),
+                                               'dir' => $wgContLang->getDir()
+                                       ],
                                        "\n" . $message->plain() . "\n"
                                ),
                                /* $lineStart */ true,
index 9e228a7..7d69d1d 100644 (file)
        "rcfilters-filter-watchlist-watched-label": "У сьпісе назіраньня",
        "rcfilters-filter-watchlist-watched-description": "Зьмены старонак у вашым сьпісе назіраньня.",
        "rcfilters-filter-watchlist-watchednew-label": "Новыя зьмены ў сьпісе назіраньня",
+       "rcfilters-filter-watchlist-watchednew-description": "Зьмены старонак у вашым сьпісе назіраньня, якія вы не наведвалі з моманту гэтых зьменаў.",
        "rcfilters-filtergroup-changetype": "Тып зьмены",
        "rcfilters-filter-pageedits-label": "Рэдагаваньні старонкі",
        "rcfilters-filter-pageedits-description": "Рэдагаваньні вікізьместу, абмеркаваньняў, апісаньняў катэгорыяў…",
index 5b242fb..4e2f7f0 100644 (file)
        "showpreview": "Prikaži izgled",
        "showdiff": "Prikaži izmjene",
        "blankarticle": "<strong>Upozorenje:</strong> Napravili ste praznu stranicu.\nAko ponovno kliknete \"$1\", napravit ćete praznu stranicu bez sadržaja.",
-       "anoneditwarning": "<strong>Upozorenje:</strong> Niste prijavljeni. \nVaša IP adresa će biti javno vidljiva ako napravite neku izmjenu. Ako se <strong>[$1 prijavite]</strong> ili <strong>[$2 napravite račun]</strong>, vaše izmjene će biti pripisane vašem korisničkom imenu, zajedno sa drugim pogodnostima.",
+       "anoneditwarning": "<strong>Upozorenje:</strong> Niste prijavljeni. Vaša IP-adresa bit će javno vidljiva ako napravite neku izmjenu. Ako se <strong>[$1 prijavite]</strong> ili <strong>[$2 napravite račun]</strong>, Vaše izmjene bit će pripisane Vašem korisničkom imenu, pored drugih pogodnosti.",
        "anonpreviewwarning": "''Niste prijavljeni. Nakon spremanja izmjena vaša IP adresa će biti zapisana u historiji uređivanja ove stranice.''",
        "missingsummary": "<strong>Napomena:</strong> Niste unijeli sažetak izmjene.\nAko ponovo kliknete na \"$1\", Vaša izmjena će biti sačuvana bez sažetka.",
        "selfredirect": "<strong>Upozorenje:</strong> Preusmjerili ste stranicu na samu sebe.\nMožda ste naveli pogrešan cilj preusmjeravanja ili ste uređivali pogrešnu stranicu.\nAko ponovno kliknete \"$1\", ipak će nastati preusmjerenje.",
        "blockip": "Blokiraj {{GENDER:$1|korisnika|korisnicu}}",
        "blockip-legend": "Blokiranje korisnika",
        "blockiptext": "Koristite donji obrazac da biste uklonili prava pisanja određenoj IP-adresi ili korisničkom imenu.\nOvo bi se trebalo raditi samo da bi se spriječio vandalizam, i u skladu sa [[{{MediaWiki:Policy-url}}|smjernicama]].\nIspod upišite konkretan razlog (naprimjer, navedite koje su stranice vandalizirane).\nMožete blokirati IP-opsege koristeći sintaksu [https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing CIDR-a]; najveći dozvoljeni opseg za IPv4 je /$1, a za IPv6 /$2.",
-       "ipaddressorusername": "IP adresa ili korisničko ime:",
+       "ipaddressorusername": "IP-adresa ili korisničko ime:",
        "ipbexpiry": "Ističe:",
        "ipbreason": "Razlog:",
        "ipbreason-dropdown": "*Najčešći razlozi blokiranja\n**Netačne informacije\n**Uklanjanje sadržaja stranica\n**Postavljanje spam vanjskih linkova\n**Ubacivanje gluposti/grafita\n**Osobni napadi (ili napadačko ponašanje)\n**Čarapare (zloupotreba više korisničkih računa)\n**Neprihvatljivo korisničko ime",
-       "ipb-hardblock": "Onemogući prijavljene korisnike da uređuju sa ove IP adrese",
+       "ipb-hardblock": "Spriječi prijavljene korisnike da uređuju s ove IP-adrese",
        "ipbcreateaccount": "Spriječi pravljenje računa",
        "ipbemailban": "Spriječi korisnika da šalje e-poštu",
        "ipbenableautoblock": "Automatski blokiraj posljednju IP-adresu koju je koristio ovaj korisnik i sve druge IP-adrese s kojih je pokušao uređivati",
        "ipboptions": "2 sata:2 hours,1 dan:1 day,3 dana:3 days,1 sedmica:1 week,2 sedmice:2 weeks,1 mjesec:1 month,3 mjeseca:3 months,6 mjeseci:6 months,1 godine:1 year,beskonačno:infinite",
        "ipbhidename": "Sakrij korisničko ime iz uređivanja i spiskova",
        "ipbwatchuser": "Prati korisničku stranicu i stranicu za razgovor ovog korisnika",
-       "ipb-disableusertalk": "Onemogući ovog korisnika da uređuje svoju stranicu za razgovor dok je blokiran",
+       "ipb-disableusertalk": "Spriječi ovog korisnika da uređuje svoju stranicu za razgovor dok je blokiran",
        "ipb-change-block": "Ponovno blokiraj korisnika sa novim postavkama",
        "ipb-confirm": "Potvrdite blokiranje",
        "badipaddress": "Pogrešna IP adresa",
index a6d3045..0ed88be 100644 (file)
        "recentchanges-legend-plusminus": "(<em>±123</em>)",
        "recentchanges-submit": "Show",
        "rcfilters-activefilters": "Active filters",
+       "rcfilters-quickfilters": "Quick links",
+       "rcfilters-savedqueries-defaultlabel": "Saved filters",
+       "rcfilters-savedqueries-rename": "Rename",
+       "rcfilters-savedqueries-setdefault": "Set as default",
+       "rcfilters-savedqueries-unsetdefault": "Unset as default",
+       "rcfilters-savedqueries-remove": "Remove",
+       "rcfilters-savedqueries-new-name-label": "Name",
+       "rcfilters-savedqueries-apply-label": "Create quick link",
+       "rcfilters-savedqueries-cancel-label": "Cancel",
+       "rcfilters-savedqueries-add-new-title": "Save filters as a quick link",
        "rcfilters-restore-default-filters": "Restore default filters",
        "rcfilters-clear-all-filters": "Clear all filters",
        "rcfilters-search-placeholder": "Filter recent changes (browse or start typing)",
        "rcfilters-filter-user-experience-level-newcomer-label": "Newcomers",
        "rcfilters-filter-user-experience-level-newcomer-description": "Fewer than 10 edits and 4 days of activity.",
        "rcfilters-filter-user-experience-level-learner-label": "Learners",
-       "rcfilters-filter-user-experience-level-learner-description": "More days of activity and edits than \"Newcomers\" but fewer than \"Experienced users\".",
+       "rcfilters-filter-user-experience-level-learner-description": "More experience than \"Newcomers\" but less than \"Experienced users\".",
        "rcfilters-filter-user-experience-level-experienced-label": "Experienced users",
        "rcfilters-filter-user-experience-level-experienced-description": "More than 30 days of activity and 500 edits.",
        "rcfilters-filtergroup-automated": "Automated contributions",
index 7fcde3d..942e935 100644 (file)
        "tags-active-yes": "Bai",
        "tags-active-no": "Ez",
        "tags-source-extension": "Softwareak definitua",
+       "tags-source-manual": "Erabiltzaileek eta botek eskuz ezarrita",
        "tags-source-none": "Ez da gehiago erabiltzen",
        "tags-edit": "aldatu",
        "tags-delete": "ezabatu",
        "tags-edit-remove-all-tags": "(kendu etiketa guztiak)",
        "tags-edit-chosen-placeholder": "Hautatu etiketa batzuk",
        "tags-edit-reason": "Arrazoia:",
+       "tags-edit-success": "Aldaketak ezarri dira.",
+       "tags-edit-failure": "Ezin izan dira aldaketak ezarri:\n$1",
        "comparepages": "Orrialdeak alderatu",
        "compare-page1": "1. orrialdea",
        "compare-page2": "2. orrialdea",
        "logentry-block-reblock": "$1 administratzaileak {{GENDER:$4|$3}} wikilariaren blokeoa {{GENDER:$2|aldatu du}}. Blokeoaldia: $5 $6",
        "logentry-suppress-block": "$1 {{GENDER:$2|administratzaileak}} {{GENDER:$4|$3}} blokeatu du. Iraupena: $5 $6",
        "logentry-suppress-reblock": "$1 administratzaileak {{GENDER:$4|$3}} wikilariaren blokeoa {{GENDER:$2|aldatu du}}. Blokeoaldia: $5 $6",
+       "logentry-import-upload": "$1(e)k $3 {{GENDER:$2|inportatu du}} fitxategi-igoera bidez",
        "logentry-move-move": "$1 {{GENDER:$2|wikilariak}} «$3» orria «$4» izenera aldatu du",
        "logentry-move-move-noredirect": "$1 {{GENDER:$2|wikilariak}} «$3» orria «$4» izenera aldatu du, birzuzenketarik utzi gabe",
        "logentry-move-move_redir": "$1 {{GENDER:$2|wikilariak}} «$3» orria «$4» izenera aldatu du, birzuzenketaren gainetik",
        "logentry-newusers-byemail": "$1(e)k $3 erabiltzaile kontua {{GENDER:$2|sortu du}} eta pasahitza emailez bidali da",
        "logentry-newusers-autocreate": "$1 erabiltzaile kontua automatikoki {{GENDER:$2|sortu da}}",
        "logentry-upload-upload": "$1(e)k $3 {{GENDER:$2|igo du}}",
+       "logentry-upload-overwrite": "$1(e)k $3(r)en bertsio berria {{GENDER:$2|igo du}}",
+       "logentry-upload-revert": "$1(e)k $3 {{GENDER:$2|igo du}}",
        "logentry-managetags-create": "$1 lankideak \"$4\" etiketa {{GENDER:$2|sortu du}}",
        "log-name-tag": "Etiketen erregistroa",
        "rightsnone": "(bat ere ez)",
        "log-action-filter-managetags-delete": "Etiketa ezabaketa",
        "log-action-filter-managetags-activate": "Etiketa aktibazioa",
        "log-action-filter-managetags-deactivate": "Etiketa desaktibazioa",
+       "log-action-filter-newusers-autocreate": "Sorrera automatikoa",
+       "log-action-filter-protect-protect": "Babesa",
        "log-action-filter-rights-rights": "Eskuzko aldaketa",
        "log-action-filter-rights-autopromote": "Aldaketa automatikoa",
        "log-action-filter-upload-upload": "Igoera berria",
index 5db211e..b855c2e 100644 (file)
        "logentry-import-upload": "$1 {{GENDER:$2|on tuonut}} kohteen $3 tiedostotallennuksella",
        "logentry-import-upload-details": "$1 {{GENDER:$2|on tuonut}} kohteen $3 tiedostotallennuksella ($4 {{PLURAL:$4|versio|versiota}})",
        "logentry-import-interwiki": "$1 {{GENDER:$2|on tuonut}} kohteen $3 muusta wikistä",
-       "logentry-import-interwiki-details": "$1 {{GENDER:$2|on tuonut}} kohteen $3 paikasta $5 ($4 {{PLURAL:$4|versio|versioita}})",
+       "logentry-import-interwiki-details": "$1 {{GENDER:$2|on tuonut}} kohteen $3 paikasta $5 ($4 {{PLURAL:$4|versio|versiota}})",
        "logentry-merge-merge": "$1 {{GENDER:$2|yhdisti}} sivun $3 sivuun $4 (versiot $5 saakka)",
        "logentry-move-move": "$1 {{GENDER:$2|siirsi}} sivun $3 uudelle nimelle $4",
        "logentry-move-move-noredirect": "$1 {{GENDER:$2|siirsi}} sivun $3 uudelle nimelle $4 luomatta ohjausta",
index 95c7147..6e8d3d4 100644 (file)
        "anoneditwarning": "<strong>Attention :</strong> vous n’êtes pas connecté. Votre adresse IP sera visible de tout le monde si vous faites des modifications. Si vous <strong>[$1 vous connectez]</strong> ou <strong>[$2 créez un compte]</strong>, vos modifications seront attribuées à votre nom d’utilisateur, avec d'autres avantages.",
        "anonpreviewwarning": "<em>Vous n’êtes pas connecté{{GENDER:||e}}. Sauvegarder enregistrera votre adresse IP dans l’historique des modifications de la page.</em>",
        "missingsummary": "<strong>Rappel :</strong> vous n’avez pas encore fourni le résumé de votre modification.\nSi vous cliquez de nouveau sur le bouton « $1 », vos modifications seront sauvegardées sans résumé.",
-       "selfredirect": "<strong>Attention :</strong> vous êtes en train de rediriger la page vers elle-même.\nVous pouvez avoir spécifié la mauvaise cible pour la redirection, ou vous modifiez peut-être la mauvaise page.\nSi vous cliquez de nouveau sur « $1 », la redirection sera tout de même créée.",
+       "selfredirect": "<strong>Attention :</strong> vous êtes en train de rediriger la page vers elle-même.\nIl se peut que vous ayez spécifié la mauvaise cible pour la redirection, ou que vous modifiez peut-être la mauvaise page.\nSi vous cliquez de nouveau sur « $1 », la redirection sera tout de même créée.",
        "missingcommenttext": "Veuillez entrer un commentaire ci-dessous.",
        "missingcommentheader": "<strong>Rappel :</strong> vous n’avez pas fourni de sujet pour ce commentaire.\nSi vous cliquez de nouveau sur « {{int:Savearticle}} », votre modification sera enregistrée sans sujet.",
        "summary-preview": "Aperçu du résumé de modification :",
index c07cf17..b9e588e 100644 (file)
        "rcfilters-filtergroup-watchlist": "Páxinas vixiadas",
        "rcfilters-filter-watchlist-watched-label": "Na lista de vixilancia",
        "rcfilters-filter-watchlist-watched-description": "Cambios a páxinas na súa lista de vixilancia.",
+       "rcfilters-filter-watchlist-watchednew-label": "Cambios novos na súa lista de vixilancia",
+       "rcfilters-filter-watchlist-watchednew-description": "Cambios nas páxinas da súa lista de vixilancia que non visitou dende que se produciron os cambios.",
+       "rcfilters-filter-watchlist-notwatched-label": "Ausente da lista de vixilancia",
+       "rcfilters-filter-watchlist-notwatched-description": "Todos, excepto os cambios nas páxinas da súa lista de vixilancia.",
        "rcfilters-filtergroup-changetype": "Tipo de cambio",
        "rcfilters-filter-pageedits-label": "Edicións de páxinas",
        "rcfilters-filter-pageedits-description": "Edicións do contido da wiki, de conversas, de descricións de categorías...",
        "rcfilters-filter-lastrevision-label": "Versión actual",
        "rcfilters-filter-lastrevision-description": "A última modificación a unha páxina.",
        "rcfilters-filter-previousrevision-label": "Versións anteriores",
+       "rcfilters-filter-previousrevision-description": "Tódolos cambios realizados nunha páxina e que non son os máis recentes.",
        "rcnotefrom": "A continuación {{PLURAL:$5|móstrase o cambio feito|móstranse os cambios feitos}} desde o <strong>$3</strong> ás <strong>$4</strong> (móstranse <strong>$1</strong> como máximo).",
        "rclistfromreset": "Reinicializar a selección da data",
        "rclistfrom": "Mostrar os cambios novos desde o $3 ás $2",
index 50db967..30d040e 100644 (file)
        "rcfilters-filter-user-experience-level-newcomer-label": "חדשים",
        "rcfilters-filter-user-experience-level-newcomer-description": "פחות מ־10 עריכות ומ־4 ימים של פעילות.",
        "rcfilters-filter-user-experience-level-learner-label": "לומדים",
-       "rcfilters-filter-user-experience-level-learner-description": "×\99×\95תר ×\99×\9e×\99 ×¤×¢×\99×\9c×\95ת ×\95ער×\99×\9b×\95ת מ\"חדשים\", אבל פחות מ\"משתמשים מנוסים\".",
+       "rcfilters-filter-user-experience-level-learner-description": "×\99×\95תר × ×\99ס×\99×\95×\9f מ\"חדשים\", אבל פחות מ\"משתמשים מנוסים\".",
        "rcfilters-filter-user-experience-level-experienced-label": "משתמשים מנוסים",
        "rcfilters-filter-user-experience-level-experienced-description": "יותר מ־30 ימים של פעילות ו־500 עריכות.",
        "rcfilters-filtergroup-automated": "תרומות אוטומטיות",
index 77542aa..92d14d2 100644 (file)
        "missingarticle-rev": "(版番号: $1)",
        "missingarticle-diff": "(差分: $1, $2)",
        "readonly_lag": "データベースはスレーブのデータベースサーバーがマスターに同期するまで自動的にロックされています",
+       "nonwrite-api-promise-error": "「Promise-Non-Write-API-Action」HHTPヘッダーが送信されましたが、リクエストはAPI書き込みモジュールに送信されました。",
        "internalerror": "内部エラー",
        "internalerror_info": "内部エラー: $1",
        "internalerror-fatal-exception": "種別「$1」の致命的例外",
        "createacct-email-ph": "メールアドレスを入力",
        "createacct-another-email-ph": "メールアドレスを入力",
        "createaccountmail": "無作為な仮パスワードを生成し、指定のメールアドレスに送信",
+       "createaccountmail-help": "パスワードを知ることなく他の人のためにアカウントを作成するために使用することが出来ます。",
        "createacct-realname": "本名 (省略可能)",
        "createacct-reason": "理由",
        "createacct-reason-ph": "アカウントを作成する理由",
        "botpasswords-deleted-body": "利用者「$2」のボット名「$1」のためのパスワードが削除されました。",
        "botpasswords-newpassword": "<strong>$1</strong>用の新しいパスワードは<strong>$2</strong>です。<em>後で参照するために、この情報を控えておいてください。</em><br />(古いボットの制約などでログイン名と利用者名が同じでなければならない場合は、<strong>$3</strong>を利用者名とし、<strong>$4</strong>をパスワードとしてください。)",
        "botpasswords-no-provider": "BotPasswordsSessionProvider が有効ではありません。",
+       "botpasswords-restriction-failed": "ボットパスワード制限によりログインできません。",
        "botpasswords-invalid-name": "指定された利用者名には、ボット用パスワードの区切りである「$1」 が含まれていません。",
        "botpasswords-not-exist": "利用者「$1」はボット「$2」のパスワードを所持していません。",
        "resetpass_forbidden": "パスワードは変更できません",
        "passwordreset-emailelement": "利用者名: \n$1\n\n仮パスワード: \n$2",
        "passwordreset-emailsentemail": "このメールアドレスがあなたのアカウントに関連付けられている場合は、パスワードリセットのメールが送信されます。",
        "passwordreset-emailsentusername": "この利用者名に関連付けられたメールアドレスがある場合は、パスワードリセットのメールが送信されます。",
+       "passwordreset-nocaller": "送信者の情報を提供する必要があります",
+       "passwordreset-nosuchcaller": "送信者が存在しません: $1",
        "passwordreset-ignored": "パスワードのリセットが処理されませんでした。プロバイダーが設定されていない可能性があります。",
        "passwordreset-invalidemail": "無効なメールアドレスです",
        "passwordreset-nodata": "利用者名もメールアドレスも入力されていません",
        "blockedtitle": "利用者はブロックされています",
        "blockedtext": "<strong>この利用者名またはIPアドレスはブロックされています。</strong>\n\nブロックは$1によって実施されました。\nブロックの理由は <em>$2</em> です。\n\n* ブロック開始日時: $8\n* ブロック解除予定: $6\n* ブロック対象: $7\n\nこのブロックについて、$1もしくは他の[[{{MediaWiki:Grouppage-sysop}}|管理者]]に問い合わせることができます。\nただし、[[Special:Preferences|個人設定]]で有効なメールアドレスが登録されていない場合、またはメール送信機能の使用がブロックされている場合、「この利用者にメールを送信」の機能は使えません。\n現在ご使用中のIPアドレスは$3、このブロックIDは#$5です。\nお問い合わせの際には、上記の情報を必ず書いてください。",
        "autoblockedtext": "このIPアドレスは、$1によりブロックされた利用者によって使用されたため、自動的にブロックされています。\n理由は次の通りです。\n\n:<em>$2</em>\n\n* ブロック開始日時: $8\n* ブロック解除予定: $6\n* ブロック対象: $7\n\n$1または他の[[{{MediaWiki:Grouppage-sysop}}|管理者]]にこのブロックについて問い合わせることができます。\n\nただし、[[Special:Preferences|個人設定]]に正しいメールアドレスが登録されていない場合、またはメール送信がブロックされている場合、「この利用者にメールを送信」機能を使用できないことに注意してください。\n\n現在ご使用中のIPアドレスは$3 、このブロックIDは#$5です。\nお問い合わせの際は、上記の情報を必ず書いてください。",
+       "systemblockedtext": "あなたの利用者名またはIPアドレスはMediaWikiによって自動的にブロックされています。\n理由は次の通りです。\n\n:<em>$2</em>\n\n* ブロック開始日時: $8\n* ブロック解除予定: $6\n* ブロック対象: $7\n\nあなたの現在のIPアドレスは $3 です。\nお問い合わせの際は、上記の詳細情報をすべて含めてください。",
        "blockednoreason": "理由が設定されていません",
        "whitelistedittext": "このページを編集するには$1してください。",
        "confirmedittext": "ページの編集を始める前にメールアドレスの確認をする必要があります。\n[[Special:Preferences|個人設定]]でメールアドレスを設定し、確認を行ってください。",
        "search-external": "外部検索",
        "searchdisabled": "{{SITENAME}}の検索機能は無効化されています。\nさしあたってはGoogleなどで検索できます。\nただし外部の検索エンジンの索引にある{{SITENAME}}のコンテンツは古い場合があります。",
        "search-error": "検索する際にエラーが発生しました: $1",
+       "search-warning": "検索中にエラーが発生しました: $1",
        "preferences": "個人設定",
        "mypreferences": "個人設定",
        "prefs-edits": "編集回数:",
        "right-applychangetags": "自分の編集に[[Special:Tags|タグ]]を適用する",
        "right-changetags": "個々の版と記録項目の任意の[[Special:Tags|タグ]]の追加と削除",
        "right-deletechangetags": "データベースから[[Special:Tags|タグ]]を削除します",
+       "grant-generic": "「$1」の権限バンドル",
+       "grant-group-page-interaction": "ページとの相互作用",
+       "grant-group-file-interaction": "メディアとの相互作用",
+       "grant-group-watchlist-interaction": "ウォッチリストとの相互作用",
        "grant-group-email": "メールの送信",
+       "grant-group-high-volume": "大量の活動を行う",
        "grant-group-customization": "カスタマイズと個人設定",
+       "grant-group-administration": "管理操作を行う",
        "grant-group-private-information": "あなたの個人情報にアクセスする",
        "grant-group-other": "その他の活動",
        "grant-blockusers": "利用者をブロックおよびブロック解除",
        "grant-basic": "基礎的な権限",
        "grant-viewdeleted": "削除されたファイルとページを閲覧",
        "grant-viewmywatchlist": "自身のウォッチリストを閲覧",
+       "grant-viewrestrictedlogs": "制限されたログを表示する",
        "newuserlogpage": "アカウント作成記録",
        "newuserlogpagetext": "以下はアカウント作成の記録です。",
        "rightslog": "利用者権限の変更記録",
        "action-deleterevision": "版の削除",
        "action-deletelogentry": "記録項目の削除",
        "action-deletedhistory": "ページの削除履歴の閲覧",
+       "action-deletedtext": "削除された版の本文を閲覧する",
        "action-browsearchive": "削除されたページの検索",
        "action-undelete": "ページの復元",
        "action-suppressrevision": "隠された版の確認と復元",
        "action-applychangetags": "自分の編集にタグを適用する",
        "action-changetags": "個々の版および記録項目への任意のタグの追加と除去",
        "action-deletechangetags": "データベースからタグの削除",
+       "action-purge": "このページをパージする",
        "nchanges": "$1 {{PLURAL:$1|回の変更}}",
        "enhancedrc-since-last-visit": "最終閲覧以降 $1 {{PLURAL:$1|件}}",
        "enhancedrc-history": "履歴",
        "rcfilters-filter-unregistered-label": "未登録",
        "rcfilters-filter-unregistered-description": "ログインしていない編集者。",
        "rcfilters-filter-unregistered-conflicts-user-experience-level": "この項目は、登録済み利用者を編集回数別で絞り込む以下の{{PLURAL:$2|項目}}と競合しています :$1",
+       "rcfilters-filtergroup-authorship": "自分の編集か他者の編集か",
        "rcfilters-filter-editsbyself-label": "自分の編集",
        "rcfilters-filter-editsbyself-description": "自分の投稿記録を絞り込む",
        "rcfilters-filter-editsbyother-label": "自分以外の編集",
        "rcfilters-filter-bots-description": "ツールによって自動化された編集",
        "rcfilters-filter-humans-label": "人間(ボットではない)",
        "rcfilters-filter-humans-description": "人間の手作業による編集",
+       "rcfilters-filtergroup-reviewstatus": "ステータスの確認",
        "rcfilters-filter-patrolled-label": "巡回済み",
        "rcfilters-filter-patrolled-description": "巡回済みとマークされた編集。",
        "rcfilters-filter-unpatrolled-label": "未巡回",
        "rcfilters-filter-minor-description": "編集者が細部の編集とマークしたもの。",
        "rcfilters-filter-major-label": "細部でない編集",
        "rcfilters-filter-major-description": "細部とマークされていない編集。",
+       "rcfilters-filtergroup-watchlist": "ウォッチリストに追加されているページ",
+       "rcfilters-filter-watchlist-watched-label": "ウォッチリストに登録されたページ",
+       "rcfilters-filter-watchlist-watched-description": "ウォッチリストに登録されているページの変更",
+       "rcfilters-filter-watchlist-watchednew-label": "ウォッチリストのページの新しい変更",
+       "rcfilters-filter-watchlist-watchednew-description": "最終訪問後にウォッチリストに登録されたページに対して行われた変更",
+       "rcfilters-filter-watchlist-notwatched-label": "ウォッチリストに登録されていないページ",
+       "rcfilters-filter-watchlist-notwatched-description": "ウォッチリストに登録されているページ以外の全ての変更。",
        "rcfilters-filtergroup-changetype": "変更の種類",
        "rcfilters-filter-pageedits-label": "ページの編集",
        "rcfilters-filter-pageedits-description": "ウィキの本文、議論、カテゴリの説明などの編集",
        "rcfilters-hideminor-conflicts-typeofchange-global": "「細部の編集」として絞り込めない項目を「細部の編集」として絞り込もうとしています。競合している項目は項目選択欄で強調表示されています。",
        "rcfilters-hideminor-conflicts-typeofchange": "細部の編集として絞り込めない以下の項目を絞り込もうとしています: $1",
        "rcfilters-typeofchange-conflicts-hideminor": "「細部の編集」の絞り込みと競合しています。この項目を「細部の編集」として絞り込むことはできません。",
+       "rcfilters-filtergroup-lastRevision": "最新版",
+       "rcfilters-filter-lastrevision-label": "最新版",
+       "rcfilters-filter-lastrevision-description": "ページの最新の変更",
+       "rcfilters-filter-previousrevision-label": "新しい版",
+       "rcfilters-filter-previousrevision-description": "ページの最新の変更ではない全ての変更。",
        "rcnotefrom": "以下は<strong>$3 $4</strong>以降の{{PLURAL:$5|更新です}} (最大 <strong>$1</strong> 件)。",
        "rclistfromreset": "日時指定をリセット",
        "rclistfrom": "$3の$2以降の更新を表示する",
index bf14368..b83572c 100644 (file)
        "tog-showtoolbar": "ಸಂಪಾದನೆಯ ಉಪಕರಣಗಳ ಪಟ್ಟಿಯನ್ನು ತೋರು",
        "tog-editondblclick": "ಎರಡು ಬಾರಿ ಕ್ಲಿಕ್ ಮಾಡಿದಾಗ ಪುಟವು ಸಂಪಾದಿಸುವಂತಾಗಲಿ",
        "tog-editsectiononrightclick": "ಪುಟದ ವಿಭಾಗಗಳನ್ನು ಅವುಗಳ ಶೀರ್ಷಿಕೆಯನ್ನು ಎರಡು ಬಾರಿ ಕ್ಲಿಕ್ ಮಾಡಿ ಸಂಪಾದನೆ ಮಾಡುವಂತೆ ಇರಲಿ",
-       "tog-watchcreations": "ನಾನು ಪ್ರಾರಂಭಿಸುವ ಲೇಖನಗಳನ್ನು ನನ್ನ ವೀಕ್ಷಣಾಪಟ್ಟಿಗೆ ಸೇರಿಸು",
-       "tog-watchdefault": "ನಾನು ಸಂಪಾದಿಸುವ ಪುಟಗಳನ್ನು ವೀಕ್ಷಣಾಪಟ್ಟಿಗೆ ಸೇರಿಸು",
-       "tog-watchmoves": "ನಾನು ಸ್ಥಳಾಂತರಿಸುವ ಪುಟಗಳನ್ನು ನನ್ನ ವೀಕ್ಷಣಾಪಟ್ಟಿಗೆ ಸೇರಿಸು",
-       "tog-watchdeletion": "ನಾನು ಅಳಿಸುವ ಪುಟಗಳನ್ನು ನನ್ನ ವೀಕ್ಷಣಾ ಪಟ್ಟಿಗೆ ಸೇರಿಸು",
+       "tog-watchcreations": "ನಾನà³\81 à²ªà³\8dರಾರà²\82ಭಿಸà³\81ವ à²²à³\87à²\96ನà²\97ಳನà³\8dನà³\81 à²®à²¤à³\8dತà³\81 à²\95ಡತà²\97ಳನà³\8dನà³\81 à²¨à²¨à³\8dನ à²µà³\80à²\95à³\8dಷಣಾಪà²\9fà³\8dà²\9fಿà²\97à³\86 à²¸à³\87ರಿಸà³\81",
+       "tog-watchdefault": "ನಾನà³\81 à²¸à²\82ಪಾದಿಸà³\81ವ à²ªà³\81à²\9fà²\97ಳನà³\8dನà³\81 à²®à²¤à³\8dತà³\81 à²\95ಡತà²\97ಳನà³\8dನà³\81 à²µà³\80à²\95à³\8dಷಣಾಪà²\9fà³\8dà²\9fಿà²\97à³\86 à²¸à³\87ರಿಸà³\81",
+       "tog-watchmoves": "ನಾನà³\81 à²¸à³\8dಥಳಾà²\82ತರಿಸà³\81ವ à²ªà³\81à²\9fà²\97ಳನà³\8dನà³\81 à²®à²¤à³\8dತà³\81 à²\95ಡತà²\97ಳನà³\8dನà³\81 à²¨à²¨à³\8dನ à²µà³\80à²\95à³\8dಷಣಾಪà²\9fà³\8dà²\9fಿà²\97à³\86 à²¸à³\87ರಿಸà³\81",
+       "tog-watchdeletion": "ನಾನà³\81 à²\85ಳಿಸà³\81ವ à²ªà³\81à²\9fà²\97ಳನà³\8dನà³\81 à²®à²¤à³\8dತà³\81 à²\95ಡತà²\97ಳನà³\8dನà³\81 à²¨à²¨à³\8dನ à²µà³\80à²\95à³\8dಷಣಾ à²ªà²\9fà³\8dà²\9fಿà²\97à³\86 à²¸à³\87ರಿಸà³\81",
        "tog-watchuploads": "ನಾನು ಹೊಸದಾಗಿ ಅಪ್‍ಲೋಡ್ ಮಾಡಿದ ಫೈಲ್‍ಗಳನ್ನು ನನ್ನ ವೀಕ್ಷಣಾಪಟ್ಟಿಗೆ ಸೇರಿಸು",
        "tog-watchrollback": "ನಾನು ಹಿಮ್ಮರಳುವಿಕೆಯನ್ನು ನಡೆಸಿದ ಪುಟಗಳನ್ನು ನನ್ನ ಗಮನಸೂಚಿಗೆ ಸೇರಿಸು",
        "tog-minordefault": "ನನ್ನ ಎಲ್ಲಾ ಸಂಪಾದನೆಗಳನ್ನು ಚುಟುಕಾದವು ಎಂದು ಗುರುತು ಮಾಡು",
@@ -60,7 +60,7 @@
        "tog-enotifrevealaddr": "ಪ್ರಕಟಣೆ ಇ-ಅಂಚೆಗಳಲ್ಲಿ ನನ್ನ ಇ-ಅಂಚೆ ವಿಳಾಸ ತೋರು",
        "tog-shownumberswatching": "ಪುಟವನ್ನು ವೀಕ್ಷಿಸುತ್ತಿರುವ ಸದಸ್ಯರ ಸಂಖ್ಯೆಯನ್ನು ತೋರಿಸು",
        "tog-oldsig": "ನಿಮ್ಮ ಪ್ರಸ್ತುತ ಸಹಿ",
-       "tog-fancysig": "ಸರಳ à²¸à²¹à²¿à²\97ಳà³\81 (à²\95à³\8aà²\82ಡಿ à²\87ಲà³\8dಲದಿರà³\81ವà²\82ತೆ)",
+       "tog-fancysig": "ಸಹಿà²\97ಳನà³\8dನà³\81 à²µà²¿à²\95ಿà²\9fà³\86à²\95à³\8dಸà³\8d à²\8eà²\82ದà³\81 à²ªà²°à²¿à²\97ಣಿಸಿ (ಸà³\8dವಯà²\82à²\9aಾಲಿತ à²²à²¿à²\82à²\95à³\8d à²\87ಲà³\8dಲದೆ)",
        "tog-uselivepreview": "ನೇರ ಮುನ್ನೋಟವನ್ನು ಉಪಯೋಗಿಸಿ",
        "tog-forceeditsummary": "ಸಂಪಾದನೆ ಸಾರಾಂಶವನ್ನು ಖಾಲಿ ಬಿಟ್ಟಲ್ಲಿ ನೆನಪಿಸು",
        "tog-watchlisthideown": "ವೀಕ್ಷಣಾ ಪಟ್ಟಿಯಲ್ಲಿ ನನ್ನ ಸಂಪಾದನೆಗಳನ್ನು ತೋರಿಸಬೇಡ",
        "tog-watchlisthideliu": "ಲಾಗ್ ಇನ್ ಆಗಿರುವ ಸದಸ್ಯರ ಸಂಪಾದನೆಗಳನ್ನು ವೀಕ್ಷಣಾಪಟ್ಟಿಯಲ್ಲಿ ಅಡಗಿಸು",
        "tog-watchlistreloadautomatically": "ಯಾವುದೇ ಫಿಲ್ಟರು ಬದಲಾದಾಗ ವೀಕ್ಷಣಾಪಟ್ಟಿ ಮತ್ತೆ ಲೋಡ್ ಆಗಲಿ (ಜಾವಾಸ್ಕ್ರಿಪ್ಟ್ ಇರಬೇಕು)",
        "tog-watchlisthideanons": "ಅನಾಮಧೇಯ ಬಳಕೆದಾರರ ಸಂಪಾದನೆಗಳನ್ನು ವೀಕ್ಷಣಾಪಟ್ಟಿಯಲ್ಲಿ ಅಡಗಿಸು",
-       "tog-watchlisthidepatrolled": "ವà³\80à²\95à³\8dಷಣಾ à²ªà²¤à³\8dತಿಯಲà³\8dಲಿ à²¹à²¸à³\8dತà³\81à²\95ದರà³\8d ಬದಲಾವಣೆಗಳನ್ನು ಅದಗಿಸು",
+       "tog-watchlisthidepatrolled": "ವà³\80à²\95à³\8dಷಣಾ à²ªà²\9fà³\8dà²\9fಿಯಲà³\8dಲಿ à²\97ಸà³\8dತà³\81 à²¤à²¿à²°à³\81à²\97ಿದ ಬದಲಾವಣೆಗಳನ್ನು ಅದಗಿಸು",
        "tog-watchlisthidecategorization": "ಪುಟಗಳ ವರ್ಗೀಕರಣವನ್ನು ಅಡಗಿಸು",
        "tog-ccmeonemails": "ಇತರರಿಗೆ ನಾನು ಕಳುಹಿಸುವ ಇ-ಅಂಚೆಯ ಪ್ರತಿಯನ್ನು ನನಗೂ ಕಳುಹಿಸು",
        "tog-diffonly": "ವ್ಯತ್ಯಾಸಗಳ ಕೆಳಗಿರುವ ಪುಟದ ವಿವರಗಳನ್ನು ತೋರಿಸಬೇಡ",
        "tog-showhiddencats": "ಅಡಗಿಸಲ್ಪಟ್ಟ ವರ್ಗಗಳನ್ನು ತೋರಿಸು",
-       "tog-norollbackdiff": "ತà³\8aಡà³\86ದà³\81ಹಾà²\95ಿದ ನಂತರ ವ್ತ್ಯತ್ಯಾಸವನ್ನು ತೋರಿಸಬೇಡ",
+       "tog-norollbackdiff": "ಹಿಮà³\8dಮರಳà³\81ವಿà²\95à³\86ಯ ನಂತರ ವ್ತ್ಯತ್ಯಾಸವನ್ನು ತೋರಿಸಬೇಡ",
        "tog-useeditwarning": "ಸಂಪಾದನೆಯನ್ನು ಉಳಿಸದೆ ಹೊರಟಲ್ಲಿ ನನಗೆ ಎಚ್ಚರಿಸು",
        "tog-prefershttps": "ಯಾವತ್ತು ಸಹ ಲಾಗಿನ್ ನಂತರ ಸುರಕ್ಷಿತ ಸಂಪರ್ಕವನ್ನು ಬಳಸಿ",
        "underline-always": "ಯಾವಾಗಲೂ",
        "underline-never": "ಎಂದಿಗೂ ಇಲ್ಲ",
        "underline-default": "ಬ್ರೌಸರ್‍ನ ಯಥಾಸ್ಥಿತಿ",
        "editfont-style": "ಬದಲಾಣೆಯ ಜಾಗಾದ ಬರಿಯುವ ಶೈಲ",
-       "editfont-default": "ಬà³\8dರà³\8cಸರದ ಯಥಾಸ್ಥಿತಿ",
-       "editfont-monospace": "à²\92à²\82ದà³\81ಸà³\8dಥಳದ ಮುದ್ರಲಿಪಿ",
+       "editfont-default": "ಬà³\8dರà³\8cಸರà³\8dâ\80\8dನ ಯಥಾಸ್ಥಿತಿ",
+       "editfont-monospace": "ಮà³\8aನà³\8aಸà³\8dಪà³\87ಸà³\8d ಮುದ್ರಲಿಪಿ",
        "editfont-sansserif": "ಸಾನ್ಸ್-ಸೆರಿಫ಼್ ಮುದ್ರಲಿಪಿ",
        "editfont-serif": "ಸೆರಿಫ಼್ ಮುದ್ರಲಿಪಿ",
        "sunday": "ಭಾನುವಾರ",
        "badtitletext": "ನೀವು ಕೋರಿದ ಪುಟದ ಶೀರ್ಷಿಕೆ ಸಿಂಧುವಲ್ಲದ್ದು ಅಥವ ಖಾಲಿ ಅಥವ ಸರಿಯಾದ ಕೊಂಡಿಯಲ್ಲದ ಅಂತರ-ಭಾಷೆ/ಅಂತರ-ವಿಕಿ ಸಂಪರ್ಕವಾಗಿದೆ.\nಅದರಲ್ಲಿ ಒಂದು ಅಥವ ಹೆಚ್ಚು ಶೀರ್ಷಿಕೆಯಲ್ಲಿ ಬಳಸಲು ನಿಷಿದ್ಧವಾಗಿರುವ ಅಕ್ಷರಗಳು ಇರಬಹುದು.",
        "title-invalid-empty": "ಮನವಿ ಮಾಡಲಾದ ಪುಟದ ಶೀರ್ಷಿಕೆಯು ಖಾಲಿಯಾಗಿದೆ ಅಥವ ಕೇವಲ ನಾಮಸ್ಥಳದ ಹೆಸರನ್ನು ಮಾತ್ರ ಹೊಂದಿದೆ.",
        "title-invalid-utf8": "ಮನವಿ ಮಾಡಲಾದ ಪುಟದ ಶೀರ್ಷಿಕೆಯು ಒಂದು ಅಮಾನ್ಯವಾದ UTF-8 ಅನುಕ್ರಮವನ್ನು ಹೊಂದಿದೆ.",
-       "title-invalid-interwiki": "ಶà³\80ರà³\8dಷಿà²\95à³\86ಯà³\81 à²\85à²\82ತರ-ವಿà²\95ಿ à²\95à³\8aà²\82ಡಿಯನà³\8dನà³\81 à²¹à³\8aà²\82ದಿದà³\86",
+       "title-invalid-interwiki": "ವಿನà²\82ತಿಸಿದ à²ªà³\81à²\9fದ à²¶à³\80ರà³\8dಷಿà²\95à³\86ಯà³\81 à²\85à²\82ತರ-ವಿà²\95ಿ à²\95à³\8aà²\82ಡಿಯನà³\8dನà³\81 à²\92ಳà²\97à³\8aà²\82ಡಿದà³\86, à²\85ದನà³\8dನà³\81 à²¶à³\80ರà³\8dಷಿà²\95à³\86à²\97ಳಲà³\8dಲಿ à²¬à²³à²¸à²²à²¾à²\97à³\81ವà³\81ದಿಲà³\8dಲ.",
        "title-invalid-talk-namespace": "ಮನವಿ ಮಾಡಲಾದ ಪುಟದ ಶೀರ್ಷಿಕೆಯು ಒಂದು ಅಸ್ತಿತ್ವದಲ್ಲಿರದೆ ಇರುವ ಮಾತಿನ ಪುಟವನ್ನು ಸೂಚಿಸುತ್ತದೆ.",
        "title-invalid-characters": "ಮನವಿ ಮಾಡಲಾದ ಪುಟದ ಶೀರ್ಷಿಕೆಯು ಅಮಾನ್ಯವಾದ ಅಕ್ಷರಗಳನ್ನು ಹೊಂದಿದೆ: \"$1\".",
        "title-invalid-relative": "ಶೀರ್ಷಿಕೆಯು ಒಂದು ಸಾಂದರ್ಭಿಕ ಮಾರ್ಗವಾಗಿರುತ್ತದೆ. ಸಾಂಧರ್ಭಿಕ ಪುಟದ ಶೀರ್ಷಿಕೆಗಳು (./, ../) ಅಮಾನ್ಯವಾಗಿರುತ್ತದೆ, ಏಕೆಂದರೆ ಬಳಕೆದಾರರ ಜಾಲವೀಕ್ಷಕದಿಂದ ಅವುಗಳನ್ನು ತಲುಪುವುದು ಸಾಮಾನ್ಯವಾಗಿ ಅಸಾಧ್ಯವಾಗಿರುತ್ತದೆ.",
        "passwordreset-username": "ಬಳಕೆದಾರರ ಹೆಸರು:",
        "passwordreset-domain": "ಕ್ಷೇತ್ರ:",
        "passwordreset-email": "ಇ-ಮೇಲ್ ವಿಳಾಸ:",
-       "passwordreset-emailsentemail": "ಪà³\8dರವà³\87ಶಪದವನà³\8dನà³\81 à²ªà³\81ನà²\83ಸà³\8dಥಾಪಿಸಿದ à²®à²¿à²\82à²\9aà²\82à²\9aà³\86ಯನà³\8dನà³\81 à²\95ಳà³\81ಹಿಸಲಾà²\97ಿದೆ.",
-       "changeemail": "ಮಿà²\82à²\9aà²\82à²\9aà³\86 à²µà²¿à²³à²¾à²¸à²µà²¨à³\8dನà³\81 à²¬à²¦à²²à²¾à²¯à²¿à²¸ಿ",
+       "passwordreset-emailsentemail": "à²\88 à²\87ಮà³\87ಲà³\8d à²µà²¿à²³à²¾à²¸à²µà³\81 à²¨à²¿à²®à³\8dಮ à²\96ಾತà³\86ಯà³\8aà²\82ದಿà²\97à³\86 à²¸à²\82ಯà³\8bà²\9cಿತà²\97à³\8aà²\82ಡಿದà³\8dದರà³\86, à²ªà³\8dರವà³\87ಶಪದ à²®à²°à³\81ಹà³\8aà²\82ದಿಸಲà³\81 à²\87ಮà³\87ಲà³\8d à²\85ನà³\8dನà³\81 à²\95ಳà³\81ಹಿಸಲಾà²\97à³\81ತà³\8dತದೆ.",
+       "changeemail": "à²\87ಮà³\87ಲà³\8d à²µà²¿à²³à²¾à²¸à²µà²¨à³\8dನà³\81 à²¬à²¦à²²à²¾à²¯à²¿à²¸à²¿ à²\85ಥವಾ à²¤à³\86à²\97à³\86ದà³\81ಹಾà²\95ಿ",
        "changeemail-no-info": "ನೀವು ಈ ಪುಟವನ್ನು ನೇರತಲುಪಲು ಲಾಗಿನ್ ಆಗಿರುವುದು ಆವಶ್ಯಕ.",
        "changeemail-oldemail": "ಪ್ರಸ್ತುತ ಮಿಂಚಂಚೆ ವಿಳಾಸ:",
        "changeemail-newemail": "ಹೊಸ  ಇ-ಅಂಚೆ ವಿಳಾಸ:",
        "accmailtext": "[[User talk:$1|$1]] ಅವರ ಹೊಸ ಪ್ರವೇಶಪದ $2 ಗೆ ಕಳುಹಿಸಲಾಗಿದೆ.\n\nಈ ಖಾತೆಯ ಪ್ರವೇಶಪದವನ್ನು ಲಾಗಿನ್ ಆದ ನಂತರ ''[[Special:ChangePassword|ಪ್ರವೇಶಪದ ಬದಲಾವಣೆ]]'' ಪುಟದಲ್ಲಿ ಬದಲಾಯಿಸಬಹುದು.",
        "newarticle": "(ಹೊಸತು)",
        "newarticletext": "ಇನ್ನೂ ಅಸ್ಥಿತ್ವದಲ್ಲಿ ಇರದ ಪುಟದ ಲಿಂಕ್ ಅನ್ನು ನೀವು ಒತ್ತಿರುವಿರಿ.\nಈ ಪುಟವನ್ನು ಸೃಷ್ಟಿಸಲು ಕೆಳಗಿನ ಚೌಕದಲ್ಲಿ ಬರೆಯಲು ಆರಂಭಿಸಿರಿ.\n(ಹೆಚ್ಚು ಮಾಹಿತಿಗೆ [$1 ಸಹಾಯ ಪುಟ] ನೋಡಿ).\nಈ ಪುಟಕ್ಕೆ ನೀವು ತಪ್ಪಾಗಿ ಬಂದಿದ್ದಲ್ಲಿ ನಿಮ್ಮ ಬ್ರೌಸರ್‍ನ '''back''' ಬಟನ್ ಅನ್ನು ಒತ್ತಿ.",
-       "anontalkpagetext": "----''ಇದು ಖಾತೆಯೊಂದನ್ನು ಹೊಂದಿರದ ಅನಾಮಧೇಯ ಬಳಕೆದಾರರೊಬ್ಬರ ಚರ್ಚೆ ಪುಟ.\nಖಾತೆಯಿಲ್ಲದಿರುವುದರಿಂದ ಅವರನ್ನು ಗುರುತಿಸಲು ಅವರ IP ವಿಳಾಸವನ್ನು ಉಪಯೋಗಿಸುತ್ತಿದ್ದೇವೆ.\nಈ ರೀತಿಯ IP ವಿಳಾಸವು ಅನೇಕ ಬಳಕೆದಾರರಿಂದ ಉಪಯೋಗದಲ್ಲಿರಬಹುದು.\nನೀವು ಅನಾಮಧೇಯ ಬಳಕೆದಾರರಾಗಿದ್ದಲ್ಲಿ, ಹಾಗು ನಿಮಗೆ ಸಂಬಂಧವಿಲ್ಲದಂತ ಸಂದೇಶಗಳು ಬರುತ್ತಿವೆ ಎಂದು ಅನಿಸಿದರೆ, ಮುಂದೆ ಬೇರೆ ಅನಾಮಧೇಯ ಬಳಕೆದಾರರೊಂದಿಗೆ ತಪ್ಪಾಗಿ ಗುರುತಿಸಬಾರದೆಂದಿದ್ದರೆ ದಯವಿಟ್ಟು [[Special:CreateAccount|ಸದಸ್ಯರಾಗಿ]] ಅಥವ [[Special:UserLogin|ಲಾಗ್ ಇನ್ ಆಗಿ]].''",
+       "anontalkpagetext": "----\n<em>ಇದು ಖಾತೆಯೊಂದನ್ನು ಹೊಂದಿರದ ಅನಾಮಧೇಯ ಬಳಕೆದಾರರೊಬ್ಬರ ಚರ್ಚೆ ಪುಟ. ಖಾತೆಯಿಲ್ಲದಿರುವುದರಿಂದ ಅವರನ್ನು ಗುರುತಿಸಲು ಅವರ IP ವಿಳಾಸವನ್ನು ಉಪಯೋಗಿಸುತ್ತಿದ್ದೇವೆ.</em>\nಈ ರೀತಿಯ IP ವಿಳಾಸವು ಅನೇಕ ಬಳಕೆದಾರರಿಂದ ಉಪಯೋಗದಲ್ಲಿರಬಹುದು.\nನೀವು ಅನಾಮಧೇಯ ಬಳಕೆದಾರರಾಗಿದ್ದಲ್ಲಿ, ಹಾಗು ನಿಮಗೆ ಸಂಬಂಧವಿಲ್ಲದಂತ ಸಂದೇಶಗಳು ಬರುತ್ತಿವೆ ಎಂದು ಅನಿಸಿದರೆ, ಮುಂದೆ ಬೇರೆ ಅನಾಮಧೇಯ ಬಳಕೆದಾರರೊಂದಿಗೆ ತಪ್ಪಾಗಿ ಗುರುತಿಸಬಾರದೆಂದಿದ್ದರೆ ದಯವಿಟ್ಟು [[Special:CreateAccount|ಸದಸ್ಯರಾಗಿ]] ಅಥವ [[Special:UserLogin|ಲಾಗ್ ಇನ್ ಆಗಿ]].''",
        "noarticletext": "ಈ ಪುಟದಲ್ಲಿ ಸದ್ಯಕ್ಕೆ ಏನೂ ಇಲ್ಲ.\nನೀವು ಇತರ ಪುಟಗಳಲ್ಲಿ [[Special:Search/{{PAGENAME}}|ಈ ಹೆಸರನ್ನು ಹುಡುಕಬಹುದು]],\n<span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} ಸಂಬಂಧಿತ ದಾಖಲೆಗಳನ್ನು ಹುಡುಕಬಹುದು],\nಅಥವ [{{fullurl:{{FULLPAGENAME}}|action=edit}} ಈ ಪುಟವನ್ನು ಸೃಷ್ಟಿಸಬಹುದು]</span>.",
        "noarticletext-nopermission": "ಈ ಪುಟದಲ್ಲಿ ಸದ್ಯಕ್ಕೆ ಯಾವ ಪಠ್ಯವೂ ಇಲ್ಲ.\nನೀವು ಇತರ ಪುಟಗಳಲ್ಲಿ [[Special:Search/{{PAGENAME}}|ಈ ಶೀರ್ಷಿಕೆಗಾಗಿ ಹುಡುಕಬಹುದು]], ಅಥವಾ <span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} ಸಂಬಂಧಿಸಿದ ದಾಖಲೆಗಳನ್ನು ಹುಡುಕಬಹುದು]</span>, ಆದರೆ ನಿಮಗೆ ಈ ಪುಟವನ್ನು ಸೃಷ್ಟಿಸಲು ಅನುಮತಿಯಿಲ್ಲ.",
        "userpage-userdoesnotexist": "ಬಳಕೆದಾರ ಖಾತೆ \"<nowiki>$1</nowiki>\" ದಾಖಲಾಗಿಲ್ಲ. ನೀವು ಇದೇ ಪುಟವನ್ನು ಸೃಷ್ಟಿ/ಸಂಪಾದನೆ ಮಾಡಬೇಕೆಂದಿರುವಿರಿ ಎಂದು ಖಾತ್ರಿ ಮಾಡಿಕೊಳ್ಳಿ.",
        "blocked-notice-logextract": "ಈ ಬಳಕೆದಾರರನ್ನು  ಪ್ರಸ್ತುತವಾಗಿ  ನಿರ್ಬಂಧಿಸಲಾಗಿದೆ. \nಇತ್ತೀಚಿನ  ನಿರ್ಬಂಧನೆಯ ದಾಖಲೆಯನ್ನು ಉಲ್ಲೇಖಕ್ಕಾಗಿ ಕೆಳಗೆ ಕೊಟ್ಟಿದೆ:",
-       "usercssyoucanpreview": "'''ಗಮನಿಸಿ:''' ಉಳಿಸುವ ಮುನ್ನ 'ಮುನ್ನೋಟ' ಗುಂಡಿಯನ್ನು ಉಪಯೋಗಿಸಿ ನಿಮ್ಮ ಹೊಸ CSS ಅನ್ನು ಪ್ರಯೋಗ ಮಾಡಿ.",
+       "usercssyoucanpreview": "<strong>ಗಮನಿಸಿ:</strong> ಉಳಿಸುವ ಮುನ್ನ \"{{int:showpreview}}\" ಗುಂಡಿಯನ್ನು ಉಪಯೋಗಿಸಿ ನಿಮ್ಮ ಹೊಸ CSS ಅನ್ನು ಪ್ರಯೋಗ ಮಾಡಿ.",
        "userjsyoucanpreview": "'''ಗಮನಿಸಿ:''' ಉಳಿಸುವ ಮುನ್ನ 'ಮುನ್ನೋಟ' ಗುಂಡಿಯನ್ನು ಉಪಯೋಗಿಸಿ ನಿಮ್ಮ ಹೊಸ JS ಅನ್ನು ಪ್ರಯೋಗ ಮಾಡಿ.",
        "usercsspreview": "'''ನೆನಪಿಡಿ: ನೀವು ಇಲ್ಲಿ ಕೇವಲ ನಿಮ್ಮ ಬಳಕೆದಾರ CSSನ ಮುನ್ನೋಟ ನೋಡುತ್ತಿರುವಿರಿ.'''\n'''ಅದನ್ನು ಇನ್ನೂ ಉಳಿಸಲಾಗಿಲ್ಲ!'''",
        "userjspreview": "'''ಗಮನಿಸಿ: ನೀವು ನಿಮ್ಮ ಬಳಕೆದಾರ JavaScriptನ ಮುನ್ನೋಟ ನೋಡುತ್ತಿರುವಿರಿ ಅಥವ ಪ್ರಯೋಗ ಮಾಡುತ್ತಿರುವಿರಿ. ಅದನ್ನಿನ್ನೂ ಉಳಿಸಲಾಗಿಲ್ಲ!'''",
index 28d987f..0f4fb62 100644 (file)
        "rcfilters-filter-registered-description": "Pieslēgušies redaktori.",
        "rcfilters-filter-unregistered-label": "Nereģistrēti",
        "rcfilters-filter-unregistered-description": "Nepieslēgušies redaktori.",
+       "rcfilters-filtergroup-authorship": "Devuma autors",
        "rcfilters-filter-editsbyself-label": "Tavi labojumi",
        "rcfilters-filter-editsbyself-description": "Tevis veiktie labojumi.",
        "rcfilters-filter-editsbyother-label": "Citu labojumi",
index 0ae3621..27dacfa 100644 (file)
        "shown-title": "Parameters:\n* $1 - number of search results",
        "viewprevnext": "This is part of the navigation message on the top and bottom of Special pages which are lists of things, e.g. the User's contributions page (in date order) or the list of all categories (in alphabetical order). ($1) and ($2) are either {{msg-mw|Pager-older-n}} and {{msg-mw|Pager-newer-n}} (for date order) or {{msg-mw|Prevn}} and {{msg-mw|Nextn}} (for alphabetical order).\n\nIt is also used by [[Special:WhatLinksHere|Whatlinkshere]] pages, where ($1) and ($2) are {{msg-mw|Whatlinkshere-prev}} and {{msg-mw|Whatlinkshere-next}}.\n($3) is made up in all cases of the various proposed numbers of results per page, e.g. \"(20 | 50 | 100 | 250 | 500)\".\nFor Special pages, the navigation bar is prefixed by \"({{msg-mw|Page first}} | {{msg-mw|Page last}})\" (alphabetical order) or \"({{msg-mw|Histfirst}} | {{msg-mw|Histlast}})\" (date order).\n\nViewprevnext is sometimes preceded by the {{msg-mw|Showingresults}} or {{msg-mw|Showingresultsnum}} message (for Special pages) or by the {{msg-mw|Linkshere}} message (for Whatlinkshere pages).\n\nRefers to {{msg-mw|Pipe-separator}}.",
        "searchmenu-exists": "An option shown in a menu beside search form offering a link to the existing page having the specified title (when using the default MediaWiki search engine).\n\nParameters:\n* $1 - page title\n* $2 - the number of search results found",
-       "searchmenu-new": "An option shown in a menu beside search form offering a red link to the not yet existing page having the specified title (when using the default MediaWiki search engine).\nParameters:\n* $1 - page title\n* $2 - the number of search results found\nParameterless gender ({{GENDER:|male|female|unspecified}}) can be used in translations.",
+       "searchmenu-new": "An option shown in a menu beside search form offering a red link to the not yet existing page having the specified title (when using the default MediaWiki search engine).\nParameters:\n* $1 - page title\n* $2 - the number of search results found\nParameterless gender (<code><nowiki>{{GENDER:|male|female|unspecified}}</nowiki></code>) can be used in translations.",
        "searchmenu-new-nocreate": "{{notranslate}}",
        "searchprofile-articles": "A quick link in the advanced search box on [[Special:Search]]. Clicking on this link starts a search in the content pages of the wiki.\n\nA 'content page' is a page that forms part of the purpose of the wiki. It includes the main page and pages in the main namespace and any other namespaces that are included when the wiki is customised. For example on Wikimedia Commons 'content pages' include pages in the file and category namespaces. On Wikinews 'content pages' include pages in the Portal namespace. For technical definition of 'content namespaces' see [[mw:Manual:Using_custom_namespaces#Content_namespaces|MediaWiki]].\n\nPossible alternatives to the word 'content' are 'subject matter' or 'wiki subject' or 'wiki purpose'.\n\n{{Identical|Content page}}",
        "searchprofile-images": "An option in the [[Special:Search]].\n\nSee also:\n* {{msg-mw|Searchprofile-images|message}}\n* {{msg-mw|Searchprofile-images-tooltip|tooltip}}\n{{Identical|Muitimedia}}",
        "recentchanges-legend-plusminus": "{{optional}}\nA plus/minus sign with a number for the legend.",
        "recentchanges-submit": "Label for submit button in [[Special:RecentChanges]]\n{{Identical|Show}}",
        "rcfilters-activefilters": "Title for the filters selection showing the active filters.",
+       "rcfilters-quickfilters": "Label for the button that opens the quick filters menu in [[Special:RecentChanges]]",
+       "rcfilters-savedqueries-defaultlabel": "Default name for saving a new set of quick filters [[Special:RecentChanges]]",
+       "rcfilters-savedqueries-rename": "Label for the menu option that edits a quick filter in [[Special:RecentChanges]]",
+       "rcfilters-savedqueries-setdefault": "Label for the menu option that sets a quick filter as default in [[Special:RecentChanges]]",
+       "rcfilters-savedqueries-unsetdefault": "Label for the menu option that unsets a quick filter as default in [[Special:RecentChanges]]",
+       "rcfilters-savedqueries-remove": "Label for the menu option that removes a quick filter as default in [[Special:RecentChanges]]",
+       "rcfilters-savedqueries-new-name-label": "Label for the input that holds the name of the new saved filters in [[Special:RecentChanges]]",
+       "rcfilters-savedqueries-add-new-title": "Title for the popup to add new quick link in [[Special:RecentChanges]]",
+       "rcfilters-savedqueries-apply-label": "Label for the button to apply saving a new quick link in [[Special:RecentChanges]]",
+       "rcfilters-savedqueries-cancel-label": "Label for the button to cancel the saving of a new quick link in [[Special:RecentChanges]]",
        "rcfilters-restore-default-filters": "Label for the button that resets filters to defaults",
        "rcfilters-clear-all-filters": "Title for the button that clears all filters",
        "rcfilters-search-placeholder": "Placeholder for the filter search input.",
index 423686e..b487f89 100644 (file)
@@ -63,9 +63,7 @@ Because any foreign key relationships involving these titles will already be
 broken, the titles are corrected to a valid version or the rows are deleted
 entirely, depending on the table.
 
-Key progress output is printed to STDERR, while a full log of all entries that
-are deleted is sent to STDOUT. You are strongly advised to capture STDOUT into
-a file.
+The script runs with the expectation that STDOUT is redirected to a file.
 TEXT
                );
                $this->addOption( 'fix', 'Actually clean up invalid titles. If this parameter is ' .
@@ -87,7 +85,10 @@ TEXT
                        }
                }
 
-               $this->output( 'Done! Cleaned up invalid DB keys on ' . wfWikiID() . "!\n" );
+               $this->outputStatus( 'Done!' );
+               if ( $this->hasOption( 'fix' ) ) {
+                       $this->outputStatus( ' Cleaned up invalid DB keys on ' . wfWikiID() . "!\n" );
+               }
        }
 
        /**
@@ -97,10 +98,10 @@ TEXT
         * @param string $str Text to write to both places
         * @param string|null $channel Ignored
         */
-       protected function output( $str, $channel = null ) {
+       protected function outputStatus( $str, $channel = null ) {
                // Make it easier to find progress lines in the STDOUT log
                if ( trim( $str ) ) {
-                       fwrite( STDOUT, '*** ' );
+                       fwrite( STDOUT, '*** ' . trim( $str ) . "\n" );
                }
                fwrite( STDERR, $str );
        }
@@ -132,7 +133,7 @@ TEXT
                        $tableParams['titleField'] :
                        "{$prefix}_title";
 
-               $this->output( "Looking for invalid $titleField entries in $table...\n" );
+               $this->outputStatus( "Looking for invalid $titleField entries in $table...\n" );
 
                // Do all the select queries on the replicas, as they are slow (they use
                // unanchored LIKEs). Naturally this could cause problems if rows are
@@ -153,9 +154,9 @@ TEXT
                        // The REGEXP operator is not cross-DBMS, so we have to use lots of LIKEs
                        [ $dbr->makeList( [
                                $titleField . $dbr->buildLike( $percent, ' ', $percent ),
-                               $titleField . $dbr->buildLike( $percent, '\r', $percent ),
-                               $titleField . $dbr->buildLike( $percent, '\n', $percent ),
-                               $titleField . $dbr->buildLike( $percent, '\t', $percent ),
+                               $titleField . $dbr->buildLike( $percent, "\r", $percent ),
+                               $titleField . $dbr->buildLike( $percent, "\n", $percent ),
+                               $titleField . $dbr->buildLike( $percent, "\t", $percent ),
                                $titleField . $dbr->buildLike( '_', $percent ),
                                $titleField . $dbr->buildLike( $percent, '_' ),
                        ], LIST_OR ) ],
@@ -163,9 +164,9 @@ TEXT
                        [ 'LIMIT' => $this->mBatchSize ]
                );
 
-               $this->output( "Number of invalid rows: " . $res->numRows() . "\n" );
+               $this->outputStatus( "Number of invalid rows: " . $res->numRows() . "\n" );
                if ( !$res->numRows() ) {
-                       $this->output( "\n" );
+                       $this->outputStatus( "\n" );
                        return;
                }
 
@@ -191,9 +192,9 @@ TEXT
                        }
 
                        if ( $table !== 'page' && $table !== 'redirect' ) {
-                               $this->output( "Run with --fix to clean up these rows\n" );
+                               $this->outputStatus( "Run with --fix to clean up these rows\n" );
                        }
-                       $this->output( "\n" );
+                       $this->outputStatus( "\n" );
                        return;
                }
 
@@ -205,7 +206,7 @@ TEXT
                                // This shouldn't happen on production wikis, and we already have a script
                                // to handle 'page' rows anyway, so just notify the user and let them decide
                                // what to do next.
-                               $this->output( <<<TEXT
+                               $this->outputStatus( <<<TEXT
 IMPORTANT: This script does not fix invalid entries in the $table table.
 Consider repairing these rows, and rows in related tables, by hand.
 You may like to run, or borrow logic from, the cleanupTitles.php script.
@@ -220,7 +221,7 @@ TEXT
                                // to the page_title field are already broken, so this will just make sure
                                // users can still access the log entries/deleted revisions from the interface
                                // using a valid page title.
-                               $this->output(
+                               $this->outputStatus(
                                        "Updating these rows, setting $titleField to the closest valid DB key...\n" );
                                $affectedRowCount = 0;
                                foreach ( $res as $row ) {
@@ -235,7 +236,7 @@ TEXT
                                        $affectedRowCount += $dbw->affectedRows();
                                }
                                wfWaitForSlaves();
-                               $this->output( "Updated $affectedRowCount rows on $table.\n" );
+                               $this->outputStatus( "Updated $affectedRowCount rows on $table.\n" );
 
                                break;
 
@@ -245,17 +246,17 @@ TEXT
                                // Since these broken titles can't exist, there's really nothing to watch,
                                // nothing can be categorised in them, and they can't have been changed
                                // recently, so we can just remove these rows.
-                               $this->output( "Deleting invalid $table rows...\n" );
+                               $this->outputStatus( "Deleting invalid $table rows...\n" );
                                $dbw->delete( $table, [ $idField => $ids ], __METHOD__ );
                                wfWaitForSlaves();
-                               $this->output( 'Deleted ' . $dbw->affectedRows() . " rows from $table.\n" );
+                               $this->outputStatus( 'Deleted ' . $dbw->affectedRows() . " rows from $table.\n" );
                                break;
 
                        case 'protected_titles':
                                // Since these broken titles can't exist, there's really nothing to protect,
                                // so we can just remove these rows. Made more complicated by this table
                                // not having an ID field
-                               $this->output( "Deleting invalid $table rows...\n" );
+                               $this->outputStatus( "Deleting invalid $table rows...\n" );
                                $affectedRowCount = 0;
                                foreach ( $res as $row ) {
                                        $dbw->delete( $table,
@@ -264,7 +265,7 @@ TEXT
                                        $affectedRowCount += $dbw->affectedRows();
                                }
                                wfWaitForSlaves();
-                               $this->output( "Deleted $affectedRowCount rows from $table.\n" );
+                               $this->outputStatus( "Deleted $affectedRowCount rows from $table.\n" );
                                break;
 
                        case 'pagelinks':
@@ -273,7 +274,7 @@ TEXT
                                // Update links tables for each page where these bogus links are supposedly
                                // located. If the invalid rows don't go away after these jobs go through,
                                // they're probably being added by a buggy hook.
-                               $this->output( "Queueing link update jobs for the pages in $idField...\n" );
+                               $this->outputStatus( "Queueing link update jobs for the pages in $idField...\n" );
                                foreach ( $res as $row ) {
                                        $wp = WikiPage::newFromID( $row->id );
                                        if ( $wp ) {
@@ -286,11 +287,11 @@ TEXT
                                        }
                                }
                                wfWaitForSlaves();
-                               $this->output( "Link update jobs have been added to the job queue.\n" );
+                               $this->outputStatus( "Link update jobs have been added to the job queue.\n" );
                                break;
                }
 
-               $this->output( "\n" );
+               $this->outputStatus( "\n" );
                return;
        }
 
index e53f7bf..e8c8f61 100644 (file)
@@ -1742,6 +1742,8 @@ return [
                        'resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FilterItem.js',
                        'resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FilterGroup.js',
                        'resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FiltersViewModel.js',
+                       'resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.SavedQueryItemModel.js',
+                       'resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.SavedQueriesModel.js',
                        'resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.ChangesListViewModel.js',
                        'resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js',
                ],
@@ -1763,6 +1765,9 @@ return [
                        'resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FloatingMenuSelectWidget.js',
                        'resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterWrapperWidget.js',
                        'resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ChangesListWrapperWidget.js',
+                       'resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.SavedLinksListWidget.js',
+                       'resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.SavedLinksListItemWidget.js',
+                       'resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.SaveFiltersPopupButtonWidget.js',
                        'resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FormWrapperWidget.js',
                        'resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterItemHighlightButton.js',
                        'resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.HighlightColorPickerWidget.js',
@@ -1785,6 +1790,9 @@ return [
                        'resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.ChangesListWrapperWidget.less',
                        'resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.HighlightColorPickerWidget.less',
                        'resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.FilterItemHighlightButton.less',
+                       'resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.SavedLinksListWidget.less',
+                       'resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.SavedLinksListItemWidget.less',
+                       'resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.SaveFiltersPopupButtonWidget.less',
                ],
                'skinStyles' => [
                        'monobook' => [
@@ -1794,6 +1802,16 @@ return [
                ],
                'messages' => [
                        'rcfilters-activefilters',
+                       'rcfilters-quickfilters',
+                       'rcfilters-savedqueries-defaultlabel',
+                       'rcfilters-savedqueries-rename',
+                       'rcfilters-savedqueries-setdefault',
+                       'rcfilters-savedqueries-unsetdefault',
+                       'rcfilters-savedqueries-remove',
+                       'rcfilters-savedqueries-new-name-label',
+                       'rcfilters-savedqueries-add-new-title',
+                       'rcfilters-savedqueries-apply-label',
+                       'rcfilters-savedqueries-cancel-label',
                        'rcfilters-restore-default-filters',
                        'rcfilters-clear-all-filters',
                        'rcfilters-search-placeholder',
index aa261d3..9054fe4 100644 (file)
                                items.push( filterItem );
                        }
 
-                       if ( data.type === 'string_options' && data.default ) {
+                       if ( data.type === 'string_options' ) {
                                // Store the default parameter group state
                                // For this group, the parameter is group name and value is the names
                                // of selected items
                                model.defaultParams[ group ] = model.sanitizeStringOptionGroup(
                                        group,
-                                       data.default.split( model.groups[ group ].getSeparator() )
+                                       data.default ?
+                                               data.default.split( model.groups[ group ].getSeparator() ) :
+                                               []
                                ).join( model.groups[ group ].getSeparator() );
                        }
                } );
                return this.defaultParams;
        };
 
-       /**
-        * Set all filter states to default values
-        */
-       mw.rcfilters.dm.FiltersViewModel.prototype.setFiltersToDefaults = function () {
-               var defaultFilterStates = this.getFiltersFromParameters( this.getDefaultParams() );
-
-               this.toggleFiltersSelected( defaultFilterStates );
-       };
-
        /**
         * Analyze the groups and their filters and output an object representing
         * the state of the parameters they represent.
                } );
        };
 
+       /**
+        * Get items that allow highlights even if they're not currently highlighted
+        *
+        * @return {mw.rcfilters.dm.FilterItem[]} Items supporting highlights
+        */
+       mw.rcfilters.dm.FiltersViewModel.prototype.getItemsSupportingHighlights = function () {
+               return this.getItems().filter( function ( filterItem ) {
+                       return filterItem.isHighlightSupported();
+               } );
+       };
+
        /**
         * Toggle the highlight feature on and off.
         * Propagate the change to filter items.
diff --git a/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.SavedQueriesModel.js b/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.SavedQueriesModel.js
new file mode 100644 (file)
index 0000000..04fb52b
--- /dev/null
@@ -0,0 +1,192 @@
+( function ( mw, $ ) {
+       /**
+        * View model for saved queries
+        *
+        * @mixins OO.EventEmitter
+        * @mixins OO.EmitterList
+        *
+        * @constructor
+        * @param {Object} [config] Configuration options
+        * @cfg {string} [default] Default query ID
+        */
+       mw.rcfilters.dm.SavedQueriesModel = function MwRcfiltersDmSavedQueriesModel( config ) {
+               config = config || {};
+
+               // Mixin constructor
+               OO.EventEmitter.call( this );
+               OO.EmitterList.call( this );
+
+               this.default = config.default;
+
+               // Events
+               this.aggregate( { update: 'itemUpdate' } );
+       };
+
+       /* Initialization */
+
+       OO.initClass( mw.rcfilters.dm.SavedQueriesModel );
+       OO.mixinClass( mw.rcfilters.dm.SavedQueriesModel, OO.EventEmitter );
+       OO.mixinClass( mw.rcfilters.dm.SavedQueriesModel, OO.EmitterList );
+
+       /* Events */
+
+       /**
+        * @event initialize
+        *
+        * Model is initialized
+        */
+
+       /**
+        * @event itemUpdate
+        * @param {mw.rcfilters.dm.SavedQueryItemModel} Changed item
+        *
+        * An item has changed
+        */
+
+       /* Methods */
+
+       /**
+        * Initialize the saved queries model by reading it from the user's settings.
+        * The structure of the saved queries is:
+        * {
+        *    default: (string) Query ID
+        *    queries:{
+        *       query_id_1: {
+        *          data:{
+        *             filters: (Object) Minimal definition of the filters
+        *             highlights: (Object) Definition of the highlights
+        *          },
+        *          label: (optional) Name of this query
+        *       }
+        *    }
+        * }
+        *
+        * @param {Object} [savedQueries] An object with the saved queries with
+        *  the above structure.
+        * @param {Object} [baseState] An object representing the base state
+        *  so we can normalize the data
+        * @fires initialize
+        */
+       mw.rcfilters.dm.SavedQueriesModel.prototype.initialize = function ( savedQueries, baseState ) {
+               var items = [];
+
+               savedQueries = savedQueries || {};
+
+               this.baseState = baseState;
+
+               this.clearItems();
+               $.each( savedQueries.queries || {}, function ( id, obj ) {
+                       var normalizedData = $.extend( true, {}, baseState, obj.data );
+                       items.push(
+                               new mw.rcfilters.dm.SavedQueryItemModel(
+                                       id,
+                                       obj.label,
+                                       normalizedData,
+                                       { 'default': savedQueries.default === id }
+                               )
+                       );
+               } );
+
+               this.default = savedQueries.default;
+
+               this.addItems( items );
+
+               this.emit( 'initialize' );
+       };
+
+       /**
+        * Add a query item
+        *
+        * @param {string} label Label for the new query
+        * @param {Object} data Data for the new query
+        */
+       mw.rcfilters.dm.SavedQueriesModel.prototype.addNewQuery = function ( label, data ) {
+               var randomID = ( new Date() ).getTime(),
+                       normalizedData = $.extend( true, {}, this.baseState, data );
+
+               // Add item
+               this.addItems( [
+                       new mw.rcfilters.dm.SavedQueryItemModel(
+                               randomID,
+                               label,
+                               normalizedData
+                       )
+               ] );
+       };
+
+       /**
+        * Get an item that matches the requested query
+        *
+        * @param {Object} fullQueryComparison Object representing all filters and highlights to compare
+        * @return {mw.rcfilters.dm.SavedQueryItemModel} Matching item model
+        */
+       mw.rcfilters.dm.SavedQueriesModel.prototype.findMatchingQuery = function ( fullQueryComparison ) {
+               return this.getItems().filter( function ( item ) {
+                       return OO.compare(
+                               item.getData(),
+                               fullQueryComparison
+                       );
+               } )[ 0 ];
+       };
+
+       /**
+        * Get query by its identifier
+        *
+        * @param {string} queryID Query identifier
+        * @return {mw.rcfilters.dm.SavedQueryItemModel|undefined} Item matching
+        *  the search. Undefined if not found.
+        */
+       mw.rcfilters.dm.SavedQueriesModel.prototype.getItemByID = function ( queryID ) {
+               return this.getItems().filter( function ( item ) {
+                       return item.getID() === queryID;
+               } )[ 0 ];
+       };
+
+       /**
+        * Get the object representing the state of the entire model and items
+        *
+        * @return {Object} Object representing the state of the model and items
+        */
+       mw.rcfilters.dm.SavedQueriesModel.prototype.getState = function () {
+               var obj = { queries: {} };
+
+               // Translate the items to the saved object
+               this.getItems().forEach( function ( item ) {
+                       var itemState = item.getState();
+
+                       obj.queries[ item.getID() ] = itemState;
+               } );
+
+               if ( this.getDefault() ) {
+                       obj.default = this.getDefault();
+               }
+
+               return obj;
+       };
+
+       /**
+        * Set a default query. Null to unset default.
+        *
+        * @param {string} itemID Query identifier
+        * @fires default
+        */
+       mw.rcfilters.dm.SavedQueriesModel.prototype.setDefault = function ( itemID ) {
+               if ( this.default !== itemID ) {
+                       this.default = itemID;
+
+                       // Set for individual itens
+                       this.getItems().forEach( function ( item ) {
+                               item.toggleDefault( item.getID() === itemID );
+                       } );
+               }
+       };
+
+       /**
+        * Get the default query ID
+        *
+        * @return {string} Default query identifier
+        */
+       mw.rcfilters.dm.SavedQueriesModel.prototype.getDefault = function () {
+               return this.default;
+       };
+}( mediaWiki, jQuery ) );
diff --git a/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.SavedQueryItemModel.js b/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.SavedQueryItemModel.js
new file mode 100644 (file)
index 0000000..729aee3
--- /dev/null
@@ -0,0 +1,115 @@
+( function ( mw ) {
+       /**
+        * View model for a single saved query
+        *
+        * @mixins OO.EventEmitter
+        *
+        * @constructor
+        * @param {string} id Unique identifier
+        * @param {string} label Saved query label
+        * @param {Object} data Saved query data
+        * @param {Object} [config] Configuration options
+        * @param {boolean} [default] This item is the default
+        */
+       mw.rcfilters.dm.SavedQueryItemModel = function MwRcfiltersDmSavedQueriesModel( id, label, data, config ) {
+               config = config || {};
+
+               // Mixin constructor
+               OO.EventEmitter.call( this );
+
+               this.id = id;
+               this.label = label;
+               this.data = data;
+               this.default = !!config.default;
+       };
+
+       /* Initialization */
+
+       OO.initClass( mw.rcfilters.dm.SavedQueryItemModel );
+       OO.mixinClass( mw.rcfilters.dm.SavedQueryItemModel, OO.EventEmitter );
+
+       /* Events */
+
+       /**
+        * @update
+        *
+        * Model has been updated
+        */
+
+       /* Methods */
+
+       /**
+        * Get an object representing the state of this item
+        *
+        * @returns {Object} Object representing the current data state
+        *  of the object
+        */
+       mw.rcfilters.dm.SavedQueryItemModel.prototype.getState = function () {
+               return {
+                       data: this.getData(),
+                       label: this.getLabel()
+               };
+       };
+
+       /**
+        * Get the query's identifier
+        *
+        * @return {string} Query identifier
+        */
+       mw.rcfilters.dm.SavedQueryItemModel.prototype.getID = function () {
+               return this.id;
+       };
+
+       /**
+        * Get query label
+        *
+        * @return {label} Query label
+        */
+       mw.rcfilters.dm.SavedQueryItemModel.prototype.getLabel = function () {
+               return this.label;
+       };
+
+       /**
+        * Update the query label
+        *
+        * @param {string} newLabel New label
+        */
+       mw.rcfilters.dm.SavedQueryItemModel.prototype.updateLabel = function ( newLabel ) {
+               if ( newLabel && this.label !== newLabel ) {
+                       this.label = newLabel;
+                       this.emit( 'update' );
+               }
+       };
+
+       /**
+        * Get query data
+        *
+        * @return {Object} Object representing parameter and highlight data
+        */
+       mw.rcfilters.dm.SavedQueryItemModel.prototype.getData = function () {
+               return this.data;
+       };
+
+       /**
+        * Check whether this item is the default
+        *
+        * @return {boolean} Query is set to be default
+        */
+       mw.rcfilters.dm.SavedQueryItemModel.prototype.isDefault = function () {
+               return this.default;
+       };
+
+       /**
+        * Toggle the default state of this query item
+        *
+        * @param {boolean} isDefault Query is default
+        */
+       mw.rcfilters.dm.SavedQueryItemModel.prototype.toggleDefault = function ( isDefault ) {
+               isDefault = isDefault === undefined ? !this.default : isDefault;
+
+               if ( this.default !== isDefault ) {
+                       this.default = isDefault;
+                       this.emit( 'update' );
+               }
+       };
+}( mediaWiki ) );
diff --git a/resources/src/mediawiki.rcfilters/images/clip.svg b/resources/src/mediawiki.rcfilters/images/clip.svg
new file mode 100644 (file)
index 0000000..86d1dbf
--- /dev/null
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
+    <path d="M17.5 4.5v13.2L12 13.5l-5.5 4.2V4.5zM5 21l7-6 7 6V3H5z" fill-rule="evenodd"/>
+</svg>
diff --git a/resources/src/mediawiki.rcfilters/images/pushPin.svg b/resources/src/mediawiki.rcfilters/images/pushPin.svg
new file mode 100644 (file)
index 0000000..b852cd0
--- /dev/null
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
+    <path d="M17.445 12.225c-.813-.935-1.775-.739-2.883-1.768-.55-.511-.498-2.36-.498-2.36s-.041-1.836.524-2.401c.39-.39 1.076-.49 1.475-.883a.973.973 0 0 0 .217-.317c.007-.013.014-.023.018-.035.035-.092.054-.2.064-.316.003-.03.017-.055.017-.085 0-.005-.003-.01-.004-.015.001-.008.004-.014.004-.022 0-.02-.015-.03-.017-.048a1.052 1.052 0 0 0-1.043-.974H8.681c-.555 0-.997.43-1.043.974-.002.018-.017.028-.017.048 0 .008.003.014.003.022 0 .006-.003.01-.003.015 0 .03.014.055.017.085.01.116.029.224.064.316.004.012.012.022.018.035a.965.965 0 0 0 .217.317c.399.393 1.084.493 1.475.883.565.565.523 2.401.523 2.401s.053 1.849-.497 2.36c-1.108 1.03-2.07.833-2.883 1.768C5.979 12.887 6 14 6 14h5.333v4.578L12 21l.668-2.422V14H18s.02-1.113-.555-1.775z"/>
+</svg>
diff --git a/resources/src/mediawiki.rcfilters/images/unClip.svg b/resources/src/mediawiki.rcfilters/images/unClip.svg
new file mode 100644 (file)
index 0000000..68459db
--- /dev/null
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
+    <path d="M5 21l7-6 7 6V3H5z" fill-rule="evenodd"/>
+</svg>
index 669420c..35541d1 100644 (file)
@@ -1,14 +1,18 @@
 ( function ( mw, $ ) {
+       /* eslint no-underscore-dangle: "off" */
        /**
         * Controller for the filters in Recent Changes
         *
         * @param {mw.rcfilters.dm.FiltersViewModel} filtersModel Filters view model
         * @param {mw.rcfilters.dm.ChangesListViewModel} changesListModel Changes list view model
+        * @param {mw.rcfilters.dm.SavedQueriesModel} savedQueriesModel Saved queries model
         */
-       mw.rcfilters.Controller = function MwRcfiltersController( filtersModel, changesListModel ) {
+       mw.rcfilters.Controller = function MwRcfiltersController( filtersModel, changesListModel, savedQueriesModel ) {
                this.filtersModel = filtersModel;
                this.changesListModel = changesListModel;
+               this.savedQueriesModel = savedQueriesModel;
                this.requestCounter = 0;
+               this.baseState = {};
        };
 
        /* Initialization */
         * @param {Array} filterStructure Filter definition and structure for the model
         */
        mw.rcfilters.Controller.prototype.initialize = function ( filterStructure ) {
-               var $changesList = $( '.mw-changeslist' ).first().contents();
+               var parsedSavedQueries,
+                       $changesList = $( '.mw-changeslist' ).first().contents();
                // Initialize the model
                this.filtersModel.initializeFilters( filterStructure );
+
+               this._buildBaseFilterState();
+
+               try {
+                       parsedSavedQueries = JSON.parse( mw.user.options.get( 'rcfilters-saved-queries' ) || '{}' );
+               } catch ( err ) {
+                       parsedSavedQueries = {};
+               }
+
+               // The queries are saved in a minimized state, so we need
+               // to send over the base state so the saved queries model
+               // can normalize them per each query item
+               this.savedQueriesModel.initialize(
+                       parsedSavedQueries,
+                       this._getBaseState()
+               );
                this.updateStateBasedOnUrl();
 
                // Update the changes list with the existing data
                        $changesList.length ? $changesList : 'NO_RESULTS',
                        $( 'fieldset.rcoptions' ).first()
                );
-
-       };
-
-       /**
-        * Update filter state (selection and highlighting) based
-        * on current URL and default values.
-        */
-       mw.rcfilters.Controller.prototype.updateStateBasedOnUrl = function () {
-               var uri = new mw.Uri();
-
-               // Set filter states based on defaults and URL params
-               this.filtersModel.toggleFiltersSelected(
-                       this.filtersModel.getFiltersFromParameters(
-                               // Merge defaults with URL params for initialization
-                               $.extend(
-                                       true,
-                                       {},
-                                       this.filtersModel.getDefaultParams(),
-                                       // URI query overrides defaults
-                                       uri.query
-                               )
-                       )
-               );
-
-               // Initialize highlights
-               this.filtersModel.toggleHighlight( !!uri.query.highlight );
-               this.filtersModel.getItems().forEach( function ( filterItem ) {
-                       var color = uri.query[ filterItem.getName() + '_color' ];
-                       if ( color ) {
-                               filterItem.setHighlightColor( color );
-                       } else {
-                               filterItem.clearHighlightColor();
-                       }
-               } );
-
-               // Check all filter interactions
-               this.filtersModel.reassessFilterInteractions();
        };
 
        /**
         * Reset to default filters
         */
        mw.rcfilters.Controller.prototype.resetToDefaults = function () {
-               this.filtersModel.setFiltersToDefaults();
-               this.filtersModel.clearAllHighlightColors();
-               // Check all filter interactions
-               this.filtersModel.reassessFilterInteractions();
-
+               this._updateModelState( this._getDefaultParams() );
                this.updateChangesList();
        };
 
@@ -98,7 +78,7 @@
                this.updateChangesList();
 
                if ( highlightedFilterNames ) {
-                       this.trackHighlight( 'clearAll', highlightedFilterNames );
+                       this._trackHighlight( 'clearAll', highlightedFilterNames );
                }
        };
 
                }
        };
 
+       /**
+        * Clear both highlight and selection of a filter
+        *
+        * @param {string} filterName Name of the filter item
+        */
+       mw.rcfilters.Controller.prototype.clearFilter = function ( filterName ) {
+               var filterItem = this.filtersModel.getItemByName( filterName ),
+                       isHighlighted = filterItem.isHighlighted();
+
+               if ( filterItem.isSelected() || isHighlighted ) {
+                       this.filtersModel.clearHighlightColor( filterName );
+                       this.filtersModel.toggleFilterSelected( filterName, false );
+                       this.updateChangesList();
+                       this.filtersModel.reassessFilterInteractions( filterItem );
+               }
+
+               if ( isHighlighted ) {
+                       this._trackHighlight( 'clear', filterName );
+               }
+       };
+
+       /**
+        * Toggle the highlight feature on and off
+        */
+       mw.rcfilters.Controller.prototype.toggleHighlight = function () {
+               this.filtersModel.toggleHighlight();
+               this._updateURL();
+
+               if ( this.filtersModel.isHighlightEnabled() ) {
+                       mw.hook( 'RcFilters.highlight.enable' ).fire();
+               }
+       };
+
+       /**
+        * Set the highlight color for a filter item
+        *
+        * @param {string} filterName Name of the filter item
+        * @param {string} color Selected color
+        */
+       mw.rcfilters.Controller.prototype.setHighlightColor = function ( filterName, color ) {
+               this.filtersModel.setHighlightColor( filterName, color );
+               this._updateURL();
+               this._trackHighlight( 'set', { name: filterName, color: color } );
+       };
+
+       /**
+        * Clear highlight for a filter item
+        *
+        * @param {string} filterName Name of the filter item
+        */
+       mw.rcfilters.Controller.prototype.clearHighlightColor = function ( filterName ) {
+               this.filtersModel.clearHighlightColor( filterName );
+               this._updateURL();
+               this._trackHighlight( 'clear', filterName );
+       };
+
+       /**
+        * Save the current model state as a saved query
+        *
+        * @param {string} [label] Label of the saved query
+        */
+       mw.rcfilters.Controller.prototype.saveCurrentQuery = function ( label ) {
+               var highlightedItems = {},
+                       highlightEnabled = this.filtersModel.isHighlightEnabled();
+
+               // Prepare highlights
+               this.filtersModel.getHighlightedItems().forEach( function ( item ) {
+                       highlightedItems[ item.getName() ] = highlightEnabled ?
+                               item.getHighlightColor() : null;
+               } );
+               highlightedItems.highlights = this.filtersModel.isHighlightEnabled();
+
+               // Add item
+               this.savedQueriesModel.addNewQuery(
+                       label || mw.msg( 'rcfilters-savedqueries-defaultlabel' ),
+                       {
+                               filters: this.filtersModel.getSelectedState(),
+                               highlights: highlightedItems
+                       }
+               );
+
+               // Save item
+               this._saveSavedQueries();
+       };
+
+       /**
+        * Remove a saved query
+        *
+        * @param {string} queryID Query id
+        */
+       mw.rcfilters.Controller.prototype.removeSavedQuery = function ( queryID ) {
+               var query = this.savedQueriesModel.getItemByID( queryID );
+
+               this.savedQueriesModel.removeItems( [ query ] );
+
+               // Check if this item was the default
+               if ( this.savedQueriesModel.getDefault() === queryID ) {
+                       // Nulify the default
+                       this.savedQueriesModel.setDefault( null );
+               }
+               this._saveSavedQueries();
+       };
+
+       /**
+        * Rename a saved query
+        *
+        * @param {string} queryID Query id
+        * @param {string} newLabel New label for the query
+        */
+       mw.rcfilters.Controller.prototype.renameSavedQuery = function ( queryID, newLabel ) {
+               var queryItem = this.savedQueriesModel.getItemByID( queryID );
+
+               if ( queryItem ) {
+                       queryItem.updateLabel( newLabel );
+               }
+               this._saveSavedQueries();
+       };
+
+       /**
+        * Set a saved query as default
+        *
+        * @param {string} queryID Query Id. If null is given, default
+        *  query is reset.
+        */
+       mw.rcfilters.Controller.prototype.setDefaultSavedQuery = function ( queryID ) {
+               this.savedQueriesModel.setDefault( queryID );
+               this._saveSavedQueries();
+       };
+
+       /**
+        * Load a saved query
+        *
+        * @param {string} queryID Query id
+        */
+       mw.rcfilters.Controller.prototype.applySavedQuery = function ( queryID ) {
+               var data, highlights,
+                       queryItem = this.savedQueriesModel.getItemByID( queryID );
+
+               if ( queryItem ) {
+                       data = queryItem.getData();
+                       highlights = data.highlights;
+
+                       // Update model state from filters
+                       this.filtersModel.toggleFiltersSelected( data.filters );
+
+                       // Update highlight state
+                       this.filtersModel.toggleHighlight( !!highlights.highlights );
+                       this.filtersModel.getItems().forEach( function ( filterItem ) {
+                               var color = highlights[ filterItem.getName() ];
+                               if ( color ) {
+                                       filterItem.setHighlightColor( color );
+                               } else {
+                                       filterItem.clearHighlightColor();
+                               }
+                       } );
+
+                       // Check all filter interactions
+                       this.filtersModel.reassessFilterInteractions();
+
+                       this.updateChangesList();
+               }
+       };
+
+       /**
+        * Check whether the current filter and highlight state exists
+        * in the saved queries model.
+        *
+        * @return {boolean} Query exists
+        */
+       mw.rcfilters.Controller.prototype.findQueryMatchingCurrentState = function () {
+               var highlightedItems = {};
+
+               // Prepare highlights of the current query
+               this.filtersModel.getItemsSupportingHighlights().forEach( function ( item ) {
+                       highlightedItems[ item.getName() ] = item.getHighlightColor();
+               } );
+               highlightedItems.highlights = this.filtersModel.isHighlightEnabled();
+
+               return this.savedQueriesModel.findMatchingQuery(
+                       {
+                               filters: this.filtersModel.getSelectedState(),
+                               highlights: highlightedItems
+                       }
+               );
+       };
+
+       /**
+        * Get an object representing the base state of parameters
+        * and highlights.
+        *
+        * This is meant to make sure that the saved queries that are
+        * in memory are always the same structure as what we would get
+        * by calling the current model's "getSelectedState" and by checking
+        * highlight items.
+        *
+        * In cases where a user saved a query when the system had a certain
+        * set of filters, and then a filter was added to the system, we want
+        * to make sure that the stored queries can still be comparable to
+        * the current state, which means that we need the base state for
+        * two operations:
+        *
+        * - Saved queries are stored in "minimal" view (only changed filters
+        *   are stored); When we initialize the system, we merge each minimal
+        *   query with the base state (using 'getNormalizedFilters') so all
+        *   saved queries have the exact same structure as what we would get
+        *   by checking the getSelectedState of the filter.
+        * - When we save the queries, we minimize the object to only represent
+        *   whatever has actually changed, rather than store the entire
+        *   object. To check what actually is different so we can store it,
+        *   we need to obtain a base state to compare against, this is
+        *   what #_getMinimalFilterList does
+        */
+       mw.rcfilters.Controller.prototype._buildBaseFilterState = function () {
+               var defaultParams = this.filtersModel.getDefaultParams(),
+                       highlightedItems = {};
+
+               // Prepare highlights
+               this.filtersModel.getItemsSupportingHighlights().forEach( function ( item ) {
+                       highlightedItems[ item.getName() ] = null;
+               } );
+               highlightedItems.highlights = false;
+
+               this.baseState = {
+                       filters: this.filtersModel.getFiltersFromParameters( defaultParams ),
+                       highlights: highlightedItems
+               };
+       };
+
+       /**
+        * Get an object representing the base state of parameters
+        * and highlights. The structure is similar to what we use
+        * to store each query in the saved queries object:
+        * {
+        *    filters: {
+        *        filterName: (bool)
+        *    },
+        *    highlights: {
+        *        filterName: (string|null)
+        *    }
+        * }
+        *
+        * @return {Object} Object representing the base state of
+        *  parameters and highlights
+        */
+       mw.rcfilters.Controller.prototype._getBaseState = function () {
+               return this.baseState;
+       };
+
+       /**
+        * Get an object that holds only the parameters and highlights that have
+        * values different than the base default value.
+        *
+        * This is the reverse of the normalization we do initially on loading and
+        * initializing the saved queries model.
+        *
+        * @param {Object} valuesObject Object representing the state of both
+        *  filters and highlights in its normalized version, to be minimized.
+        * @return {Object} Minimal filters and highlights list
+        */
+       mw.rcfilters.Controller.prototype._getMinimalFilterList = function ( valuesObject ) {
+               var result = { filters: {}, highlights: {} },
+                       baseState = this._getBaseState();
+
+               // XOR results
+               $.each( valuesObject.filters, function ( name, value ) {
+                       if ( baseState.filters !== undefined && baseState.filters[ name ] !== value ) {
+                               result.filters[ name ] = value;
+                       }
+               } );
+
+               $.each( valuesObject.highlights, function ( name, value ) {
+                       if ( baseState.highlights !== undefined && baseState.highlights[ name ] !== value ) {
+                               result.highlights[ name ] = value;
+                       }
+               } );
+
+               return result;
+       };
+
+       /**
+        * Save the current state of the saved queries model with all
+        * query item representation in the user settings.
+        */
+       mw.rcfilters.Controller.prototype._saveSavedQueries = function () {
+               var stringified,
+                       state = this.savedQueriesModel.getState(),
+                       controller = this;
+
+               // Minimize before save
+               $.each( state.queries, function ( queryID, info ) {
+                       state.queries[ queryID ].data = controller._getMinimalFilterList( info.data );
+               } );
+
+               // Stringify state
+               stringified = JSON.stringify( state );
+
+               if ( stringified.length > 65535 ) {
+                       // Sanity check, since the preference can only hold that.
+                       return;
+               }
+
+               // Save the preference
+               new mw.Api().saveOption( 'rcfilters-saved-queries', stringified );
+               // Update the preference for this session
+               mw.user.options.set( 'rcfilters-saved-queries', stringified );
+       };
+
+       /**
+        * Synchronize the URL with the current state of the filters
+        * without adding an history entry.
+        */
+       mw.rcfilters.Controller.prototype.replaceUrl = function () {
+               window.history.replaceState(
+                       { tag: 'rcfilters' },
+                       document.title,
+                       this._getUpdatedUri().toString()
+               );
+       };
+
+       /**
+        * Update filter state (selection and highlighting) based
+        * on current URL and default values.
+        */
+       mw.rcfilters.Controller.prototype.updateStateBasedOnUrl = function () {
+               var uri = new mw.Uri(),
+                       defaultParams = this._getDefaultParams();
+
+               this._updateModelState( $.extend( {}, defaultParams, uri.query ) );
+               this.updateChangesList();
+       };
+
+       /**
+        * Update the list of changes and notify the model
+        *
+        * @param {Object} [params] Extra parameters to add to the API call
+        */
+       mw.rcfilters.Controller.prototype.updateChangesList = function ( params ) {
+               this._updateURL( params );
+               this.changesListModel.invalidate();
+               this._fetchChangesList()
+                       .then(
+                               // Success
+                               function ( pieces ) {
+                                       var $changesListContent = pieces.changes,
+                                               $fieldset = pieces.fieldset;
+                                       this.changesListModel.update( $changesListContent, $fieldset );
+                               }.bind( this )
+                               // Do nothing for failure
+                       );
+       };
+
+       /**
+        * Update the model state from given the given parameters.
+        *
+        * This is an internal method, and should only be used from inside
+        * the controller.
+        *
+        * @param {Object} parameters Object representing the parameters for
+        *  filters and highlights
+        */
+       mw.rcfilters.Controller.prototype._updateModelState = function ( parameters ) {
+               // Update filter states
+               this.filtersModel.toggleFiltersSelected(
+                       this.filtersModel.getFiltersFromParameters(
+                               parameters
+                       )
+               );
+
+               // Update highlight state
+               this.filtersModel.toggleHighlight( !!parameters.highlights );
+               this.filtersModel.getItems().forEach( function ( filterItem ) {
+                       var color = parameters[ filterItem.getName() + '_color' ];
+                       if ( color ) {
+                               filterItem.setHighlightColor( color );
+                       } else {
+                               filterItem.clearHighlightColor();
+                       }
+               } );
+
+               // Check all filter interactions
+               this.filtersModel.reassessFilterInteractions();
+       };
+
+       /**
+        * Get an object representing the default parameter state, whether
+        * it is from the model defaults or from the saved queries.
+        *
+        * @return {Object} Default parameters
+        */
+       mw.rcfilters.Controller.prototype._getDefaultParams = function () {
+               var data, queryHighlights,
+                       savedParams = {},
+                       savedHighlights = {},
+                       defaultSavedQueryItem = this.savedQueriesModel.getItemByID( this.savedQueriesModel.getDefault() );
+
+               if ( defaultSavedQueryItem ) {
+                       data = defaultSavedQueryItem.getData();
+
+                       queryHighlights = data.highlights || {};
+                       savedParams = this.filtersModel.getParametersFromFilters( data.filters || {} );
+
+                       // Translate highlights to parameters
+                       savedHighlights.highlights = queryHighlights.highlights;
+                       $.each( queryHighlights, function ( filterName, color ) {
+                               if ( filterName !== 'highlights' ) {
+                                       savedHighlights[ filterName + '_color' ] = color;
+                               }
+                       } );
+
+                       return $.extend( true, {}, savedParams, savedHighlights );
+               }
+
+               return this.filtersModel.getDefaultParams();
+       };
+
        /**
         * Update the URL of the page to reflect current filters
         *
         * highlighting actions below, or call #updateChangesList which does
         * the uri corrections already.
         *
-        * @private
         * @param {Object} [params] Extra parameters to add to the API call
         */
-       mw.rcfilters.Controller.prototype.updateURL = function ( params ) {
+       mw.rcfilters.Controller.prototype._updateURL = function ( params ) {
                var updatedUri,
                        notEquivalent = function ( obj1, obj2 ) {
                                var keys = Object.keys( obj1 ).concat( Object.keys( obj2 ) );
 
                params = params || {};
 
-               updatedUri = this.getUpdatedUri();
+               updatedUri = this._getUpdatedUri();
                updatedUri.extend( params );
 
                if ( notEquivalent( updatedUri.query, new mw.Uri().query ) ) {
         *
         * @return {mw.Uri} Updated Uri
         */
-       mw.rcfilters.Controller.prototype.getUpdatedUri = function () {
+       mw.rcfilters.Controller.prototype._getUpdatedUri = function () {
                var uri = new mw.Uri(),
                        highlightParams = this.filtersModel.getHighlightParameters();
 
         * @return {jQuery.Promise} Promise object that will resolve with the changes list
         *  or with a string denoting no results.
         */
-       mw.rcfilters.Controller.prototype.fetchChangesList = function () {
-               var uri = this.getUpdatedUri(),
+       mw.rcfilters.Controller.prototype._fetchChangesList = function () {
+               var uri = this._getUpdatedUri(),
                        requestId = ++this.requestCounter,
                        latestRequest = function () {
                                return requestId === this.requestCounter;
                        );
        };
 
-       /**
-        * Update the list of changes and notify the model
-        *
-        * @param {Object} [params] Extra parameters to add to the API call
-        */
-       mw.rcfilters.Controller.prototype.updateChangesList = function ( params ) {
-               this.updateURL( params );
-               this.changesListModel.invalidate();
-               this.fetchChangesList()
-                       .then(
-                               // Success
-                               function ( pieces ) {
-                                       var $changesListContent = pieces.changes,
-                                               $fieldset = pieces.fieldset;
-                                       this.changesListModel.update( $changesListContent, $fieldset );
-                               }.bind( this )
-                               // Do nothing for failure
-                       );
-       };
-
-       /**
-        * Toggle the highlight feature on and off
-        */
-       mw.rcfilters.Controller.prototype.toggleHighlight = function () {
-               this.filtersModel.toggleHighlight();
-               this.updateURL();
-
-               if ( this.filtersModel.isHighlightEnabled() ) {
-                       mw.hook( 'RcFilters.highlight.enable' ).fire();
-               }
-       };
-
-       /**
-        * Set the highlight color for a filter item
-        *
-        * @param {string} filterName Name of the filter item
-        * @param {string} color Selected color
-        */
-       mw.rcfilters.Controller.prototype.setHighlightColor = function ( filterName, color ) {
-               this.filtersModel.setHighlightColor( filterName, color );
-               this.updateURL();
-               this.trackHighlight( 'set', { name: filterName, color: color } );
-       };
-
-       /**
-        * Clear highlight for a filter item
-        *
-        * @param {string} filterName Name of the filter item
-        */
-       mw.rcfilters.Controller.prototype.clearHighlightColor = function ( filterName ) {
-               this.filtersModel.clearHighlightColor( filterName );
-               this.updateURL();
-               this.trackHighlight( 'clear', filterName );
-       };
-
-       /**
-        * Clear both highlight and selection of a filter
-        *
-        * @param {string} filterName Name of the filter item
-        */
-       mw.rcfilters.Controller.prototype.clearFilter = function ( filterName ) {
-               var filterItem = this.filtersModel.getItemByName( filterName ),
-                       isHighlighted = filterItem.isHighlighted();
-
-               if ( filterItem.isSelected() || isHighlighted ) {
-                       this.filtersModel.clearHighlightColor( filterName );
-                       this.filtersModel.toggleFilterSelected( filterName, false );
-                       this.updateChangesList();
-                       this.filtersModel.reassessFilterInteractions( filterItem );
-               }
-
-               if ( isHighlighted ) {
-                       this.trackHighlight( 'clear', filterName );
-               }
-       };
-
-       /**
-        * Synchronize the URL with the current state of the filters
-        * without adding an history entry.
-        */
-       mw.rcfilters.Controller.prototype.replaceUrl = function () {
-               window.history.replaceState(
-                       { tag: 'rcfilters' },
-                       document.title,
-                       this.getUpdatedUri().toString()
-               );
-       };
-
        /**
         * Track usage of highlight feature
         *
         * @param {string} action
         * @param {array|object|string} filters
         */
-       mw.rcfilters.Controller.prototype.trackHighlight = function ( action, filters ) {
+       mw.rcfilters.Controller.prototype._trackHighlight = function ( action, filters ) {
                filters = typeof filters === 'string' ? { name: filters } : filters;
                filters = !Array.isArray( filters ) ? [ filters ] : filters;
                mw.track(
                        }
                );
        };
+
 }( mediaWiki, jQuery ) );
index 4a586e4..dd8fae0 100644 (file)
                init: function () {
                        var filtersModel = new mw.rcfilters.dm.FiltersViewModel(),
                                changesListModel = new mw.rcfilters.dm.ChangesListViewModel(),
-                               controller = new mw.rcfilters.Controller( filtersModel, changesListModel ),
+                               savedQueriesModel = new mw.rcfilters.dm.SavedQueriesModel(),
+                               controller = new mw.rcfilters.Controller( filtersModel, changesListModel, savedQueriesModel ),
                                $overlay = $( '<div>' )
                                        .addClass( 'mw-rcfilters-ui-overlay' ),
                                filtersWidget = new mw.rcfilters.ui.FilterWrapperWidget(
-                                       controller, filtersModel, { $overlay: $overlay } );
+                                       controller, filtersModel, savedQueriesModel, { $overlay: $overlay } );
 
                        // TODO: The changesListWrapperWidget should be able to initialize
                        // after the model is ready.
index f1b6871..66e6d96 100644 (file)
                margin-top: 0.3em;
        }
 
-       &-wrapper-content-title {
-               font-weight: bold;
-               color: #54595d;
+       &-wrapper-content {
+               &-title {
+                       font-weight: bold;
+                       color: #54595d;
+               }
+
+               &-savedQueryTitle {
+                       color: #72777d;
+                       margin-left: 1em;
+               }
        }
 
        &-emptyFilters {
diff --git a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.SaveFiltersPopupButtonWidget.less b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.SaveFiltersPopupButtonWidget.less
new file mode 100644 (file)
index 0000000..e19c246
--- /dev/null
@@ -0,0 +1,22 @@
+.mw-rcfilters-ui-saveFiltersPopupButtonWidget {
+       &-popup {
+               &-layout {
+                       padding-bottom: 1.5em;
+               }
+
+               > .oo-ui-popupWidget-popup > .oo-ui-popupWidget-head {
+                       > .oo-ui-iconWidget {
+                               margin: 0.75em 0.5em;
+                               float: left;
+                       }
+
+                       > .oo-ui-labelElement-label {
+                               font-size: 1.2em;
+                               padding: 0.3em;
+                               margin-left: 0;
+                               font-weight: bold;
+                       }
+               }
+       }
+
+}
diff --git a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.SavedLinksListItemWidget.less b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.SavedLinksListItemWidget.less
new file mode 100644 (file)
index 0000000..66ceb64
--- /dev/null
@@ -0,0 +1,52 @@
+.mw-rcfilters-ui-savedLinksListItemWidget {
+       padding: 0.5em;
+
+       &:hover {
+               // Mimicking optionWidget styles
+               background-color: #eaecf0;
+               color: #000;
+       }
+
+       .mw-rcfilters-ui-cell {
+               vertical-align: middle;
+       }
+
+       &:not( .oo-ui-iconElement ) .oo-ui-iconElement-icon {
+               // The iconElement-icon class still appears when we
+               // have an empty icon, and we need it to pretend to
+               // be there so the text has the same alignment as
+               // text next to a visible icon. #ThanksOOUI
+               width: 1.875em;
+               height: 1.875em;
+       }
+
+       &-icon span {
+               display: inline-block;
+       }
+
+       &-input {
+               display: inline-block;
+               margin-right: 0;
+               width: 15em;
+       }
+
+       &-label {
+               max-width: 15em;
+               display: inline-block;
+               vertical-align: middle;
+               text-overflow: ellipsis;
+               overflow: hidden;
+               cursor: pointer;
+               margin-left: 0.5px;
+       }
+
+       &-icon,
+       &-button {
+               width: 2em;
+       }
+
+       &-content {
+               width: 100%;
+       }
+
+}
diff --git a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.SavedLinksListWidget.less b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.SavedLinksListWidget.less
new file mode 100644 (file)
index 0000000..e1e55a7
--- /dev/null
@@ -0,0 +1,7 @@
+.mw-rcfilters-ui-savedLinksListWidget {
+       float: right;
+
+       &-menu {
+               width: 100%;
+       }
+}
index 957e9e9..c0f24c6 100644 (file)
        }
 }
 
+// Temporary icon classes, until these icons
+// are merged into OOUI properly
+.oo-ui-iconElement-icon.oo-ui-icon-clip {
+       /* @embed */
+       background-image: url( ../images/clip.svg );
+}
+
+.oo-ui-iconElement-icon.oo-ui-icon-unClip {
+       /* @embed */
+       background-image: url( ../images/unClip.svg );
+}
+
+.oo-ui-iconElement-icon.oo-ui-icon-pushPin {
+       /* @embed */
+       background-image: url( ../images/pushPin.svg );
+}
index c52ca1f..cbf8747 100644 (file)
@@ -8,10 +8,11 @@
         * @constructor
         * @param {mw.rcfilters.Controller} controller Controller
         * @param {mw.rcfilters.dm.FiltersViewModel} model View model
+        * @param {mw.rcfilters.dm.SavedQueriesModel} savedQueriesModel Saved queries model
         * @param {Object} config Configuration object
         * @cfg {jQuery} [$overlay] A jQuery object serving as overlay for popups
         */
-       mw.rcfilters.ui.FilterTagMultiselectWidget = function MwRcfiltersUiFilterTagMultiselectWidget( controller, model, config ) {
+       mw.rcfilters.ui.FilterTagMultiselectWidget = function MwRcfiltersUiFilterTagMultiselectWidget( controller, model, savedQueriesModel, config ) {
                var title = new OO.ui.LabelWidget( {
                                label: mw.msg( 'rcfilters-activefilters' ),
                                classes: [ 'mw-rcfilters-ui-filterTagMultiselectWidget-wrapper-content-title' ]
@@ -23,7 +24,9 @@
 
                this.controller = controller;
                this.model = model;
+               this.queriesModel = savedQueriesModel;
                this.$overlay = config.$overlay || this.$element;
+               this.matchingQuery = null;
 
                // Parent
                mw.rcfilters.ui.FilterTagMultiselectWidget.parent.call( this, $.extend( true, {
                        }
                }, config ) );
 
+               this.savedQueryTitle = new OO.ui.LabelWidget( {
+                       label: '',
+                       classes: [ 'mw-rcfilters-ui-filterTagMultiselectWidget-wrapper-content-savedQueryTitle' ]
+               } );
+
                this.resetButton = new OO.ui.ButtonWidget( {
                        framed: false,
                        classes: [ 'mw-rcfilters-ui-filterTagMultiselectWidget-resetButton' ]
                } );
 
+               this.saveQueryButton = new mw.rcfilters.ui.SaveFiltersPopupButtonWidget(
+                       this.controller,
+                       this.queriesModel
+               );
+
                this.emptyFilterMessage = new OO.ui.LabelWidget( {
                        label: mw.msg( 'rcfilters-empty-filter' ),
                        classes: [ 'mw-rcfilters-ui-filterTagMultiselectWidget-emptyFilters' ]
                // Stop propagation for mousedown, so that the widget doesn't
                // trigger the focus on the input and scrolls up when we click the reset button
                this.resetButton.$element.on( 'mousedown', function ( e ) { e.stopPropagation(); } );
+               this.saveQueryButton.$element.on( 'mousedown', function ( e ) { e.stopPropagation(); } );
                this.model.connect( this, {
                        initialize: 'onModelInitialize',
                        itemUpdate: 'onModelItemUpdate',
                        highlightChange: 'onModelHighlightChange'
                } );
+               this.saveQueryButton.connect( this, {
+                       click: 'onSaveQueryButtonClick',
+                       saveCurrent: 'setSavedQueryVisibility'
+               } );
+               this.queriesModel.connect( this, { itemUpdate: 'onSavedQueriesItemUpdate' } );
 
                // Build the content
                $contentWrapper.append(
                        title.$element,
+                       this.savedQueryTitle.$element,
                        $( '<div>' )
                                .addClass( 'mw-rcfilters-ui-table' )
                                .append(
                                                        this.$content
                                                                .addClass( 'mw-rcfilters-ui-cell' )
                                                                .addClass( 'mw-rcfilters-ui-filterTagMultiselectWidget-cell-filters' ),
+                                                       $( '<div>' )
+                                                               .addClass( 'mw-rcfilters-ui-cell' )
+                                                               .addClass( 'mw-rcfilters-ui-filterTagMultiselectWidget-cell-save' )
+                                                               .append( this.saveQueryButton.$element ),
                                                        $( '<div>' )
                                                                .addClass( 'mw-rcfilters-ui-cell' )
                                                                .addClass( 'mw-rcfilters-ui-filterTagMultiselectWidget-cell-reset' )
                // Initialize
                this.$handle.append( $contentWrapper );
                this.emptyFilterMessage.toggle( this.isEmpty() );
+               this.savedQueryTitle.toggle( false );
 
                this.$element
                        .addClass( 'mw-rcfilters-ui-filterTagMultiselectWidget' );
 
        /* Methods */
 
+       /**
+        * Respond to query button click
+        */
+       mw.rcfilters.ui.FilterTagMultiselectWidget.prototype.onSaveQueryButtonClick = function () {
+               this.getMenu().toggle( false );
+       };
+
+       /**
+        * Respond to save query item change. Mainly this is done to update the label in case
+        * a query item has been edited
+        *
+        * @param {mw.rcfilters.dm.SavedQueryItemModel} item Saved query item
+        */
+       mw.rcfilters.ui.FilterTagMultiselectWidget.prototype.onSavedQueriesItemUpdate = function ( item ) {
+               if ( this.matchingQuery === item ) {
+                       // This means we just edited the item that is currently matched
+                       this.savedQueryTitle.setLabel( item.getLabel() );
+               }
+       };
+
        /**
         * Respond to menu toggle
         *
         */
        mw.rcfilters.ui.FilterTagMultiselectWidget.prototype.onModelInitialize = function () {
                this.populateFromModel();
+
+               this.setSavedQueryVisibility();
        };
 
+       /**
+        * Set the visibility of the saved query button
+        */
+       mw.rcfilters.ui.FilterTagMultiselectWidget.prototype.setSavedQueryVisibility = function () {
+               this.matchingQuery = this.controller.findQueryMatchingCurrentState();
+
+               this.savedQueryTitle.setLabel(
+                       this.matchingQuery ? this.matchingQuery.getLabel() : ''
+               );
+               this.savedQueryTitle.toggle( !!this.matchingQuery );
+               this.saveQueryButton.toggle(
+                       !this.isEmpty() &&
+                       !this.matchingQuery
+               );
+       };
        /**
         * Respond to model itemUpdate event
         *
                        this.removeTagByData( item.getName() );
                }
 
+               this.setSavedQueryVisibility();
+
                // Re-evaluate reset state
                this.reevaluateResetRestoreState();
        };
index b7ebf34..738a981 100644 (file)
@@ -8,11 +8,12 @@
         * @constructor
         * @param {mw.rcfilters.Controller} controller Controller
         * @param {mw.rcfilters.dm.FiltersViewModel} model View model
+        * @param {mw.rcfilters.dm.SavedQueriesModel} savedQueriesModel Saved queries model
         * @param {Object} [config] Configuration object
         * @cfg {Object} [filters] A definition of the filter groups in this list
         * @cfg {jQuery} [$overlay] A jQuery object serving as overlay for popups
         */
-       mw.rcfilters.ui.FilterWrapperWidget = function MwRcfiltersUiFilterWrapperWidget( controller, model, config ) {
+       mw.rcfilters.ui.FilterWrapperWidget = function MwRcfiltersUiFilterWrapperWidget( controller, model, savedQueriesModel, config ) {
                config = config || {};
 
                // Parent
 
                this.controller = controller;
                this.model = model;
+               this.queriesModel = savedQueriesModel;
                this.$overlay = config.$overlay || this.$element;
 
                this.filterTagWidget = new mw.rcfilters.ui.FilterTagMultiselectWidget(
                        this.controller,
                        this.model,
+                       this.queriesModel,
+                       { $overlay: this.$overlay }
+               );
+
+               this.savedLinksListWidget = new mw.rcfilters.ui.SavedLinksListWidget(
+                       this.controller,
+                       this.queriesModel,
                        { $overlay: this.$overlay }
                );
 
                // Initialize
                this.$element
                        .addClass( 'mw-rcfilters-ui-filterWrapperWidget' )
-                       .append( this.filterTagWidget.$element );
+                       .append(
+                               this.savedLinksListWidget.$element,
+                               this.filterTagWidget.$element
+                       );
        };
 
        /* Initialization */
diff --git a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.SaveFiltersPopupButtonWidget.js b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.SaveFiltersPopupButtonWidget.js
new file mode 100644 (file)
index 0000000..9b7a2fb
--- /dev/null
@@ -0,0 +1,159 @@
+( function ( mw ) {
+       /**
+        * Save filters widget. This widget is displayed in the tag area
+        * and allows the user to save the current state of the system
+        * as a new saved filter query they can later load or set as
+        * default.
+        *
+        * @extends OO.ui.PopupButtonWidget
+        *
+        * @constructor
+        * @param {mw.rcfilters.Controller} controller Controller
+        * @param {mw.rcfilters.dm.SavedQueriesModel} model View model
+        * @param {Object} [config] Configuration object
+        */
+       mw.rcfilters.ui.SaveFiltersPopupButtonWidget = function MwRcfiltersUiSaveFiltersPopupButtonWidget( controller, model, config ) {
+               var layout,
+                       $popupContent = $( '<div>' );
+
+               config = config || {};
+
+               this.controller = controller;
+               this.model = model;
+
+               // Parent
+               mw.rcfilters.ui.SaveFiltersPopupButtonWidget.parent.call( this, $.extend( {
+                       framed: false,
+                       icon: 'clip',
+                       $overlay: this.$overlay,
+                       title: mw.msg( 'rcfilters-savedqueries-add-new-title' ),
+                       popup: {
+                               classes: [ 'mw-rcfilters-ui-saveFiltersPopupButtonWidget-popup' ],
+                               padded: true,
+                               head: true,
+                               label: mw.msg( 'rcfilters-savedqueries-add-new-title' ),
+                               $content: $popupContent
+                       }
+               }, config ) );
+               // // HACK: Add an icon to the popup head label
+               this.popup.$head.prepend( ( new OO.ui.IconWidget( { icon: 'clip' } ) ).$element );
+
+               this.input = new OO.ui.TextInputWidget( {
+                       validate: 'non-empty'
+               } );
+               layout = new OO.ui.FieldLayout( this.input, {
+                       label: mw.msg( 'rcfilters-savedqueries-new-name-label' ),
+                       align: 'top'
+               } );
+
+               this.applyButton = new OO.ui.ButtonWidget( {
+                       label: mw.msg( 'rcfilters-savedqueries-apply-label' ),
+                       classes: [ 'mw-rcfilters-ui-saveFiltersPopupButtonWidget-popup-buttons-apply' ],
+                       flags: [ 'primary', 'progressive' ]
+               } );
+               this.cancelButton = new OO.ui.ButtonWidget( {
+                       label: mw.msg( 'rcfilters-savedqueries-cancel-label' ),
+                       classes: [ 'mw-rcfilters-ui-saveFiltersPopupButtonWidget-popup-buttons-cancel' ]
+               } );
+
+               $popupContent
+                       .append(
+                               $( '<div>' )
+                                       .addClass( 'mw-rcfilters-ui-saveFiltersPopupButtonWidget-popup-layout' )
+                                       .append( layout.$element ),
+                               $( '<div>' )
+                                       .addClass( 'mw-rcfilters-ui-saveFiltersPopupButtonWidget-popup-buttons' )
+                                       .append(
+                                               this.cancelButton.$element,
+                                               this.applyButton.$element
+                                       )
+                       );
+
+               // Events
+               this.popup.connect( this, {
+                       ready: 'onPopupReady',
+                       toggle: 'onPopupToggle'
+               } );
+               this.input.connect( this, { enter: 'onInputEnter' } );
+               this.input.$input.on( {
+                       keyup: this.onInputKeyup.bind( this )
+               } );
+               this.cancelButton.connect( this, { click: 'onCancelButtonClick' } );
+               this.applyButton.connect( this, { click: 'onApplyButtonClick' } );
+
+               // Initialize
+               this.$element
+                       .addClass( 'mw-rcfilters-ui-saveFiltersPopupButtonWidget' );
+       };
+
+       /* Initialization */
+       OO.inheritClass( mw.rcfilters.ui.SaveFiltersPopupButtonWidget, OO.ui.PopupButtonWidget );
+
+       /**
+        * Respond to input enter event
+        */
+       mw.rcfilters.ui.SaveFiltersPopupButtonWidget.prototype.onInputEnter = function () {
+               this.apply();
+       };
+
+       /**
+        * Respond to input keyup event, this is the way to intercept 'escape' key
+        *
+        * @param {jQuery.Event} e Event data
+        * @returns {boolean} false
+        */
+       mw.rcfilters.ui.SaveFiltersPopupButtonWidget.prototype.onInputKeyup = function ( e ) {
+               if ( e.which === OO.ui.Keys.ESCAPE ) {
+                       this.popup.toggle( false );
+                       return false;
+               }
+       };
+
+       /**
+        * Respond to popup toggle event
+        *
+        * @param {boolean} isVisible Popup is visible
+        */
+       mw.rcfilters.ui.SaveFiltersPopupButtonWidget.prototype.onPopupToggle = function ( isVisible ) {
+               this.setIcon( isVisible ? 'unClip' : 'clip' );
+       };
+
+       /**
+        * Respond to popup ready event
+        */
+       mw.rcfilters.ui.SaveFiltersPopupButtonWidget.prototype.onPopupReady = function () {
+               this.input.focus();
+       };
+
+       /**
+        * Respond to cancel button click event
+        */
+       mw.rcfilters.ui.SaveFiltersPopupButtonWidget.prototype.onCancelButtonClick = function () {
+               this.popup.toggle( false );
+       };
+
+       /**
+        * Respond to apply button click event
+        */
+       mw.rcfilters.ui.SaveFiltersPopupButtonWidget.prototype.onApplyButtonClick = function () {
+               this.apply();
+       };
+
+       /**
+        * Apply and add the new quick link
+        */
+       mw.rcfilters.ui.SaveFiltersPopupButtonWidget.prototype.apply = function () {
+               var widget = this,
+                       label = this.input.getValue();
+
+               this.input.getValidity()
+                       .done( function () {
+                               widget.controller.saveCurrentQuery( label );
+                               widget.input.setValue( this.input, '' );
+                               widget.emit( 'saveCurrent' );
+                       } )
+                       .always( function () {
+                               widget.popup.toggle( false );
+                       } );
+       };
+}( mediaWiki ) );
diff --git a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.SavedLinksListItemWidget.js b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.SavedLinksListItemWidget.js
new file mode 100644 (file)
index 0000000..51b348e
--- /dev/null
@@ -0,0 +1,293 @@
+( function ( mw ) {
+       /**
+        * Quick links menu option widget
+        *
+        * @extends OO.ui.Widget
+        * @mixins OO.ui.mixin.LabelElement
+        * @mixins OO.ui.mixin.IconElement
+        *
+        * @constructor
+        * @param {mw.rcfilters.dm.SavedQueryItemModel} model View model
+        * @param {Object} [config] Configuration object
+        * @cfg {jQuery} [$overlay] A jQuery object serving as overlay for popups
+        */
+       mw.rcfilters.ui.SavedLinksListItemWidget = function MwRcfiltersUiSavedLinksListWidget( model, config ) {
+               config = config || {};
+
+               this.model = model;
+
+               // Parent
+               mw.rcfilters.ui.SavedLinksListItemWidget.parent.call( this, $.extend( {
+                       data: this.model.getID()
+               }, config ) );
+
+               // Mixin constructors
+               OO.ui.mixin.LabelElement.call( this, $.extend( {
+                       label: this.model.getLabel()
+               }, config ) );
+               OO.ui.mixin.IconElement.call( this, $.extend( {
+                       icon: ''
+               }, config ) );
+
+               this.edit = false;
+               this.$overlay = config.$overlay || this.$element;
+
+               this.popupButton = new OO.ui.ButtonWidget( {
+                       classes: [ 'mw-rcfilters-ui-savedLinksListItemWidget-button' ],
+                       icon: 'ellipsis',
+                       framed: false
+               } );
+               this.menu = new OO.ui.FloatingMenuSelectWidget( {
+                       classes: [ 'mw-rcfilters-ui-savedLinksListItemWidget-menu' ],
+                       widget: this.popupButton,
+                       width: 200,
+                       horizontalPosition: 'end',
+                       $container: this.popupButton.$element,
+                       items: [
+                               new OO.ui.MenuOptionWidget( {
+                                       data: 'edit',
+                                       icon: 'edit',
+                                       label: mw.msg( 'rcfilters-savedqueries-rename' )
+                               } ),
+                               new OO.ui.MenuOptionWidget( {
+                                       data: 'delete',
+                                       icon: 'close',
+                                       label: mw.msg( 'rcfilters-savedqueries-remove' )
+                               } ),
+                               new OO.ui.MenuOptionWidget( {
+                                       data: 'default',
+                                       icon: 'pushPin',
+                                       label: mw.msg( 'rcfilters-savedqueries-setdefault' )
+                               } )
+                       ]
+               } );
+
+               this.editInput = new OO.ui.TextInputWidget( {
+                       classes: [ 'mw-rcfilters-ui-savedLinksListItemWidget-input' ]
+               } );
+               this.saveButton = new OO.ui.ButtonWidget( {
+                       icon: 'check',
+                       flags: [ 'primary', 'progressive' ]
+               } );
+               this.toggleEdit( false );
+
+               // Events
+               this.model.connect( this, { update: 'onModelUpdate' } );
+               this.popupButton.connect( this, { click: 'onPopupButtonClick' } );
+               this.menu.connect( this, {
+                       choose: 'onMenuChoose'
+               } );
+               this.saveButton.connect( this, { click: 'onSaveButtonClick' } );
+               this.editInput.connect( this, { enter: 'onEditInputEnter' } );
+               this.editInput.$input.on( {
+                       blur: this.onInputBlur.bind( this ),
+                       keyup: this.onInputKeyup.bind( this )
+               } );
+               this.$element.on( { click: this.onClick.bind( this ) } );
+               this.$label.on( { click: this.onClick.bind( this ) } );
+               // Prevent propagation on mousedown for the save button
+               // so the menu doesn't close
+               this.saveButton.$element.on( { mousedown: function () { return false; } } );
+
+               // Initialize
+               this.toggleDefault( !!this.model.isDefault() );
+               this.$overlay.append( this.menu.$element );
+               this.$element
+                       .addClass( 'mw-rcfilters-ui-savedLinksListItemWidget' )
+                       .addClass( 'mw-rcfilters-ui-savedLinksListItemWidget-query-' + this.model.getID() )
+                       .append(
+                               $( '<div>' )
+                                       .addClass( 'mw-rcfilters-ui-table' )
+                                       .append(
+                                               $( '<div>' )
+                                                       .addClass( 'mw-rcfilters-ui-row' )
+                                                       .append(
+                                                               $( '<div>' )
+                                                                       .addClass( 'mw-rcfilters-ui-cell' )
+                                                                       .addClass( 'mw-rcfilters-ui-savedLinksListItemWidget-icon' )
+                                                                       .append( this.$icon ),
+                                                               $( '<div>' )
+                                                                       .addClass( 'mw-rcfilters-ui-cell' )
+                                                                       .addClass( 'mw-rcfilters-ui-savedLinksListItemWidget-content' )
+                                                                       .append(
+                                                                               this.$label
+                                                                                       .addClass( 'mw-rcfilters-ui-savedLinksListItemWidget-label' ),
+                                                                               this.editInput.$element,
+                                                                               this.saveButton.$element
+                                                                       ),
+                                                               this.popupButton.$element
+                                                                       .addClass( 'mw-rcfilters-ui-cell' )
+                                                       )
+                                       )
+                       );
+       };
+
+       /* Initialization */
+       OO.inheritClass( mw.rcfilters.ui.SavedLinksListItemWidget, OO.ui.Widget );
+       OO.mixinClass( mw.rcfilters.ui.SavedLinksListItemWidget, OO.ui.mixin.LabelElement );
+       OO.mixinClass( mw.rcfilters.ui.SavedLinksListItemWidget, OO.ui.mixin.IconElement );
+
+       /* Events */
+
+       /**
+        * @event delete
+        *
+        * The delete option was selected for this item
+        */
+
+       /**
+        * @event default
+        * @param {boolean} default Item is default
+        *
+        * The 'make default' option was selected for this item
+        */
+
+       /**
+        * @event edit
+        * @param {string} newLabel New label for the query
+        *
+        * The label has been edited
+        */
+
+       /* Methods */
+
+       /**
+        * Respond to model update event
+        */
+       mw.rcfilters.ui.SavedLinksListItemWidget.prototype.onModelUpdate = function () {
+               this.setLabel( this.model.getLabel() );
+               this.toggleDefault( this.model.isDefault() );
+       };
+
+       /**
+        * Respond to click on the element or label
+        *
+        * @fires click
+        */
+       mw.rcfilters.ui.SavedLinksListItemWidget.prototype.onClick = function () {
+               if ( !this.editing ) {
+                       this.emit( 'click' );
+               }
+       };
+       /**
+        * Respond to popup button click event
+        */
+       mw.rcfilters.ui.SavedLinksListItemWidget.prototype.onPopupButtonClick = function () {
+               this.menu.toggle();
+       };
+
+       /**
+        * Respond to menu choose event
+        *
+        * @param {OO.ui.MenuOptionWidget} item Chosen item
+        * @fires delete
+        * @fires default
+        */
+       mw.rcfilters.ui.SavedLinksListItemWidget.prototype.onMenuChoose = function ( item ) {
+               var action = item.getData();
+
+               if ( action === 'edit' ) {
+                       this.toggleEdit( true );
+               } else if ( action === 'delete' ) {
+                       this.emit( 'delete' );
+               } else if ( action === 'default' ) {
+                       this.emit( 'default', !this.default );
+               }
+               // Reset selected
+               this.menu.selectItem( null );
+               // Close the menu
+               this.menu.toggle( false );
+       };
+
+       /**
+        * Respond to save button click
+        */
+       mw.rcfilters.ui.SavedLinksListItemWidget.prototype.onSaveButtonClick = function () {
+               this.emit( 'edit', this.editInput.getValue() );
+               this.toggleEdit( false );
+       };
+
+       /**
+        * Respond to input enter event
+        */
+       mw.rcfilters.ui.SavedLinksListItemWidget.prototype.onEditInputEnter = function () {
+               this.emit( 'edit', this.editInput.getValue() );
+               this.toggleEdit( false );
+       };
+
+       /**
+        * Respond to input keyup event, this is the way to intercept 'escape' key
+        *
+        * @param {jQuery.Event} e Event data
+        * @returns {boolean} false
+        */
+       mw.rcfilters.ui.SavedLinksListItemWidget.prototype.onInputKeyup = function ( e ) {
+               if ( e.which === OO.ui.Keys.ESCAPE ) {
+                       // Return the input to the original label
+                       this.editInput.setValue( this.getLabel() );
+                       this.toggleEdit( false );
+                       return false;
+               }
+       };
+
+       /**
+        * Respond to blur event on the input
+        */
+       mw.rcfilters.ui.SavedLinksListItemWidget.prototype.onInputBlur = function () {
+               this.emit( 'edit', this.editInput.getValue() );
+               this.toggleEdit( false );
+       };
+
+       /**
+        * Toggle edit mode on this widget
+        *
+        * @param {boolean} isEdit Widget is in edit mode
+        */
+       mw.rcfilters.ui.SavedLinksListItemWidget.prototype.toggleEdit = function ( isEdit ) {
+               isEdit = isEdit === undefined ? !this.editing : isEdit;
+
+               if ( this.editing !== isEdit ) {
+                       this.$element.toggleClass( 'mw-rcfilters-ui-savedLinksListItemWidget-edit', isEdit );
+                       this.editInput.setValue( this.getLabel() );
+
+                       this.editInput.toggle( isEdit );
+                       this.$label.toggleClass( 'oo-ui-element-hidden', isEdit );
+                       this.popupButton.toggle( !isEdit );
+                       this.saveButton.toggle( isEdit );
+
+                       if ( isEdit ) {
+                               this.editInput.$input.focus();
+                       }
+                       this.editing = isEdit;
+               }
+       };
+
+       /**
+        * Toggle default this widget
+        *
+        * @param {boolean} isDefault This item is default
+        */
+       mw.rcfilters.ui.SavedLinksListItemWidget.prototype.toggleDefault = function ( isDefault ) {
+               isDefault = isDefault === undefined ? !this.default : isDefault;
+
+               if ( this.default !== isDefault ) {
+                       this.default = isDefault;
+                       this.setIcon( this.default ? 'pushPin' : '' );
+                       this.menu.getItemFromData( 'default' ).setLabel(
+                               this.default ?
+                                       mw.msg( 'rcfilters-savedqueries-unsetdefault' ) :
+                                       mw.msg( 'rcfilters-savedqueries-setdefault' )
+                       );
+               }
+       };
+
+       /**
+        * Get item ID
+        *
+        * @returns {string} Query identifier
+        */
+       mw.rcfilters.ui.SavedLinksListItemWidget.prototype.getID = function () {
+               return this.model.getID();
+       };
+
+}( mediaWiki ) );
diff --git a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.SavedLinksListWidget.js b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.SavedLinksListWidget.js
new file mode 100644 (file)
index 0000000..9ae1d34
--- /dev/null
@@ -0,0 +1,137 @@
+( function ( mw ) {
+       /**
+        * Quick links widget
+        *
+        * @extends OO.ui.Widget
+        *
+        * @constructor
+        * @param {mw.rcfilters.Controller} controller Controller
+        * @param {mw.rcfilters.dm.SavedQueriesModel} model View model
+        * @param {Object} [config] Configuration object
+        * @cfg {jQuery} [$overlay] A jQuery object serving as overlay for popups
+        */
+       mw.rcfilters.ui.SavedLinksListWidget = function MwRcfiltersUiSavedLinksListWidget( controller, model, config ) {
+               config = config || {};
+
+               // Parent
+               mw.rcfilters.ui.SavedLinksListWidget.parent.call( this, config );
+
+               this.controller = controller;
+               this.model = model;
+               this.$overlay = config.$overlay || this.$element;
+
+               // The only reason we're using "ButtonGroupWidget" here is that
+               // straight-out "GroupWidget" is a mixin and cannot be initialized
+               // on its own, so we need something to be its widget.
+               this.menu = new OO.ui.ButtonGroupWidget( {
+                       classes: [ 'mw-rcfilters-ui-savedLinksListWidget-menu' ]
+               } );
+               this.button = new OO.ui.PopupButtonWidget( {
+                       classes: [ 'mw-rcfilters-ui-savedLinksListWidget-button' ],
+                       label: mw.msg( 'rcfilters-quickfilters' ),
+                       icon: 'unClip',
+                       $overlay: this.$overlay,
+                       popup: {
+                               width: 300,
+                               anchor: false,
+                               align: 'forwards',
+                               $autoCloseIgnore: this.$overlay,
+                               $content: this.menu.$element
+                       }
+               } );
+
+               this.menu.aggregate( {
+                       click: 'menuItemClick',
+                       'delete': 'menuItemDelete',
+                       'default': 'menuItemDefault',
+                       edit: 'menuItemEdit'
+               } );
+
+               // Events
+               this.model.connect( this, {
+                       add: 'onModelAddItem',
+                       remove: 'onModelRemoveItem'
+               } );
+               this.menu.connect( this, {
+                       menuItemClick: 'onMenuItemClick',
+                       menuItemDelete: 'onMenuItemRemove',
+                       menuItemDefault: 'onMenuItemDefault',
+                       menuItemEdit: 'onMenuItemEdit'
+               } );
+
+               this.button.toggle( !this.menu.isEmpty() );
+               // Initialize
+               this.$element
+                       .addClass( 'mw-rcfilters-ui-savedLinksListWidget' )
+                       .append( this.button.$element );
+       };
+
+       /* Initialization */
+       OO.inheritClass( mw.rcfilters.ui.SavedLinksListWidget, OO.ui.Widget );
+
+       /**
+        * Respond to menu item click event
+        *
+        * @param {mw.rcfilters.ui.SavedLinksListItemWidget} item Menu item
+        */
+       mw.rcfilters.ui.SavedLinksListWidget.prototype.onMenuItemClick = function ( item ) {
+               this.controller.applySavedQuery( item.getID() );
+               this.button.popup.toggle( false );
+       };
+
+       /**
+        * Respond to menu item remove event
+        *
+        * @param {mw.rcfilters.ui.SavedLinksListItemWidget} item Menu item
+        */
+       mw.rcfilters.ui.SavedLinksListWidget.prototype.onMenuItemRemove = function ( item ) {
+               this.controller.removeSavedQuery( item.getID() );
+               this.menu.removeItems( [ item ] );
+       };
+
+       /**
+        * Respond to menu item default event
+        *
+        * @param {mw.rcfilters.ui.SavedLinksListItemWidget} item Menu item
+        * @param {boolean} isDefault Item is default
+        */
+       mw.rcfilters.ui.SavedLinksListWidget.prototype.onMenuItemDefault = function ( item, isDefault ) {
+               this.controller.setDefaultSavedQuery( isDefault ? item.getID() : null );
+       };
+
+       /**
+        * Respond to menu item edit event
+        *
+        * @param {mw.rcfilters.ui.SavedLinksListItemWidget} item Menu item
+        * @param {string} newLabel New label
+        */
+       mw.rcfilters.ui.SavedLinksListWidget.prototype.onMenuItemEdit = function ( item, newLabel ) {
+               this.controller.renameSavedQuery( item.getID(), newLabel );
+       };
+
+       /**
+        * Respond to menu add item event
+        *
+        * @param {mw.rcfilters.ui.SavedLinksListItemWidget} item Menu item
+        */
+       mw.rcfilters.ui.SavedLinksListWidget.prototype.onModelAddItem = function ( item ) {
+               if ( this.menu.getItemFromData( item.getID() ) ) {
+                       return;
+               }
+
+               this.menu.addItems( [
+                       new mw.rcfilters.ui.SavedLinksListItemWidget( item, { $overlay: this.$overlay } )
+               ] );
+               this.button.toggle( !this.menu.isEmpty() );
+       };
+
+       /**
+        * Respond to menu remove item event
+        *
+        * @param {mw.rcfilters.ui.SavedLinksListItemWidget} item Menu item
+        */
+       mw.rcfilters.ui.SavedLinksListWidget.prototype.onModelRemoveItem = function ( item ) {
+               this.menu.removeItems( [ this.model.getItemByID( item.getID() ) ] );
+               this.button.toggle( !this.menu.isEmpty() );
+       };
+}( mediaWiki ) );
index f100411..f44b0d5 100644 (file)
@@ -747,6 +747,10 @@ class ParserTestRunner {
                $user = $context->getUser();
                $options = ParserOptions::newFromContext( $context );
 
+               if ( !isset( $opts['wrap'] ) ) {
+                       $options->setWrapOutputClass( false );
+               }
+
                if ( isset( $opts['tidy'] ) ) {
                        if ( !$this->tidySupport->isEnabled() ) {
                                $this->recorder->skipped( $test, 'tidy extension is not installed' );
index e12c136..6477356 100644 (file)
@@ -32,6 +32,7 @@
 # local         format section links in edit comment text as local links
 # notoc         disable table of contents
 # thumbsize=NNN set the default thumb size to NNNpx for this test
+# wrap          include the normal wrapper <div class="mw-parser-output"> (since 1.30)
 #
 # You can also set the following parser properties via test options:
 #  wgEnableUploads, wgAllowExternalImages, wgMaxTocLevel,
index 4e95a30..a4e3bb9 100644 (file)
@@ -26,6 +26,7 @@ class ExtraParserTest extends MediaWikiTestCase {
                // FIXME: This test should pass without setting global content language
                $this->options = ParserOptions::newFromUserAndLang( new User, $contLang );
                $this->options->setTemplateCallback( [ __CLASS__, 'statelessFetchTemplate' ] );
+               $this->options->setWrapOutputClass( false );
                $this->parser = new Parser;
 
                MagicWord::clearCache();
@@ -40,6 +41,7 @@ class ExtraParserTest extends MediaWikiTestCase {
 
                $title = Title::newFromText( 'Unit test' );
                $options = ParserOptions::newFromUser( new User() );
+               $options->setWrapOutputClass( false );
                $this->assertEquals( "<p>$longLine</p>",
                        $this->parser->parse( $longLine, $title, $options )->getText() );
        }
index 4c69d87..b9ce997 100644 (file)
@@ -29,7 +29,7 @@ more stuff
                                "WikitextContentTest_testGetParserOutput",
                                CONTENT_MODEL_WIKITEXT,
                                "hello ''world''\n",
-                               "<p>hello <i>world</i>\n</p>"
+                               "<div class=\"mw-parser-output\"><p>hello <i>world</i>\n</p>\n\n\n</div>"
                        ],
                        // TODO: more...?
                ];
index 6b911bf..556a348 100644 (file)
@@ -549,7 +549,11 @@ class WikiPageTest extends MediaWikiLangTestCase {
 
        public static function provideGetParserOutput() {
                return [
-                       [ CONTENT_MODEL_WIKITEXT, "hello ''world''\n", "<p>hello <i>world</i></p>" ],
+                       [
+                               CONTENT_MODEL_WIKITEXT,
+                               "hello ''world''\n",
+                               "<div class=\"mw-parser-output\"><p>hello <i>world</i></p></div>"
+                       ],
                        // @todo more...?
                ];
        }
@@ -566,7 +570,7 @@ class WikiPageTest extends MediaWikiLangTestCase {
                $text = $po->getText();
 
                $text = trim( preg_replace( '/<!--.*?-->/sm', '', $text ) ); # strip injected comments
-               $text = preg_replace( '!\s*(</p>)!sm', '\1', $text ); # don't let tidy confuse us
+               $text = preg_replace( '!\s*(</p>|</div>)!sm', '\1', $text ); # don't let tidy confuse us
 
                $this->assertEquals( $expectedHtml, $text );
 
index 12936ee..06fe272 100644 (file)
@@ -43,18 +43,25 @@ class TagHookTest extends MediaWikiTestCase {
                return [ [ "foo<bar" ], [ "foo>bar" ], [ "foo\nbar" ], [ "foo\rbar" ] ];
        }
 
+       private function getParserOptions() {
+               global $wgContLang;
+               $popt = ParserOptions::newFromUserAndLang( new User, $wgContLang );
+               $popt->setWrapOutputClass( false );
+               return $popt;
+       }
+
        /**
         * @dataProvider provideValidNames
         */
        public function testTagHooks( $tag ) {
-               global $wgParserConf, $wgContLang;
+               global $wgParserConf;
                $parser = new Parser( $wgParserConf );
 
                $parser->setHook( $tag, [ $this, 'tagCallback' ] );
                $parserOutput = $parser->parse(
                        "Foo<$tag>Bar</$tag>Baz",
                        Title::newFromText( 'Test' ),
-                       ParserOptions::newFromUserAndLang( new User, $wgContLang )
+                       $this->getParserOptions()
                );
                $this->assertEquals( "<p>FooOneBaz\n</p>", $parserOutput->getText() );
 
@@ -66,14 +73,14 @@ class TagHookTest extends MediaWikiTestCase {
         * @expectedException MWException
         */
        public function testBadTagHooks( $tag ) {
-               global $wgParserConf, $wgContLang;
+               global $wgParserConf;
                $parser = new Parser( $wgParserConf );
 
                $parser->setHook( $tag, [ $this, 'tagCallback' ] );
                $parser->parse(
                        "Foo<$tag>Bar</$tag>Baz",
                        Title::newFromText( 'Test' ),
-                       ParserOptions::newFromUserAndLang( new User, $wgContLang )
+                       $this->getParserOptions()
                );
                $this->fail( 'Exception not thrown.' );
        }
@@ -82,14 +89,14 @@ class TagHookTest extends MediaWikiTestCase {
         * @dataProvider provideValidNames
         */
        public function testFunctionTagHooks( $tag ) {
-               global $wgParserConf, $wgContLang;
+               global $wgParserConf;
                $parser = new Parser( $wgParserConf );
 
                $parser->setFunctionTagHook( $tag, [ $this, 'functionTagCallback' ], 0 );
                $parserOutput = $parser->parse(
                        "Foo<$tag>Bar</$tag>Baz",
                        Title::newFromText( 'Test' ),
-                       ParserOptions::newFromUserAndLang( new User, $wgContLang )
+                       $this->getParserOptions()
                );
                $this->assertEquals( "<p>FooOneBaz\n</p>", $parserOutput->getText() );
 
@@ -101,7 +108,7 @@ class TagHookTest extends MediaWikiTestCase {
         * @expectedException MWException
         */
        public function testBadFunctionTagHooks( $tag ) {
-               global $wgParserConf, $wgContLang;
+               global $wgParserConf;
                $parser = new Parser( $wgParserConf );
 
                $parser->setFunctionTagHook(
@@ -112,7 +119,7 @@ class TagHookTest extends MediaWikiTestCase {
                $parser->parse(
                        "Foo<$tag>Bar</$tag>Baz",
                        Title::newFromText( 'Test' ),
-                       ParserOptions::newFromUserAndLang( new User, $wgContLang )
+                       $this->getParserOptions()
                );
                $this->fail( 'Exception not thrown.' );
        }
index 8071d6e..bc266fb 100644 (file)
                );
        } );
 
-       QUnit.test( 'setFiltersToDefaults', function ( assert ) {
-               var definition = [ {
-                               name: 'group1',
-                               title: 'Group 1',
-                               type: 'send_unselected_if_any',
-                               filters: [
-                                       {
-                                               name: 'hidefilter1',
-                                               label: 'Show filter 1',
-                                               description: 'Description of Filter 1 in Group 1',
-                                               default: true
-                                       },
-                                       {
-                                               name: 'hidefilter2',
-                                               label: 'Show filter 2',
-                                               description: 'Description of Filter 2 in Group 1'
-                                       },
-                                       {
-                                               name: 'hidefilter3',
-                                               label: 'Show filter 3',
-                                               description: 'Description of Filter 3 in Group 1',
-                                               default: true
-                                       }
-                               ]
-                       }, {
-                               name: 'group2',
-                               title: 'Group 2',
-                               type: 'send_unselected_if_any',
-                               filters: [
-                                       {
-                                               name: 'hidefilter4',
-                                               label: 'Show filter 4',
-                                               description: 'Description of Filter 1 in Group 2'
-                                       },
-                                       {
-                                               name: 'hidefilter5',
-                                               label: 'Show filter 5',
-                                               description: 'Description of Filter 2 in Group 2',
-                                               default: true
-                                       },
-                                       {
-                                               name: 'hidefilter6',
-                                               label: 'Show filter 6',
-                                               description: 'Description of Filter 3 in Group 2'
-                                       }
-                               ]
-                       } ],
-                       defaultFilterRepresentation = {
-                               // Group 1 and 2, "send_unselected_if_any", the values of the filters are "flipped" from the values of the parameters
-                               group1__hidefilter1: false,
-                               group1__hidefilter2: true,
-                               group1__hidefilter3: false,
-                               group2__hidefilter4: true,
-                               group2__hidefilter5: false,
-                               group2__hidefilter6: true
-                       },
-                       model = new mw.rcfilters.dm.FiltersViewModel();
-
-               model.initializeFilters( definition );
-
-               assert.deepEqual(
-                       model.getSelectedState(),
-                       {
-                               group1__hidefilter1: false,
-                               group1__hidefilter2: false,
-                               group1__hidefilter3: false,
-                               group2__hidefilter4: false,
-                               group2__hidefilter5: false,
-                               group2__hidefilter6: false
-                       },
-                       'Initial state: default filters are not selected (controller selects defaults explicitly).'
-               );
-
-               model.toggleFiltersSelected( {
-                       group1__hidefilter1: false,
-                       group1__hidefilter3: false
-               } );
-
-               model.setFiltersToDefaults();
-
-               assert.deepEqual(
-                       model.getSelectedState(),
-                       defaultFilterRepresentation,
-                       'Changing values of filters and then returning to defaults still results in default filters being selected.'
-               );
-       } );
-
        QUnit.test( 'Filter interaction: subsets', function ( assert ) {
                var definition = [ {
                                name: 'group1',