Generate translations from CLI so export works in gitlab ci

Godot Version

4.2.1

Question

Hello.

I am trying to setup gitlab ci to build my godot project.
I don’t commit the *.translation files.
The problem I am facing is, that godot does apperantly not generate the translations-files on CLI-export.
The error:

ERROR: Cannot open file 'res://locale/text.de.translation'.
   at: load (core/io/resource_format_binary.cpp:1187)
ERROR: Failed loading resource: res://locale/text.de.translation. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (core/io/resource_loader.cpp:274)
ERROR: Cannot open file 'res://locale/text.en.translation'.
[...]

How do I generate the translation-file via CLI?

Ok, so this is a known issue with no good solution: