Sort languages list in general settings#10355
Conversation
|
Hi, At least in Korean, it works. In regards to what's new entry, I think it should be clarified that it affects certain languages such as French. I'm interested in comments from @nvdaes and other Spanish users and speakers of languages where this is an issue. Thanks. |
|
Hi, Also, @bdorer, can you test this pull request to see if German does sort languages correctly? Thanks. |
|
Hi, I find the following issues for now:
@Christianlm or @ABuffEr may want to join this conversation for Italian. |
|
I don't know if it matters or not, but with Windows 10 in bulgarian, we're also affected by this sorting bug. But it is only a minor issue - from all the supported by NVDA languages, only the icelandic one is written with a lower case first letter "i" and it is located on the bottom of the list, before the "Default for the user account" option. |
|
@k-kolev1985: @nvdaes and all: I may also fix this in this PR if people agree. |
959ff69 to
53c3ab8
Compare
|
I have just added a new commit (and rebased) to sort only on the first part of the list item (i.e. full language name) and not on the whole list item string (i.e. "Full language name, ln", ln being the language name abbreviation). The consequence is that "German" is now sorted before "German (Switzerland)" (and the same for Spanish). @josephsl: Since this last modification should have impacted all languages, should I still modify the Change log information or not? If yes, what would you suggest? |
This comment has been minimized.
This comment has been minimized.
Co-Authored-By: Leonard de Ruijter <leonardder@users.noreply.github.com>
|
hi @CyrilleB79 |
|
Hello @dingpengyu Thank you for your tests and your useful feedback.
@josephsl In french, the order is as follow: zh_CN, zh_HK, zh_TW. I will try with Windows language set to English later to check this. Thanks. |
|
The example you gave me are in English, not in Chinese. If your Windows UI is in Chinese, I would have expected these names to be in Chinese. Did I miss something?
Any feedback from this point? It seems there is no compiled snapshot on appVeyor for this commit, maybe because I have rebased my branch. So you need to checkout this commit and run NVDA from source to perform the tests. Is it possible for you? |
|
|
@dingpengyu I have however some questions:
Help from other Chinese/Japanese/Korean speakers is welcomed. |
|
Is there a build for this? At the moment I don't have needed
dependencies installed.
Am 10.10.2019 um 19:04 schrieb Joseph Lee:
…
Hi,
Also, @bdorer <https://github.com/bdorer>, can you test this pull
request to see if German does sort languages correctly?
Thanks.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#10355?email_source=notifications&email_token=ACV2PZKOGTBLCTSZFFRUHLDQN5ODNA5CNFSM4I6XD7R2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEA5CFHY#issuecomment-540680863>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACV2PZMYARA4CPLY3R26IM3QN5ODNANCNFSM4I6XD7RQ>.
|
|
@bdorer You can test it, and in German, de should appear before de_CH. Note however that I am still waiting a feedback from @dingpengyu or anybody else that could help me to understand how language names are sorted in Chinese and why they are not sorted as Chinese people would expect. I have sent an e-mail on nvda-devel mailing-list but did not receive any answer yet. |
As I said in an earlier comment, in bulgarian locale we have problem only with the Icelandic language being sorted second to last in the list due to being written with a small letter "I". With this test build however, the problem is fixed - Icelandic is sorted in its correct place in the list. |
|
I don’t see the problem with the croatian locale.
|
|
Hi, I'm not able to run this build. I get the following error message on
every key press and no speech feedback
```
ERROR - eventHandler.executeEvent (12:14:12.946) - MainThread (10400):
error executing event: focusEntered on
<NVDAObjects.Dynamic_NvdaDialogDialogIAccessibleWindowNVDAObject object
at 0x06D71870> with extra args of {}
Traceback (most recent call last):
File "eventHandler.pyc", line 155, in executeEvent
File "eventHandler.pyc", line 92, in __init__
File "eventHandler.pyc", line 100, in next
File "NVDAObjects\__init__.pyc", line 1030, in event_focusEntered
File "speech\__init__.pyc", line 385, in speakObject
File "speech\__init__.pyc", line 321, in speakObjectProperties
File "speech\__init__.pyc", line 555, in speak
File "speech\__init__.pyc", line 82, in processText
File "speechDictHandler\__init__.pyc", line 109, in processText
File "speechDictHandler\__init__.pyc", line 102, in sub
File "speechDictHandler\__init__.pyc", line 46, in sub
File "re.pyc", line 309, in _subx
File "re.pyc", line 300, in _compile_repl
File "sre_parse.pyc", line 1018, in parse_template
File "sre_parse.pyc", line 962, in addgroup
re.error: invalid group reference 1 at position 1
```
|
|
@bdorer:
Thanks. |
|
Hi Cyrille,
I'm running Alpha 18986,be3fdc45 without problems.
As you requested I tested nvda_snapshot_pr10355-18925,3c4cac23.exe and I
got the noted errors so I'm not able to test this PR at all because I
get no speech.
Thanks
|
|
The issue of NVDA not speaking is now understood (cf. #10334) and is about to be resolved (cf. PR #10421). @dingpengyu could you give feedback on these questions so we can go ahead on this PR?
And also if you (or other Chinese speaking people) could give me explanation on how Chinese words (here language names) are sorted, this would be welcome, since I have almost no knowledge on this topic. |
|
According to @dingpengyu ,that sequence may be determined by pinyin. |
|
To enable single key navigation for none latin language users |
|
Since content of this list is highly locale specific, we can just make key and list content translatable. |
|
Thanks @larry801 for all these feedbacks: @larry801 you wrote:
So it seems that pinyin is not relevant to determine the order that a Chinese user would expect. Right? @larry801 you wrote:
For languages written with latin alphabet, ISO local code is not always at the same position as full language name, e.g. Persian (fa), Albanian (sq) and Chinese (zh). This was the reason of issue #7284 / PR #8143 . Sorting with locale code would mean revert this PR. @larry801 you wrote:
OK, that is a point to consider. If I understand well, Chinese people can only use first letter navigation if items start with latin text. Right? What about people using non-latin alphabet (Cyrillic, Arabic)? @k-kolev1985 can you use first letter navigation in bulgarian and how does it work for you? @larry801 you wrote:
There seems to be something missing in your code (all inputs of format are not present ins string). Anyway the idea of making keys and displayed description translatable is interesting. To be discussed before being implemented however. Would it be allowed for translators to take the responsibility to translate the key string as Cc @bhavyashah, @feerrenrut, @jcsteh, @josephsl who have already discussed a similar topic in #7284. |
|
Is there any progress on this? |
|
Hi, Regarding sorting languages list by ISO-639 codes, from technical standpoint, it would resolve this issue. However, from user experience perspective, it will not, as it is the language name users want to see, not the language code. Regarding Icelandic shown as a lowercase word in Bulgarian: unless the situation has changed in latest Windows 10 releases, I'm afraid this is something Microsoft must fix. As for an overall progress on this pull request, provided that there will be no outstanding regression, I think it might be best to either merge it into 2020.1 or alpha first so folks can provide feedback. Thanks. |
|
This won't go into 2020.1 only serious bug fixes will at this stage. While looking at this, I think it makes sense to ensure that the "user default" option is the first in the list. At the moment it is appended, after all other languages. There isn't a code comment to say why, though perhaps there is some history on it that I am not aware of? |
|
I have put the default language in first place in the list as suggested by @feerrenrut since I did not find any hint on why it was appended last. Moreover, regarding sorting for Chinese people, I am not sure to have fully understood the sorting issue. Anyway, I have understood that strxfrm seems to use pinyin (what seems not to be a suitable order) and that if description coming first does not allow to use first letter navigation. Thus I have implemented translatable item pattern as suggested by @larry801, so that each translator can customize how the items of this list are displayed.
|
|
I am a little bit worried about changing position of User default from last to first on the list. While I have no idea why it has been placed as the last option in the first place this is a behavior to which our users are accustomed (it has been like that since at least 2014.2). If I'd mistakenly change language to one which I do not speak it gives a certain comfort to know that I am easily able to press END and return to the Windows language. Such changes of behavior are sometimes unavoidable but I do not think that it brings any real advantage in this particular case and it might make someone unable to return to the default language as easily. |
|
@lukaszgo1 you are right saying that people already used to NVDA would remember that the default option is at the end. On the contrary, such default options usually are at the top of the list in other applications settings. So some other people may expect it at this place (new NVDA users or not). |
|
I agree it's worth considering maintaining expected behavior for users who are lost (because NVDA is in the wrong language), instead is there anyway we can mitigate concerns in this situation? For instance, "Windows" is a product name and shouldn't be translated, if the first item is "Windows default" rather than "User default" this should be obvious enough? Even if translated, a user should be able to read the "Windows" part? I'm also not too worried about this, since I expect that the mostly its NVDA developers who are changing NVDA into a language they don't understand. Another slightly strange idea is to make it the first AND last item. |
|
@feerrenrut wrote:
The problem that "user default" is a proper term - we are not using default language of Windows, but default language of the currenty logged in user |
|
Perhaps "Match Windows language"? Another more complicated solution is to have the language name in the current language but also in its native language. You could also do this with the "user default".
Note:
I think this is a much larger change, and should be out of scope for this PR. Happy for it to be worked on subsequently. As for the other questions you had:
What will happen if one or either part is missing? We have had a similar problem with hotkey translations, where they are modified but not tested properly, leading to problems much later. I think it would be worthwhile adding a unit test for this.
I think this approach is fine as long as mistakes are easy to catch. |
|
How about implementing a dialog for language setting (i.e. like the dialog for choosing a synthesizer) where the user can choose to sort the list according to their needs? For example sort combo box: alphabetically, ISO xxx or any other option out there. I bet most people would just choose to sort the list alphabetically. But at least they would have the choice. |
|
Thanks all for your comments. Here are my grouped feedbacks. @lukaszgo1 you wrote:
So we may use "Windows user language"? This would allow to have the "Windows" text that could be easily recognized in any language as explained by @feerrenrut. And it specifies that this is the language of the currently logged Windows user as explained by @lukaszgo1. @feerrenrut you wrote:
I do not see a relevant use case for this request. Since the language names are written with Windows current user language, I expect this user to understand the Windows language he is using. @feerrenrut you wrote:
I do not see how a unit test could cover such translation issue. Can you elaborate? @Adriani90 you wrote:
IMO it is really overkill for just a combobox sorting issue. It is a lot of extra code just for a sorting order. Most users would even not understand why there is such an option and they may be confused by it. Moreover, most people would expect the language names sorted alphabetically as you wrote. Only for few culture/language, alphabetical order does not seem to be relevant. That's why the format customization is at translator level. |
Despite being out of scope, I'll try to clear up the misunderstanding. The reason for being concerned about the name of "user default" is because we are considering changing it's position which may cause users to get stuck in a language they don't understand. This could happen if they accidentally changed the NVDA language, or they are developers testing a language specific problem, or perhaps using someone else's computer. Having the native name for a language fixes this problem. Arguably it makes sense to display languages ONLY in their native spelling, since users who understand that language should recognize it, and it doesn't matter if those who don't speak that language don't recognize it.
This might be a test similar to the pot tests. It would use getText or similar to open each translation file, and get the entry, and check if it can be formatted with the required arguments. You would have to investigate whether this is easier / cleaner to just read the files directly or use getText to do it. |
feerrenrut
left a comment
There was a problem hiding this comment.
I think this is ok. One thing to note about this PR, sorting by description will mean the order of the languages is different based on the active language. I think this is fine.
|
Thanks @feerrenrut for your review and the fixed typo. |
Link to issue number:
Fixes #10348
Summary of the issue:
Language list in general settings panel is not ordered correctly in French due to 2 issues:
Description of how this pull request fixes the issue:
Use python locale sorting capacity.
Testing performed:
Checked on French Windows that the languages list order is now correct.
Note that the languages names are localized according to Windows UI language, not NVDA UI language. If people can check with other Windows UI language, it would be welcome.
Known issues with pull request:
None
Change log entry:
None or the following:
Bug fixes
In general settings panel, the language list is now sorted correctly. (#10348)