public function getTestGroups(&$list)
 {
     $exampleMessageGroup = new WikiMessageGroup('theid', 'thesource');
     $exampleMessageGroup->setLabel('thelabel');
     // Example
     $exampleMessageGroup->setNamespace(5);
     // Example
     $list['theid'] = $exampleMessageGroup;
     $anotherExampleMessageGroup = new WikiMessageGroup('anotherid', 'thesource');
     $anotherExampleMessageGroup->setLabel('thelabel');
     // Example
     $anotherExampleMessageGroup->setNamespace(5);
     // Example
     $list['anotherid'] = $anotherExampleMessageGroup;
     return false;
 }
コード例 #2
0
 function addSidebarMessageGroup($id)
 {
     $mg = new WikiMessageGroup($id, 'sidebar-messages');
     $mg->setLabel('Sidebar');
     $mg->setDescription('Messages used in the sidebar of this wiki');
     return $mg;
 }
コード例 #3
0
    }
    $wgTranslateEC = array();
    if ($wgDBname === 'wikimania2013wiki') {
        $wgHooks['TranslatePostInitGroups'][] = function (&$cc) {
            $id = 'wiki-sidebar';
            $mg = new WikiMessageGroup($id, 'sidebar-messages');
            $mg->setLabel('Sidebar');
            $mg->setDescription('Messages used in the sidebar of this wiki');
            $cc[$id] = $mg;
            return true;
        };
    }
    if ($wgDBname === 'commonswiki') {
        $wgHooks['TranslatePostInitGroups'][] = function (&$cc) {
            $id = 'wiki-translatable';
            $mg = new WikiMessageGroup($id, 'translatable-messages');
            $mg->setLabel('Interface');
            $mg->setDescription('Messages used in the custom interface of this wiki');
            $cc[$id] = $mg;
            return true;
        };
    }
    unset($wgSpecialPages['FirstSteps']);
    unset($wgSpecialPages['ManageMessageGroups']);
    unset($wgSpecialPages['TranslationStats']);
}
if ($wmgUseTranslationNotifications) {
    require_once "{$IP}/extensions/TranslationNotifications/TranslationNotifications.php";
    $wgNotificationUsername = '******';
    $wgNotificationUserPassword = $wmgTranslationNotificationUserPassword;
    $wgTranslationNotificationsContactMethods['talkpage-elsewhere'] = true;
 public function __construct($id, array $messages)
 {
     parent::__construct($id, 'unused');
     $this->id = $id;
     $this->messages = $messages;
 }