mirror of
https://github.com/wxWidgets/wxWidgets.git
synced 2026-08-18 09:30:13 +08:00
This commit improves the best locale match algorithm by prioritizing closer matches and add many new tests verifying that this works as expected. In order to do this, new information had to be added to the language database, which was extended with it and updated to use the latest Unicode CLDR data and latest Windows 11 locale list. Further, add a set of scripts for maintaining the language database up to date and a GitHub workflow `genlangdb.yml` which can be run manually to regenerate the wxWidgets language-related source and header files from the underlying Windows and Unicode data. It produces 2 artifacts: - wxLanguageDatabaseDist.zip allows to easily update the language-related files in the wxWidgets repository by simply copying all files. - the normal workflow log and wxLanguageDatabaseLog.zip allow to check all temporary files of the regeneration process and to detect potential issues, before the language-related files are actually replaced by the new ones. Finally, fix wxUILocaleImplName::GetPreferredUILanguages: Under Windows 10 and above the Windows API function ::GetUserPreferredUILanguages() returns only the primary UI language plus US English. Additional preferred UI languages installed by the user are ignored, so instead of using this function read the list of user preferred languages from the Windows registry. Closes #24855.
30 lines
742 B
SQL
30 lines
742 B
SQL
.print Initialize database
|
|
.print Import territory codes
|
|
.read temp/uni_loadterritorycodes.sql
|
|
|
|
.print Import locales supported by Windows
|
|
.read temp/win_loadlocaletable.sql
|
|
|
|
.print Import wxWidgets language list
|
|
.read temp/wx_loadlangtabl.sql
|
|
|
|
.print Import wxWidgets language synonyms
|
|
.read temp/wx_loadsynonymtabl.sql
|
|
|
|
.print Import script map
|
|
.read temp/uni_loadscriptmap.sql
|
|
|
|
.print Import likely subtags map
|
|
.read temp/uni_loadlikely.sql
|
|
|
|
.print Import matching subtags map
|
|
.read temp/uni_loadmatching.sql
|
|
|
|
.print Import region groups for main languages map
|
|
.read temp/uni_loadregiongroups.sql
|
|
|
|
.read temp/wx_loadversion.sql
|
|
|
|
.print Generate new tables (langtabl, scripttabl, synonymtabl, likelytabl, matchingtabl)
|
|
.read mkwxtables.sql
|