Tweaks for datetime display options (#14186)

* use translation keys

* change strict option to half width
This commit is contained in:
Azri Kahar
2022-06-29 23:25:11 +08:00
committed by GitHub
parent 75e7fa743f
commit 742bca9b9e
2 changed files with 13 additions and 7 deletions

View File

@@ -94,15 +94,15 @@ export default defineDisplay({
fields.push(
{
field: 'suffix',
name: 'Suffix',
name: '$t:displays.datetime.suffix',
type: 'boolean',
meta: {
width: 'half',
interface: 'boolean',
options: {
label: 'Show relative indicator',
label: '$t:displays.datetime.suffix_label',
},
note: "Uses words like 'in' and 'ago'",
note: '$t:displays.datetime.suffix_note',
},
schema: {
default_value: true,
@@ -110,15 +110,15 @@ export default defineDisplay({
},
{
field: 'strict',
name: 'Strict',
name: '$t:displays.datetime.strict',
type: 'boolean',
meta: {
width: 'full',
width: 'half',
interface: 'boolean',
options: {
label: 'Use strict units',
label: '$t:displays.datetime.strict_label',
},
note: "Removes words like 'almost', 'over', 'less than'",
note: '$t:displays.datetime.strict_note',
},
schema: {
default_value: false,

View File

@@ -1762,6 +1762,12 @@ displays:
short: Short
relative: Relative
relative_label: 'Show relative time, eg: 5 minutes ago'
suffix: Suffix
suffix_label: Show relative indicator
suffix_note: Uses words like 'in' and 'ago'
strict: Strict
strict_label: Use strict units
strict_note: Removes words like 'almost', 'over', 'less than'
file:
file: File
description: Display files