Skip to content

T443051: Adding Sundanese Script keyboard and tests - #875

Merged
srish merged 3 commits into
wikimedia:masterfrom
sarahd-wu:master
Nov 30, 2026
Merged

srish merged 3 commits into
wikimedia:masterfrom
sarahd-wu:master

Conversation

@sarahd-wu

Copy link
Copy Markdown
Contributor

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:

  • ^ maps to ᮪ (a diacritic which indicates the removal of the inherent "ah" sound in base consonants)
  • A method to differentiate between a standalone and a diacritic key. If the input value is doubled, I turned it to a diacritic. For example, for ki, the input values are ki (ᮊᮄ, standalone i), or kii (ᮊᮤ, diacritic i).
  • Similarly, I differentiated between the diacritic -r and -r- by doubling the input value for -r. For example: input kir (ᮊᮁ), and input kirr (ᮊᮢ).
  • Order of the pattern matters! Else, nga would be replaced by ga if 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.

@srish srish left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sarahd-wu Thanks for adding this keyboard! I've left a few comments. Please take a look.

Comment thread rules/su/su-sundanese.js
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',

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@sarahd-wu sarahd-wu Nov 17, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread rules/su/su-sundanese.js Resolved
Comment thread rules/su/su-sundanese.js Resolved
Comment thread test/jquery.ime.test.fixtures.js Outdated
description: 'Sundanese Script test',
inputmethod: 'su-sundanese',
tests: [
{ input: 'kagangacajanyatadanapabamayaralawasahaqazafavaxakhasya', output: 'ᮊᮌᮙᮎᮏᮑᮒᮓᮔᮕᮘᮙᮚᮛᮜᮝᮞᮠᮋᮐᮖᮗᮟᮮᮯ', description: 'Sundanese standalone consonants' },

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Comment thread rules/su/su-sundanese.js Outdated
Comment on lines +79 to +80
[ 'l', 'ᮣ' ],
[ 'y', 'ᮡ' ],

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@sarahd-wu

Copy link
Copy Markdown
Contributor Author

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 srish left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@sarahd-wu

Copy link
Copy Markdown
Contributor Author

@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 srish left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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.

@sarahd-wu

Copy link
Copy Markdown
Contributor Author

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).

@srish
srish merged commit c93bfc6 into wikimedia:master Nov 30, 2026
2 checks passed
@srish

srish commented Nov 30, 2026

Copy link
Copy Markdown
Member

Thank you adding this keyboard @sarahd-wu :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants