chore(docs): Revert changes to Extending Options documentation
This commit is contained in:
parent
a687ca43d8
commit
a8912b3e60
1 changed files with 49 additions and 10 deletions
|
@ -1,18 +1,15 @@
|
|||
---
|
||||
title: Extending options and suppressing translation
|
||||
title: Extending options
|
||||
---
|
||||
|
||||
## Extending and overriding inherited options
|
||||
<Fixme>
|
||||
|
||||
Parts automatically inherit options from the parts they are based on.
|
||||
However, parts can also extend their options.
|
||||
Explain extending options here
|
||||
|
||||
- A part can define new options. These new options are added to the ones inherited.
|
||||
- Options can be redefined to override/extend an inherited option.
|
||||
- For example, an inherited percentage option can be redefined to have different min, max, and/or default values.
|
||||
- A different menu can be specified for an inherited option, or the menu property can be ommitted or set to `null` to prevent the option from appearing in the menus.
|
||||
</Fixme>
|
||||
|
||||
## Suppressing translation
|
||||
|
||||
## 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:
|
||||
|
@ -44,7 +41,49 @@ options: {
|
|||
}
|
||||
```
|
||||
|
||||
As you can see above, you can set the `doNotTranslate` property to `true` to indicate this.
|
||||
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>
|
||||
## 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>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue