Index: trunk/extensions/Translate/SpecialTranslationChanges.php |
— | — | @@ -80,6 +80,7 @@ |
81 | 81 | case 'core': $class = 'mediawiki'; break; |
82 | 82 | case 'out-freecol': $class = 'freecol'; break; |
83 | 83 | case 'out-mantis': $class = 'mantis'; break; |
| 84 | + case 'out-nocc': $class = 'nocc'; break; |
84 | 85 | case 'out-voctrain': $class = 'voctrain'; break; |
85 | 86 | case 'out-zabbix': $class = 'zabbix'; break; |
86 | 87 | default: $class = 'extension'; break; |
Index: trunk/extensions/Translate/groups/Nocc.php |
— | — | @@ -0,0 +1,69 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * Support NOCC: http://nocc.sourceforge.net. |
| 5 | + * |
| 6 | + * @addtogroup Extensions |
| 7 | + * |
| 8 | + * @author Siebrand Mazeland |
| 9 | + * @copyright Copyright � 2009, Siebrand Mazeland |
| 10 | + * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later |
| 11 | + */ |
| 12 | + |
| 13 | +class NoccMessageGroup extends MessageGroup { |
| 14 | + protected $label = 'NOCC (webmail client)'; |
| 15 | + protected $id = 'out-nocc'; |
| 16 | + protected $type = 'nocc'; |
| 17 | + |
| 18 | + protected $fileDir = '__BUG__'; |
| 19 | + |
| 20 | + public function getPath() { return $this->fileDir; } |
| 21 | + public function setPath( $value ) { $this->fileDir = $value; } |
| 22 | + |
| 23 | + protected $codeMap = array( |
| 24 | + 'fa' => 'farsi', |
| 25 | + 'sr-el' => 'sr', |
| 26 | + 'ko' => 'kr', |
| 27 | + 'zh-hans' => 'zh-gb', |
| 28 | + 'zh-hant' => 'zh-tw', |
| 29 | + ); |
| 30 | + |
| 31 | +/* protected $optional = array( |
| 32 | + 'key', |
| 33 | + ); */ |
| 34 | + |
| 35 | + public $header = '<?php |
| 36 | +/** |
| 37 | + * Language configuration file for NOCC |
| 38 | + * |
| 39 | + * Copyright 2001 Nicolas Chalanset <nicocha@free.fr> |
| 40 | + * Copyright 2001 Olivier Cahagne <cahagn_o@epita.fr> |
| 41 | + * |
| 42 | + * This file is part of NOCC. NOCC is free software under the terms of the |
| 43 | + * GNU General Public License. You should have received a copy of the license |
| 44 | + * along with NOCC. If not, see <http://www.gnu.org/licenses/>. |
| 45 | + * |
| 46 | + * @package NOCC |
| 47 | + * @subpackage Translations |
| 48 | + * @license http://www.gnu.org/licenses/ GNU General Public License |
| 49 | + * @version SVN: $Id$ |
| 50 | + */'; |
| 51 | + |
| 52 | + public function getMessageFile( $code ) { |
| 53 | + if ( isset( $this->codeMap[$code] ) ) { |
| 54 | + $code = $this->codeMap[$code]; |
| 55 | + } |
| 56 | + return "$code.php"; |
| 57 | + } |
| 58 | + |
| 59 | + protected function getFileLocation( $code ) { |
| 60 | + return $this->fileDir . '/' . $this->getMessageFile( $code ); |
| 61 | + } |
| 62 | + |
| 63 | + public function getReader( $code ) { |
| 64 | + return new PhpVariablesFormatReader( $this->getFileLocation( $code ) ); |
| 65 | + } |
| 66 | + |
| 67 | + public function getWriter() { |
| 68 | + return new PhpVariablesFormatWriter( $this ); |
| 69 | + } |
| 70 | +} |
Property changes on: trunk/extensions/Translate/groups/Nocc.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 71 | + native |
Added: svn:keywords |
2 | 72 | + Id |
Index: trunk/extensions/Translate/Translate.php |
— | — | @@ -11,7 +11,7 @@ |
12 | 12 | * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later |
13 | 13 | */ |
14 | 14 | |
15 | | -define( 'TRANSLATE_VERSION', '11:2009-03-27' ); |
| 15 | +define( 'TRANSLATE_VERSION', '11:2009-04-04:2' ); |
16 | 16 | |
17 | 17 | $wgExtensionCredits['specialpage'][] = array( |
18 | 18 | 'name' => 'Translate', |
Index: trunk/extensions/Translate/MessageChecks.php |
— | — | @@ -32,6 +32,11 @@ |
33 | 33 | 'checkPrintfExtraVars', |
34 | 34 | 'checkBalance', |
35 | 35 | ), |
| 36 | + 'nocc' => array( |
| 37 | + 'checkPrintfMissingVars', |
| 38 | + 'checkPrintfExtraVars', |
| 39 | + 'checkBalance', |
| 40 | + ), |
36 | 41 | 'voctrain' => array( |
37 | 42 | 'checkI18nSprintMissingVars', |
38 | 43 | 'checkI18nSprintExtraVars', |
Index: trunk/extensions/Translate/_autoload.php |
— | — | @@ -71,6 +71,7 @@ |
72 | 72 | $wgAutoloadClasses['CommonistMessageGroup'] = $dir . 'groups/Commonist.php'; |
73 | 73 | $wgAutoloadClasses['FreeColMessageGroup'] = $dir . 'groups/FreeCol.php'; |
74 | 74 | $wgAutoloadClasses['MantisMessageGroup'] = $dir . 'groups/Mantis.php'; |
| 75 | +$wgAutoloadClasses['NoccMessageGroup'] = $dir . 'groups/Nocc.php'; |
75 | 76 | |
76 | 77 | # tag |
77 | 78 | $wgAutoloadClasses['TranslateTag'] = $dir . 'tag/Tag.php'; |
Index: trunk/extensions/Translate/README |
— | — | @@ -33,6 +33,9 @@ |
34 | 34 | </code> |
35 | 35 | |
36 | 36 | == Changes in version 11 == |
| 37 | +* 2009-04-04:2 Experimental support added for NOCC |
| 38 | +* 2009-04-04:1 PhpVariables Mantis header inconsistency fixed |
| 39 | +* 2009-03-29 Table header on Special:LanguageStats suppressed when all translations are complete |
37 | 40 | |
38 | 41 | == Changes in version 10 == |
39 | 42 | * 2009-03-24 Also 2 decimals for fuzzy in Special:LanguageStats |