mirror of
https://github.com/wxWidgets/wxWidgets.git
synced 2026-08-18 18:22:01 +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.
12 lines
438 B
PowerShell
12 lines
438 B
PowerShell
# Create SQLite language database and generate language database files
|
|
|
|
echo "=== Create SQLite language database and generate language database files..."
|
|
|
|
# Delete old database, if it exists
|
|
Remove-Item -Path "localedata.db3" -ErrorAction Ignore
|
|
|
|
# Generate new database and new language database files
|
|
Invoke-Expression "sqlite3 localedata.db3 `".read mkdatabase.sql`""
|
|
|
|
echo "-> SQLite database and language database files generated."
|