wip(lab): Work on i18n-next
This commit is contained in:
parent
491913e288
commit
4c17255a58
26 changed files with 170 additions and 105 deletions
|
@ -1,7 +1,9 @@
|
|||
import { useState } from 'react'
|
||||
import ClearIcon from 'shared/components/icons/clear.js'
|
||||
import { useTranslation } from 'next-i18next'
|
||||
|
||||
const DesignOptionList = props => {
|
||||
const { t } = useTranslation(['app'])
|
||||
const { dflt, list } = props.pattern.config.options[props.option]
|
||||
const val = (typeof props.gist?.options?.[props.option] === 'undefined')
|
||||
? dflt
|
||||
|
@ -45,12 +47,12 @@ const DesignOptionList = props => {
|
|||
`}>
|
||||
<>°</>
|
||||
</span>
|
||||
{props.app.t(`options.${props.pattern.config.name}.${props.option}.options.${choice}`)}
|
||||
{t(`options.${props.pattern.config.name}.${props.option}.options.${choice}`)}
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
<button
|
||||
title={props.app.t('app.reset')}
|
||||
title={t('reset')}
|
||||
className=""
|
||||
disabled={val === dflt}
|
||||
onClick={reset}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue