This makes it possible to change the branch of the documentation that
URLs are pointing to without having to modify all class reference
files.
In the XML class reference, the `$DOCS_URL` placeholder should be used,
and will be replaced automatically in the editor and when generating
the RST class reference.
The documentation branch string is set in `version.py`.
Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
(cherry picked from commit 5341e6010e)
And do the dedent and stripping for both translated and
non-translated strings for consistency, and so that we
don't need to do it at the call site.
(cherry picked from commit a16031beb6)
- Parse `.po` files from `doc/translations/*.po` like already done
with `editor/translations/*.po`.
- Add logic to register a doc translation mapping in `TranslationServer`
and `EditorSettings`.
- Add `DTR()` to lookup the doc translation mapping (similar to `TTR()`).
Strings are automatically dedented and stripped of whitespace to ensure
that they would match the translation catalog.
- Use `DTR()` to translate relevant strings in `EditorHelp`,
`EditorInspector`, `CreateDialog`, `ConnectionsDialog`.
- Small simplification to `TranslationLoaderPO`, the path argument was
not really meaningful.
(cherry picked from commit 4857648a16)
String.get_slice_count is always at least 1 or 2 for bases with a port number.
Before this change the following URL would return ERR_INVALID_PARAMETER ```ws://127.0.0.1:8000/test```
(cherry picked from commit 3d9f29910c)
* Add support for decimal numeric entities to String::xml_unescape
* Add more error checks to String::xml_unescape
* Refactor XMLParser to use String::xml_unescape instead of an internal
implementation
Splits the URL into (scheme, host, port, path).
Supports both literal IPv4 and IPv6.
Strip credentials when present (e.g. http://user:pass@example.com/).
Use that function in both HTTPRequest and WebSocketClient.
(cherry picked from commit 3bb40669d5)
Happy new year to the wonderful Godot community!
2020 has been a tough year for most of us personally, but a good year for
Godot development nonetheless with a huge amount of work done towards Godot
4.0 and great improvements backported to the long-lived 3.2 branch.
We've had close to 400 contributors to engine code this year, authoring near
7,000 commit! (And that's only for the `master` branch and for the engine code,
there's a lot more when counting docs, demos and other first-party repos.)
Here's to a great year 2021 for all Godot users 🎆
(cherry picked from commit b5334d14f7)
Fix errors when comparing strings with large numbers (> INT64_MAX).
Comparisons now occur by comparing individual digits, instead of
converting to int64_t first.
(cherry picked from commit de46c92711)
Current error checks for to_int and to_int64 do not issue overflow error
messages for INT64_MAX + 1, INT64_MAX + 2, and others close to the
limits. Likewise, error checks for hex_to_int, hex_to_int64 and bin_to_int64
issue false positive error messages for INT64_MIN or INT32_MIN. This commit
fixes these error checks.
Godot currently supports zero padding for integers, octals and
hexadecimals when using format strings, but not for floats.
This commit adds support for zero padding for floats, thus ensuring
consistent behavior for all types, and making Godot's format specifiers'
behavior closer to c's `printf()`.
Before: `print("<%07.2f>" % -0.2345)` prints `< -0.23>`.
Now: `print("<%07.2f>" % -0.2345)` prints `<-000.23>`.
`print("<%7.2f>" % -0.2345)` prints `< -0.23>`.
(cherry picked from commit b7d835d9ca)
Happy new year to the wonderful Godot community!
We're starting a new decade with a well-established, non-profit, free
and open source game engine, and tons of further improvements in the
pipeline from hundreds of contributors.
Godot will keep getting better, and we're looking forward to all the
games that the community will keep developing and releasing with it.
Before this fix, opening relative export paths inside of an EditorFileDialog was not possible. This was fixed by modifying String::path_to_file() to save relative paths in EditorExportPreset::set_export_path() more appropriately and changing EditorFileDialog::set_current_dir() to open relative paths.
- Use "B" insted of "Bytes" to be more compact
- Use suffixes that denote a binary prefix
- Make suffixes localizable
This removes the need for the custom
`EditorNetworkProfiler:_format_bandwidth()` method.