Repository navigation
T443051: Adding Sundanese Script keyboard and tests - #875
Conversation
srish
left a comment
There was a problem hiding this comment.
@sarahd-wu Thanks for adding this keyboard! I've left a few comments. Please take a look.
| name: 'su-sundanese', | ||
| description: 'Sundanese keyboard (Sundanese Script)', | ||
| date: '2026-11-09', | ||
| URL: 'https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Extension:UniversalLanguageSelector/Input_methods/su-sundanese', |
There was a problem hiding this comment.
I understand the help page linked here is developed by another author. Could you take a look at the help page as well? The keyboard added in the code repo and the page on MediaWiki.org should match.
There was a problem hiding this comment.
Took a longer look at the other author's keyboard. 👍 Yes, I can implement elements of this help page. I based my keyboard with the phonetic pronunciation (each consonant holds an inherent "a," so ᮊ is actually "ka"), but could see how it may be more complicated.
The only thing is that this help page 1) makes a few mappings unclear/potentially confusing (for example, "nga" was turned into "G" to create the Sunda script ᮍ), and 2) the keyboard is missing a few characters ("-r-" and "-r" are different, ᮊᮢ versus ᮊᮁ).
I will implement the other author's patterns, noting in mind that 1) I will add more comments to the help page & repo to clarify the keyboard mapping to its phonetic pronunciation of the Sunda script and 2) I will also add in the keys that are missing.
| description: 'Sundanese Script test', | ||
| inputmethod: 'su-sundanese', | ||
| tests: [ | ||
| { input: 'kagangacajanyatadanapabamayaralawasahaqazafavaxakhasya', output: 'ᮊᮌᮙᮎᮏᮑᮒᮓᮔᮕᮘᮙᮚᮛᮜᮝᮞᮠᮋᮐᮖᮗᮟᮮᮯ', description: 'Sundanese standalone consonants' }, |
There was a problem hiding this comment.
When I ran npm test, three of these tests failed:
- Line 21582 seems to fail because of the space and é issues in the rules file.
- Line 21576: should the third character be ᮍ (nga) instead of ᮙ?
- Line 21577: I got ᮃᮄᮅᮆᮇᮉᮈ, which might be the expected output here.
Could you double-check these?
| [ 'l', 'ᮣ' ], | ||
| [ 'y', 'ᮡ' ], |
There was a problem hiding this comment.
When I typed kal I got ᮊᮣ, and kay gave ᮊᮡ. I'm not sure if this is the right output for words ending in l or y. Could you check?
There was a problem hiding this comment.
Yes, works as intended! Though my keyboard is a bit confusing because the "l" is "-l-", so "kal" input values would be phonetically "kla" to make ᮊᮣ. Same with the "kay" input values.
The other keyboard format had "l" as ᮜ and "L" as ◌ᮣ. Wrote out a lovely diagram below.
Phonetic·········My input·········Other input·········Sunda
"la"·····················"la"····················"l"····················ᮜ
"-l-"····················"l"·····················"L"···················◌ᮣ
Imo the other input keyboard is just easier to type with & debug, so will change mine.
|
I changed the keyboard mapping to match DeepTurquoise's original QWERTY format. I've also added a comprehensive Unicode table to the Input Methods WikiMedia page showing the phonetic pronunciation of the Sunda Script (in order to assist users with the QWERTY format). Let me know if there are additional errors! I have removed the é, so there should be no more é issues. |
srish
left a comment
There was a problem hiding this comment.
Thanks @sarahd-wu!
A few more small things:
- Failing test: lowercase i is now the vowel sign, so aiU{OE} gives ᮃᮤᮅᮆᮇᮈᮉ. I think the input should be aIU{OE}.
- "Sunda" test: Sunda gives ᮯᮥᮔᮓᮃ, because S is ᮯ and the final a adds ᮃ. From the help page, I think it would be typed sun;d (ᮞᮥᮔ᮪ᮓ), but please correct me if I'm wrong.
- Typing a: since consonants already include "a" (ᮊ = ka), typing ka gives ᮊᮃ ("ka-a"). Is that intended, or should a after a consonant do nothing?
- Minor: could name be 'Sundanese Script' to match the menu, and lines 15, 40, 42, 51, 59 and 68 use tabs instead of spaces? The PR description could also be updated, since it still describes the earlier design.
- Also, you can remove the code from the documentation on MediaWiki.org as that page is intended for users of the keyboard.
|
@srish Thank you for checking the tests! Yes, these all make sense. I added all of your suggestions and corrections. 👍 Quickly checking in with the 4th suggestion to change the menu name to "Sundanese Script." Is this referring to the su-sundanese id, and are you suggesting for the file to be changed to su-sundanesescript? |
srish
left a comment
There was a problem hiding this comment.
@sarahd-wu I think the new changes may not have been pushed yet, since the latest commit on the PR is still from Nov 20. Could you push them?
About the name: I only meant the name field inside rules/su/su-sundanese.js, so name: 'su-sundanese' becomes name: 'Sundanese Script'. Please keep the id and filename as su-sundanese.
|
Added! In addition, to the 3rd comment about typing "a," I have decided to keep typing the input ka as ᮊᮃ ("ka-a"). There is a similar keyboard here which follows the current method. (Although this keyboard is pretty cool and automatically adds the pamaeh (ᮊ᮪) when only k is typed, and removes the pamaeh for ka (ᮊ). I've decided not to do that). |
|
Thank you adding this keyboard @sarahd-wu :) |
Summary
This pull request adds new keyboard layout and tests for Sundanese Script (su-sundanese). These changes are part of a completion of a Phabricator task (T443051).
Issue: https://phabricator.wikimedia.org/T443051
Details
Request Implementation Details
As the Sundanese Script contains diacritics, I separated the patterns for diacritics and standalone consonants/vowels. These are some of the few more creative patterns which I implemented for the Sundanese Script, and potentially might need a second eye to look over:
ki, the input values areki (ᮊᮄ, standalone i), orkii (ᮊᮤ, diacritic i).-rand-r-by doubling the input value for-r.For example: inputkir (ᮊᮁ), and inputkirr (ᮊᮢ).ngawould be replaced bygaif it was after it, etc.Notes
Attempted to run the keyboard through the test, but while my browser indicated no errors, I am not quite sure my testing environment was accurate. I manually processed the tests, but was not able to fully check the test automatically.