Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In general settings panel, language combo-box is not sorted correctly #10348

Closed
CyrilleB79 opened this issue Oct 7, 2019 · 5 comments · Fixed by #10355
Closed

In general settings panel, language combo-box is not sorted correctly #10348

CyrilleB79 opened this issue Oct 7, 2019 · 5 comments · Fixed by #10355
Labels
enhancement p4 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority
Milestone

Comments

@CyrilleB79
Copy link
Collaborator

Steps to reproduce:

  • Open General property settings page, e.g. pressing NVDA+Ctrl+G
  • Open language combo-box and look at the order of the language list

Actual behavior:

The list is sorted as follow :

  • Afrikaans (Afrique du Sud), af_ZA
  • [most of all languages]
  • Vietnamien, vi
  • macédonien, mk
  • norvégien, bokmål (Norvège), nb_NO
  • norvégien, nynorsk (Norvège), nn_NO
  • User default

Expected behavior:

The list is sorted as follow :

  • Afrikaans (Afrique du Sud), af_ZA
  • [all languages]
  • Vietnamien, vi
  • User default

Analysis

  • The names of the languages are provided by Windows itself ; that's why it is in French here, whatever the language of NVDA.
  • Seems that Windows provides 3 language names starting with lower case and the others with upper case.
  • A solution would be to sort language names without taking into account case.
  • In English or other Windows UI languages, is the issue also present?

System configuration

NVDA installed/portable/running from source:

Installed or portable or source

NVDA version:

2019.2.1 and 2019.3

Windows version:

Windows 10 1903 and Windows 10 1709, both French UI.

Name and version of other software in use when reproducing the issue:

N/A

Other information about your system:

Other questions

Does the issue still occur after restarting your PC?

Yes

Have you tried any other versions of NVDA? If so, please report their behaviors.

Already present on some earlier versions of NVDA.

@XLTechie
Copy link
Collaborator

XLTechie commented Oct 7, 2019 via email

@ruifontes
Copy link
Contributor

Also not in portuguese.

@LeonarddeR
Copy link
Collaborator

In Dutch, it's also fine here.

@bdorer
Copy link

bdorer commented Oct 8, 2019 via email

@CyrilleB79
Copy link
Collaborator Author

After investigations on French Windows 10 1709 and 1903, I confirm the following fact.

GetLocaleInfoW in kernel32.dll called with LOCALE_SLANGDISPLAYNAME or LOCALE_SLANGUAGE returns:

  • A localized language name starting with lowercase for the following LCIDs:

    • 1044 = nb / nb_NO = Norwegian (Bokmål)
    • 2068 = no / nn_NO = Norwegian (Nynorsk)
    • 1071 = mk = Macedonian
  • A localized language name starting with upper case for all other languages (at least the ones in NVDA)

The sorting issue does not appear in NVDA on Windows 7 and all languages in the list begin with upper case.

Moreover by trying to fix this issue, I have seen that there are other sorting issue in this list. In today's 2019.2.1 and in today's alpha, the orderr on French Windows is as follow:


> ...
> Galicien
> Grec
> Géorgien
> Hindi
> Hongrois
> Hébreu
> Indonésien
> ...
> Mongol
> Néerlandais
> Népalais
> Ourdou, ur
> ...
> norvégien, bokmål
> norvégien, nynorsk
> ```

Not only the lower case are sorted after upper case. But the letters with "é" are sorted after all the letters without diacritic. Thus, "Hébreu" is listed after "Hongrois" whereas it should appear before. Indeed, in French letters with diacritic should be sorted at the same position of their equivalent without diacritic.

The order should thus be as follow:

...
Galicien
Géorgien
Grec
Hindi
Hébreu
Hongrois
Indonésien
...
Mongol
Néerlandais
Népalais
norvégien, bokmål
norvégien, nynorsk
Ourdou, ur
...


Are there other languages where alphabetical order differs from ASCII 26-letter alphabet order and that have an impact on this language list? Languages with letters with accents or diaeresis that impact language names order?

@feerrenrut feerrenrut added enhancement p4 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority labels Mar 19, 2020
feerrenrut added a commit that referenced this issue Jul 2, 2020
Fixes #10348
The language list in general settings panel was not ordered correctly in French due to 2 issues:
- Some localized languages names returned by Windows start with lower case whereas the vast majority of the language names start with upper case.
- "é" does not appear at the position of "e" when sorting but after all letters without accent marks. e.g. "Géorgien" incorrectly appears after "Grec".

Co-authored-by: Leonard de Ruijter <leonardder@users.noreply.github.com>
Co-authored-by: Reef Turner <feerrenrut@users.noreply.github.com>
@nvaccessAuto nvaccessAuto modified the milestone: 2020.3 Jul 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement p4 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants