fix: Allow suppresion of translation in list options
Fixes #2604 It's not so easy to handle this frontend side, so I feel it's better to be explicit and add a `doNotTranslate` attribute to the option. Added the frontend code to take that into account, as well as a note in the docs.
This commit is contained in:
parent
90483b155f
commit
f0761cecf9
4 changed files with 56 additions and 5 deletions
|
@ -31,3 +31,46 @@ options: {
|
|||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Suppress translation
|
||||
|
||||
In the example above, you want the different `list` options to be translated.
|
||||
But sometimes, there is no need for that, like in this example from Breanna:
|
||||
|
||||
```js
|
||||
options: {
|
||||
primaryBustDart: {
|
||||
list: [
|
||||
'06:00',
|
||||
'07:00',
|
||||
'08:00',
|
||||
'09:00',
|
||||
'10:00',
|
||||
'11:00',
|
||||
'11:30',
|
||||
'12:00',
|
||||
'12:30',
|
||||
'13:00',
|
||||
'13:30',
|
||||
'14:00',
|
||||
'15:00',
|
||||
'16:00',
|
||||
'17:00',
|
||||
],
|
||||
dflt: '06:00',
|
||||
doNotTranslate: true,
|
||||
},
|
||||
// More here
|
||||
}
|
||||
```
|
||||
|
||||
As you can see above, you can set the `doNotTranslate` property to `true` and to indicate this.
|
||||
|
||||
<Note>
|
||||
|
||||
##### This is not a core feature
|
||||
|
||||
To be clear, setting this here does not do anything in core. It's merely extra
|
||||
metadata you can add on the option to facilitate frontend integration.
|
||||
|
||||
</Note>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue