Skip to content

Commit d19d020

Browse files
committed
Replace uses of shorthand codeblock syntax to avoid issues with localization
Previously, many paragraphs in the documentation used `::` at the end of a line as a replacement for a single colon (and `::` on the following line). Due to this, the `::` was part of the extracted string for localization. Weblate also showed a warning about the trailing `::`, as it's not normally expected to be there. This change requires translators to revalidate all modified strings. However, considering many of those have broken code blocks due to translators replacing `::` with `:`, it can be a good idea. This also adds documentation writing guidelines for code blocks and admonitions. This commit does not modify existing admonitions in any way (as this would lead to a much larger diff, and require more localizable text to be revalidated by translators).
1 parent 5e20706 commit d19d020

32 files changed

+580
-200
lines changed

about/complying_with_licenses.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ Requirements
4242
In the case of the MIT license, the only requirement is to include the license
4343
text somewhere in your game or derivative project.
4444

45-
This text reads as follows::
45+
This text reads as follows:
46+
47+
::
4648

4749
This game uses Godot Engine, available under the following license:
4850

contributing/development/compiling/compiling_for_ios.rst

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ Requirements
2424
from the `MoltenVK SDK <https://github.com/KhronosGroup/MoltenVK#fetching-moltenvk-source-code>`__.
2525

2626
.. note:: If you have `Homebrew <https://brew.sh/>`_ installed, you can easily
27-
install SCons using the following command::
27+
install SCons using the following command:
28+
29+
::
2830

2931
brew install scons
3032

@@ -33,7 +35,9 @@ Requirements
3335

3436
Similarly, if you have `MacPorts <https://www.macports.org/>`_
3537
installed, you can easily install SCons using the
36-
following command::
38+
following command:
39+
40+
::
3741

3842
sudo port install scons
3943

contributing/development/compiling/compiling_for_linuxbsd.rst

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -301,11 +301,15 @@ Running a headless/server build
301301
-------------------------------
302302

303303
To run in *headless* mode which provides editor functionality to export
304-
projects in an automated manner, use the normal build::
304+
projects in an automated manner, use the normal build:
305+
306+
::
305307

306308
scons platform=linuxbsd target=editor
307309

308-
And then use the ``--headless`` command line argument::
310+
And then use the ``--headless`` command line argument:
311+
312+
::
309313

310314
./bin/godot.linuxbsd.editor.x86_64 --headless
311315

@@ -468,7 +472,9 @@ the default GCC + GNU ld setup:
468472
- Clang tends to give more useful error messages compared to GCC.
469473

470474
To do so, install Clang and the ``lld`` package from your distribution's package manager
471-
then use the following SCons command::
475+
then use the following SCons command:
476+
477+
::
472478

473479
scons platform=linuxbsd use_llvm=yes linker=lld
474480

@@ -478,7 +484,9 @@ created in the ``bin/`` folder.
478484
It's still recommended to use GCC for production builds as they can be compiled using
479485
link-time optimization, making the resulting binaries smaller and faster.
480486

481-
If this error occurs::
487+
If this error occurs:
488+
489+
::
482490

483491
/usr/bin/ld: cannot find -l:libatomic.a: No such file or directory
484492

contributing/development/compiling/compiling_for_macos.rst

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ For compiling under macOS, the following is required:
2525
``misc/scripts/install_vulkan_sdk_macos.sh`` within the Godot source repository.
2626

2727
.. note:: If you have `Homebrew <https://brew.sh/>`_ installed, you can easily
28-
install SCons using the following command::
28+
install SCons using the following command:
29+
30+
::
2931

3032
brew install scons
3133

@@ -34,7 +36,9 @@ For compiling under macOS, the following is required:
3436

3537
Similarly, if you have `MacPorts <https://www.macports.org/>`_
3638
installed, you can easily install SCons using the
37-
following command::
39+
following command:
40+
41+
::
3842

3943
sudo port install scons
4044

@@ -80,7 +84,9 @@ Automatic ``.app`` bundle creation
8084
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
8185

8286
To automatically create an ``.app`` bundle like in the official builds, use the ``generate_bundle=yes`` option on the *last*
83-
SCons command used to build editor::
87+
SCons command used to build editor:
88+
89+
::
8490

8591
scons platform=macos arch=x86_64
8692
scons platform=macos arch=arm64 generate_bundle=yes
@@ -89,7 +95,9 @@ Manual ``.app`` bundle creation
8995
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
9096

9197
To support both architectures in a single "Universal 2" binary,
92-
run the above two commands and then use ``lipo`` to bundle them together::
98+
run the above two commands and then use ``lipo`` to bundle them together:
99+
100+
::
93101

94102
lipo -create bin/godot.macos.editor.x86_64 bin/godot.macos.editor.arm64 -output bin/godot.macos.editor.universal
95103

@@ -117,11 +125,15 @@ Running a headless/server build
117125
-------------------------------
118126

119127
To run in *headless* mode which provides editor functionality to export
120-
projects in an automated manner, use the normal build::
128+
projects in an automated manner, use the normal build:
129+
130+
::
121131

122132
scons platform=macos target=editor
123133

124-
And then use the ``--headless`` command line argument::
134+
And then use the ``--headless`` command line argument:
135+
136+
::
125137

126138
./bin/godot.macos.editor.x86_64 --headless
127139

@@ -179,7 +191,9 @@ an *Universal 2* binary from two separate ARM64 and x86_64 binaries (if both wer
179191
MoltenVK without having to recompile export templates.
180192

181193
You can then zip the ``macos_template.app`` folder to reproduce the ``macos.zip``
182-
template from the official Godot distribution::
194+
template from the official Godot distribution:
195+
196+
::
183197

184198
zip -r9 macos.zip macos_template.app
185199

@@ -208,7 +222,9 @@ repository/extracted the zip), e.g.::
208222

209223
export OSXCROSS_ROOT="$HOME/osxcross"
210224

211-
Now you can compile with SCons like you normally would::
225+
Now you can compile with SCons like you normally would:
226+
227+
::
212228

213229
scons platform=macos
214230

contributing/development/compiling/compiling_for_web.rst

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,21 +34,27 @@ and ``source ./emsdk_env.sh``/``emsdk_env.bat``.
3434

3535
Open a terminal and navigate to the root directory of the engine source code.
3636
Then instruct SCons to build the Web platform. Specify ``target`` as
37-
either ``template_release`` for a release build or ``template_debug`` for a debug build::
37+
either ``template_release`` for a release build or ``template_debug`` for a debug build:
38+
39+
::
3840

3941
scons platform=web target=template_release
4042
scons platform=web target=template_debug
4143

4244
By default, the :ref:`JavaScriptBridge singleton <doc_web_javascript_bridge>` will be built
4345
into the engine. Official export templates also have the JavaScript singleton
4446
enabled. Since ``eval()`` calls can be a security concern, the
45-
``javascript_eval`` option can be used to build without the singleton::
47+
``javascript_eval`` option can be used to build without the singleton:
48+
49+
::
4650

4751
scons platform=web target=template_release javascript_eval=no
4852
scons platform=web target=template_debug javascript_eval=no
4953

5054
By default, WebWorker threads support is enabled. To disable it and only use a single thread,
51-
the ``threads`` option can be used to build the web template without threads support::
55+
the ``threads`` option can be used to build the web template without threads support:
56+
57+
::
5258

5359
scons platform=web target=template_release threads=no
5460
scons platform=web target=template_debug threads=no
@@ -59,11 +65,15 @@ the resulting file will be placed in the ``bin`` subdirectory. Its name is
5965
for debug.
6066

6167
Finally, rename the zip archive to ``web_release.zip`` for the
62-
release template::
68+
release template:
69+
70+
::
6371

6472
mv bin/godot.web.template_release.wasm32.zip bin/web_release.zip
6573

66-
And ``web_debug.zip`` for the debug template::
74+
And ``web_debug.zip`` for the debug template:
75+
76+
::
6777

6878
mv bin/godot.web.template_debug.wasm32.zip bin/web_debug.zip
6979

@@ -75,7 +85,9 @@ performance and compatibility reasons. See the
7585
:ref:`export page <doc_javascript_export_options>` for more info.
7686

7787
You can build the export templates using the option ``dlink_enabled=yes``
78-
to enable GDExtension support::
88+
to enable GDExtension support:
89+
90+
::
7991

8092
scons platform=web dlink_enabled=yes target=template_release
8193
scons platform=web dlink_enabled=yes target=template_debug
@@ -84,7 +96,9 @@ Once finished, the resulting file will be placed in the ``bin`` subdirectory.
8496
Its name will have ``_dlink`` added.
8597

8698
Finally, rename the zip archives to ``web_dlink_release.zip`` and
87-
``web_dlink_release.zip`` for the release template::
99+
``web_dlink_release.zip`` for the release template:
100+
101+
::
88102

89103
mv bin/godot.web.template_release.wasm32.dlink.zip bin/web_dlink_release.zip
90104
mv bin/godot.web.template_debug.wasm32.dlink.zip bin/web_dlink_debug.zip
@@ -94,7 +108,9 @@ Building the editor
94108

95109
It is also possible to build a version of the Godot editor that can run in the
96110
browser. The editor version is not recommended
97-
over the native build. You can build the editor with::
111+
over the native build. You can build the editor with:
112+
113+
::
98114

99115
scons platform=web target=editor
100116

contributing/development/compiling/compiling_for_windows.rst

Lines changed: 30 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,17 @@ For compiling under Windows, the following is required:
3838
Studio releases.
3939

4040
.. note:: If you have `Scoop <https://scoop.sh/>`_ installed, you can easily
41-
install MinGW and other dependencies using the following command::
41+
install MinGW and other dependencies using the following command:
42+
43+
::
4244

4345
scoop install python mingw
4446

4547
Scons will still need to be installed via pip
4648
.. note:: If you have `MSYS2 <https://www.msys2.org/>`_ installed, you can easily
47-
install MinGW and other dependencies using the following command::
49+
install MinGW and other dependencies using the following command:
50+
51+
::
4852

4953
pacman -S mingw-w64-x86_64-python3-pip mingw-w64-x86_64-gcc \
5054
mingw-w64-i686-python3-pip mingw-w64-i686-gcc make
@@ -61,7 +65,9 @@ For compiling under Windows, the following is required:
6165
Setting up SCons
6266
----------------
6367

64-
To install SCons, open the command prompt and run the following command::
68+
To install SCons, open the command prompt and run the following command:
69+
70+
::
6571

6672
python -m pip install scons
6773

@@ -205,7 +211,9 @@ optional PIX and Agility SDK components).
205211
which is needed to generate some files.
206212
2. Clone the `godot-nir-static <https://github.com/godotengine/godot-nir-static>`_
207213
directory and navigate to it.
208-
3. Run the following::
214+
3. Run the following:
215+
216+
::
209217

210218
git submodule update --init
211219
./update_mesa.sh
@@ -244,7 +252,9 @@ Optionally, you can compile with the following for additional features:
244252
developer mode in Windows; otherwise it won't be used.
245253

246254
.. note:: If you want to use a PIX with MinGW build, navigate to PIX runtime
247-
directory and use the following commands to generate import library::
255+
directory and use the following commands to generate import library:
256+
257+
::
248258

249259
# For x86-64:
250260
gendef ./bin/x64/WinPixEventRuntime.dll
@@ -300,7 +310,9 @@ To compile Godot with statically linked ANGLE:
300310

301311
1. Clone the `godot-angle-static <https://github.com/godotengine/godot-angle-static>`_
302312
directory and navigate to it.
303-
2. Run the following command::
313+
2. Run the following command:
314+
315+
::
304316

305317
git submodule update --init
306318
./update_angle.sh
@@ -330,7 +342,9 @@ Folder-based editors don't require any particular setup to start working with Go
330342
codebase. To edit projects with Visual Studio they need to be set up as a solution.
331343

332344
You can create a Visual Studio solution via SCons by running SCons with
333-
the ``vsproj=yes`` parameter, like this::
345+
the ``vsproj=yes`` parameter, like this:
346+
347+
::
334348

335349
scons platform=windows vsproj=yes
336350

@@ -373,7 +387,9 @@ The package names may differ based on your distribution, here are some known one
373387
+----------------+--------------------------------------------------------------+
374388

375389
Before attempting the compilation, SCons will check for
376-
the following binaries in your ``PATH`` environment variable::
390+
the following binaries in your ``PATH`` environment variable:
391+
392+
::
377393

378394
# for MinGW-w64
379395
i686-w64-mingw32-gcc
@@ -386,7 +402,9 @@ the following binaries in your ``PATH`` environment variable::
386402

387403
If the binaries are not located in the ``PATH`` (e.g. ``/usr/bin``),
388404
you can define the following environment variable to give a hint to
389-
the build system::
405+
the build system:
406+
407+
::
390408

391409
export MINGW_PREFIX="/path/to/mingw"
392410

@@ -452,7 +470,9 @@ following location, replacing ``<version>`` with the version identifier
452470
453471
%APPDATA%\Godot\export_templates\<version>\
454472
455-
With the following names::
473+
With the following names:
474+
475+
::
456476

457477
windows_debug_x86_32_console.exe
458478
windows_debug_x86_32.exe

contributing/development/compiling/compiling_with_dotnet.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ These source files must be generated before building the managed libraries.
3333
They can be generated by any .NET-enabled Godot editor binary by running it with
3434
the parameters ``--headless --generate-mono-glue`` followed by the path to an
3535
output directory.
36-
This path must be ``modules/mono/glue`` in the Godot directory::
36+
This path must be ``modules/mono/glue`` in the Godot directory:
37+
38+
::
3739

3840
<godot_binary> --headless --generate-mono-glue modules/mono/glue
3941

contributing/development/compiling/index.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ Building from source
99

1010
Godot prides itself on being very easy to build, by C++ projects' standards.
1111
:ref:`Godot uses the SCons build system <doc_faq_why_scons>`, and after the initial
12-
setup compiling the engine for your current platform should be as easy as running::
12+
setup compiling the engine for your current platform should be as easy as running:
13+
14+
::
1315

1416
scons
1517

0 commit comments

Comments
 (0)