Editor style guide

Einführung

Thanks for your interest in contributing to the Godot editor!

This page describes the grammar and writing style used throughout the Godot editor. Following this style guide will help your contribution get merged faster since there will be fewer review steps required.

Writing style

  • Write messages (errors, warnings, ...) as full sentences. They should start with an uppercase letter and end with a period.
  • Try to keep sentences short. This makes it more likely that their translations will be short as well, which is a good thing to avoid UI bugs.
  • Use contractions. For example, use "isn't" instead of "is not". An exception to this rule can be made when you specifically want to emphasize one of the contraction's words.
  • Use double quotes in messages ("") instead of simple quotes (''). Double quotes should be used to quote user input, file paths and possibly other things depending on the context.

Siehe auch

Try to follow the Richtlinien Dokumentation schreiben in addition to the guidelines outlined above.

Schaltflächen und Menü Texte

Großschreibung von Texten in Schaltflächen und Menüs:

  • gut: Editor Datenverzeichnis öffnen
  • schlecht: Editor Datenverzeichnis öffnen

If a menu action opens a modal dialog, suffix it with an ellipsis (...).

  • Gut: Editoreigenschaften...
  • schlecht: Editoreigenschaften

Inspector Sektion

In general, don't create sections that contain less than 3 items. Sections that contain few items make it difficult to navigate the inspector, while missing the benefits of using sections such as folding.

Es gibt einige gültige Ausnahmen hierfür, z.B. Materialeigenschaften in SpatialMaterial.

Dieser Ratschlag gilt ebenso für die Projekteinstellungen und die Editoreinstellungen.

Inspector Leistungs Tipps

Enum properties that noticeably impact performance should have a performance hint associated. The hint should refer to the absolute performance impact, rather than being relative to the other options provided in the enum. Here are some examples taken from the Godot editor:

  • Screen-space antialiasing: Disabled (Fastest), FXAA (Fast)
  • MSAA quality: Disabled (Fastest), 2x (Fast), 4x (Average), 8x (Slow), 16x (Slower)
  • DirectionalLight mode: Orthogonal (Fast), PSSM 2 Splits (Average), PSSM 4 Splits (Slow)

For consistency, try to stick to the terms below (from fastest to slowest):

  • schnellster, schneller, schnell, durchschnittlich, langsam, langsamer, langsamste

Their usage doesn't have to be contiguous. For example, you can use only "Fast" and "Slow" from the list above.

If you're adding a new enum, its values should be ordered from the fastest option to the slowest option.

Tooltips

Consider adding tooltips whenever the action performed by a button or menu action isn't obvious. You can also provide additional context or highlight caveats in the tooltip.

You can do this by calling set_tooltip(TTR("Text here.")) on the Control-based node in question. If the tooltip is particularly long (more than ~80 characters), wrap it over several lines by adding line breaks using \n.

Tooltips should follow the writing style described above. In addition to this, use indicative mood instead of imperative mood:

  • Good: Computes global illumination for the selected GIProbe.
  • Bad: Compute global illumination for the selected GIProbe.