1
0
mirror of https://github.com/uetchy/namae.git synced 2025-03-17 12:30:32 +09:00

fix: i18n 'show more'

This commit is contained in:
uetchy 2019-08-27 03:22:47 +09:00
parent df56b21a99
commit c2fee2271c
4 changed files with 8 additions and 4 deletions

View File

@ -23,5 +23,6 @@
"now": "ZEIT Now" "now": "ZEIT Now"
}, },
"countryCode": "us", "countryCode": "us",
"try": "suggestions" "try": "suggestions",
"showMore": "show more"
} }

View File

@ -23,5 +23,6 @@
"now": "ZEIT Now" "now": "ZEIT Now"
}, },
"countryCode": "jp", "countryCode": "jp",
"try": "全自動名前考え機" "try": "全自動名前考え機",
"showMore": "もっと見る"
} }

View File

@ -5,6 +5,7 @@ import { Tooltip } from 'react-tippy'
import 'react-tippy/dist/tippy.css' import 'react-tippy/dist/tippy.css'
import BarLoader from 'react-spinners/BarLoader' import BarLoader from 'react-spinners/BarLoader'
import { GoInfo } from 'react-icons/go' import { GoInfo } from 'react-icons/go'
import { useTranslation } from 'react-i18next'
import { ExternalLink } from './Links' import { ExternalLink } from './Links'
import { mobile } from '../util/css' import { mobile } from '../util/css'
@ -37,6 +38,7 @@ export function Card({ title, children }) {
export function Repeater({ items = [], moreItems = [], children }) { export function Repeater({ items = [], moreItems = [], children }) {
const [revealAlternatives, setRevealAlternatives] = useState(false) const [revealAlternatives, setRevealAlternatives] = useState(false)
const { t } = useTranslation()
function onClick() { function onClick() {
setRevealAlternatives(true) setRevealAlternatives(true)
@ -58,7 +60,7 @@ export function Repeater({ items = [], moreItems = [], children }) {
)) ))
: null} : null}
{moreItems.length > 0 && !revealAlternatives ? ( {moreItems.length > 0 && !revealAlternatives ? (
<Button onClick={onClick}>show more</Button> <Button onClick={onClick}>{t('showMore')}</Button>
) : null} ) : null}
</> </>
) )

View File

@ -14,7 +14,7 @@ i18n
backends: [LocalStorageBackend, XHR], backends: [LocalStorageBackend, XHR],
backendOptions: [ backendOptions: [
{ {
versions: { en: '1.2', ja: '1.2' }, versions: { en: '1.3', ja: '1.3' },
}, },
], ],
}, },