General Settings/Language: sort items based on descriptions#8143
Conversation
… be obtained. Re nvaccess#7284. When going through General settings/Language combo box, users might be puzzled as to why items in there are listed in random order. This is because entries are sorte according to ISO 639-1 code. To improve user experience, sort this alphabetically according to description. This is done through a new keyword argument in languageHandler.getAvailableLanguages function. Wuth presentational argument set, language tuples will be sorted based on description text.
…ntation purposes. Re nvaccess#7284. Reduece confusion further by omitting language codes from language description texts.
|
@josephsl commented on 4 apr. 2018 17:50 CEST:
I tend to disagree here. When I somehow end up at a Korean system running NVDA, all the language names will be in Korean. As I don't know Korean, I will need the ISO code to find the appropriate language. I haven't tested the code yet, but I assume that the "user default" option is still the last one in the list? |
|
It is on my latest next snap. However I'm in the UK of course!
Brian
|
|
Hi, yes, user default will be the last option. Thanks.
|
|
I agree with @LeonarddeR here: please keep the language code in the description. |
the nanes 'd', 'i', and 'l' are so generic. Thus rename them to 'displayNames', 'entry', and 'locales'.
…users. Re nvaccess#7284. Reviewed by Mick Curran (NV Access) and others: suppose a user changes to another language by accident, a language he or she cannot understand, especially changes the Windows display language by accident. So how can they return to a language they know? This cannot be done with absence of ISO 639 language codes.
| #See the file COPYING for more details. | ||
|
|
||
| """Language and localization support. | ||
| This module assists in NVDA going global through language services such as converting Windows locale ID's to friendly names and presenting available languages. |
There was a problem hiding this comment.
What do you mean with going global here?
| return desc | ||
|
|
||
| def getAvailableLanguages(): | ||
| def getAvailableLanguages(presentational=False): |
There was a problem hiding this comment.
I think alphabetize or sort might be a clearer keyword argument instead of presentational. Furthermore, someone might be interested in getting a sorted list of languages for non presentational purposes.
|
Hi, it is already sorted by language code, so the presentational keyword name makes a bit more sense (as it’ll be used in the UI).
|
|
Hi, “going global” is a descriptive term for “internationalization”. Thanks.
|
Link to issue number:
Fixes #7284
Summary of the issue:
Items in general settings/language are sorted by language codes.
Description of how this pull request fixes the issue:
Users may not realize the languages list in General settings/Language combo box are sorted by ISO 639-1 codes. Thus improve user experience by sorting items by descriptions instead, and when possible, just display human-readable language names (not codes).
Testing performed:
Tested on Windows 10 Version 1803 (17133) with languages set to English and Korean.
Known issues with pull request:
None
Change log entry:
Changes: the list of available languages in General Settings dialog is now sorted based on language names instead of ISO 639 codes. (#7284)