I invested some time this weekend to check out the current state of backend translations.
Currently one big change is under review that should be merged:
I produced the change to improve code readability and data structures for the editing interface.
As the code was pretty complicated and the labelid format described in the JS files was actually not used I refactored it to be way simpler, making this a breaking change if someone already used this format (I guess this is almost impossible).
Additionally the change fixes the problem that tooltips contained script tags by making the translate handlebars helper unbound which results in using the raw return value of the helper.
After continually rebasing and making it work together with another change I finally merged Rens change into this one, so that is the master change.
Now with those changes what you can do is:
You can configure which xliff files are loaded for the Neos backend via Setting in:
which is a map of
'Vendor.Package': ['Different', 'Sources', 'MaybeGlobbingSubDirectory/*']
With that, all packages can include their translations to the Neos backend.
Labels for node properties can be configured via:
ui.labelTranslationId in the property configuration of the NodeTypes.
The translationId can contain the package and source file to use, which would look like:
resulting in using the label
properties._hidden from the
Resources/Private/Translations/<locale>/NodeTypes/Hideable.xliff file in the
TYPO3.Neos package (provided it was included as explained above).
To make translating easier, given a NodeType
Foo.Bar:Baz the property named
text will have the following default
So if you stick to that convention you don’t need to change NodeTypes configuration.
That means with the system it is possible to translate the backend as well as any user land node types.
Additionally you can override any node type label of other packages by overriding the
labelTranslationId to point to your package.
Points of action:
- review and get the above change merged
- check https://review.typo3.org/#/c/40546/
- and https://review.typo3.org/#/c/40543/ for translation of core pakcage node types
- Find other non labelized parts and labelize them
What you cannot do right now is overwrite Neos labels in the backend that are not NodeTypes (general button labels, tree etc.) but I think that’s fine.
So lets finish this up!