Page MenuHomePhabricator

Create edit lexicon special page
Closed, ResolvedPublic


It should have fields necessary to add to or edit the lexicon. Functionality will be implemented in sibling tasks.

Event Timeline

The old form had a field for lexicon, but I guess that will be taken care of in the backend so I am dropping it. In the future we may want to bring this back.

For now I am getting the available languages from the "WikispeechVoices" config variable. Not sure of this is what we want in the end, but it is reasonable to believe that you only want to edit lexicons for languages that you have voices for.

Stumbled upon this little cute class that should be usable for language selection: HTMLSelectLanguageField. Maybe subclass it for filtering.

I opted to go for a OOUI solution without an HTML Form, which was the initial design. There are a few things that will need to be supported that a form can't do, such adding an audio element (not there yet, but needed for T274486) and requests before submitting. While this may be possible to do with an HTML form with added Javascript, I feel like you lose the benefit of having it.

This also means that the above mentioned language field couldn't be used.

Change 665313 had a related patch set uploaded (by Sebastian Berlin (WMSE); owner: Sebastian Berlin (WMSE)):
[mediawiki/extensions/Wikispeech@master] Create special page for editing lexicon

Sebastian_Berlin-WMSE changed the point value for this task from 12 to 4.Feb 25 2021, 8:33 AM

Change 665313 merged by jenkins-bot:
[mediawiki/extensions/Wikispeech@master] Create special page for editing lexicon