⚓ T372652 Adding silesian alphabet to jquery.ime
Page MenuHomePhabricator

Adding silesian alphabet to jquery.ime
Closed, ResolvedPublicFeature

Description

Feature summary (what you would like to be able to do and where):

Add a keyboard mapping on jquery.ime for silesian alphabets. This involves following mappings:

ō <- o~1
ô <- o~2
ŏ <- o~3
õ <- o~4
ã <- a~5
ů <- ~u

There are another mappings to consider, but the above one ensures fast typing seems to be easy to remember and for fast typing. There is no risk that other letters will be needed in these places in the future is for silesian language.

Use case(s) (list the steps that you performed to discover that problem, and describe the actual underlying problem which you want to solve. Do not describe only a solution):

I asked for help to get silesian letters for Silesian WIkipedia users on https://meta.wikimedia.org/wiki/Tech#Getting_extra_letters_with_javascript as follows:

//Hello, I would like to know what are the limitations to get custom letter on keyboard combination, e.g. ō on alt+q or ô on ctrl+alt+1, using common.js. I tried and it works with combination alt+shift well, but somehow most another combinations, like shift+q, doesnt worked (the text field losted focus and console printed only the numbers 1 and 2).

Motivation: as administrator of a small wikipedia I would like to provide a user friendly solution to use our custom alphabet. Alternative solutions used so far are copy-pasting or usage of autohotkey, but it requires installation of external software and configuration, which makes the entry threshold to the project very high, especially for older people, which our minority language project targets.//

I got following answer by Amir E. Aharoni:

I can make a nicely-managed Silesian keyboard for you.
Combinations with Alt and Ctrl are not very reliable in JavaScript, so I recommend using what we successfully used in many other languages: typing a letter and then typing ~ (tilde) and a character that looks similar to the diacritic. For example:
ŏ <- o~(
ō <- o~-
ô <- o~^
õ <- o~{
ã <- a~{
ů <- ~u
Comments:
ů is simply ~u because it's the only diacritic on u, unlike o, which has several diacritics.
The tilde on õ and ã are with { because the tilde itself is already used for something else. It's a bit weird, but I see that you don't use these letters often anyway, so I hope it's not a big deal.
I recommended ( for ŏ, but you can choose something else.
The code for this is on GitHub: https://github.com/wikimedia/jquery.ime
Some time after it's merged on GitHub, it will be deployed on Wikipedia. (Usually it takes up to two weeks.)
I also recommend reading mw:Manual:Adding_and_removing_languages#jquery.ime.
Every new addition of an input method (also known as keyboard mapping) must include:
The rules themselves, under rules/
Tests, in the fixtures files under tests/
Language and input method registration in src/jquery.ime.inputmethods.js
Recent example: https://github.com/wikimedia/jquery.ime/pull/786/files
Also, it would be nice if you could create a mw:Phabricator task to track this work.
Good luck, and let me know if you need more help!

Benefits (why should this be implemented?):

a major convenience for editing silesian wikipedia

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Hello, I added a pull request: https://github.com/wikimedia/jquery.ime/pull/787

Unfortunatelly I coudn't run the test, I am not familiar with node.js. Thank you in advance!

The patch is merged in GitHub. Thank you, @Krol111! I'll merge it to the UniversalLanguageExtension soon, and if all goes well, it will be deployed next week.

In the review comments of the patch, there was a little discussion about the name of the language. It can be changed everywhere in MediaWiki, but please create a separate ticket for it, and substantiate it as much as possible by adding:

  • Links to community discussions that confirm that everyone agrees with the name change.
  • Links to external examples of this name, such as websites that have a Silesian version, academic articles, books, dictionaries, etc.

Since language names are very visible, we try to make their configuration properly referenced :)

(Also, all those discussions, sources, and examples really don't have to be in English. It's totally fine if they are in Silesian. I am able to read it well enough to understand such a discussion.)

Thank you! It will be a big improvement for Silesian Wikipedia. The language name notation has no consensus. This may be standardized soon, most probably to ''Ślōnski'' (from Ślōnski jynzyk), but also "Ślōnskŏ" (from Ślōnskŏ gŏdka), Ślůnski and Ślůnsko have their sympathizers.

MaryMunyoki triaged this task as Medium priority.