mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-23 11:44:06 -08:00
✏️ Clarify deep nesting in collections
This commit is contained in:
parent
709e71e76a
commit
427e40326c
|
@ -12,8 +12,7 @@ Currently, n8n does _not_ allow for internalization of:
|
|||
|
||||
- messages from outside the `editor-ui` package, e.g. `No active database connection`,
|
||||
- node subtitles, e.g. `create: user` or `getAll: post` below the node name on the canvas,
|
||||
- new version notification contents in the updates panel, e.g. `Includes node enhancements`,
|
||||
- deeply nested parameters inside `collection` and `fixedCollection` (untested feature).
|
||||
- new version notification contents in the updates panel, e.g. `Includes node enhancements`.
|
||||
|
||||
## Locale identifiers
|
||||
|
||||
|
@ -507,7 +506,6 @@ Allowed keys: `displayName`, `description`, `placeholder`, and `multipleValueBut
|
|||
```
|
||||
|
||||
```js
|
||||
// node translation: /packages/nodes-base/nodes/Github/translations/de.ts
|
||||
module.exports = {
|
||||
github: {
|
||||
header: {},
|
||||
|
@ -523,17 +521,33 @@ module.exports = {
|
|||
displayName: '🇩🇪 Label',
|
||||
description: '🇩🇪 Label to add to issue.',
|
||||
},
|
||||
|
||||
// fixed collection
|
||||
additionalParameters: {
|
||||
displayName: '🇩🇪 Additional Fields',
|
||||
options: {
|
||||
author: {
|
||||
displayName: '🇩🇪 Author',
|
||||
},
|
||||
},
|
||||
},
|
||||
// fixed collection item - same level of nesting
|
||||
author: {
|
||||
displayName: '🇩🇪 Author',
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
```
|
||||
|
||||
To reduce excessive nesting, a parameter inside a collection's `options` parameter sits at the same level of nesting as the containing collection in the `nodeView` section.
|
||||
To reduce nesting and to share translations, a parameter inside a collection's or fixed collection's `options` parameter sits at the same level of nesting as the containing collection in the `nodeView` section.
|
||||
|
||||
<p align="center">
|
||||
<img src="img/node3.png">
|
||||
</p>
|
||||
|
||||
> **Note**: In case of deep nesting, i.e. a child of a child of a `collection` and `fixedCollection` parameter, the deeply nested child in principle should be translatable at the same level of nesting as the `collection` and `fixedCollection` parameter, but this has not been fully tested for this first release.
|
||||
|
||||
#### Reusable dynamic text
|
||||
|
||||
Also, the base text file may contain the special key `reusableDynamicText`, allowing for a node parameter to be translated once and reused elsewhere in other node parameter translations.
|
||||
|
|
Loading…
Reference in a new issue