NSoiffer / MathCATForPython

A Python Interface and NVDA plugin to MathCAT
MIT License
6 stars 6 forks source link

Update MathCATPreferences.py to support language variants #62

Closed ways2read closed 9 months ago

ways2read commented 9 months ago

Populate the language list box with variants if there are subfolders for languages.

ways2read commented 9 months ago

I tested the code by modifying my current installation with this subroutine and adding subfolders GB and US to the en folder. image Examples of how the options are displayed in the dialog:

ways2read commented 9 months ago

I made a table of country codes and country names from Wikipedia. The country names are in English.

the country name should be in that language Which language? Many countries have more than one. I have searched for a list like this. I didn't find anything. The list of countries could be localized to the UI language, which would be doable, but it adds more effort onto the translator for not much gain (I think). I propose to either leave as is (just the codes are given for the variants, e.g. "Française (fr-BE)") or the English language name of the country is given together with the code (e.g. "Française, Belgium (fr-BE)". I think the former is preferable.

NSoiffer commented 9 months ago

I hadn't thought about the multiple languages per country. But given that we have a language, then "Français, Belgique (fr-BE)" and "Nederlands, België (nl-BE)" seems reasonable from my very provincial viewpoint. I think there are a few problems like "zh-tw" where "tw" isn't really Taiwan and "zh" would be different depending on the country code, but those can be fixed up by hand.

However, I don't think this is a big deal and we can certainly see if anyone complains or suggests a change if we leave it as is.

Neil