r70981 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r70980‎ | r70981 | r70982 >
Date:20:15, 12 August 2010
Author:siebrand
Status:deferred
Tags:
Comment:
Move NOCC to new style message group.
Modified paths:
  • /trunk/extensions/Translate/groups/Nocc (added) (history)
  • /trunk/extensions/Translate/groups/Nocc.php (deleted) (history)
  • /trunk/extensions/Translate/groups/Nocc/Nocc.yml (added) (history)

Diff [purge]

Index: trunk/extensions/Translate/groups/Nocc.php
@@ -1,79 +0,0 @@
2 -<?php
3 -/**
4 - * Support NOCC: http://nocc.sourceforge.net.
5 - *
6 - * @file
7 - * @ingroup Extensions
8 - *
9 - * @author Siebrand Mazeland
10 - * @copyright Copyright © 2009, Siebrand Mazeland
11 - * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
12 - */
13 -
14 -class NoccMessageGroup extends MessageGroupOld {
15 - protected $label = 'NOCC (webmail client)';
16 - protected $id = 'out-nocc';
17 - protected $type = 'nocc';
18 -
19 - protected $fileDir = '__BUG__';
20 -
21 - public function getPath() { return $this->fileDir; }
22 - public function setPath( $value ) { $this->fileDir = $value; }
23 -
24 - protected $codeMap = array(
25 - 'sr-el' => 'sr',
26 - );
27 -
28 - protected $optional = array(
29 - 'lang_locale', 'lang_dir',
30 - );
31 -
32 - protected $ignored = array(
33 - 'charset',
34 - );
35 -
36 - public $header = '<?php
37 -/**
38 - * Language configuration file for NOCC
39 - *
40 - * Copyright 2001 Nicolas Chalanset <nicocha@free.fr>
41 - * Copyright 2001 Olivier Cahagne <cahagn_o@epita.fr>
42 - *
43 - * This file is part of NOCC. NOCC is free software under the terms of the
44 - * GNU General Public License. You should have received a copy of the license
45 - * along with NOCC. If not, see <http://www.gnu.org/licenses/>.
46 - *
47 - * @package NOCC
48 - * @subpackage Translations
49 - * @license http://www.gnu.org/licenses/ GNU General Public License
50 - * @version SVN: $Id$
51 - */';
52 -
53 - public function getMessageFile( $code ) {
54 - if ( isset( $this->codeMap[$code] ) ) {
55 - $code = $this->codeMap[$code];
56 - }
57 - return "$code.php";
58 - }
59 -
60 - protected function getFileLocation( $code ) {
61 - return $this->fileDir . '/' . $this->getMessageFile( $code );
62 - }
63 -
64 - public function getReader( $code ) {
65 - return new PhpVariablesFormatReader( $this->getFileLocation( $code ) );
66 - }
67 -
68 - public function getWriter() {
69 - return new PhpVariablesFormatWriter( $this );
70 - }
71 -
72 - public function getChecker() {
73 - $checker = new MessageChecker( $this );
74 - $checker->setChecks( array(
75 - array( $checker, 'printfCheck' ),
76 - array( $checker, 'braceBalanceCheck' ),
77 - ) );
78 - return $checker;
79 - }
80 -}
Index: trunk/extensions/Translate/groups/Nocc/Nocc.yml
@@ -0,0 +1,44 @@
 2+BASIC:
 3+ id: out-nocc
 4+ label: NOCC (webmail client)
 5+ namespace: NS_NOCC
 6+ class: FileBasedMessageGroup
 7+ description: "{{int:bw-desc-nocc}}"
 8+ display: out/nocc
 9+
 10+FILES:
 11+ class: FlatPhpFFS
 12+ sourcePattern: %GROUPROOT%/nocc/webmail/lang/%CODE%.php
 13+ targetPattern: nocc/webmail/lang/%CODE%.php
 14+ codeMap:
 15+ sr-el: sr
 16+ header: |
 17+ <?php
 18+ /**
 19+ * Language configuration file for NOCC
 20+ *
 21+ * Copyright 2001 Nicolas Chalanset <nicocha@free.fr>
 22+ * Copyright 2001 Olivier Cahagne <cahagn_o@epita.fr>
 23+ *
 24+ * This file is part of NOCC. NOCC is free software under the terms of the
 25+ * GNU General Public License. You should have received a copy of the license
 26+ * along with NOCC. If not, see <http://www.gnu.org/licenses/>.
 27+ *
 28+ * @package NOCC
 29+ * @subpackage Translations
 30+ * @license http://www.gnu.org/licenses/ GNU General Public License
 31+ * @version SVN: $Id: $
 32+ */
 33+
 34+TAGS:
 35+ optional:
 36+ - lang_locale
 37+ - lang_dir
 38+ ignored:
 39+ - charset
 40+
 41+CHECKER:
 42+ class: MessageChecker
 43+ checks:
 44+ - printfCheck
 45+ - braceBalanceCheck
Property changes on: trunk/extensions/Translate/groups/Nocc/Nocc.yml
___________________________________________________________________
Added: svn:eol-style
146 + native

Follow-up revisions

RevisionCommit summaryAuthorDate
r70982Follow-up r70981. Remove from autoloader.siebrand20:17, 12 August 2010

Status & tagging log