http://www.mediawiki.org/wiki/Special:Code/MediaWiki/70981

Revision: 70981
Author:   siebrand
Date:     2010-08-12 20:15:49 +0000 (Thu, 12 Aug 2010)

Log Message:
-----------
Move NOCC to new style message group.

Added Paths:
-----------
    trunk/extensions/Translate/groups/Nocc/
    trunk/extensions/Translate/groups/Nocc/Nocc.yml

Removed Paths:
-------------
    trunk/extensions/Translate/groups/Nocc.php

Added: trunk/extensions/Translate/groups/Nocc/Nocc.yml
===================================================================
--- trunk/extensions/Translate/groups/Nocc/Nocc.yml                             
(rev 0)
+++ trunk/extensions/Translate/groups/Nocc/Nocc.yml     2010-08-12 20:15:49 UTC 
(rev 70981)
@@ -0,0 +1,44 @@
+BASIC:
+  id: out-nocc
+  label: NOCC (webmail client)
+  namespace: NS_NOCC
+  class: FileBasedMessageGroup
+  description: "{{int:bw-desc-nocc}}"
+  display: out/nocc
+
+FILES:
+  class: FlatPhpFFS
+  sourcePattern: %GROUPROOT%/nocc/webmail/lang/%CODE%.php
+  targetPattern: nocc/webmail/lang/%CODE%.php
+  codeMap:
+    sr-el: sr
+  header: |
+    <?php
+    /**
+     * Language configuration file for NOCC
+     *
+     * Copyright 2001 Nicolas Chalanset <nico...@free.fr>
+     * Copyright 2001 Olivier Cahagne <cahag...@epita.fr>
+     *
+     * This file is part of NOCC. NOCC is free software under the terms of the
+     * GNU General Public License. You should have received a copy of the 
license
+     * along with NOCC.  If not, see <http://www.gnu.org/licenses/>.
+     *
+     * @package    NOCC
+     * @subpackage Translations
+     * @license    http://www.gnu.org/licenses/ GNU General Public License
+     * @version    SVN: $Id: $
+     */
+
+TAGS:
+  optional:
+    - lang_locale
+    - lang_dir
+  ignored:
+    - charset
+
+CHECKER:
+  class: MessageChecker
+  checks:
+    - printfCheck
+    - braceBalanceCheck


Property changes on: trunk/extensions/Translate/groups/Nocc/Nocc.yml
___________________________________________________________________
Added: svn:eol-style
   + native

Deleted: trunk/extensions/Translate/groups/Nocc.php
===================================================================
--- trunk/extensions/Translate/groups/Nocc.php  2010-08-12 19:19:13 UTC (rev 
70980)
+++ trunk/extensions/Translate/groups/Nocc.php  2010-08-12 20:15:49 UTC (rev 
70981)
@@ -1,79 +0,0 @@
-<?php
-/**
- * Support NOCC: http://nocc.sourceforge.net.
- *
- * @file
- * @ingroup Extensions
- *
- * @author Siebrand Mazeland
- * @copyright Copyright © 2009, Siebrand Mazeland
- * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 
2.0 or later
- */
-
-class NoccMessageGroup extends MessageGroupOld {
-       protected $label = 'NOCC (webmail client)';
-       protected $id    = 'out-nocc';
-       protected $type  = 'nocc';
-
-       protected   $fileDir  = '__BUG__';
-
-       public function getPath() { return $this->fileDir; }
-       public function setPath( $value ) { $this->fileDir = $value; }
-
-       protected $codeMap = array(
-               'sr-el' => 'sr',
-       );
-
-       protected $optional = array(
-               'lang_locale', 'lang_dir',
-       );
-
-       protected $ignored = array(
-               'charset',
-       );
-
-       public $header = '<?php
-/**
- * Language configuration file for NOCC
- *
- * Copyright 2001 Nicolas Chalanset <nico...@free.fr>
- * Copyright 2001 Olivier Cahagne <cahag...@epita.fr>
- *
- * This file is part of NOCC. NOCC is free software under the terms of the
- * GNU General Public License. You should have received a copy of the license
- * along with NOCC.  If not, see <http://www.gnu.org/licenses/>.
- *
- * @package    NOCC
- * @subpackage Translations
- * @license    http://www.gnu.org/licenses/ GNU General Public License
- * @version    SVN: $Id$
- */';
-
-       public function getMessageFile( $code ) {
-               if ( isset( $this->codeMap[$code] ) ) {
-                       $code = $this->codeMap[$code];
-               }
-               return "$code.php";
-       }
-
-       protected function getFileLocation( $code ) {
-               return $this->fileDir . '/' . $this->getMessageFile( $code );
-       }
-
-       public function getReader( $code ) {
-               return new PhpVariablesFormatReader( $this->getFileLocation( 
$code ) );
-       }
-
-       public function getWriter() {
-               return new PhpVariablesFormatWriter( $this );
-       }
-
-       public function getChecker() {
-               $checker = new MessageChecker( $this );
-               $checker->setChecks( array(
-                       array( $checker, 'printfCheck' ),
-                       array( $checker, 'braceBalanceCheck' ),
-               ) );
-               return $checker;
-       }
-}



_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to