* Sync pl.po to source code.
* Fix "U.S. Sales" translation.
* Change "żywotność" to "witalność" so it flows better in character stats screen.
* Button combo bindings translation.
* Player inspection translations.
* Debug commands translations.
* Inventory sorting translations.
* Quick spell translations.
* Chat log translations.
* Consistent translations for "armor" and "armor class".
* Update store label translations.
* Different take on resists translation on character screen.
* Shorten Experience translation to avoid overflowing.
* Improve the validate_translations.py script.
Our implementation has a more modern interface and only
supports the features that we care about.
It always outputs `\n` as newlines and does not output BOM.
The modern interface eliminates awkward `c_str()/data()` conversions.
This implementation preserves comments and the file order of sections
and keys. New keys are written in insertion order.
We now also support modifying and adding default comments,
which may be a useful thing to do for the especially tricky
ini options (this PR doesn't add any but adds the ability to do so).
Sadly, this increases the RG99 binary size by 24 KiB.
I'm guessing this is because the map implementation generates
quite a bit of code.
Note that while it might seem that using `std::string` for every key and
value would do a lot of allocations, most of these strings are
small and thus benefit from Small String Optimization (= no allocations).
We may want to migrate this to 1 file per monster but for now the
migration is as close to the hard-coded version as possible.
Sprites that are used by multiple monsters are only loaded from disk
once.
Stop using git for the version tag.
The new process is as follows:
1. The `VERSION` file contains the version.
For release, it should contain "1.5.0".
Immediately after the release, it should be changed to "1.6.0-dev".
2. The build type is included in the version string unless it is
"Release". The commit hash is now included into the version string
whenever the `VERSION` file has a suffix (i.e. 1.5.0-dev rather than
just 1.5.0). The full version string for development builds now
looks like this: `1.5.0-dev-Debug-b102dccf8`.
This means we longer need git or `-DVERSION_NUM` to get a sensible version number.
The in-development versions are now always clearly indicated with the
`-dev` suffix no matter how DevilutionX was built.
This allows forcing the locale without changing the settings.
The `forceLocale` option also lets us avoid changing the locale in settings if fonts.mpq is missing, fixing the following scenario:
1. System locale is ja
2. Launch the game -- fonts are missing
3. Close the game, download fonts.mpq
4. Launch the game again -- it is now in English because the settings have changed
Example:
```
$ tools/measure_timedemo_performance.py -n 32 --binary build-reld-sdl1-nonet-nosound-unpk/devilutionx
Run 1 of 32: 6.02 seconds 170.8 FPS
Run 2 of 32: 6.22 seconds 165.5 FPS
Run 3 of 32: 6.01 seconds 171.1 FPS
Run 4 of 32: 6.03 seconds 170.6 FPS
Run 5 of 32: 6.05 seconds 170.2 FPS
Run 6 of 32: 6.04 seconds 170.3 FPS
Run 7 of 32: 6.03 seconds 170.5 FPS
Run 8 of 32: 6.03 seconds 170.5 FPS
Run 9 of 32: 6.01 seconds 171.1 FPS
Run 10 of 32: 6.04 seconds 170.3 FPS
Run 11 of 32: 6.03 seconds 170.7 FPS
Run 12 of 32: 6.03 seconds 170.7 FPS
Run 13 of 32: 6.04 seconds 170.3 FPS
Run 14 of 32: 6.03 seconds 170.6 FPS
Run 15 of 32: 6.04 seconds 170.3 FPS
Run 16 of 32: 6.04 seconds 170.4 FPS
Run 17 of 32: 6.03 seconds 170.6 FPS
Run 18 of 32: 6.03 seconds 170.5 FPS
Run 19 of 32: 6.06 seconds 169.9 FPS
Run 20 of 32: 6.04 seconds 170.3 FPS
Run 21 of 32: 6.03 seconds 170.7 FPS
Run 22 of 32: 6.02 seconds 171.0 FPS
Run 23 of 32: 6.02 seconds 170.8 FPS
Run 24 of 32: 6.02 seconds 170.8 FPS
Run 25 of 32: 6.04 seconds 170.3 FPS
Run 26 of 32: 6.03 seconds 170.8 FPS
Run 27 of 32: 6.04 seconds 170.4 FPS
Run 28 of 32: 6.07 seconds 169.4 FPS
Run 29 of 32: 6.03 seconds 170.7 FPS
Run 30 of 32: 5.99 seconds 171.7 FPS
Run 31 of 32: 6.01 seconds 171.1 FPS
Run 32 of 32: 6.06 seconds 169.9 FPS
6.038 ± 0.037 seconds, 170.400 ± 0.988 FPS
```
Explicitly set `-DDEVILUTIONX_SYSTEM_SDL_AUDIOLIB=OFF`
and `-DDEVILUTIONX_SYSTEM_SIMPLEINI=OFF` because we now
also support the system versions of these.
1. Adds a `libdevilution_so` target when tests are enabled.
2. Each test file is now a separate binary target linked against `libdevilutionx_so` (can now run tests in parallel).
3. Tests are now defined in a separate `test/CMakeLists.txt` file.
4. Building the tests is now controlled by the standard `BUILD_TESTING` option (defined by CTest).
5. Tests are now built by default.
6. On CI, test errors are now reported.
Also:
* `.clang-format`: Enable SortIncludes in tests
* `path_test.cpp`: Fix -Wsign-compare
With this flag (off by default), all of the dependencies are packaged
into the source archive (including SDL2 etc).
Useful for building on machines without an internet connection.
The does some pruning of the dependencies' files to avoid a 100 MiB+ tarball.
Even with that, the final tarball size is 17 MiB with xz, 25 MiB with gzip.
See the file documentation at the top of `tools/make_src_dist.py` for
more information.
The line wrapping algorithm of gettext is somewhat complicated.
Rather than trying to approximate it, use `msgcat` from gettext
directly. This is also what poedit does.
This tool can insert ZWSP between words in Chinese .po files using this
model: https://tfhub.dev/google/zh_segmentation/1
We will use this tool to be able to word wrap Chinese translations at runtime
without bundling a segmenter.
Doing this offline also allows us to use a segmenter that would
otherwise be too slow for runtime.