The primary motivation for this is to resolve a licensing issue with
these files (the files have been relicensed with a Debian-approved
license), but there were a few minor fixes/additions since the previous
update. The generation code/scripts required some modernization to get
it working on a current system, as well as needing to handle the format
of CP866.TXT, which is a bit different than the other files.
Update the whitespace check to exclude these files from it as we prefer
not to modify them to avoid any divergences with the upstream copies
(even trivial ones).
Closes#26700.
Node v20 has gone EOL and will be removed from GitHub Actions soon.
This migrates all the GitHub Actions to use versions that are Node 24
compatible.
The only change of real substance is moving to the step-security fork of
gha-setup-vsdevenv which seems probably better than wx maintaining its
own fork.
For the checks running simple shell scripts, any Ubuntu version should
work, so switch them to use the latest one to avoid having to update
them every time when an existing version is dropped by GitHub Actions.
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.
This can't be done for Ubuntu 18.04 because its libc version is too old
for node20 to run there.
Update version of all the actions we use to use node20 in them too.
Closes#24377.
Previously this was never done, as we couldn't determine if we were
using Cocoa or not at generation time, but we can determine it in the
makefile itself.
Only check for the use of NULL in C++ code, not C, for example, where
it still can, and should, be used.
Also allow using "NULL" as part of a larger macro name (where it would
be followed by "_") or at the beginning/end of a string.
This was previously disallowed by the code style check, but it's fine to
use this, as it expands to `nullptr` and it's not worth changing all the
existing occurrences of @NULL to @nullptr.
The previously used v2 uses node12 which is being deprecated by GitHub
and won't be any longer available soon, so switch to the currently
supported version.
Import the theme files into a subdirectory without any changes, even not
removing the trailing whitespace, to facilitate updating them in the
future. Do not add the theme as a submodule as it's surprisingly big
(~12MB) and we don't want to spend extra time on cloning it in each of
our CI builds.
Using this theme gives a nicer appearance and supports the often
requested dark mode.
Remove all colour-related options from the existing custom CSS file as
they don't work well in dark mode.
Also switch to using SVGs with transparent background, rather than PNGs,
for the class diagrams, to avoid background colour mismatch in dark
mode.
These files use TABs for indentation, so the standard check doesn't work
for them (and it doesn't seem worth having a special check just for
them neither, so simply don't check them at all).
Add missing ":" in the beginning of Git pathspecs to make the exclusions
really work.
Also add entries for Makefile.in, which is not caught by **/*akefile*,
and other files in the root directory containing hard TABs.
Running it using Python 2 seems to result in a problem with not matching
an exclusion line with non-ASCII character, which works fine with Python
3 locally.