Page MenuHomePhabricator

Use ULS for language selection
Closed, ResolvedPublic

Description

The Spelling Dictionary extension requires language selection for viewing words of the database. Presently, the language can be selected by using a dropdown of languages. The interface can be improved by replacing the dropdown by the extension:ULS.

Extension code available here.

Event Timeline

Ankitashukla claimed this task.
Ankitashukla raised the priority of this task from to Normal.
Ankitashukla updated the task description. (Show Details)
Ankitashukla moved this task to Admin Page on the Spelling-Dictionary board.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJan 20 2015, 6:16 PM

I will mentor this in #GCI2015

@Ankitashukla: Could you extend / elaborate the task description and provide documentation pointers for potential contributors?

Aklapper added a comment.EditedDec 12 2015, 8:25 PM

@Ankitashukla: Could you extend / elaborate the task description and provide documentation pointers for potential contributors?

(And feel free to remove the GCI project here if you might have changed your mind and think this is too complex for a GCI student. Just saying :)

Ankitashukla added a comment.EditedDec 20 2015, 12:23 PM

The Spelling Dictionary extension requires language selection for viewing words of the database. Presently, this is how the language can be selected, using a dropdown:

The interface can be improved by replacing the dropdown by ULS.

Ankitashukla set Security to None.
Ankitashukla removed Ankitashukla as the assignee of this task.Dec 20 2015, 12:41 PM
Ankitashukla moved this task from Proposed to Imported into GCI site on the Google-Code-In-2015 board.

@Ankitashukla this still needs clarification. You haven't mentioned:

  • if we have to replace the dropdown with ULS everywhere possible
  • how the final result should look (since ULS can look like many things, e.g. popup, another popup style, not popup), you should add a mockup or something

Thank you

TheDJ added a subscriber: TheDJ.Dec 30 2015, 8:20 PM

The GCI student came to IRC asking for clarification, so I'm provisionally putting this out there, in the hopes that Ankitashukla further clarifies what exactly needs to happen soon, otherwise I suggest the student should return the task as being unclear.

  • The code for this will go into the Spelling Dictionary extension, specifically its "/specials/SpecialViewByLanguage.php" page
  • The code will have to check if ULS is present/defined
  • A new ResourceLoader Javascript module will need to be created, that can be added to this page. (Look for the addModules() function)
  • This new ResourceLoader module will depend on the relevant ULS JS modules.
  • The new ResourceLoader will probably have to do something similar to what happens here, to produce the language selector similarly to how it is used on the main page of TranslateWiki.

@Victorbarbu The dropdown currently is only a dummy implementation with a few languages. The purpose here is to replace the dropdown by the ULS by setting the position of the ULS trigger on some text like Select Language.

The dropdown exists on two Special pages -

  • where the user can submit valid words ("/specials/SpecialSpellingDictionary.php")
  • where you can select a language to view words of that language ("/specials/SpecialViewByLanguage.php")

Both these instances need to be replaced by ULS. One way of achieving this could be by using the jquery.uls. Look at the example given by TheDJ for reference.

What is needed here is a popup showing the languages when the ULS-trigger is invoked.

Thanks @TheDJ :)

Change 261911 had a related patch set uploaded (by Victorbarbu):
Replace language selection dropdown with ULS

https://gerrit.wikimedia.org/r/261911

Change 261911 merged by TTO:
Replace language selection dropdown with ULS

https://gerrit.wikimedia.org/r/261911

TTO closed this task as Resolved.Jan 3 2016, 1:25 PM
TTO added a subscriber: TTO.

Thanks TTO and Victor, this code duplication reduction is lovely. :)