Bug 37781 - Add German namespace translations
Change-Id: I3df5ee8e5b49ea49dcf3251272a132757a930b0c
This commit is contained in:
Родитель
2abd4cd813
Коммит
e893f95f01
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
$namespaceNames = array();
|
||||
|
||||
// For wikis without Widgets installed.
|
||||
if ( !defined( 'NS_WIDGET' ) ) {
|
||||
define( 'NS_WIDGET', 274 );
|
||||
define( 'NS_WIDGET_TALK', 275 );
|
||||
}
|
||||
|
||||
$namespaceNames['en'] = array(
|
||||
NS_WIDGET => 'Widget',
|
||||
NS_WIDGET_TALK => 'Widget_talk',
|
||||
);
|
||||
|
||||
$namespaceNames['de'] = array(
|
||||
NS_WIDGET_TALK => 'Widget_Diskussion',
|
||||
);
|
|
@ -33,10 +33,6 @@ if ( !defined( 'NS_WIDGET_TALK' ) ) {
|
|||
throw new MWException( 'Configuration error. Do not define NS_WIDGET_TALK, it is automatically set based on NS_WIDGET.' );
|
||||
}
|
||||
|
||||
// Define new namespaces
|
||||
$wgExtraNamespaces[NS_WIDGET] = 'Widget';
|
||||
$wgExtraNamespaces[NS_WIDGET_TALK] = 'Widget_talk';
|
||||
|
||||
// Support subpages only for talk pages by default
|
||||
$wgNamespacesWithSubpages[NS_WIDGET_TALK] = true;
|
||||
|
||||
|
@ -56,6 +52,7 @@ $dir = dirname( __FILE__ ) . '/';
|
|||
// Initialize Smarty
|
||||
require_once( $dir . 'smarty/Smarty.class.php' );
|
||||
$wgExtensionMessagesFiles['Widgets'] = $dir . 'Widgets.i18n.php';
|
||||
$wgExtensionMessagesFiles['WidgetsNamespaces'] = $dir . 'Widgets.i18n.namespaces.php';
|
||||
$wgAutoloadClasses['WidgetRenderer'] = $dir . 'WidgetRenderer.php';
|
||||
|
||||
$wgExtensionMessagesFiles['WidgetsMagic'] = $dir . 'Widgets.i18n.magic.php';
|
||||
|
@ -87,7 +84,7 @@ function processEncodedWidgetOutput( &$out, &$text ) {
|
|||
}
|
||||
|
||||
function widgetNamespacesInit() {
|
||||
global $wgGroupPermissions, $wgNamespaceProtection, $wgWidgetsUseFlaggedRevs;
|
||||
global $wgNamespaceProtection, $wgWidgetsUseFlaggedRevs;
|
||||
|
||||
if ( !$wgWidgetsUseFlaggedRevs ) {
|
||||
// Setting required namespace permission rights
|
||||
|
|
Загрузка…
Ссылка в новой задаче