Files
godot-docs-l10n/sphinx/templates/engine_details/architecture/binding_to_external_libraries.pot
2025-12-19 15:00:42 +01:00

123 lines
6.0 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 latest\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/engine_details/architecture/binding_to_external_libraries.rst:4
msgid "Binding to external libraries"
msgstr ""
#: ../../docs/engine_details/architecture/binding_to_external_libraries.rst:7
msgid "Modules"
msgstr ""
#: ../../docs/engine_details/architecture/binding_to_external_libraries.rst:9
msgid "The Summator example in :ref:`doc_custom_modules_in_cpp` is great for small, custom modules, but what if you want to use a larger, external library? Let's look at an example using `Festival <https://www.cstr.ed.ac.uk/projects/festival/>`_, a speech synthesis (text-to-speech) library written in C++."
msgstr ""
#: ../../docs/engine_details/architecture/binding_to_external_libraries.rst:14
msgid "To bind to an external library, set up a module directory similar to the Summator example:"
msgstr ""
#: ../../docs/engine_details/architecture/binding_to_external_libraries.rst:20
msgid "Next, you will create a header file with a TTS class:"
msgstr ""
#: ../../docs/engine_details/architecture/binding_to_external_libraries.rst:22
msgid "godot/modules/tts/tts.h"
msgstr ""
#: ../../docs/engine_details/architecture/binding_to_external_libraries.rst:41
msgid "And then you'll add the cpp file."
msgstr ""
#: ../../docs/engine_details/architecture/binding_to_external_libraries.rst:43
msgid "godot/modules/tts/tts.cpp"
msgstr ""
#: ../../docs/engine_details/architecture/binding_to_external_libraries.rst:65
msgid "Just as before, the new class needs to be registered somehow, so two more files need to be created:"
msgstr ""
#: ../../docs/engine_details/architecture/binding_to_external_libraries.rst:74
msgid "These files must be in the top-level folder of your module (next to your ``SCsub`` and ``config.py`` files) for the module to be registered properly."
msgstr ""
#: ../../docs/engine_details/architecture/binding_to_external_libraries.rst:77
msgid "These files should contain the following:"
msgstr ""
#: ../../docs/engine_details/architecture/binding_to_external_libraries.rst:79
msgid "godot/modules/tts/register_types.h"
msgstr ""
#: ../../docs/engine_details/architecture/binding_to_external_libraries.rst:86
msgid "godot/modules/tts/register_types.cpp"
msgstr ""
#: ../../docs/engine_details/architecture/binding_to_external_libraries.rst:105
msgid "Next, you need to create an ``SCsub`` file so the build system compiles this module:"
msgstr ""
#: ../../docs/engine_details/architecture/binding_to_external_libraries.rst:108
#: ../../docs/engine_details/architecture/binding_to_external_libraries.rst:159
#: ../../docs/engine_details/architecture/binding_to_external_libraries.rst:181
msgid "godot/modules/tts/SCsub"
msgstr ""
#: ../../docs/engine_details/architecture/binding_to_external_libraries.rst:116
msgid "You'll need to install the external library on your machine to get the .a library files. See the library's official documentation for specific instructions on how to do this for your operation system. We've included the installation commands for Linux below, for reference."
msgstr ""
#: ../../docs/engine_details/architecture/binding_to_external_libraries.rst:127
msgid "The voices that Festival uses (and any other potential external/3rd-party resource) all have varying licenses and terms of use; some (if not most) of them may be be problematic with Godot, even if the Festival Library itself is MIT License compatible. Please be sure to check the licenses and terms of use."
msgstr ""
#: ../../docs/engine_details/architecture/binding_to_external_libraries.rst:132
msgid "The external library will also need to be installed inside your module to make the source files accessible to the compiler, while also keeping the module code self-contained. The festival and speech_tools libraries can be installed from the modules/tts/ directory via git using the following commands:"
msgstr ""
#: ../../docs/engine_details/architecture/binding_to_external_libraries.rst:142
msgid "If you don't want the external repository source files committed to your repository, you can link to them instead by adding them as submodules (from within the modules/tts/ directory), as seen below:"
msgstr ""
#: ../../docs/engine_details/architecture/binding_to_external_libraries.rst:151
msgid "Please note that Git submodules are not used in the Godot repository. If you are developing a module to be merged into the main Godot repository, you should not use submodules. If your module doesn't get merged in, you can always try to implement the external library as a GDExtension."
msgstr ""
#: ../../docs/engine_details/architecture/binding_to_external_libraries.rst:156
msgid "To add include directories for the compiler to look at you can append it to the environment's paths:"
msgstr ""
#: ../../docs/engine_details/architecture/binding_to_external_libraries.rst:177
msgid "If you want to add custom compiler flags when building your module, you need to clone `env` first, so it won't add those flags to whole Godot build (which can cause errors). Example `SCsub` with custom flags:"
msgstr ""
#: ../../docs/engine_details/architecture/binding_to_external_libraries.rst:194
msgid "The final module should look like this:"
msgstr ""
#: ../../docs/engine_details/architecture/binding_to_external_libraries.rst:212
msgid "Using the module"
msgstr ""
#: ../../docs/engine_details/architecture/binding_to_external_libraries.rst:214
msgid "You can now use your newly created module from any script:"
msgstr ""
#: ../../docs/engine_details/architecture/binding_to_external_libraries.rst:223
msgid "And the output will be ``is_spoken: True`` if the text is spoken."
msgstr ""