Fix docs don't give justification for manual construction.
Clarify how to apply manual StringName construction as an
optimization and that "string intern" means "work at parse time".
There are several godot-demo-projects (including 3d/platformer) that
incorrectly use StringName literals (they use & literals instead of just
passing strings), so clearly this is confusing.
AThousandShips did a disassembly test to prove it automatically converts
constant strings to StringName for annotated functions:
func do_test(_var: StringName, _var2: String):
pass
func test():
do_test("abc", "def")
Yields:
Disassembling do_test(_var, _var2)
0: line 2: pass
2: == END ==
Disassembling test()
0: line 5: do_test("abc", "def")
2: call self.do_test(const(&"abc"), const("def"))
10: assign stack(3) = false
12: == END ==
It also happens with built-in functions such as those of Input.
We don't use that info for anything, and it generates unnecessary diffs
every time we bump the minor version (and CI failures if we forget to
sync some files from opt-in modules (mono, text_server_fb).
* Description of `ui_text_submit` action should be "Submit Text" instead of "Text Submitted".
* Spell out "Animation" instead of using "Anim.".
* Treat "Max" as regular word instead of writing "Max.".
* Use generic "Set %s" for action name instead of a dedicated "Set target_position".
* Add translator comment for:
* "Inclusive" and "Self" in the profiler.
* Places where it needs the context about being an editor progress label.
* "Duplicated Animation Name" since it's refering to the new name of a duplicated animation.
* Disambiguation of "View Plane Transform", "Paste Selects" and "Display Normal".
* Fix wrong undo action name for renaming an input action.
* Fix missing end quote in a shader error message.
* In class reference:
* Fix duplicated "if" in the description of `signf()`.
* Fix mismatched example output in `String.operator %()`.
* Fix typo in the description of `Decal.texture_emission`.
* Unify description of `String.match()` and `StringName.match()`.
- Update the NodePath shorthand prefix for `master`.
- Document the StringName construction shorthand (`&"example"`).
- Cross-link between NodePath and StringName, as these are related
concepts.
This makes it easier to spot syntax errors when editing the
class reference. The schema is referenced locally so validation
can still work offline.
Each class XML's schema conformance is also checked on GitHub Actions.
For the time being we don't support writing a description for those, preferring
having all details in the method's description.
Using self-closing tags saves half the lines, and prevents contributors from
thinking that they should write the argument or return documentation there.