* @file
* @ingroup Ajax
*/
+use MediaWiki\MediaWikiServices;
/**
* Handle responses for Ajax requests (send headers, print
function __construct( $text = null, Config $config = null ) {
$this->mCacheDuration = null;
$this->mVary = null;
- $this->mConfig = $config ?: ConfigFactory::getDefaultInstance()->makeConfig( 'main' );
+ $this->mConfig = $config ?: MediaWikiServices::getInstance()->getMainConfig();
$this->mDisabled = false;
$this->mText = '';
'contentmodel/change' => 'ContentModelLogFormatter',
'contentmodel/new' => 'ContentModelLogFormatter',
'delete/delete' => 'DeleteLogFormatter',
+ 'delete/delete_redir' => 'DeleteLogFormatter',
'delete/event' => 'DeleteLogFormatter',
'delete/restore' => 'DeleteLogFormatter',
'delete/revision' => 'DeleteLogFormatter',
],
'delete' => [
'delete' => [ 'delete' ],
+ 'delete_redir' => [ 'delete_redir' ],
'restore' => [ 'restore' ],
'event' => [ 'event' ],
'revision' => [ 'revision' ],
*/
public function useDatabase( $useDatabase ) {
$this->useDatabase = (bool)$useDatabase;
+ $this->message = null;
return $this;
}
return [ 'before', '[INVALID]' ];
}
} elseif ( $param instanceof Message ) {
+ // Match language, flags, etc. to the current message.
+ $msg = clone $param;
+ if ( $msg->language !== $this->language || $msg->useDatabase !== $this->useDatabase ) {
+ // Cache depends on these parameters
+ $msg->message = null;
+ }
+ $msg->interface = $this->interface;
+ $msg->language = $this->language;
+ $msg->useDatabase = $this->useDatabase;
+ $msg->title = $this->title;
+
+ // DWIM
+ if ( $format === 'block-parse' ) {
+ $format = 'parse';
+ }
+ $msg->format = $format;
+
// Message objects should not be before parameters because
// then they'll get double escaped. If the message needs to be
// escaped, it'll happen right here when we call toString().
- return [ 'after', $param->toString( $format ) ];
+ return [ 'after', $msg->toString( $format ) ];
} else {
return [ 'before', $param ];
}
* @file
*/
use MediaWiki\MediaWikiServices;
-use MediaWiki\Logger\LoggerFactory;
+use Wikimedia\Assert\Assert;
+/**
+ * @deprecated since 1.29
+ * MimeAnalyzer should be used instead of MimeMagic
+ */
class MimeMagic extends MimeAnalyzer {
/**
* Get an instance of this class
* @return MimeMagic
- * @deprecated since 1.28
+ * @deprecated since 1.28 get a MimeAnalyzer instance form MediaWikiServices
*/
public static function singleton() {
- return MediaWikiServices::getInstance()->getMimeAnalyzer();
- }
-
- /**
- * @param array $params
- * @param Config $mainConfig
- * @return array
- */
- public static function applyDefaultParameters( array $params, Config $mainConfig ) {
- $logger = LoggerFactory::getInstance( 'Mime' );
- $params += [
- 'typeFile' => $mainConfig->get( 'MimeTypeFile' ),
- 'infoFile' => $mainConfig->get( 'MimeInfoFile' ),
- 'xmlTypes' => $mainConfig->get( 'XMLMimeTypes' ),
- 'guessCallback' =>
- function ( $mimeAnalyzer, &$head, &$tail, $file, &$mime ) use ( $logger ) {
- // Also test DjVu
- $deja = new DjVuImage( $file );
- if ( $deja->isValid() ) {
- $logger->info( __METHOD__ . ": detected $file as image/vnd.djvu\n" );
- $mime = 'image/vnd.djvu';
-
- return;
- }
- // Some strings by reference for performance - assuming well-behaved hooks
- Hooks::run(
- 'MimeMagicGuessFromContent',
- [ $mimeAnalyzer, &$head, &$tail, $file, &$mime ]
- );
- },
- 'extCallback' => function ( $mimeAnalyzer, $ext, &$mime ) {
- // Media handling extensions can improve the MIME detected
- Hooks::run( 'MimeMagicImproveFromExtension', [ $mimeAnalyzer, $ext, &$mime ] );
- },
- 'initCallback' => function ( $mimeAnalyzer ) {
- // Allow media handling extensions adding MIME-types and MIME-info
- Hooks::run( 'MimeMagicInit', [ $mimeAnalyzer ] );
- },
- 'logger' => $logger
- ];
-
- if ( $params['infoFile'] === 'includes/mime.info' ) {
- $params['infoFile'] = __DIR__ . "/libs/mime/mime.info";
- }
-
- if ( $params['typeFile'] === 'includes/mime.types' ) {
- $params['typeFile'] = __DIR__ . "/libs/mime/mime.types";
- }
-
- $detectorCmd = $mainConfig->get( 'MimeDetectorCommand' );
- if ( $detectorCmd ) {
- $params['detectCallback'] = function ( $file ) use ( $detectorCmd ) {
- return wfShellExec( "$detectorCmd " . wfEscapeShellArg( $file ) );
- };
- }
-
- return $params;
+ // XXX: We know that the MimeAnalyzer is currently an instance of MimeMagic
+ $instance = MediaWikiServices::getInstance()->getMimeAnalyzer();
+ Assert::postcondition(
+ $instance instanceof MimeMagic,
+ __METHOD__ . ' should return an instance of ' . MimeMagic::class
+ );
+ return $instance;
}
}
$nt->getArticleID(),
/* $commit */ false,
$errs,
- $user
+ $user,
+ [],
+ 'delete_redir'
);
if ( !$status->isGood() ) {
protected $mCategoryLinks = [];
/** @var array */
- protected $mCategories = [];
+ protected $mCategories = [
+ 'hidden' => [],
+ 'normal' => [],
+ ];
/** @var array */
protected $mIndicators = [];
return;
}
- # Add the links to a LinkBatch
- $arr = [ NS_CATEGORY => $categories ];
- $lb = new LinkBatch;
- $lb->setArray( $arr );
-
- # Fetch existence plus the hiddencat property
- $dbr = wfGetDB( DB_REPLICA );
- $fields = array_merge(
- LinkCache::getSelectFields(),
- [ 'page_namespace', 'page_title', 'pp_value' ]
- );
-
- $res = $dbr->select( [ 'page', 'page_props' ],
- $fields,
- $lb->constructSet( 'page', $dbr ),
- __METHOD__,
- [],
- [ 'page_props' => [ 'LEFT JOIN', [
- 'pp_propname' => 'hiddencat',
- 'pp_page = page_id'
- ] ] ]
- );
-
- # Add the results to the link cache
- $lb->addResultToCache( LinkCache::singleton(), $res );
+ $res = $this->addCategoryLinksToLBAndGetResult( $categories );
# Set all the values to 'normal'.
$categories = array_fill_keys( array_keys( $categories ), 'normal' );
continue;
}
$text = $wgContLang->convertHtml( $title->getText() );
- $this->mCategories[] = $title->getText();
+ $this->mCategories[$type][] = $title->getText();
$this->mCategoryLinks[$type][] = Linker::link( $title, $text );
}
}
}
+ /**
+ * @param array $categories
+ * @return bool|ResultWrapper
+ */
+ protected function addCategoryLinksToLBAndGetResult( array $categories ) {
+ # Add the links to a LinkBatch
+ $arr = [ NS_CATEGORY => $categories ];
+ $lb = new LinkBatch;
+ $lb->setArray( $arr );
+
+ # Fetch existence plus the hiddencat property
+ $dbr = wfGetDB( DB_REPLICA );
+ $fields = array_merge(
+ LinkCache::getSelectFields(),
+ [ 'page_namespace', 'page_title', 'pp_value' ]
+ );
+
+ $res = $dbr->select( [ 'page', 'page_props' ],
+ $fields,
+ $lb->constructSet( 'page', $dbr ),
+ __METHOD__,
+ [],
+ [ 'page_props' => [ 'LEFT JOIN', [
+ 'pp_propname' => 'hiddencat',
+ 'pp_page = page_id'
+ ] ] ]
+ );
+
+ # Add the results to the link cache
+ $lb->addResultToCache( LinkCache::singleton(), $res );
+
+ return $res;
+ }
+
/**
* Reset the category links (but not the category list) and add $categories
*
}
/**
- * Get the list of category names this page belongs to
+ * Get the list of category names this page belongs to.
*
+ * @param string $type The type of categories which should be returned. Possible values:
+ * * all: all categories of all types
+ * * hidden: only the hidden categories
+ * * normal: all categories, except hidden categories
* @return array Array of strings
*/
- public function getCategories() {
- return $this->mCategories;
+ public function getCategories( $type = 'all' ) {
+ if ( $type === 'all' ) {
+ $allCategories = [];
+ foreach ( $this->mCategories as $categories ) {
+ $allCategories = array_merge( $allCategories, $categories );
+ }
+ return $allCategories;
+ }
+ if ( !isset( $this->mCategories[$type] ) ) {
+ throw new InvalidArgumentException( 'Invalid category type given: ' . $type );
+ }
+ return $this->mCategories[$type];
}
/**
},
'MimeAnalyzer' => function( MediaWikiServices $services ) {
- return new MimeMagic(
- MimeMagic::applyDefaultParameters(
- [],
- $services->getMainConfig()
- )
- );
+ $logger = LoggerFactory::getInstance( 'Mime' );
+ $mainConfig = $services->getMainConfig();
+ $params = [
+ 'typeFile' => $mainConfig->get( 'MimeTypeFile' ),
+ 'infoFile' => $mainConfig->get( 'MimeInfoFile' ),
+ 'xmlTypes' => $mainConfig->get( 'XMLMimeTypes' ),
+ 'guessCallback' =>
+ function ( $mimeAnalyzer, &$head, &$tail, $file, &$mime ) use ( $logger ) {
+ // Also test DjVu
+ $deja = new DjVuImage( $file );
+ if ( $deja->isValid() ) {
+ $logger->info( __METHOD__ . ": detected $file as image/vnd.djvu\n" );
+ $mime = 'image/vnd.djvu';
+
+ return;
+ }
+ // Some strings by reference for performance - assuming well-behaved hooks
+ Hooks::run(
+ 'MimeMagicGuessFromContent',
+ [ $mimeAnalyzer, &$head, &$tail, $file, &$mime ]
+ );
+ },
+ 'extCallback' => function ( $mimeAnalyzer, $ext, &$mime ) {
+ // Media handling extensions can improve the MIME detected
+ Hooks::run( 'MimeMagicImproveFromExtension', [ $mimeAnalyzer, $ext, &$mime ] );
+ },
+ 'initCallback' => function ( $mimeAnalyzer ) {
+ // Allow media handling extensions adding MIME-types and MIME-info
+ Hooks::run( 'MimeMagicInit', [ $mimeAnalyzer ] );
+ },
+ 'logger' => $logger
+ ];
+
+ if ( $params['infoFile'] === 'includes/mime.info' ) {
+ $params['infoFile'] = __DIR__ . "/libs/mime/mime.info";
+ }
+
+ if ( $params['typeFile'] === 'includes/mime.types' ) {
+ $params['typeFile'] = __DIR__ . "/libs/mime/mime.types";
+ }
+
+ $detectorCmd = $mainConfig->get( 'MimeDetectorCommand' );
+ if ( $detectorCmd ) {
+ $params['detectCallback'] = function ( $file ) use ( $detectorCmd ) {
+ return wfShellExec( "$detectorCmd " . wfEscapeShellArg( $file ) );
+ };
+ }
+
+ // XXX: MimeMagic::singleton currently requires this service to return an instance of MimeMagic
+ return new MimeMagic( $params );
},
'ProxyLookup' => function( MediaWikiServices $services ) {
<?php
+use MediaWiki\MediaWikiServices;
+
/**
* Handles compiling Mustache templates into PHP rendering functions
*
$fastHash = md5( $fileContents );
// Fetch a secret key for building a keyed hash of the PHP code
- $config = ConfigFactory::getDefaultInstance()->makeConfig( 'main' );
+ $config = MediaWikiServices::getInstance()->getMainConfig();
$secretKey = $config->get( 'SecretKey' );
if ( $secretKey ) {
"api-help-param-upload": "Muss als Dateiupload mithilfe eines multipart/form-data-Formular bereitgestellt werden.",
"api-help-param-multi-separate": "Werte mit <kbd>|</kbd> trennen oder [[Special:ApiHelp/main#main/datatypes|Alternative]].",
"api-help-param-multi-max": "Maximale Anzahl der Werte ist {{PLURAL:$1|$1}} ({{PLURAL:$2|$2}} für Bots).",
+ "api-help-param-multi-all": "Um alle Werte anzugeben, verwende <kbd>$1</kbd>.",
"api-help-param-default": "Standard: $1",
"api-help-param-default-empty": "Standard: <span class=\"apihelp-empty\">(leer)</span>",
"api-help-param-token": "Ein „$1“-Token abgerufen von [[Special:ApiHelp/query+tokens|action=query&meta=tokens]]",
"apihelp-resetpassword-description-noroutes": "Aucun chemin pour réinitialiser le mot de passe n’est disponible.\n\nActiver les chemins dans <var>[[mw:Manual:$wgPasswordResetRoutes|$wgPasswordResetRoutes]]</var> pour utiliser ce module.",
"apihelp-resetpassword-param-user": "Utilisateur ayant été réinitialisé.",
"apihelp-resetpassword-param-email": "Adresse courriel de l’utilisateur ayant été réinitialisé.",
- "apihelp-resetpassword-param-capture": "Renvoyer les mots de passe temporaires déjà envoyés. Nécessite le droit utilisateur <code>passwordreset</code>.",
"apihelp-resetpassword-example-user": "Envoyer un courriel de réinitialisation du mot de passe à l’utilisateur <kbd>Exemple</kbd>.",
"apihelp-resetpassword-example-email": "Envoyer un courriel pour la réinitialisation de mot de passe à tous les utilisateurs avec une adresse email <kbd>user@example.com</kbd>.",
"apihelp-revisiondelete-description": "Supprimer et annuler la suppression des révisions.",
"api-help-param-upload": "Doit être envoyé comme un fichier importé utilisant multipart/form-data.",
"api-help-param-multi-separate": "Valeurs séparées par <kbd>|</kbd> ou [[Special:ApiHelp/main#main/datatypes|autre]].",
"api-help-param-multi-max": "Le nombre maximal de valeurs est {{PLURAL:$1|$1}} ({{PLURAL:$2|$2}} pour les robots).",
+ "api-help-param-multi-all": "Pour spécifier toutes les valeurs, utiliser <kbd>$1</kbd>.",
"api-help-param-default": "Par défaut : $1",
"api-help-param-default-empty": "Par défaut : <span class=\"apihelp-empty\">(vide)</span>",
"api-help-param-token": "Un jeton « $1 » récupéré par [[Special:ApiHelp/query+tokens|action=query&meta=tokens]]",
"apihelp-resetpassword-description-noroutes": "Non están dispoñibles as rutas de reinicio de contrasinal \n\nActive as rutas en <var>[[mw:Manual:$wgPasswordResetRoutes|$wgPasswordResetRoutes]]</var> para usar este módulo.",
"apihelp-resetpassword-param-user": "Usuario sendo reinicializado.",
"apihelp-resetpassword-param-email": "Está reinicializándose o enderezo de correo electrónico do usuario.",
- "apihelp-resetpassword-param-capture": "Devolve os contrasinais temporais que se enviaron. Require o dereito de usuario <code>passwordreset</code> .",
"apihelp-resetpassword-example-user": "Enviar un correo de reinicialización de contrasinal ó usuario <kbd>Exemplo</kbd>.",
"apihelp-resetpassword-example-email": "Enviar un correo de reinicialización de contrasinal a todos os usuarios con enderezo de correo electrónico <kbd>usario@exemplo.com</kbd>.",
"apihelp-revisiondelete-description": "Borrar e restaurar revisións.",
"api-help-param-upload": "Debe ser enviado como un ficheiro importado usando multipart/form-data.",
"api-help-param-multi-separate": "Separe os valores con <kbd>|</kbd> ou [[Special:ApiHelp/main#main/datatypes|outros]].",
"api-help-param-multi-max": "O número máximo de valores é {{PLURAL:$1|$1}} ({{PLURAL:$2|$2}} para os bots).",
+ "api-help-param-multi-all": "Para especificar tódolos valores use <kbd>$1</kbd>.",
"api-help-param-default": "Por defecto: $1",
"api-help-param-default-empty": "Por defecto: <span class=\"apihelp-empty\">(baleiro)</span>",
"api-help-param-token": "Un identificador \"$1\" recuperado por [[Special:ApiHelp/query+tokens|action=query&meta=tokens]]",
"apihelp-resetpassword-description-noroutes": "אין מסלולים לאיפוס ססמה.\n\nכדי להשתמש במודול הזה, יש להפעיל מסלולים ב־<var>[[mw:Manual:$wgPasswordResetRoutes|$wgPasswordResetRoutes]]</var>.",
"apihelp-resetpassword-param-user": "המשתמש שמאופס.",
"apihelp-resetpassword-param-email": "כתובת הדוא\"ל של המשתמש שהסיסמה שלו מאופסת.",
- "apihelp-resetpassword-param-capture": "החזרת הססמאות הזמניות שנשלחו. דורש את ההרשאה <code>passwordreset</code>.",
"apihelp-resetpassword-example-user": "שליחת מכתב איפוס ססמה למשתמש <kbd>Example</kbd>.",
"apihelp-resetpassword-example-email": "שליחת מכתב איפוס ססמה לכל המשתמשים שהכתובת שלהם היא <kbd>user@example.com</kbd>.",
"apihelp-revisiondelete-description": "מחיקה ושחזור ממחיקה של גרסאות.",
"api-help-param-upload": "חייב להישלח (posted) בתור העלאת קובץ באמצעות multipart/form-data.",
"api-help-param-multi-separate": "הפרדה בין ערכים נעשית באמצעות <kbd>|</kbd> או [[Special:ApiHelp/main#main/datatypes|תו חלופי]].",
"api-help-param-multi-max": "מספר הערכים המרבי הוא {{PLURAL:$1|$1}} (עבור בוטים – {{PLURAL:$2|$2}}).",
+ "api-help-param-multi-all": "כדי לתת את כל הערכים, יש להשתמש ב־<kbd>$1</kbd>.",
"api-help-param-default": "ברירת מחדל: $1",
"api-help-param-default-empty": "ברירת מחדל: <span class=\"apihelp-empty\">(ריק)</span>",
"api-help-param-token": "אסימון \"$1\" שאוחזר מ־[[Special:ApiHelp/query+tokens|action=query&meta=tokens]]",
"apihelp-resetpassword-description-noroutes": "Non sono disponibili rotte per la reimpostazione della password.\n\nAbilita le rotte in <var>[[mw:Manual:$wgPasswordResetRoutes|$wgPasswordResetRoutes]]</var> per usare questo modulo.",
"apihelp-resetpassword-param-user": "Utente in corso di ripristino.",
"apihelp-resetpassword-param-email": "Indirizzo di posta elettronica dell'utente in corso di ripristino.",
- "apihelp-resetpassword-param-capture": "Restituisce le password temporanee che erano state inviate. Richiede il diritto utente <code>passwordreset</code>.",
"apihelp-resetpassword-example-user": "Invia una mail per reimpostare la password all'utente <kbd>Example</kbd>.",
"apihelp-resetpassword-example-email": "Invia una mail per reimpostare la password a tutti gli utenti con indirizzo di posta elettronica <kbd>user@example.com</kbd>.",
"apihelp-revisiondelete-description": "Cancella e ripristina le versioni.",
"api-help-param-integer-minmax": "{{PLURAL:$1|1=Il valore deve essere compreso|2=I valori devono essere compresi}} tra $2 e $3.",
"api-help-param-multi-separate": "Separa i valori con <kbd>|</kbd> o [[Special:ApiHelp/main#main/datatypes|alternativa]].",
"api-help-param-multi-max": "Il numero massimo di valori è {{PLURAL:$1|$1}} ({{PLURAL:$2|$2}} per i bot).",
+ "api-help-param-multi-all": "Per specificare tutti i valori, utilizza <kbd>$1</kbd>.",
"api-help-param-default": "Predefinito: $1",
"api-help-param-default-empty": "Predefinito: <span class=\"apihelp-empty\">(vuoto)</span>",
"api-help-param-token": "Un token \"$1\" recuperato da [[Special:ApiHelp/query+tokens|action=query&meta=tokens]]",
"api-help-examples": "{{PLURAL:$1|예시}}:",
"api-help-permissions": "{{PLURAL:$1|권한}}:",
"api-help-permissions-granted-to": "{{PLURAL:$1|다음 그룹에 부여됨}}: $2",
+ "api-help-right-apihighlimits": "API 쿼리에서 더 높은 제한 사용 (느린 쿼리: $1, 빠른 쿼리: $2) 느린 쿼리에 대한 제한은 다중값 매개변수에도 적용됩니다.",
"api-help-open-in-apisandbox": "<small>[연습장에서 열기]</small>",
"api-help-authmanagerhelper-messageformat": "반환 메시지에 사용할 형식.",
"api-credits": "API 개발자:\n* Roan Kattouw (선임 개발자, 2007년 9월–2009년)\n* Victor Vasiliev\n* Bryan Tong Minh\n* Sam Reed\n* Yuri Astrakhan (초기 개발자, 선임 개발자 2006년 9월~2007년 9월)\n* Brad Jorsch (선임 개발자 2013년–현재)\n\n당신의 의견이나 제안, 질문은 mediawiki-api@lists.wikimedia.org 로 보내주시거나,\nhttps://phabricator.wikimedia.org/ 에 버그 보고를 해 주시기 바랍니다."
"api-help-param-integer-minmax": "{{PLURAL:$1|1=Wartość musi|2=Wartości muszą}} być pomiędzy $2 a $3.",
"api-help-param-multi-separate": "Oddziel wartości za pomocą <kbd>|</kbd> lub [[Special:ApiHelp/main#main/datatypes|alternatywy]].",
"api-help-param-multi-max": "Maksymalna liczba wartości to {{PLURAL:$1|$1}} ({{PLURAL:$2|$2}} dla botów).",
+ "api-help-param-multi-all": "Aby wskazać wszystkie wartości, użyj <kbd>$1</kbd>.",
"api-help-param-default": "Domyślnie: $1",
"api-help-param-default-empty": "Domyślnie: <span class=\"apihelp-empty\">(puste)</span>",
"api-help-param-token": "Token \"$1\" zdobyty z [[Special:ApiHelp/query+tokens|action=query&meta=tokens]]",
"apihelp-resetpassword-description-noroutes": "Não estão disponíveis rotas de reinício da palavra-passe.\n\nPara usar este módulo, ative uma rota em <var>[[mw:Manual:$wgPasswordResetRoutes|$wgPasswordResetRoutes]]</var>.",
"apihelp-resetpassword-param-user": "O utilizar cuja palavra-passe será reiniciada.",
"apihelp-resetpassword-param-email": "O correio eletrónico do utilizador cuja palavra-passe será reiniciada.",
- "apihelp-resetpassword-param-capture": "Devolver as palavras-passe temporárias que foram enviadas. Requer a permissão <code>passwordreset</code>.",
"apihelp-resetpassword-example-user": "Enviar uma mensagem eletrónica para reinício da palavra-passe ao utilizador <kbd>Example</kbd>.",
"apihelp-resetpassword-example-email": "Enviar uma mensagem eletrónica para reinício da palavra-passe a todos os utilizadores com o correio eletrónico <kbd>user@example.com</kbd>.",
"apihelp-revisiondelete-description": "Eliminar e restaurar revisões.",
"api-help-param-upload": "Tem ser enviado (''posted'') como um carregamento de ficheiro usando multipart/form-data.",
"api-help-param-multi-separate": "Separar os valores com <kbd>|</kbd> ou [[Special:ApiHelp/main#main/datatypes|alternativas]].",
"api-help-param-multi-max": "O número máximo de valores é {{PLURAL:$1|$1}} ({{PLURAL:$2|$2}} para robôs).",
+ "api-help-param-multi-all": "Para especificar todos os valores, use <kbd>$1</kbd>.",
"api-help-param-default": "Valor por omissão: $1",
"api-help-param-default-empty": "Padrão: <span class=\"apihelp-empty\">(vazio)</span>",
"api-help-param-token": "Uma chave \"$1\" obtida de [[Special:ApiHelp/query+tokens|action=query&meta=tokens]]",
"api-help-param-upload": "必须被公布为使用multipart/form-data的一次文件上传。",
"api-help-param-multi-separate": "通过<kbd>|</kbd>或[[Special:ApiHelp/main#main/datatypes|替代物]]隔开各值。",
"api-help-param-multi-max": "值的最大数量是{{PLURAL:$1|$1}}(对于机器人则是{{PLURAL:$2|$2}})。",
+ "api-help-param-multi-all": "要指定所有值,请使用<kbd>$1</kbd>。",
"api-help-param-default": "默认:$1",
"api-help-param-default-empty": "默认:<span class=\"apihelp-empty\">(空)</span>",
"api-help-param-token": "从[[Special:ApiHelp/query+tokens|action=query&meta=tokens]]取回的“$1”令牌",
namespace MediaWiki\Auth;
use Config;
+use MediaWiki\MediaWikiServices;
use Psr\Log\LoggerAwareInterface;
use Psr\Log\LoggerInterface;
use Status;
if ( self::$instance === null ) {
self::$instance = new self(
\RequestContext::getMain()->getRequest(),
- \ConfigFactory::getDefaultInstance()->makeConfig( 'main' )
+ MediaWikiServices::getInstance()->getMainConfig()
);
}
return self::$instance;
* - optional: (bool) If set and truthy, the field may be left empty
* - sensitive: (bool) If set and truthy, the field is considered sensitive. Code using the
* request should avoid exposing the value of the field.
+ * - skippable: (bool) If set and truthy, the client is free to hide this
+ * field from the user to streamline the workflow. If all fields are
+ * skippable (except possibly a single button), no user interaction is
+ * required at all.
*
* All AuthenticationRequests are populated from the same data, so most of the time you'll
* want to prefix fields names with something unique to the extension/provider (although
'label' => wfMessage( 'userlogin-remembermypassword' )->numParams( $expirationDays ),
'help' => wfMessage( 'authmanager-userlogin-remembermypassword-help' ),
'optional' => true,
+ 'skippable' => true,
]
];
}
namespace MediaWiki\Auth;
+use MediaWiki\MediaWikiServices;
+
/**
* This represents the intention to set a temporary password for the user.
* @ingroup Auth
* @return TemporaryPasswordAuthenticationRequest
*/
public static function newRandom() {
- $config = \ConfigFactory::getDefaultInstance()->makeConfig( 'main' );
+ $config = MediaWikiServices::getInstance()->getMainConfig();
// get the min password length
$minLength = $config->get( 'MinimalPasswordLength' );
use BagOStuff;
use MediaWiki\Logger\LoggerFactory;
+use MediaWiki\MediaWikiServices;
use Psr\Log\LoggerAwareInterface;
use Psr\Log\LoggerInterface;
use Psr\Log\LogLevel;
}
if ( $conditions === null ) {
- $config = \ConfigFactory::getDefaultInstance()->makeConfig( 'main' );
+ $config = MediaWikiServices::getInstance()->getMainConfig();
$conditions = $config->get( 'PasswordAttemptThrottle' );
$params += [
'type' => 'password',
namespace MediaWiki\Auth;
+use MediaWiki\MediaWikiServices;
use StatusValue;
use User;
public $realname;
public function getFieldInfo() {
- $config = \ConfigFactory::getDefaultInstance()->makeConfig( 'main' );
+ $config = MediaWikiServices::getInstance()->getMainConfig();
$ret = [
'email' => [
'type' => 'string',
# # Get pageStatus for email notification
switch ( $type . '-' . $action ) {
case 'delete-delete':
+ case 'delete-delete_redir':
$pageStatus = 'deleted';
break;
case 'move-move':
if ( $this->config === null ) {
// @todo In the future, we could move this to WebStart.php so
// the Config object is ready for when initialization happens
- $this->config = ConfigFactory::getDefaultInstance()->makeConfig( 'main' );
+ $this->config = MediaWikiServices::getInstance()->getMainConfig();
}
return $this->config;
*/
public function trySubmit() {
$valid = true;
- $hoistedErrors = [];
- $hoistedErrors[] = isset( $this->mValidationErrorMessage )
- ? $this->mValidationErrorMessage
- : [ 'htmlform-invalid-input' ];
+ $hoistedErrors = Status::newGood();
+ if ( $this->mValidationErrorMessage ) {
+ foreach ( (array)$this->mValidationErrorMessage as $error ) {
+ call_user_func_array( [ $hoistedErrors, 'fatal' ], $error );
+ }
+ } else {
+ $hoistedErrors->fatal( 'htmlform-invalid-input' );
+ }
$this->mWasSubmitted = true;
if ( $res !== true ) {
$valid = false;
if ( $res !== false && !$field->canDisplayErrors() ) {
- $hoistedErrors[] = [ 'rawmessage', $res ];
+ if ( is_string( $res ) ) {
+ $hoistedErrors->fatal( 'rawmessage', $res );
+ } else {
+ $hoistedErrors->fatal( $res );
+ }
}
}
}
if ( !$valid ) {
- if ( count( $hoistedErrors ) === 1 ) {
- $hoistedErrors = $hoistedErrors[0];
- }
return $hoistedErrors;
}
* @param string|array $value The value the field was submitted with
* @param array $alldata The data collected from the form
*
- * @return bool|string True on success, or String error to display, or
+ * @return bool|string|Message True on success, or String/Message error to display, or
* false to fail validation without displaying an error.
*/
public function validate( $value, $alldata ) {
&& $this->mParams['required'] !== false
&& $value === ''
) {
- return $this->msg( 'htmlform-required' )->parse();
+ return $this->msg( 'htmlform-required' );
}
if ( isset( $this->mValidationCallback ) ) {
} elseif ( in_array( strval( $value ), $this->autocompleteData, true ) ) {
return true;
} elseif ( $this->mParams['require-match'] ) {
- return $this->msg( 'htmlform-select-badoption' )->parse();
+ return $this->msg( 'htmlform-select-badoption' );
}
return true;
* @param string $value
* @param array $alldata
*
- * @return bool
+ * @return bool|string|Message
*/
public function validate( $value, $alldata ) {
return true;
if ( count( $validValues ) == count( $value ) ) {
return true;
} else {
- return $this->msg( 'htmlform-select-badoption' )->parse();
+ return $this->msg( 'htmlform-select-badoption' );
}
}
$date = $this->parseDate( $value );
if ( !$date ) {
// Messages: htmlform-date-invalid htmlform-time-invalid htmlform-datetime-invalid
- return $this->msg( "htmlform-{$this->mType}-invalid" )->parseAsBlock();
+ return $this->msg( "htmlform-{$this->mType}-invalid" );
}
if ( isset( $this->mParams['min'] ) ) {
$min = $this->parseDate( $this->mParams['min'] );
if ( $min && $date < $min ) {
// Messages: htmlform-date-toolow htmlform-time-toolow htmlform-datetime-toolow
- return $this->msg( "htmlform-{$this->mType}-toolow", $this->formatDate( $min ) )
- ->parseAsBlock();
+ return $this->msg( "htmlform-{$this->mType}-toolow", $this->formatDate( $min ) );
}
}
$max = $this->parseDate( $this->mParams['max'] );
if ( $max && $date > $max ) {
// Messages: htmlform-date-toohigh htmlform-time-toohigh htmlform-datetime-toohigh
- return $this->msg( "htmlform-{$this->mType}-toohigh", $this->formatDate( $max ) )
- ->parseAsBlock();
+ return $this->msg( "htmlform-{$this->mType}-toohigh", $this->formatDate( $max ) );
}
}
# https://www.w3.org/TR/html5/infrastructure.html#floating-point-numbers
# with the addition that a leading '+' sign is ok.
if ( !preg_match( '/^((\+|\-)?\d+(\.\d+)?(E(\+|\-)?\d+)?)?$/i', $value ) ) {
- return $this->msg( 'htmlform-float-invalid' )->parseAsBlock();
+ return $this->msg( 'htmlform-float-invalid' );
}
# The "int" part of these message names is rather confusing.
$min = $this->mParams['min'];
if ( $min > $value ) {
- return $this->msg( 'htmlform-int-toolow', $min )->parseAsBlock();
+ return $this->msg( 'htmlform-int-toolow', $min );
}
}
$max = $this->mParams['max'];
if ( $max < $value ) {
- return $this->msg( 'htmlform-int-toohigh', $max )->parseAsBlock();
+ return $this->msg( 'htmlform-int-toohigh', $max );
}
}
&& $this->mParams['required'] !== false
&& !$values
) {
- return $this->msg( 'htmlform-cloner-required' )->parseAsBlock();
+ return $this->msg( 'htmlform-cloner-required' );
}
if ( isset( $values['nonjs'] ) ) {
# input does not require its value to be numeric). If you want a tidier
# value to, eg, save in the DB, clean it up with intval().
if ( !preg_match( '/^((\+|\-)?\d+)?$/', trim( $value ) ) ) {
- return $this->msg( 'htmlform-int-invalid' )->parseAsBlock();
+ return $this->msg( 'htmlform-int-invalid' );
}
return true;
if ( count( $validValues ) == count( $value ) ) {
return true;
} else {
- return $this->msg( 'htmlform-select-badoption' )->parse();
+ return $this->msg( 'htmlform-select-badoption' );
}
}
}
if ( !is_string( $value ) && !is_int( $value ) ) {
- return $this->msg( 'htmlform-required' )->parse();
+ return $this->msg( 'htmlform-required' );
}
$validOptions = HTMLFormField::flattenOptions( $this->getOptions() );
if ( in_array( strval( $value ), $validOptions, true ) ) {
return true;
} else {
- return $this->msg( 'htmlform-select-badoption' )->parse();
+ return $this->msg( 'htmlform-select-badoption' );
}
}
* @param string|MWRestrictions $value The value the field was submitted with
* @param array $alldata The data collected from the form
*
- * @return bool|string True on success, or String error to display, or
+ * @return bool|string|Message True on success, or String/Message error to display, or
* false to fail validation without displaying an error.
*/
public function validate( $value, $alldata ) {
isset( $this->mParams['required'] ) && $this->mParams['required'] !== false
&& $value instanceof MWRestrictions && !$value->toArray()['IPAddresses']
) {
- return $this->msg( 'htmlform-required' )->parse();
+ return $this->msg( 'htmlform-required' );
}
if ( is_string( $value ) ) {
if ( $status->isOK() ) {
$status->fatal( 'unknown-error' );
}
- return $status->getMessage()->parse();
+ return $status->getMessage();
}
if ( isset( $this->mValidationCallback ) ) {
&& $this->mParams['required'] !== false
&& $value[1] === ''
) {
- return $this->msg( 'htmlform-required' )->parse();
+ return $this->msg( 'htmlform-required' );
}
return true;
if ( in_array( strval( $value ), $validOptions, true ) ) {
return true;
} else {
- return $this->msg( 'htmlform-select-badoption' )->parse();
+ return $this->msg( 'htmlform-select-badoption' );
}
}
if ( $params ) {
$msg->params( $params );
}
- return $msg->parse();
+ return $msg;
}
$text = $title->getPrefixedText();
if ( $this->mParams['namespace'] !== false &&
!$title->inNamespace( $this->mParams['namespace'] )
) {
- return $this->msg( 'htmlform-title-badnamespace', $this->mParams['namespace'], $text )->parse();
+ return $this->msg( 'htmlform-title-badnamespace', $this->mParams['namespace'], $text );
}
if ( $this->mParams['creatable'] && !$title->canExist() ) {
- return $this->msg( 'htmlform-title-not-creatable', $text )->escaped();
+ return $this->msg( 'htmlform-title-not-creatable', $text );
}
if ( $this->mParams['exists'] && !$title->exists() ) {
- return $this->msg( 'htmlform-title-not-exists', $text )->parse();
+ return $this->msg( 'htmlform-title-not-exists', $text );
}
return parent::validate( $value, $alldata );
$user = User::newFromName( $value, false );
if ( !$user ) {
- return $this->msg( 'htmlform-user-not-valid', $value )->parse();
+ return $this->msg( 'htmlform-user-not-valid', $value );
} elseif (
( $this->mParams['exists'] && $user->getId() === 0 ) &&
!( $this->mParams['ipallowed'] && User::isIP( $value ) )
) {
- return $this->msg( 'htmlform-user-not-exists', $user->getName() )->parse();
+ return $this->msg( 'htmlform-user-not-exists', $user->getName() );
}
return parent::validate( $value, $alldata );
* @file
* @ingroup SpecialPage
*/
+use MediaWiki\MediaWikiServices;
/**
* XML file reader for the page data importer.
$this->reader = new XMLReader();
if ( !$config ) {
wfDeprecated( __METHOD__ . ' without a Config instance', '1.25' );
- $config = ConfigFactory::getDefaultInstance()->makeConfig( 'main' );
+ $config = MediaWikiServices::getInstance()->getMainConfig();
}
$this->config = $config;
switch ( $this->entry->getSubtype() ) {
case 'delete': // Show undelete link
+ case 'delete_redir':
if ( $user->isAllowed( 'undelete' ) ) {
$message = 'undeletelink';
} else {
*/
public function doDeleteArticleReal(
$reason, $suppress = false, $u1 = null, $u2 = null, &$error = '', User $user = null,
- $tags = []
+ $tags = [], $logsubtype = 'delete'
) {
global $wgUser, $wgContentHandlerUseDB;
// Log the deletion, if the page was suppressed, put it in the suppression log instead
$logtype = $suppress ? 'suppress' : 'delete';
- $logEntry = new ManualLogEntry( $logtype, 'delete' );
+ $logEntry = new ManualLogEntry( $logtype, $logsubtype );
$logEntry->setPerformer( $user );
$logEntry->setTarget( $logTitle );
$logEntry->setComment( $reason );
* @author Trevor Parscal
*/
+use MediaWiki\MediaWikiServices;
use Psr\Log\LoggerAwareInterface;
use Psr\Log\LoggerInterface;
use Psr\Log\NullLogger;
if ( !$config ) {
$this->logger->debug( __METHOD__ . ' was called without providing a Config instance' );
- $config = ConfigFactory::getDefaultInstance()->makeConfig( 'main' );
+ $config = MediaWikiServices::getInstance()->getMainConfig();
}
$this->config = $config;
*/
use MediaWiki\Logger\LoggerFactory;
+use MediaWiki\MediaWikiServices;
/**
* Object passed around to modules which contains information about the state
*/
public static function newDummyContext() {
return new self( new ResourceLoader(
- ConfigFactory::getDefaultInstance()->makeConfig( 'main' ),
+ MediaWikiServices::getInstance()->getMainConfig(),
LoggerFactory::getInstance( 'resourceloader' )
), new FauxRequest( [] ) );
}
* @author Roan Kattouw
*/
+use MediaWiki\MediaWikiServices;
use Psr\Log\LoggerAwareInterface;
use Psr\Log\LoggerInterface;
use Psr\Log\NullLogger;
public function getConfig() {
if ( $this->config === null ) {
// Ugh, fall back to default
- $this->config = ConfigFactory::getDefaultInstance()->makeConfig( 'main' );
+ $this->config = MediaWikiServices::getInstance()->getMainConfig();
}
return $this->config;
namespace MediaWiki\Session;
+use MediaWiki\MediaWikiServices;
use MWException;
use Psr\Log\LoggerInterface;
use BagOStuff;
);
}
} else {
- $this->config = \ConfigFactory::getDefaultInstance()->makeConfig( 'main' );
+ $this->config = MediaWikiServices::getInstance()->getMainConfig();
}
if ( isset( $options['logger'] ) ) {
*
* @file
*/
+use MediaWiki\MediaWikiServices;
/**
* Generic wrapper for template functions, with interface
$this->translator = new MediaWikiI18N();
if ( $config === null ) {
wfDebug( __METHOD__ . ' was called with no Config instance passed to it' );
- $config = ConfigFactory::getDefaultInstance()->makeConfig( 'main' );
+ $config = MediaWikiServices::getInstance()->getMainConfig();
}
$this->config = $config;
}
return;
}
+ if ( $this->canBypassForm( $button_name ) ) {
+ $this->setRequest( [], true );
+ $this->getRequest()->setVal( $this->getTokenName(), $this->getToken() );
+ if ( $button_name ) {
+ $this->getRequest()->setVal( $button_name, true );
+ }
+ }
+
$status = $this->trySubmit();
if ( !$status || !$status->isGood() ) {
}
}
+ /**
+ * Determine if the login form can be bypassed. This will be the case when no more than one
+ * button is present and no other user input fields that are not marked as 'skippable' are
+ * present. If the login form were not bypassed, the user would be presented with a
+ * superfluous page on which they must press the single button to proceed with login.
+ * Not only does this cause an additional mouse click and page load, it confuses users,
+ * especially since there are a help link and forgotten password link that are
+ * provided on the login page that do not apply to this situation.
+ *
+ * @param string|null &$button_name if the form has a single button, returns
+ * the name of the button; otherwise, returns null
+ * @return bool
+ */
+ private function canBypassForm( &$button_name ) {
+ $button_name = null;
+ if ( $this->isContinued() ) {
+ return false;
+ }
+ $fields = AuthenticationRequest::mergeFieldInfo( $this->authRequests );
+ foreach ( $fields as $fieldname => $field ) {
+ if ( !isset( $field['type'] ) ) {
+ return false;
+ }
+ if ( !empty( $field['skippable'] ) ) {
+ continue;
+ }
+ if ( $field['type'] === 'button' ) {
+ if ( $button_name !== null ) {
+ $button_name = null;
+ return false;
+ } else {
+ $button_name = $fieldname;
+ }
+ } elseif ( $field['type'] !== 'null' ) {
+ return false;
+ }
+ }
+ return true;
+ }
+
/**
* Show the success page.
*
* @file
* @ingroup SpecialPage
*/
+use MediaWiki\MediaWikiServices;
/**
* A special page that allows users to send e-mails to other users
public static function getPermissionsError( $user, $editToken, Config $config = null ) {
if ( $config === null ) {
wfDebug( __METHOD__ . ' called without a Config instance passed to it' );
- $config = ConfigFactory::getDefaultInstance()->makeConfig( 'main' );
+ $config = MediaWikiServices::getInstance()->getMainConfig();
}
if ( !$config->get( 'EnableEmail' ) || !$config->get( 'EnableUserEmail' ) ) {
return 'usermaildisabled';
* @file
* @ingroup SpecialPage
*/
+use MediaWiki\MediaWikiServices;
/**
* Used to show archived pages and eventually restore them.
$this->title = $title;
if ( $config === null ) {
wfDebug( __METHOD__ . ' did not have a Config object passed to it' );
- $config = ConfigFactory::getDefaultInstance()->makeConfig( 'main' );
+ $config = MediaWikiServices::getInstance()->getMainConfig();
}
$this->config = $config;
}
) {
if ( $config === null ) {
wfDebug( __METHOD__ . ' called without a Config instance passed to it' );
- $config = ConfigFactory::getDefaultInstance()->makeConfig( 'main' );
+ $config = MediaWikiServices::getInstance()->getMainConfig();
}
$msg = [];
"passwordreset-disabled": "S'ha desactivau o restablimiento de claus en ista wiki.",
"passwordreset-username": "Nombre d'usuario:",
"passwordreset-domain": "Dominio:",
- "passwordreset-capture": "Veyer o mensache resultant?",
- "passwordreset-capture-help": "Si marca ista caixeta, se li amostrará o correu electronico (con a clau temporal) amás de ninviar-lo ta l'usuario.",
"passwordreset-email": "Adreza de correu electronico:",
"passwordreset-emailtitle": "Detalles d'a cuenta en {{SITENAME}}",
"passwordreset-emailtext-ip": "Belún (probablement vusté, dende l'adreza IP $1) ha demandau un recordatorio d'a información d'a suya cuenta en {{SITENAME}} ($4). {{PLURAL:$3|A cuenta d'usuario siguient ye asociata|As cuentas d'usuario siguients son asociatas}} a ista adreza de correu-e:\n\n$2\n\n{{PLURAL:$3|Ista clau temporal circumducirá|Istas claus temporals circumducirán}} en {{PLURAL:$5|un día|$5 días}}. Habría de connectar-se agora y trigar una nueva clau. Si ista demanda no dimana de vusté, u ya se'n ha acordau d'a suya clau inicial y ya no deseya modificar-la, puet ignorar iste mensache y continar emplegando a suya viella clau.",
"right-siteadmin": "Trancar y destrancar a base de datos",
"right-override-export-depth": "Exporta pachinas que incluigan as enlazadas dica un fundaria de 5",
"right-sendemail": "Ninviar un correu electronico a atros usuarios",
- "right-passwordreset": "Veyer os correus electronicos de restabimiento de claus",
"newuserlogpage": "Rechistro de nuevos usuarios",
"newuserlogpagetext": "Isto ye un rechistro de creyación d'usuarios.",
"rightslog": "Rechistro de cambios en os dreitos d'os usuarios",
"booksources-search": "Mirar",
"booksources-text": "Contino ye una lista de vinclos ta atros puestos an que venden libros nuevos y usatos, talment bi haiga más información sobre os libros que ye mirando.",
"booksources-invalid-isbn": "O numero d'ISBN dato pareix que no ye conforme; comprebe si no bi ha garra error en copiar d'a fuent orichinal.",
+ "magiclink-tracking-rfc": "Pachinas que fan servir vinclos machicos RFC",
+ "magiclink-tracking-rfc-desc": "Ista pachina fa servir vinclos machicos de RFC. Se veiga [https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Magic_links mediawiki.org] sobre cómo migrar.",
+ "magiclink-tracking-pmid": "Pachinas que fan servir vinclos machicos PMID",
+ "magiclink-tracking-pmid-desc": "Ista pachina fa servir vinclos machicos de PMID. Se veiga [https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Magic_links mediawiki.org] sobre cómo migrar.",
+ "magiclink-tracking-isbn": "Pachinas que fan servir vinclos machicos d'ISBN",
+ "magiclink-tracking-isbn-desc": "Ista pachina fa servir vinclos machicos d'ISBN. Se veiga [https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Magic_links mediawiki.org] sobre cómo migrar.",
"specialloguserlabel": "Fedor:",
"speciallogtitlelabel": "Obchectivo (titol u usuario):",
"log": "Rechistros",
"apisandbox-continue-clear": "إفراغ",
"apisandbox-continue-help": "{{int:apisandbox-continue}} س [https://www.mediawiki.org/wiki/API:Query#Continuing_queries يستمر] في الطلب الأخير؛ {{int:apisandbox-continue-clear}} سيفرغ المعاملات المرتبطة بالاستمرار.",
"apisandbox-param-limit": "أدخل <kbd>max</kbd> لاستخدام الحد الأقصى.",
+ "apisandbox-multivalue-all-namespaces": "$1 (كل النطاقات)",
+ "apisandbox-multivalue-all-values": "$1 (كل القيم)",
"booksources": "مصادر كتاب",
"booksources-search-legend": "البحث عن مصادر الكتب",
"booksources-isbn": "ردمك:",
"activeusers-count": "{{PLURAL:$1|لا أفعال|فعل واحد|فعلان اثنان|$1 أفعال|$1 فعلا|$1 فعل}} منذ {{PLURAL:$3||يوم|يومين|$3 أيام|$3 يوما|$1 يوم}}",
"activeusers-from": "اعرض المستخدمين ابتداء من:",
"activeusers-groups": "عرض المستخدمين المنتمين للمجموعات:",
+ "activeusers-excludegroups": "استثن المستخدمين المنتمين للمجموعات:",
"activeusers-noresult": "لم يعثر على أي مستخدمين",
"activeusers-submit": "عرض المستخدمين النشطين",
"listgrouprights": "صلاحيات مجموعات المستخدمين",
"mw-widgets-dateinput-no-date": "لا تاريخ تم اختياره",
"mw-widgets-titleinput-description-new-page": "الصفحة غير موجودة بعد",
"mw-widgets-titleinput-description-redirect": "تحويل إلى $1",
+ "mw-widgets-categoryselector-add-category-placeholder": "أضف تصنيفا...",
"sessionmanager-tie": "لا يمكن جمع أنواع استيثاق متعددة: $1.",
"sessionprovider-generic": "جلسات $1",
"sessionprovider-mediawiki-session-cookiesessionprovider": "جلسات قائمة على ملفات تعريف الارتباط (كوكيز)",
"markedaspatrollederrornotify": "دولانماق برچسبی مووفقیت سیز اولدو",
"patrol-log-page": "دولانما ژورنالی",
"patrol-log-header": "بو یوخلانمیش دییشیکلیکلرین ژورنالیدیر.",
- "log-show-hide-patrol": "$1 پاترول گوندهلیگی",
+ "log-show-hide-patrol": "$1 دولانما ژورنالی",
"log-show-hide-tag": "اِتیکت ژورنالی $1",
"deletedrevision": "کؤهنه نوسخه لری سیلیندی $1.",
"filedeleteerror-short": "فایل سیلینرکن ختا: $1",
"previewconflict": "Гэта папярэдні прагляд тэксту зь верхняга вакна рэдагаваньня, так ён будзе выглядаць, калі Вы вырашыце яго захаваць.",
"session_fail_preview": "Выбачайце! Мы не змаглі апрацаваць вашую праўку праз страту зьвестак сэсіі.\n\nМагчыма, вы выйшлі з сыстэмы. <strong>Калі ласка, праверце, што вы знаходзіцеся ў сыстэме і паспрабуйце яшчэ раз<strong>. Калі не спрацуе, паспрабуйце [[Special:UserLogout|выйсьці]] і ўвайсьці яшчэ раз, а таксама праверце, што ваш браўзэр дазваляе файлы-кукі з гэтага сайту.",
"session_fail_preview_html": "Выбачайце! Мы не змаглі апрацаваць вашую праўку праз страту зьвестак сэсіі.\n\n<em>Таму што ў {{GRAMMAR:месны|{{SITENAME}}}} дазволена выкарыстоўваць чысты HTML, папярэдні прагляд быў адключаны для засьцярогі ад атакаў праз JavaScript.</em>\n\n<strong>Калі гэта сапраўдная спроба рэдагаваньня, калі ласка, паспрабуйце яшчэ раз.</strong>\nКалі гэта не дапамагае, паспрабуйце [[Special:UserLogout|выйсьці з сыстэмы]] і ўвайсьці ізноў, а таксама праверце, што ваш браўзер дазваляе кукі-файлы з гэтага сайту.",
- "token_suffix_mismatch": "'''Вашае рэдагаваньне было адхіленае, таму што Ваш кліент ня можа апрацоўваць знакі пунктуацыі ў акне рэдагаваньня.\nРэдагаваньне было скасаванае для таго, каб пазьбегнуць зьнішчэньня тэксту старонкі.\nТакія памылкі здараюцца, калі Вы выкарыстоўваеце ананімны проксі-сэрвэр, які ўтрымлівае памылкі.'''",
+ "token_suffix_mismatch": "<strong>Вашае рэдагаваньне было адхіленае, таму што Ваш кліент псуе знакі пунктуацыі ў жэтоне рэдагаваньня.</strong>\nРэдагаваньне было скасаванае для таго, каб пазьбегнуць зьнішчэньня тэксту старонкі.\nТакія памылкі здараюцца, калі Вы выкарыстоўваеце ананімны проксі-сэрвэр, які ўтрымлівае памылкі.",
"edit_form_incomplete": "'''Некаторыя часткі формы рэдагаваньня не дасягнулі сэрвэра. Упэўніцеся, што Вашыя рэдагаваньні не пашкоджаныя і паспрабуйце зноў.'''",
"editing": "Рэдагаваньне: $1",
"creating": "Стварэньне «$1»",
"apisandbox-continue-clear": "Ачысьціць",
"apisandbox-continue-help": "{{int:apisandbox-continue}} [https://www.mediawiki.org/wiki/API:Query#Continuing_queries працягне] апошні запыт; {{int:apisandbox-continue-clear}} ачысьціць парамэтры, зьвязаныя з працягам.",
"apisandbox-param-limit": "Увядзіце <kbd>max</kbd>, каб выкарыстаць максымальны ліміт.",
+ "apisandbox-multivalue-all-namespaces": "$1 (усе прасторы назваў)",
"booksources": "Крыніцы кніг",
"booksources-search-legend": "Пошук кніг",
"booksources-isbn": "ISBN:",
"feedback-message": "پەیام:",
"feedback-subject": "بابەت:",
"feedback-submit": "ناردن",
- "searchsuggest-search": "لە {{SITENAME}} بگەڕێ",
+ "searchsuggest-search": "لە {{SITENAME}}دا بگەڕێ",
"searchsuggest-containing": "بە لەبەرگرتنەوەی ...",
"api-error-empty-file": "ئەو پەڕگەیە کە ناردووتە واڵا بوو.",
"api-error-file-too-large": "ئەو پەڕگەیە ناردووتە زۆر گەورەیە.",
"apisandbox-continue-clear": "Löschen",
"apisandbox-continue-help": "Mit „{{int:apisandbox-continue}}“ kann man die letzte Anfrage [https://www.mediawiki.org/wiki/API:Query#Continuing_queries fortfahren]; „{{int:apisandbox-continue-clear}}“ löscht fortsetzungsbezogene Parameter.",
"apisandbox-param-limit": "Gib <kbd>max</kbd> ein, um das maximale Limit zu verwenden.",
+ "apisandbox-multivalue-all-namespaces": "$1 (Alle Namensräume)",
+ "apisandbox-multivalue-all-values": "$1 (Alle Werte)",
"booksources": "ISBN-Suche",
"booksources-search-legend": "Suche nach Bezugsquellen für Bücher",
"booksources-search": "Suchen",
"mw-widgets-dateinput-placeholder-month": "JJJJ-MM",
"mw-widgets-titleinput-description-new-page": "Seite ist noch nicht vorhanden",
"mw-widgets-titleinput-description-redirect": "Weiterleitung nach $1",
+ "mw-widgets-categoryselector-add-category-placeholder": "Eine Kategorie hinzufügen …",
"sessionmanager-tie": "Mehrere Anfrageauthentifikationstypen konnten nicht kombiniert werden: $1.",
"sessionprovider-generic": "$1-Sitzungen",
"sessionprovider-mediawiki-session-cookiesessionprovider": "cookiebasierten Sitzungen",
"prefs-help-recentchangescount": "This includes recent changes, page histories, and logs.",
"prefs-help-watchlist-token2": "This is the secret key to the web feed of your watchlist.\nAnyone who knows it will be able to read your watchlist, so do not share it.\nIf you need to, [[Special:ResetTokens|you can reset it]].",
"savedprefs": "Your preferences have been saved.",
- "savedrights": "The user rights of {{GENDER:$1|$1}} have been saved.",
+ "savedrights": "The user groups of {{GENDER:$1|$1}} have been saved.",
"timezonelegend": "Time zone:",
"localtime": "Local time:",
"timezoneuseserverdefault": "Use wiki default ($1)",
"htmlform-user-not-valid": "<strong>$1</strong> isn't a valid username.",
"rawmessage": "$1",
"logentry-delete-delete": "$1 {{GENDER:$2|deleted}} page $3",
+ "logentry-delete-delete_redir": "$1 {{GENDER:$2|deleted}} redirect $3 by overwriting",
"logentry-delete-restore": "$1 {{GENDER:$2|restored}} page $3",
"logentry-delete-event": "$1 {{GENDER:$2|changed}} visibility of {{PLURAL:$5|a log event|$5 log events}} on $3: $4",
"logentry-delete-revision": "$1 {{GENDER:$2|changed}} visibility of {{PLURAL:$5|a revision|$5 revisions}} on page $3: $4",
"log-action-filter-contentmodel-change": "Change of Contentmodel",
"log-action-filter-contentmodel-new": "Creation of page with non-standard Contentmodel",
"log-action-filter-delete-delete": "Page deletion",
+ "log-action-filter-delete-delete_redir": "Redirect overwrite",
"log-action-filter-delete-restore": "Page undeletion",
"log-action-filter-delete-event": "Log deletion",
"log-action-filter-delete-revision": "Revision deletion",
"usercssispublic": "Please note: CSS subpages should not contain confidential data as they are viewable by other users.",
"restrictionsfield-badip": "Invalid IP address or range: $1",
"restrictionsfield-label": "Allowed IP ranges:",
- "restrictionsfield-help": "One IP address or CIDR range per line. To enable everything, use<br><code>0.0.0.0/0</code><br><code>::/0</code>",
- "edit-error-short": "Error: $1",
- "edit-error-long": "Errors:\n\n$1"
+ "restrictionsfield-help": "One IP address or CIDR range per line. To enable everything, use<br><code>0.0.0.0/0</code><br><code>::/0</code>"
}
"Irus",
"Sophivorus",
"Pompilos",
- "Igv"
+ "Igv",
+ "Juanpabl"
]
},
"tog-underline": "Subrayar los enlaces:",
"newimages-label": "Failinimi (või selle osa):",
"newimages-showbots": "Näita robotite üles laaditud faile",
"noimages": "Uusi pilte ei ole.",
+ "gallery-slideshow-toggle": "Lülita pisipildid ümber",
"ilsubmit": "Otsi",
"bydate": "kuupäeva järgi",
"sp-newimages-showfrom": "Näita uusi faile alates kuupäevast $2, kell $1",
"apisandbox-continue-clear": "Effacer",
"apisandbox-continue-help": "{{int:apisandbox-continue}} [https://www.mediawiki.org/wiki/API:Query#Continuing_queries continuera] la dernière requête ; {{int:apisandbox-continue-clear}} effacera les paramètres relatifs à la continuation.",
"apisandbox-param-limit": "Saisir <kbd>max</kbd> pour utiliser la limite maximale.",
+ "apisandbox-multivalue-all-namespaces": "$1 (tous les espaces de noms)",
+ "apisandbox-multivalue-all-values": "$1 (Toutes les valeurs)",
"booksources": "Ouvrages de référence",
"booksources-search-legend": "Rechercher parmi des ouvrages de référence",
"booksources-isbn": "ISBN :",
"mw-widgets-dateinput-placeholder-month": "AAAA-MM",
"mw-widgets-titleinput-description-new-page": "la page n’existe pas encore",
"mw-widgets-titleinput-description-redirect": "redirection vers $1",
+ "mw-widgets-categoryselector-add-category-placeholder": "Ajouter une catégorie...",
"sessionmanager-tie": "Impossible de combiner des types multiples de demandes d’authentification : $1.",
"sessionprovider-generic": "sessions $1",
"sessionprovider-mediawiki-session-cookiesessionprovider": "sessions basées sur les témoins (''cookies'')",
"apisandbox-continue-clear": "Limpar",
"apisandbox-continue-help": "\"{{int:apisandbox-continue}}\" [https://www.mediawiki.org/wiki/API:Query#Continuing_queries continuará] a última petición; \"{{int:apisandbox-continue-clear}}\" limpará os parámetros relativos á continuación.",
"apisandbox-param-limit": "Indicar <kbd>max</kbd> para usar o límite máximo.",
+ "apisandbox-multivalue-all-namespaces": "$1 (Tódolos espazos de nomes)",
+ "apisandbox-multivalue-all-values": "$1 (Tódolos valores)",
"booksources": "Fontes bibliográficas",
"booksources-search-legend": "Procurar fontes bibliográficas",
"booksources-search": "Procurar",
"mw-widgets-dateinput-placeholder-month": "AAAA-MM",
"mw-widgets-titleinput-description-new-page": "a páxina aínda non existe",
"mw-widgets-titleinput-description-redirect": "redirección cara a $1",
+ "mw-widgets-categoryselector-add-category-placeholder": "Engadir unha categoría...",
"sessionmanager-tie": "Non pode combinar peticións múltiples de tipos de autenticación: $1.",
"sessionprovider-generic": "sesións $1",
"sessionprovider-mediawiki-session-cookiesessionprovider": "sesións baseadas nas cookies",
"apisandbox-continue-clear": "ניקוי",
"apisandbox-continue-help": "\"{{int:apisandbox-continue}}\" [https://www.mediawiki.org/wiki/API:Query#Continuing_queries ימשיך] את הבקשה האחרונה; \"{{int:apisandbox-continue-clear}}\" ינקה את הפרמטרים הקשורים להמשך.",
"apisandbox-param-limit": "יש לכתוב <kbd>max</kbd> כדי להשתמש בערך המרבי האפשרי.",
+ "apisandbox-multivalue-all-namespaces": "$1 (כל מרחבי השם)",
+ "apisandbox-multivalue-all-values": "$1 (כל הערכים)",
"booksources": "משאבי ספרות חיצוניים",
"booksources-search-legend": "חיפוש משאבי ספרות חיצוניים",
"booksources-isbn": "מסת\"ב (ISBN):",
"apisandbox-continue": "Continua",
"apisandbox-continue-clear": "Pulisci",
"apisandbox-param-limit": "Inserisci <kbd>max</kbd> per utilizzare il limite massimo.",
+ "apisandbox-multivalue-all-namespaces": "$1 (Tutti i namespace)",
+ "apisandbox-multivalue-all-values": "$1 (Tutti i valori)",
"booksources": "Fonti librarie",
"booksources-search-legend": "Ricerca di fonti librarie",
"booksources-isbn": "Codice ISBN:",
"mw-widgets-dateinput-placeholder-month": "AAAA-MM",
"mw-widgets-titleinput-description-new-page": "questa pagina non esiste ancora",
"mw-widgets-titleinput-description-redirect": "reindirizzamento a $1",
+ "mw-widgets-categoryselector-add-category-placeholder": "Aggiungi una categoria...",
"sessionmanager-tie": "Non è possibile combinare più tipi di richieste di autenticazione: $1.",
"sessionprovider-generic": "sessioni $1",
"sessionprovider-mediawiki-session-cookiesessionprovider": "sessioni basate su cookie",
"right-autoconfirmed": "IP 기반의 속도 제한에 영향을 받지 않음",
"right-bot": "봇의 편집으로 취급",
"right-nominornewtalk": "토론 문서에서 사소한 편집으로 새 메시지 알림을 보내지 않기",
- "right-apihighlimits": "API ì\83\81í\95\9c ì\83\81ì\8a¹",
+ "right-apihighlimits": "API 쿼리ì\97\90ì\84\9c ë\8d\94 ë\86\92ì\9d\80 ì \9cí\95\9c ì\82¬ì\9a©",
"right-writeapi": "쓰기 API 사용",
"right-delete": "문서 삭제",
"right-bigdelete": "문서 역사가 긴 문서를 삭제",
"apisandbox-continue": "계속",
"apisandbox-continue-clear": "지우기",
"apisandbox-param-limit": "최대 한계치를 사용하려면 <kbd>max</kbd>를 입력하십시오.",
+ "apisandbox-multivalue-all-namespaces": "$1 (모든 이름공간)",
+ "apisandbox-multivalue-all-values": "$1 (모든 값)",
"booksources": "책 찾기",
"booksources-search-legend": "책 원본 검색",
"booksources-isbn": "ISBN:",
"modifiedarticleprotection": "님이 \"[[$1]]\" 문서의 보호 설정을 바꿨습니다",
"unprotectedarticle": "\"[[$1]]\" 문서를 보호 해제했습니다",
"movedarticleprotection": "님이 문서의 보호 설정을 \"[[$2]]\"에서 \"[[$1]]\"(으)로 이동했습니다",
- "protectedarticle-comment": "{{GENDER:$2|보호됨}} \"[[$1]]\"",
- "modifiedarticleprotection-comment": "\"[[$1]]문서의 {{GENDER:$2|보호 수준 변경하기}}",
- "unprotectedarticle-comment": "\"[[$1]]'문서의 {{GENDER:$2|보호 해제하기}}",
+ "protectedarticle-comment": "\"[[$1]]\" 문서를 {{GENDER:$2|보호했습니다}}",
+ "modifiedarticleprotection-comment": "\"[[$1]]\" 문서의 {{GENDER:$2|보호 수준을 변경했습니다}}",
+ "unprotectedarticle-comment": "\"[[$1]]\" 문서의 {{GENDER:$2|보호를 해제했습니다}}",
"protect-title": "\"$1\" 보호하기",
"protect-title-notallowed": "\"$1\" 문서의 보호 수준 보기",
"prot_1movedto2": "[[$1]] 문서를 [[$2]] 문서로 이동함",
"mw-widgets-dateinput-no-date": "선택된 날짜 없음",
"mw-widgets-titleinput-description-new-page": "문서가 존재하지 않습니다",
"mw-widgets-titleinput-description-redirect": "$1 문서로 넘겨주기",
+ "mw-widgets-categoryselector-add-category-placeholder": "분류 추가...",
"sessionmanager-tie": "여러 요청 인증 유형 결합할 수 없습니다: $1.",
"sessionprovider-generic": "$1 세션",
"sessionprovider-mediawiki-session-cookiesessionprovider": "쿠키 기반 세션",
"apisandbox-continue": "Virufueren",
"apisandbox-continue-clear": "Eidel maachen",
"apisandbox-param-limit": "Gitt <kbd>max</kbd> fir déi maximal Limite ze benotzen.",
+ "apisandbox-multivalue-all-values": "$1 (All Wäerter)",
"booksources": "Bicherreferenzen",
"booksources-search-legend": "No Bicherreferenze sichen",
"booksources-search": "Sichen",
"Jdforrester",
"Jeleniccz",
"MrLeopold",
- "Hex"
+ "Hex",
+ "Xxmarijnw"
]
},
"tog-underline": "Koppelingen onderstrepen:",
"apisandbox-continue-clear": "Wissen",
"apisandbox-continue-help": "{{int:apisandbox-continue}} zal [https://www.mediawiki.org/wiki/API:Query#Continuing_queries doorgaan] met het laatste verzoek; {{int:apisandbox-continue-clear}} zal de voortgangsparameters wissen.",
"apisandbox-param-limit": "Gebruik <kbd>max</kbd> voor de maximale limiet.",
+ "apisandbox-multivalue-all-namespaces": "$1 (Alle naamruimtes)",
+ "apisandbox-multivalue-all-values": "$1 (Alle waarden)",
"booksources": "Boekinformatie",
"booksources-search-legend": "Bronnen en gegevens over een boek zoeken",
"booksources-search": "Zoeken",
"activeusers-count": "$1 recente {{PLURAL:$1|handeling|handelingen}} in de {{PLURAL:$3|afgelopen dag|laatste $3 dagen}}",
"activeusers-from": "Gebruikers worden weergegeven vanaf:",
"activeusers-groups": "Gebruikers weergeven die horen bij de groepen:",
+ "activeusers-excludegroups": "Gebruikers uitsluiten die behoren tot de groepen:",
"activeusers-noresult": "Geen actieve gebruikers gevonden.",
"activeusers-submit": "Weergeven",
"listgrouprights": "Rechten van gebruikersgroepen",
"confirmemail_body_set": "Iemand, waarschijnlijk u, met het IP-adres $1,\nheeft het e-mailadres voor gebruiker \"$2\" op {{SITENAME}} ingesteld op dit e-mailadres.\n\nOpen de volgende koppeling in uw webbrowser om te bevestigen dat u deze gebruiker bent en om de e-mailmogelijkheden op {{SITENAME}} opnieuw te activeren:\n\n$3\n\nAls deze gebruiker *niet* aan u toebehoort, klik dan op de volgende koppeling om de bevestiging van uw e-mailadres te annuleren:\n\n$5\n\nDe bevestigingscode vervalt op $4.",
"confirmemail_invalidated": "De e-mailbevestiging is geannuleerd",
"invalidateemail": "E-mailbevestiging annuleren",
+ "notificationemail_body_removed": "Iemand, waarschijnlijk u, met het IP-adres $1, heeft het e-mailadres geregistreerd voor gebruiker \"$2\" verwijderd op {{SITENAME}}. \n\nAls u dit niet was, neem dan onmiddellijk contact op met een sitebeheerder.",
"scarytranscludedisabled": "[Interwiki-invoeging van sjablonen is uitgeschakeld]",
"scarytranscludefailed": "[De sjabloon $1 kon niet opgehaald worden]",
"scarytranscludefailed-httpstatus": "[De sjabloon $1 kon niet opgehaald worden: HTTP $2]",
"apisandbox-continue": "Kontynuuj",
"apisandbox-continue-clear": "Wyczyść",
"apisandbox-param-limit": "Wpisz <kbd>max</kbd>, aby wykorzystać maksymalny limit.",
+ "apisandbox-multivalue-all-namespaces": "$1 (wszystkie przestrzenie nazw)",
+ "apisandbox-multivalue-all-values": "$1 (wszystkie wartości)",
"booksources": "Książki",
"booksources-search-legend": "Szukaj informacji o książkach",
"booksources-search": "Szukaj",
"mw-widgets-dateinput-placeholder-month": "RRRR-MM",
"mw-widgets-titleinput-description-new-page": "strona jeszcze nie istnieje",
"mw-widgets-titleinput-description-redirect": "przekierowanie do $1",
+ "mw-widgets-categoryselector-add-category-placeholder": "Dodaj kategorię...",
"sessionmanager-tie": "Nie można łączyć kilku rodzajów uwierzytelniania dla zapytania: $1.",
"sessionprovider-generic": "sesje $1",
"sessionprovider-mediawiki-session-cookiesessionprovider": "sesje na podstawie cookie",
"apisandbox-continue-clear": "Limpar",
"apisandbox-continue-help": "{{int:apisandbox-continue}} [https://www.mediawiki.org/wiki/API:Query#Continuing_queries continuará] o último pedido; {{int:apisandbox-continue-clear}} limpará os parâmetros relativos à continuação.",
"apisandbox-param-limit": "Introduza <kbd>max</kbd> para usar o limite máximo.",
+ "apisandbox-multivalue-all-namespaces": "$1 (Todos os espaços nominais)",
+ "apisandbox-multivalue-all-values": "$1 (Todos os valores)",
"booksources": "Fontes bibliográficas",
"booksources-search-legend": "Pesquisar referências bibliográficas",
"booksources-search": "Pesquisar",
"mw-widgets-dateinput-placeholder-month": "AAAA-MM",
"mw-widgets-titleinput-description-new-page": "a página ainda não existe.",
"mw-widgets-titleinput-description-redirect": "redirecionar para $1",
+ "mw-widgets-categoryselector-add-category-placeholder": "Adicionar uma categoria...",
"sessionmanager-tie": "Não se pode combinar múltiplas solicitações de tipos de autenticação: $1.",
"sessionprovider-generic": "Sessões $1",
"sessionprovider-mediawiki-session-cookiesessionprovider": "sessões baseadas em cookie",
"prefs-help-recentchangescount": "Used in [[Special:Preferences]], tab \"Recent changes\".",
"prefs-help-watchlist-token2": "Used in [[Special:Preferences]], tab Watchlist. (Formerly in {{msg-mw|prefs-help-watchlist-token}}.)",
"savedprefs": "This message appears after saving changes to your user preferences.",
- "savedrights": "This message appears after saving the user rights on [[Special:UserRights]].\n* $1 - The user name of the user which rights was saved.",
+ "savedrights": "This message appears after saving the user groups on [[Special:UserRights]].\n* $1 - The user name of the user which groups was saved.",
"timezonelegend": "{{Identical|Time zone}}",
"localtime": "Used as label in [[Special:Preferences#mw-prefsection-datetime|preferences]].",
"timezoneuseserverdefault": "[[Special:Preferences]] > Date and time > Time zone\n\nThis option lets your time zone setting use the one that is used on the wiki (often UTC).\n\nParameters:\n* $1 - timezone name, or timezone offset (in \"%+03d:%02d\" format)",
"htmlform-user-not-valid": "Error message shown if the name provided by the user isn't a valid username. $1 is the username.",
"rawmessage": "{{notranslate}} Used to pass arbitrary text as a message specifier array",
"logentry-delete-delete": "{{Logentry|[[Special:Log/delete]]}}",
+ "logentry-delete-delete_redir": "{{Logentry|[[Special:Log/delete]]}}",
"logentry-delete-restore": "{{Logentry|[[Special:Log/delete]]}}",
"logentry-delete-event": "{{Logentry|[[Special:Log/delete]]}}\n{{Logentryparam}}\n* $5 - count of affected log events",
"logentry-delete-revision": "{{Logentry|[[Special:Log/delete]]}}\n{{Logentryparam}}\n* $5 - the number of affected revisions of the page $3",
"log-action-filter-contentmodel-change": "{{doc-log-action-filter-action|contentmodel|change}}",
"log-action-filter-contentmodel-new": "{{doc-log-action-filter-action|contentmodel|new}}",
"log-action-filter-delete-delete": "{{doc-log-action-filter-action|delete|delete}}",
+ "log-action-filter-delete-delete_redir": "{{doc-log-action-filter-action|delete|delete_redir}}",
"log-action-filter-delete-restore": "{{doc-log-action-filter-action|delete|restore}}",
"log-action-filter-delete-event": "{{doc-log-action-filter-action|delete|event}}",
"log-action-filter-delete-revision": "{{doc-log-action-filter-action|delete|revision}}",
"usercssispublic": "A reminder to users that CSS subpages are not preferences but normal pages, and thus can be viewed by other users and the general public. This message is shown to a user whenever they are editing a subpage in their own user-space that ends in .css. See also {{msg-mw|userjsispublic}}",
"restrictionsfield-badip": "An error message shown when one entered an invalid IP address or range in a restrictions field (such as Special:BotPassword). $1 is the IP address.",
"restrictionsfield-label": "Field label shown for restriction fields (e.g. on Special:BotPassword).",
- "restrictionsfield-help": "Placeholder text displayed in restriction fields (e.g. on Special:BotPassword).",
- "edit-error-short": "Error message. Parameters:\n* $1 - the error details\nSee also:\n* {{msg-mw|edit-error-long}}\n{{Identical|Error}}",
- "edit-error-long": "Error message. Parameters:\n* $1 - the error details\nSee also:\n* {{msg-mw|edit-error-short}}\n{{Identical|Error}}"
+ "restrictionsfield-help": "Placeholder text displayed in restriction fields (e.g. on Special:BotPassword)."
}
"apisandbox-continue-clear": "Очистить",
"apisandbox-continue-help": "{{int:apisandbox-continue}} [https://www.mediawiki.org/wiki/API:Query#Continuing_queries продолжит] последний запрос; {{int:apisandbox-continue-clear}} очистит связанные с продолжением параметры.",
"apisandbox-param-limit": "Введите <kbd>максимальное</kbd> использование максимального предела.",
+ "apisandbox-multivalue-all-namespaces": "$1 (Все пространства имён)",
+ "apisandbox-multivalue-all-values": "$1 (Все значения)",
"booksources": "Источники книг",
"booksources-search-legend": "Поиск информации о книге",
"booksources-isbn": "ISBN:",
"mw-widgets-dateinput-placeholder-month": "ГГГГ-ММ",
"mw-widgets-titleinput-description-new-page": "страница ещё не существует",
"mw-widgets-titleinput-description-redirect": "перенаправление на $1",
+ "mw-widgets-categoryselector-add-category-placeholder": "Добавить категорию…",
"sessionmanager-tie": "Невозможно использовать одновременно несколько типов проверки подлинности запроса: $1.",
"sessionprovider-generic": "$1 сессий",
"sessionprovider-mediawiki-session-cookiesessionprovider": "сессий на основе куки",
"apisandbox-continue-clear": "Počisti",
"apisandbox-continue-help": "{{int:apisandbox-continue}} bo [https://www.mediawiki.org/wiki/API:Query#Continuing_queries nadaljevalo] zadnjo zahtevo; {{int:apisandbox-continue-clear}} bo počistilo parametre, povezane z nadaljevanjem.",
"apisandbox-param-limit": "Vnesite <kbd>max</kbd>, da uporabite največjo omejitev.",
+ "apisandbox-multivalue-all-namespaces": "$1 (Vsi imenski prostori)",
+ "apisandbox-multivalue-all-values": "$1 (Vse vrednosti)",
"booksources": "Viri knjig",
"booksources-search-legend": "Išči knjižne vire",
"booksources-search": "Išči",
"htmlform-float-invalid": "Vrednost, ki ste jo vnesli, ni število.",
"htmlform-int-toolow": "Vrednost, ki ste jo vnesli, je manjša od najmanjše dovoljene vrednosti $1",
"htmlform-int-toohigh": "Vrednost, ki ste jo vnesli, je večja od največje dovoljene vrednosti $1",
- "htmlform-required": "Ta vrednost je zahtevana",
+ "htmlform-required": "To je zahtevana vrednost.",
"htmlform-submit": "Pošlji",
"htmlform-reset": "Razveljavi spremembe",
"htmlform-selectorother-other": "Drugo",
"mw-widgets-dateinput-placeholder-month": "LLLL-MM",
"mw-widgets-titleinput-description-new-page": "stran še ne obstaja",
"mw-widgets-titleinput-description-redirect": "preusmeritev na $1",
+ "mw-widgets-categoryselector-add-category-placeholder": "Dodaj kategorijo ...",
"sessionmanager-tie": "Ne morem združiti več vrst overitvenih zahtev: $1.",
"sessionprovider-generic": "sej $1",
"sessionprovider-mediawiki-session-cookiesessionprovider": "sej, ki temeljijo na piškotkih",
"passwordreset-emaildisabled": "Имејл је онемогућен на овом викију.",
"passwordreset-username": "Корисничко име:",
"passwordreset-domain": "Домен:",
- "passwordreset-capture": "Погледати крајњи имејл?",
- "passwordreset-capture-help": "Ако означите ову кућицу, имејл (с привременом лозинком) ће бити приказан и послат кориснику.",
"passwordreset-email": "Имејл адреса:",
"passwordreset-emailtitle": "Детаљи налога на викију {{SITENAME}}",
"passwordreset-emailtext-ip": "Неко (вероватно Ви, са ИП адресе $1) је затражио нову лозинку на викију {{SITENAME}} ($4).\nСледећи {{PLURAL:$3|кориснички налог је повезан|кориснички налози су повезани}} с овом имејл адресом:\n\n$2\n\n{{PLURAL:$3|Привремена лозинка истиче|Привремене лозинке истичу}} за {{PLURAL:$5|један дан|$5 дана}}.\nПријавите се и изаберите нову лозинку. Ако је неко други захтевао ову радњу или сте се сетили лозинке и не желите да је мењате, занемарите ову поруку и наставите користити стару лозинку.",
"right-siteadmin": "закључавање и откључавање базе података",
"right-override-export-depth": "извоз страница укључујући и повазене странице до дубине од пет веза",
"right-sendemail": "Пошаљи имејл другим корисницима",
- "right-passwordreset": "прегледање порука за обнављање лозинке",
"right-managechangetags": "прављење и (де)активирање [[Special:Tags|ознака]]",
"right-applychangetags": "примењивање [[Special:Tags|ознака]] на нечије измене",
"right-changetags": "додавање и уклањање разних [[Special:Tags|ознака]] на појединачним изменама и уносима у дневницима",
"passwordreset-emaildisabled": "Imejl je onemogućen na ovom vikiju.",
"passwordreset-username": "Korisničko ime:",
"passwordreset-domain": "Domen:",
- "passwordreset-capture": "Pogledati krajnji imejl?",
- "passwordreset-capture-help": "Ako označite ovo polje, imejl (s privremenom lozinkom) će biti prikazana i poslata korisniku.",
"passwordreset-email": "Imejl adresa:",
"passwordreset-emailtitle": "Detalji naloga na vikiju {{SITENAME}}",
"passwordreset-emailtext-ip": "Neko (verovatno Vi, sa IP adrese $1) je zatražio novu lozinku na vikiju {{SITENAME}} ($4).\nSledeći {{PLURAL:$3|korisnički nalog je povezan|korisnički nalozi su povezani}} s ovom imejl adresom:\n\n$2\n\n{{PLURAL:$3|Privremena lozinka ističe|Privremene lozinke ističu}} za {{PLURAL:$5|jedan dan|$5 dana}}.\nPrijavite se i izaberite novu lozinku. Ako je neko drugi zahtevao ovu radnju ili ste se setili lozinke i ne želite da je menjate, zanemarite ovu poruku i nastavite koristiti staru lozinku.",
"right-siteadmin": "zaključavanje i otključavanje baze podataka",
"right-override-export-depth": "izvoz stranica uključujući i povazene stranice do dubine od pet veza",
"right-sendemail": "Pošalji imejl drugim korisnicima",
- "right-passwordreset": "pregledanje poruka za obnavljanje lozinke",
"right-managechangetags": "pravljenje i (de)aktiviranje [[Special:Tags|oznaka]]",
"grant-group-page-interaction": "Uređivanje stranica",
"grant-group-file-interaction": "Uređivanje datoteka",
"apisandbox-continue-clear": "Rensa",
"apisandbox-continue-help": "{{int:apisandbox-continue}} kommer att [https://www.mediawiki.org/wiki/API:Query#Continuing_queries fortsätta] den sista begäran; {{int:apisandbox-continue-clear}} kommer att rensa fortsättningsrelaterade parametrar.",
"apisandbox-param-limit": "Ange <kbd>max</kbd> för att använda den maximala gränsen.",
+ "apisandbox-multivalue-all-namespaces": "$1 (alla namnrymder)",
+ "apisandbox-multivalue-all-values": "$1 (alla värden)",
"booksources": "Bokkällor",
"booksources-search-legend": "Sök efter bokkällor",
"booksources-search": "Sök",
"activeusers-count": "$1 {{PLURAL:$1|handling|handlingar}} {{PLURAL:$3|det senaste dygnet|de senaste $3 dygnen}}",
"activeusers-from": "Visa användare från och med:",
"activeusers-groups": "Visa användare som tillhör grupper:",
+ "activeusers-excludegroups": "Exkludera användare som tillhör grupper:",
"activeusers-noresult": "Inga användare funna.",
"activeusers-submit": "Visa aktiva användare",
"listgrouprights": "Behörigheter för användargrupper",
"mw-widgets-dateinput-placeholder-month": "ÅÅÅÅ-MM",
"mw-widgets-titleinput-description-new-page": "sidan existerar inte ännu",
"mw-widgets-titleinput-description-redirect": "omdirigerar till $1",
+ "mw-widgets-categoryselector-add-category-placeholder": "Lägg till en kategori...",
"sessionmanager-tie": "Kan inte kombinera flera begäransautentiseringstyper: $1.",
"sessionprovider-generic": "$1-sessioner",
"sessionprovider-mediawiki-session-cookiesessionprovider": "cookiebaserade sessioner",
"suppressionlogtext": "该列表列出了管理人员隐藏的删除与封禁。另参见[[Special:BlockList|封禁列表]]查询当前的封禁列表。",
"mergehistory": "合并页面历史",
"mergehistory-header": "此页面让您将来源页面的版本合并到新页面中去。请确保此次更改能继续保持历史页面的连续性。",
- "mergehistory-box": "合并两个页面的版本历史:",
+ "mergehistory-box": "合并两个页面的修订版本:",
"mergehistory-from": "来源页面:",
"mergehistory-into": "目的页面:",
"mergehistory-list": "可以合并的编辑历史",
"apisandbox-continue-clear": "清除",
"apisandbox-continue-help": "{{int:apisandbox-continue}}将[https://www.mediawiki.org/wiki/API:Query#Continuing_queries 继续]上次请求;{{int:apisandbox-continue-clear}}将清除继续相关的参数。",
"apisandbox-param-limit": "输入<kbd>max</kbd>以使用最大限制。",
+ "apisandbox-multivalue-all-namespaces": "$1(所有名字空间)",
+ "apisandbox-multivalue-all-values": "$1(所有值)",
"booksources": "网络书源",
"booksources-search-legend": "搜索图书来源",
"booksources-isbn": "ISBN:",
"mw-widgets-dateinput-no-date": "没有选定日期",
"mw-widgets-titleinput-description-new-page": "页面不存在",
"mw-widgets-titleinput-description-redirect": "重定向至$1",
+ "mw-widgets-categoryselector-add-category-placeholder": "添加分类...",
"sessionmanager-tie": "不能结合多个请求的身份验证类型:$1。",
"sessionprovider-generic": "$1会话",
"sessionprovider-mediawiki-session-cookiesessionprovider": "基于cookie的会话",
*/
public function getConfig() {
if ( $this->config === null ) {
- $this->config = ConfigFactory::getDefaultInstance()->makeConfig( 'main' );
+ $this->config = MediaWikiServices::getInstance()->getMainConfig();
}
return $this->config;
* @author Roan Kattouw
*/
+use MediaWiki\MediaWikiServices;
+
require_once __DIR__ . '/Maintenance.php';
/**
public function execute() {
$dbw = $this->getDB( DB_MASTER );
- $rl = new ResourceLoader( ConfigFactory::getDefaultInstance()->makeConfig( 'main' ) );
+ $rl = new ResourceLoader( MediaWikiServices::getInstance()->getMainConfig() );
$moduleNames = $rl->getModuleNames();
$moduleList = implode( ', ', array_map( [ $dbw, 'addQuotes' ], $moduleNames ) );
$limit = max( 1, intval( $this->getOption( 'batchsize', 500 ) ) );
require_once "$IP/includes/Setup.php";
// Initialize main config instance
-$maintenance->setConfig( ConfigFactory::getDefaultInstance()->makeConfig( 'main' ) );
+$maintenance->setConfig( MediaWikiServices::getInstance()->getMainConfig() );
// Sanity-check required extensions are installed
$maintenance->checkRequiredExtensions();
* @ingroup Maintenance
*/
+use MediaWiki\MediaWikiServices;
+
require_once __DIR__ . '/Maintenance.php';
/**
}
}
- $rev = new WikiRevision( ConfigFactory::getDefaultInstance()->makeConfig( 'main' ) );
+ $rev = new WikiRevision( MediaWikiServices::getInstance()->getMainConfig() );
$rev->setText( rtrim( $text ) );
$rev->setTitle( $title );
$rev->setUserObj( $user );
* @ingroup Maintenance ExternalStorage
*/
+use MediaWiki\MediaWikiServices;
+
if ( !defined( 'MEDIAWIKI' ) ) {
$optionsWithoutArgs = [ 'fix' ];
require_once __DIR__ . '/../commandLine.inc';
$source = new ImportStreamSource( $file );
$importer = new WikiImporter(
$source,
- ConfigFactory::getDefaultInstance()->makeConfig( 'main' )
+ MediaWikiServices::getInstance()->getMainConfig()
);
$importer->setRevisionCallback( [ $this, 'importRevision' ] );
$importer->doImport();
// get a reference to the mock object.
MessageCache::singleton()->getParser();
$restore = $this->executeSetupSnippets( [ 'wgParser' => new ParserTestMockParser ] );
- $status = $page->doEditContent( ContentHandler::makeContent( $text, $title ), '', EDIT_NEW );
+ $status = $page->doEditContent(
+ ContentHandler::makeContent( $text, $title ),
+ '',
+ EDIT_NEW | EDIT_INTERNAL
+ );
$restore();
if ( !$status->isOK() ) {
<?php
+use MediaWiki\MediaWikiServices;
use Psr\Log\LoggerInterface;
use Psr\Log\NullLogger;
// and default registrations are done from ServiceWiring instead.
public function __construct( Config $config = null, LoggerInterface $logger = null ) {
$this->setLogger( $logger ?: new NullLogger() );
- $this->config = $config ?: ConfigFactory::getDefaultInstance()->makeConfig( 'main' );
+ $this->config = $config ?: MediaWikiServices::getInstance()->getMainConfig();
$this->setMessageBlobStore( new MessageBlobStore( $this, $this->getLogger() ) );
}
}
);
}
+ /**
+ * @covers Message::extractParam
+ */
+ public function testMessageAsParam() {
+ $this->setMwGlobals( [
+ 'wgScript' => '/wiki/index.php',
+ 'wgArticlePath' => '/wiki/$1',
+ ] );
+
+ $msg = new Message( 'returnto', [
+ new Message( 'apihelp-link', [
+ 'foo', new Message( 'mainpage', [], Language::factory( 'en' ) )
+ ], Language::factory( 'de' ) )
+ ], Language::factory( 'es' ) );
+
+ $this->assertEquals(
+ 'Volver a [[Special:ApiHelp/foo|Página principal]].',
+ $msg->text(),
+ 'Process with ->text()'
+ );
+ $this->assertEquals(
+ '<p>Volver a <a href="/wiki/Special:ApiHelp/foo" title="Special:ApiHelp/foo">Página '
+ . "principal</a>.\n</p>",
+ $msg->parseAsBlock(),
+ 'Process with ->parseAsBlock()'
+ );
+ }
+
public static function provideParser() {
return [
[
$request->setCookie( 'Token', '123' );
$this->assertTrue( $outputPage->haveCacheVaryCookies() );
}
+
+ /*
+ * @covers OutputPage::addCategoryLinks
+ * @covers OutputPage::getCategories
+ */
+ function testGetCategories() {
+ $fakeResultWrapper = new FakeResultWrapper( [
+ (object) [
+ 'pp_value' => 1,
+ 'page_title' => 'Test'
+ ],
+ (object) [
+ 'page_title' => 'Test2'
+ ]
+ ] );
+ $outputPage = $this->getMockBuilder( 'OutputPage' )
+ ->setConstructorArgs( [ new RequestContext() ] )
+ ->setMethods( [ 'addCategoryLinksToLBAndGetResult' ] )
+ ->getMock();
+ $outputPage->expects( $this->any() )
+ ->method( 'addCategoryLinksToLBAndGetResult' )
+ ->will( $this->returnValue( $fakeResultWrapper ) );
+
+ $outputPage->addCategoryLinks( [
+ 'Test' => 'Test',
+ 'Test2' => 'Test2',
+ ] );
+ $this->assertEquals( [ 0 => 'Test', '1' => 'Test2' ], $outputPage->getCategories() );
+ $this->assertEquals( [ 0 => 'Test2' ], $outputPage->getCategories( 'normal' ) );
+ $this->assertEquals( [ 0 => 'Test' ], $outputPage->getCategories( 'hidden' ) );
+ }
}
/**
namespace MediaWiki\Auth;
+use MediaWiki\MediaWikiServices;
+
/**
* @group AuthManager
* @covers MediaWiki\Auth\AbstractPasswordPrimaryAuthenticationProvider
$provider = $this->getMockForAbstractClass(
AbstractPasswordPrimaryAuthenticationProvider::class
);
- $provider->setConfig( \ConfigFactory::getDefaultInstance()->makeConfig( 'main' ) );
+ $provider->setConfig( MediaWikiServices::getInstance()->getMainConfig() );
$providerPriv = \TestingAccessWrapper::newFromObject( $provider );
$obj = $providerPriv->getPasswordFactory();
$provider = $this->getMockForAbstractClass(
AbstractPasswordPrimaryAuthenticationProvider::class
);
- $provider->setConfig( \ConfigFactory::getDefaultInstance()->makeConfig( 'main' ) );
+ $provider->setConfig( MediaWikiServices::getInstance()->getMainConfig() );
$provider->setLogger( new \Psr\Log\NullLogger() );
$providerPriv = \TestingAccessWrapper::newFromObject( $provider );
);
$provider->setConfig( new \MultiConfig( [
$config,
- \ConfigFactory::getDefaultInstance()->makeConfig( 'main' )
+ MediaWikiServices::getInstance()->getMainConfig()
] ) );
$provider->setLogger( new \Psr\Log\NullLogger() );
$providerPriv = \TestingAccessWrapper::newFromObject( $provider );
$provider = $this->getMockForAbstractClass(
AbstractPasswordPrimaryAuthenticationProvider::class
);
- $provider->setConfig( \ConfigFactory::getDefaultInstance()->makeConfig( 'main' ) );
+ $provider->setConfig( MediaWikiServices::getInstance()->getMainConfig() );
$provider->setLogger( new \Psr\Log\NullLogger() );
$providerPriv = \TestingAccessWrapper::newFromObject( $provider );
] );
$manager = new AuthManager(
- new \FauxRequest(), \ConfigFactory::getDefaultInstance()->makeConfig( 'main' )
+ new \FauxRequest(),
+ MediaWikiServices::getInstance()->getMainConfig()
);
$provider = $this->getMockForAbstractClass(
namespace MediaWiki\Auth;
+use MediaWiki\MediaWikiServices;
+
/**
* @group AuthManager
* @group Database
$request->expects( $this->any() )->method( 'getIP' )->will( $this->returnValue( '127.0.0.42' ) );
$manager = new AuthManager(
- $request, \ConfigFactory::getDefaultInstance()->makeConfig( 'main' )
+ $request,
+ MediaWikiServices::getInstance()->getMainConfig()
);
$provider = new LegacyHookPreAuthenticationProvider();
namespace MediaWiki\Auth;
+use MediaWiki\MediaWikiServices;
+
/**
* @group AuthManager
* @group Database
}
$config = new \MultiConfig( [
$this->config,
- \ConfigFactory::getDefaultInstance()->makeConfig( 'main' )
+ MediaWikiServices::getInstance()->getMainConfig()
] );
if ( !$this->manager ) {
namespace MediaWiki\Auth;
+use MediaWiki\MediaWikiServices;
use Wikimedia\ScopedCallback;
/**
}
$config = new \MultiConfig( [
$this->config,
- \ConfigFactory::getDefaultInstance()->makeConfig( 'main' )
+ MediaWikiServices::getInstance()->getMainConfig()
] );
if ( !$this->manager ) {
<?php
+use MediaWiki\MediaWikiServices;
+
class ConfigFactoryTest extends MediaWikiTestCase {
/**
public function testGetDefaultInstance() {
// NOTE: the global config factory returned here has been overwritten
// for operation in test mode. It may not reflect LocalSettings.
- $factory = ConfigFactory::getDefaultInstance();
+ $factory = MediaWikiServices::getInstance()->getConfigFactory();
$this->assertInstanceOf( 'Config', $factory->makeConfig( 'main' ) );
}
public function testValidateAllowsOnlyKnownTags() {
$field = new HTMLCheckMatrix( self::$defaultOptions );
- $this->assertInternalType( 'string', $this->validate( $field, [ 'foo' ] ) );
+ $this->assertInstanceOf( Message::class, $this->validate( $field, [ 'foo' ] ) );
}
public function testValidateAcceptsPartialTagList() {
<?php
+use MediaWiki\MediaWikiServices;
+
/**
* Integration test that checks import success and
* LinkCache integration.
$importer = new WikiImporter(
$importStreamSource->value,
- ConfigFactory::getDefaultInstance()->makeConfig( 'main' )
+ MediaWikiServices::getInstance()->getMainConfig()
);
$importer->setDebug( true );
<?php
+use MediaWiki\MediaWikiServices;
/**
* Test class for Import methods.
$importer = new WikiImporter(
$source,
- ConfigFactory::getDefaultInstance()->makeConfig( 'main' )
+ MediaWikiServices::getInstance()->getMainConfig()
);
$importer->doImport();
$importer = new WikiImporter(
$source,
- ConfigFactory::getDefaultInstance()->makeConfig( 'main' )
+ MediaWikiServices::getInstance()->getMainConfig()
);
$importer->setPageOutCallback( $callback );
$importer->doImport();
$importer = new WikiImporter(
$source,
- ConfigFactory::getDefaultInstance()->makeConfig( 'main' )
+ MediaWikiServices::getInstance()->getMainConfig()
);
$importer->setSiteInfoCallback( $callback );
$importer->doImport();
// without changing the visibility and without working around hacks in
// Maintenance.php
// For the same reason, we cannot just use FakeMaintenance.
+use MediaWiki\MediaWikiServices;
/**
* makes parts of the API of Maintenance that is hidden by protected visibily
public function testGetConfig() {
$this->assertInstanceOf( 'Config', $this->m->getConfig() );
$this->assertSame(
- ConfigFactory::getDefaultInstance()->makeConfig( 'main' ),
+ MediaWikiServices::getInstance()->getMainConfig(),
$this->m->getConfig()
);
}