upstream: http://github.com/wikimedia/jquery.ime changes: * Support for contenteditable, like the VisualEditor surfaces. This support is very minimal now. Because of VE bugs on IME support, many things are broken. But one-one keyboard mappings should work with less issues. The UI of jquery.ime is not integrated with VE toolbar * More input methods - IPA-X-SAMPA by Amir - Armenian keymaps by Aleksey Chalabyan - Kurdish keymaps by Ghybu - Кыргыз keymap by Amir - Central Kurdish keyboards by Çalak * A lot of input method bug fixes multiple contributors * Minor UX fixes Introduces Rangy library. A module named rangy is defined in VisualEditor extension with more features of rangy. Here we need only the core library. This module is loaded dynamically from client when rangy is undefined. If VE is present rangy will be defined, the module defined in VE will be used. ie, This get loaded only when VE is not present and user trying to type in a contenteditable. Bug: 49569 Bug: 50849 Bug: 50220 Change-Id: Iadad5a4e5972fbd1359847526d28e9dbbe00a7c4
51 lines
1.4 KiB
JavaScript
51 lines
1.4 KiB
JavaScript
( function ( $ ) {
|
|
'use strict';
|
|
|
|
var defs = {
|
|
id: 'nb-normforms',
|
|
name: 'Norsk normal transliterasjon',
|
|
description: 'Norwegian input method with most common form transliterated',
|
|
date: '2012-12-04',
|
|
URL: 'http://www.evertype.com/alphabets/bokmaal-norwegian.pdf',
|
|
//URL: 'http://www.evertype.com/alphabets/nynorsk-norwegian.pdf',
|
|
author: 'John Erling Blad',
|
|
license: 'GPLv3',
|
|
version: '1.0',
|
|
contextLength: 1,
|
|
maxKeyLength: 3,
|
|
patterns: [
|
|
// The most common transliterations
|
|
[ 'aa', 'å' ],
|
|
[ 'AA', 'Å' ],
|
|
[ 'Aa', 'Å' ],
|
|
[ 'ae', 'æ' ],
|
|
[ 'AE', 'Æ' ],
|
|
[ 'Ae', 'Æ' ],
|
|
[ 'oe', 'ø' ],
|
|
[ 'OE', 'Ø' ],
|
|
[ 'Oe', 'Ø' ],
|
|
// The previous as negated transliterations, mostly for names
|
|
[ 'åa', 'a', 'aa' ],
|
|
[ 'ÅA', 'A', 'AA' ],
|
|
[ 'Åa', 'A', 'Aa' ],
|
|
[ 'åA', 'a', 'aA' ],
|
|
[ 'æe', 'e', 'ae' ],
|
|
[ 'ÆE', 'E', 'AE' ],
|
|
[ 'Æe', 'E', 'Ae' ],
|
|
[ 'æE', 'e', 'aE' ],
|
|
[ 'øe', 'e', 'oe' ],
|
|
[ 'ØE', 'E', 'OE' ],
|
|
[ 'Øe', 'E', 'Oe' ], // this fails for some names like "Øen"
|
|
[ 'øE', 'e', 'oE' ]
|
|
// historically similar forms
|
|
// "Å" is sometimes written as "Aa", and "å" as "aa", but in names
|
|
// it is not generally acceptable to use this transliteration. To
|
|
// handle those situations we need some oposite forms.
|
|
// There is a similar character "Å" for the length unit Angstrom,
|
|
// but this is not the upper case letter Å.
|
|
]
|
|
};
|
|
|
|
$.ime.register( defs );
|
|
}( jQuery ) );
|