mirror of
https://github.com/godotengine/godot-docs-l10n.git
synced 2025-12-31 09:49:22 +03:00
77 lines
4.5 KiB
Plaintext
77 lines
4.5 KiB
Plaintext
# SOME DESCRIPTIVE TITLE.
|
|
# Copyright (C) 2014-present Juan Linietsky, Ariel Manzur and the Godot community (CC BY 3.0)
|
|
# This file is distributed under the same license as the Godot Engine package.
|
|
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
|
#
|
|
#, fuzzy
|
|
msgid ""
|
|
msgstr ""
|
|
"Project-Id-Version: Godot Engine 4.3\n"
|
|
"Report-Msgid-Bugs-To: \n"
|
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
|
"MIME-Version: 1.0\n"
|
|
"Content-Type: text/plain; charset=UTF-8\n"
|
|
"Content-Transfer-Encoding: 8bit\n"
|
|
|
|
#: ../../docs/contributing/development/handling_compatibility_breakages.rst:4
|
|
msgid "Handling compatibility breakages"
|
|
msgstr ""
|
|
|
|
#: ../../docs/contributing/development/handling_compatibility_breakages.rst:8
|
|
msgid "So you've added a new parameter to a method, changed the return type, changed the type of a parameter, or changed its default value, and now the automated testing is complaining about compatibility breakages?"
|
|
msgstr ""
|
|
|
|
#: ../../docs/contributing/development/handling_compatibility_breakages.rst:12
|
|
msgid "Breaking compatibility should be avoided, but when necessary there are systems in place to handle this in a way that makes the transition as smooth as possible."
|
|
msgstr ""
|
|
|
|
#: ../../docs/contributing/development/handling_compatibility_breakages.rst:16
|
|
msgid "A practical example"
|
|
msgstr ""
|
|
|
|
#: ../../docs/contributing/development/handling_compatibility_breakages.rst:20
|
|
msgid "These changes are taken from `pull request #88047 <https://github.com/godotengine/godot/pull/88047>`_, which added new pathing options to ``AStarGrid2D`` and other AStar classes. Among other changes, these methods were modified in ``core/math/a_star_grid_2d.h``:"
|
|
msgstr ""
|
|
|
|
#: ../../docs/contributing/development/handling_compatibility_breakages.rst:29
|
|
msgid "To:"
|
|
msgstr ""
|
|
|
|
#: ../../docs/contributing/development/handling_compatibility_breakages.rst:36
|
|
msgid "This meant adding new compatibility method bindings to the file, which should be in the ``protected`` section of the code, usually placed next to ``_bind_methods()``:"
|
|
msgstr ""
|
|
|
|
#: ../../docs/contributing/development/handling_compatibility_breakages.rst:47
|
|
msgid "They should start with a ``_`` to indicate that they are internal, and end with ``_bind_compat_`` followed by the PR number that introduced the change (``88047`` in this example). These compatibility methods need to be implemented in a dedicated file, like ``core/math/a_star_grid_2d.compat.inc`` in this case:"
|
|
msgstr ""
|
|
|
|
#: ../../docs/contributing/development/handling_compatibility_breakages.rst:102
|
|
msgid "Unless the change in compatibility is complex, the compatibility method should simply call the modified method directly, instead of duplicating that method. Make sure to match the default arguments for that method (in the example above this would be ``false``)."
|
|
msgstr ""
|
|
|
|
#: ../../docs/contributing/development/handling_compatibility_breakages.rst:105
|
|
msgid "This file should always be placed next to the original file, and have ``.compat.inc`` at the end instead of ``.cpp`` or ``.h``. Next, this should be included in the ``.cpp`` file we're adding compatibility methods to, so ``core/math/a_star_grid_2d.cpp``:"
|
|
msgstr ""
|
|
|
|
#: ../../docs/contributing/development/handling_compatibility_breakages.rst:115
|
|
msgid "And finally, the changes reported by the API validation step should be added to the relevant validation file. Because this was done during the development of 4.3, this would be ``misc/extension_api_validation/4.2-stable.expected`` (including changes not shown in this example):"
|
|
msgstr ""
|
|
|
|
#: ../../docs/contributing/development/handling_compatibility_breakages.rst:133
|
|
msgid "The instructions for how to add to that file are at the top of the file itself."
|
|
msgstr ""
|
|
|
|
#: ../../docs/contributing/development/handling_compatibility_breakages.rst:135
|
|
msgid "If you get a \"Hash changed\" error for a method, it means that the compatibility binding is missing or incorrect. Such lines shouldn't be added to the ``.expected`` file, but fixed by binding the proper compatibility method."
|
|
msgstr ""
|
|
|
|
#: ../../docs/contributing/development/handling_compatibility_breakages.rst:138
|
|
msgid "And that's it! You might run into a bit more complicated cases, like rearranging arguments, changing return types, etc., but this covers the basic on how to use this system."
|
|
msgstr ""
|
|
|
|
#: ../../docs/contributing/development/handling_compatibility_breakages.rst:141
|
|
msgid "For more information, see `pull request #76446 <https://github.com/godotengine/godot/pull/76446>`_."
|
|
msgstr ""
|