Language: preselect which languages users can choose from #129
Labels
No labels
Component: User interface
Component: Wymeditor
Help wanted
Level: Difficult
Level: Easy
Level: Moderate
Pagetype: Festival
Pagetype: Mailinglist
Pagetype: Peer reviewed article
Pagetype: Text
Privacy GDPR AVG
status: has conflicts
Status: Needs changes
Status: Needs discussion
Status: Needs review
Status: Ready to merge
Status: Waiting for response
Type: Bug
Type: Enhancement
Type: Question
Usecase: De Stadsbron
Usecase: Koppelting
Usecase: MeetjeStad
Value: Coders
Value: Security
Value: Users
Value: Visitors
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
harmen/hypha#129
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
In the admin user interface define place where complete language list can be subsetted into list with languages available for this site.
Example from Limesurvey
This is related to issue #137
I have worked on this for a bit, but struggled a bit with making an interface that is easy to use without becoming too complicated. Then, discussing this with @giplt, we considered an alternative: Always allow all languages, but make it a bit harder to pick a language that is not currently used yet. @giplt suggested a dropdown with currently used languages, and an explicit "Add new language" interface (that can be used by any user, not just admins).
A simpler version would be to just make a distinction in the language selection dropdown: First show languages that are currently in use, then a horizontal line or other separator, then all other languages.
Furthermore, it would be good to add a "Select language" or other dummy option at the top of the select, so you are actually forced to make a selection rather than automatically getting the
aalanguage as currently when you ignore the dropdown entirely. Optionally, if only two languages are in use, you could preselect the "other" language already, which will likely what you want in most cases.One related problem, that can probably be solved along with this issue, is that the language dropdown in the translation view currently shows all languages, except the current language (e.g. through where you reached the translation view). However, if multiple translations are already present, the dropdown will still show languages that already have a translation (and maybe the server-side handling code will even allow them and create duplicate translations, I haven't checked that).
I already looked at implementing the modified dropdown in the translation view, but to do that properly, I wanted to change
languageOptionListto return an array of DomElements rather than a single string, but that required being able to modify the DOM of the HTMLForm after creating it, which turned out to be a bit tricky (and then I ran out of time). Maybe a lighter version would be to return an array of strings, so you can reorder them as needed (and insert additional separators etc.), but still insert them into the HTML string before creating the HTMLForm.