wikimedia / jquery.ime Goto Github PK
View Code? Open in Web Editor NEWjQuery based input methods library
License: Other
jQuery based input methods library
License: Other
kok for Konkani is a macro-language code. It is currently not supported in ULS. It must be decided whether to use kok, or maybe some of the gom codes, or to implement some other solution for identifying Konkani.
Per Title. See screenshot.
http://crossbrowsertesting.com/users/34057/snapshot/zd7aeceb219d8e6ac9cc/public
In JS error log I have lots of
Uncaught SyntaxError: Invalid regular expression: /+'a$/: Nothing to repeat
I think the + characters should be escaped.
I am here to open a discussion about the application of dead keys and the name of some input methods.
Dead key is a special type of modifier keys which you can find in some keyboard layouts designed for the European languages. It is used to attach diacritics to the base letter. When we press the key, nothing is typed. But if we press the key before we type the base letter, the letter with diacritic is input. For example, in Turkish Q-keyboard, "Ctrl+Alt+[" +"u"="ü". But, no keyboard layouts for the Jquery IME is equipped with the dead keys. How can we applicate the dead keys in the IMEs?
Besides that, in the file "jquery.ime.inputmethods.js", some input methods' name is not understandable. The problem is originated from the commits by sucheta92. For example, the Lao IME is named as "າຶກ"; that's not understandable. Though I can't understand Lao very well, but I know that it is similar to the Thai script. We cannot use the vowel "າ" and "ຶ" alone to represent a syllable. However, if we add the consonant before/after/beneath/on top of the vowel, we can use the compound to represent the syllable - for example, "ອາ" represents the syllable "a". Then, the IME should be renamed as "ພາສາລາວ" (Lao language) or something else - but it should be understandable for the native user of the languages. I am sure we can solve that we the help of native speakers of these languages.
If there is no previous used language, use first input method to use when control+m is pressed.
Avoid sticking to system input method mod even after pressing control+m more than once.
Process https://gerrit.wikimedia.org/r/52376 ;)
After changing an input method or language, the user should be able to continue editing at the point he was before the operation. This is true when using keyboard shortcuts but it should be also when change is done using the mouse. Otherwise, the user has to click again in the input area and go back to the point where he was editing, making the editing experience less fluent.
This involves:
Update punjabi phonetic keyboard as per https://bugzilla.wikimedia.org/show_bug.cgi?id=43730
Presenting "System input method" as an input method option is technically correct, but from the user perspective the main function for this option is to disable any input help and can be presented as such (and only when it is needed):
Currently, Different IMEs have been ported as parts of jquery.ime. These included IMEs of Indic languages, Russian and Mongolian of Outer Mongolia (which use Cyrillic Script as their writing system), as well as some Scandinavian languages. As a contributor, I am quite pleased to see the development of jquery.ime.
My country - China is among the BRICS countries, as well as India. In China, the main language - Chinese language employs the Chinese script as its writing system (though different types of romanisation scheme have been introduced to help foreigners to pronounce Chinese words, such as Pinyin which is introduced in 1958). The Chinese script is the most complicated writing system that I have ever seen since my birth. It has about 5,000 - 10,000 characters. Currently, the IMEs which are used to type Chinese are not perfect - Lots of Chinese characters shared the same pronunciation (for example, 中,which means centre, China, etc; and 終, which means final, are pronounced as zhong in Mandarin Chinese), when some of them have similar outlooks (for example, 日, which means sun, day, etc; and 曰, an archaic expression of the verb "say"), such that when you use the shape-based Chinese IMEs, their codings are the same. Most of Chinese IMEs have this function: if you type the pronunciation or the code for the Chinese character, a box will be shown and the candidate characters (or even phrases) are shown in the box. However, as a Wikimedian who is not experted in computing, I have no idea for how to turn this concept into reality for the Chinese IME of jquery.ime. Thus, I am not going to develop the Chinese IME for jquery.ime, until someone do what I want to do.
Some Asian languages employs Latin script as their writing system (e.g. Malay, Indonesian, Tagalog, as well as Zhuang language, which is mainly used by a ethnic group in Guangxi, China). I think it will be easy to develop IMEs for these languages.
Vietnamese's script is derived from Latin script (namely Quốc ngữ). Different diacritics and additional letters are used to represent the tones and specific vowels or consonants in the Vietnamese language. Different IMEs are used in Vietnam to type Vietnamese script (it is said that the most popular one is called Telex). This month, I will work for a Vietnamese Telex IME for jquery.ime.
Besides that, I will also work for a Thai IME (based on Kedmanee keyboard keyout) and a Lao IME for jquery.ime.
What's your opinion about that? You are welcomed to comment that and I am pleased to see it.
beta status can be defined with version: 'beta' in input method
See UI mockups at https://www.mediawiki.org/wiki/Universal_Language_Selector
When the user zooms the browser window (Ctrl+/- in most browsers), the IME button location is out of sync with the textarea.
I tried to use this tool from translatewiki.net and faced the following issues,
Logged at https://bugzilla.wikimedia.org/45149. There's also some code there: http://bug-attachment.wikimedia.org/attachment.cgi?id=11811
Diff is small, so copying it here:
diff --git a/lib/jquery.ime/jquery.ime.js b/lib/jquery.ime/jquery.ime.js
index 670aa93..f5918e2 100644
--- a/lib/jquery.ime/jquery.ime.js
+++ b/lib/jquery.ime/jquery.ime.js
@@ -924,7 +924,7 @@
function isShortcutKey ( event ) {
// 77 - The letter M, for Ctrl-M
// 13 - The Enter key
return event.ctrlKey && ( event.which === 77 || event.which === 13 );
return event.ctrlKey && !event.altKey && ( event.which === 77 || event.which === 13 );
}
function isDOMAttrModifiedSupported () {
Refer https://bugzilla.wikimedia.org/show_bug.cgi?id=35990
Add this support for Devanagari script based input methods
By default use all languages registered
fonipa for IPA is not a valid ISO-639 language code, so it doesn't work well with ULS. It's a valid BCP 47 suffix. Something smarter is needed for identifying IPA.
ber for Berber scripts is not a valid ISO-639 language code, so it doesn't work well with ULS.
None of the links in the page are not working after initializing jquery.ime. Tried adding an anchor to the ced.html in the examples.
Users tend to use a small set of languages when writing (typically less than 6).
The "Other languages" section is a single list composed of the supported input languages (typically a lot more than 6). A user hat often switches between Russian and Hebrew will be forced to scan a long list each time.
For lists longer than 10 elements we can show initially the first 6 elements (based on previous choices) and a "more" option represented by an ellipsis. When the user clicks the more option (or hovers it or scrolls down), more items become available in the list. In addition, the more option should disappear and any scrolling aid should appear to help the user scan the longer list.
According to Niklas's comment in https://gerrit.wikimedia.org/r/#/c/64474/2/lib/jquery.ime/jquery.ime.js , the version number never changes when it goes upstream.
We should either remove it or have a proper policy for updating it.
Firstly, I selected Hindi as the language and it got displayed pretty quickly. Then on selecting Sanskrit, there was a delay of about 3 seconds and then it got displayed. Sometimes, after switching to some other language, there is a delay, the icon disappears and then on clicking the text box again, the icon appears and the new language selected gets displayed. Happens in case of only some of the languages.
May be a class, or data attribute.
Sometimes we need to avoid it enabled on fields like captcha input boxes
Links are broken in the "For Developers" section. (https://github.com/wikimedia/jquery.ime#for-developers). I tried to test this extension from the demo site(http://thottingal.in/projects/js/jquery.ime/examples/) and it is not working.
could you please tell me where can i get a little detailed information, so that i can get involve here.
Left square bracket "[" missing in Lekhani in Odia, someone cannot type it using Lekhani input. Please add.
The selector causes a bug while alternating between languages. May be related to issue #20.
http://awesomescreenshot.com/0c6k874eb
Steps to reproduce :
Choose Hindi language, transilteration is defaulted.
Disable IME using Control M, now system becomes default to Hindi
Chose Tamil language,, transilteration is defaulted.
Disable IME using Control M, now system becomes default to Tamil
Chose Kannada language,, transilteration is defaulted.
Change back to Hindi, expectation is system to be defaulted. Works fine
Control M, loads Kannada Transliteration while chosen language in Hindi -> Bug
Support needed for advanced backspace rules such as:
Backspace($1 $2): delete $1, return $2;
if (this == ি॥ে॥ৈ && previous == consonant ){
swap the value of this and previous;
delete this;
}
Input method naming currently very inconsistent - some are in latin, some in the method's language. Some include the name of the language, but some do not. Some consistency would be nice.
http://crossbrowsertesting.com/users/34057/snapshot/zd4b6a2804d166f906f9/public - IE7
Santhosh suggests IE might not be able to render svg icon
User wants to change between active layouts (coming from previously used layouts cache?) with keyboard shortcut.
Would be nice for a user who is typing say Tamil,Malayalam,English(which can be
toggled by turning on/off the IME) on Wiktionary.
Mediawiki extension Narayam has this feature. Need to port that code to jquery.ime
In the Mongolian Cyrillic IME, the Capital letters "К", "Ъ", "Д", "Ь", "В", "Ю" can't be input even the Caps Lock is open. The solution is to press the shift lock with the required key. But it looks so strange - in Mongolian Cyrillic keyboard, it works normally. I am seeking for someone to solve the problem. Thanks.
rgba is not supported by IE8 and below. So background image set in the same statement fails too.
The language code used for the Ukrainian keyboards is marked with the code 'ua'. This is incorrect. The language code to be used for Ukranian is 'uk' or 'ukr'[1].
When the list of other languages contains more languages that shown appropriate affordances are needed to indicate that it can be scrolled. This can be done by either:
The first approach is simpler and, if the list is initially compacted (as suggested in issue #19 ) scrollbars will be shown only when expanding the list.
replaceText function in jquery.ime.js replaces the entire text content of editable field (input, textarea) in every keypress. This was an unfortunate step to avoid browsers bug that prevent programmatic caret positioning inside ligature.
Ref Bug https://bugs.webkit.org/show_bug.cgi?id=66630
But this issue can be solved by a tricky workaround as illustrated in santhoshtr@03602f4#L0R509
If caret cannot placed inside ligature, go back to previous positions step by step till a place found where caret can be placed. Adjust that offset in the text to replace.
The Bamini layout is incomplete. It needs callbacks for handling smart re-positioning of the vowels. Downstream bug:
https://bugzilla.wikimedia.org/show_bug.cgi?id=31904
'[a-z][0-9]', function(input){
return tras($1+trans($2));
}
Required for porting bn-disha to jquery.ime, wherein there is a requirement to make a recursive callback to the transliterate method to for a range of characters.
Example:-
For a range of consonants inputs, the following result is required:-
['ি([b-d])', 'i', trans($1)ি}],
Firefox 18.0.2, 32-bit, Ubuntu Precise
git clone https://github.com/wikimedia/jquery.ime.git
jquery.ime/examples/index.html
Text is typed according to the selected input method (e.g. Cyrillic).
Text appears in the Latin alphabet, as though the input method is disabled.
Character's are found to be swapped. Please correct them.
(q for ಱ) (Q for ೞ್) - test cases are added.
Reference link - https://www.mediawiki.org/wiki/Help:Extension:Narayam/Kannada/Transliteration
In facebook chat window ime lanaguage selector appears at right bottom corner. As a result language selector isn't displayed in visible area, but if one scrolls the page ime appears.
If ime selector is available above the input/textarea it will be intuitive.
Steps to reproduce:
the preference data that is saved is the registry object. Currently it has isDirty member. It is used only to do conditional saving and should be part of preference object and not part of registry.
If the current language is different from the lang attribute of an editable area, add that language to the selector to make quick selection.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.