mirror of
https://github.com/discourse/discourse.git
synced 2024-12-08 11:43:39 +08:00
6dac187785
Why this change?
In cdba864598
, we added support for adding
a description which will be displayed under the input of each property
on the client side.
Currently this convention in the locale file is followed:
```
en:
theme_metadata:
settings:
objects_setting:
description: <description> for the setting
schema:
properties:
name: <description for the name property>
links:
name: <description for the name property in link>
url: <description for the url property in link>
```
Since we now want to allow the label to be translated as well, we will
be changing the convention to the following:
```
en:
theme_metadata:
settings:
objects_setting:
description: <description> for the setting
schema:
properties:
name:
label: <label for the name property>
description: <description for the name property>
links:
name:
label: <label for the name property>
description: <description for the name property in link>
url:
label: <label for the url property>
description: <description for the url property in link>
```
If the locale file does not provide a `label` key under the property's
name, the client side will just display the property's name as the
label for the input field.
18 lines
456 B
YAML
18 lines
456 B
YAML
en:
|
|
theme_metadata:
|
|
settings:
|
|
objects_setting:
|
|
description: "This is a description for objects setting"
|
|
schema:
|
|
properties:
|
|
name:
|
|
label: Name
|
|
description: "Section Name"
|
|
links:
|
|
name:
|
|
label: Name
|
|
description: "Name of the link"
|
|
url:
|
|
label: URL
|
|
description: "URL of the link"
|