Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added designs/images/i18n-info-text.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
48 changes: 48 additions & 0 deletions designs/node-info-i18n.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
state: draft
---

# i18n of Node Info

Current Node-RED editor allow nodes or flows has their own description written in markdown.

Nodes can have internationalized info help text but markdown descriptions are restricted to one language.

This proposal covers how node info (shown on the right pane of Node-RED side bar) can be internationalized.

The interface for specifying locale should follow design for locale selection interface for subflow enhancements.

### Authors

- @HiroyasuNishiyamann

### Details

#### Interface

Current locale for info text can be selected by menu at the bottom of description tab of a node.

![Info Text Editor](images/i18n-info-text.png)

#### Internal Representation

In order to keep compatibility with old flow format, `info` property of nodes hold info text for `en-US` locale.

Info texts for other locales are stored in `i18nInfo` property. The `i18nInfo` property points to an object with `locale` as a key and corresponding text as a value.

```json
{
"info": "Info text in English",
"i18nInfo": {
"ja": "Info text in Japanese",
"de": "Info text in German"
}
}
```




## History

- 2019-08-28 - initial revision