r103739 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r103738‎ | r103739 | r103740 >
Date:09:43, 20 November 2011
Author:erik
Status:ok
Tags:
Comment:
Add a simple input method for German umlauts and the sz character,
using ~ as the compose key.
Modified paths:
  • /trunk/extensions/Narayam/Narayam.i18n.php (modified) (history)
  • /trunk/extensions/Narayam/Narayam.php (modified) (history)
  • /trunk/extensions/Narayam/js/ext.narayam.rules.de.js (added) (history)

Diff [purge]

Index: trunk/extensions/Narayam/Narayam.i18n.php
@@ -55,6 +55,7 @@
5656 'narayam-bn-inscript' => 'Bengali InScript',
5757 'narayam-bn-nkb' => 'Bengali NKB',
5858 'narayam-ur' => 'Urdu standard',
 59+ 'narayam-de' => 'German',
5960 'narayam-gu' => 'Gujarati transliteration',
6061 );
6162
@@ -461,6 +462,7 @@
462463 'narayam-bn-avro' => 'Bengalisch (Avro)',
463464 'narayam-bn-inscript' => 'Bengalisch (InScript)',
464465 'narayam-bn-nkb' => 'Bengalisch (NKB)',
 466+ 'narayam-de' => 'Deutsch',
465467 );
466468
467469 /** Greek (Ελληνικά)
Index: trunk/extensions/Narayam/js/ext.narayam.rules.de.js
@@ -0,0 +1,24 @@
 2+/**
 3+ * German input method (umlauts and sz), using ~ as the compose key.
 4+ * @author Erik Moeller ([[User:Eloquence]])
 5+ * @date 2011-11-20
 6+ * License: Public domain
 7+ */
 8+
 9+(function() {
 10+
 11+var rules = [];
 12+var chars = {A: 'Ä', O: 'Ö', U: 'Ü', a: 'ä', o: 'ö', u: 'ü', s: 'ß', S: 'ß'};
 13+jQuery.each( chars, function( ascii, special ) {
 14+ rules.push( [ '~' + ascii, '~' , special ] );
 15+});
 16+
 17+jQuery.narayam.addScheme( 'de', {
 18+ 'namemsg': 'narayam-de',
 19+ 'extended_keyboard': false,
 20+ 'lookbackLength': 1,
 21+ 'keyBufferLength': 1,
 22+ 'rules': rules
 23+} );
 24+
 25+})(jQuery);
Property changes on: trunk/extensions/Narayam/js/ext.narayam.rules.de.js
___________________________________________________________________
Added: svn:eol-style
126 + native
Index: trunk/extensions/Narayam/Narayam.php
@@ -61,6 +61,9 @@
6262 'bn-inscript' => 'ext.narayam.rules.bn-inscript',
6363 'bn-nkb' => 'ext.narayam.rules.bn-nkb',
6464 ),
 65+ 'de' => array(
 66+ 'de' => 'ext.narayam.rules.de',
 67+ ),
6568 'brx' => array(
6669 'brx-inscript' => 'ext.narayam.rules.brx-inscript',
6770 ),
@@ -163,6 +166,7 @@
164167 'narayam-as-avro',
165168 'narayam-as-bornona',
166169 'narayam-as-inscript',
 170+ 'narayam-de',
167171 'narayam-brx-inscript',
168172 'narayam-eo',
169173 'narayam-hi',
@@ -230,6 +234,10 @@
231235 'scripts' => 'js/ext.narayam.rules.bn-nkb.js',
232236 'dependencies' => 'ext.narayam.core',
233237 );
 238+$wgResourceModules['ext.narayam.rules.de'] = $narayamTpl + array(
 239+ 'scripts' => 'js/ext.narayam.rules.de.js',
 240+ 'dependencies' => 'ext.narayam.core',
 241+);
234242 $wgResourceModules['ext.narayam.rules.brx-inscript'] = $narayamTpl + array(
235243 'scripts' => 'js/ext.narayam.rules.brx-inscript.js',
236244 'dependencies' => 'ext.narayam.core',

Status & tagging log