From c2fee2271cd827d4559d4875e5c7820ed286149c Mon Sep 17 00:00:00 2001 From: Yasuaki Uechi Date: Tue, 27 Aug 2019 03:22:47 +0900 Subject: [PATCH] fix: i18n 'show more' --- web/public/locales/en/translation.json | 3 ++- web/public/locales/ja/translation.json | 3 ++- web/src/components/Cards.js | 4 +++- web/src/i18n.js | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/web/public/locales/en/translation.json b/web/public/locales/en/translation.json index 26dfee2..05ab0d5 100644 --- a/web/public/locales/en/translation.json +++ b/web/public/locales/en/translation.json @@ -23,5 +23,6 @@ "now": "ZEIT Now" }, "countryCode": "us", - "try": "suggestions" + "try": "suggestions", + "showMore": "show more" } diff --git a/web/public/locales/ja/translation.json b/web/public/locales/ja/translation.json index cf41191..3a6e119 100644 --- a/web/public/locales/ja/translation.json +++ b/web/public/locales/ja/translation.json @@ -23,5 +23,6 @@ "now": "ZEIT Now" }, "countryCode": "jp", - "try": "全自動名前考え機" + "try": "全自動名前考え機", + "showMore": "もっと見る" } diff --git a/web/src/components/Cards.js b/web/src/components/Cards.js index d4ed6bb..bf5c779 100644 --- a/web/src/components/Cards.js +++ b/web/src/components/Cards.js @@ -5,6 +5,7 @@ import { Tooltip } from 'react-tippy' import 'react-tippy/dist/tippy.css' import BarLoader from 'react-spinners/BarLoader' import { GoInfo } from 'react-icons/go' +import { useTranslation } from 'react-i18next' import { ExternalLink } from './Links' import { mobile } from '../util/css' @@ -37,6 +38,7 @@ export function Card({ title, children }) { export function Repeater({ items = [], moreItems = [], children }) { const [revealAlternatives, setRevealAlternatives] = useState(false) + const { t } = useTranslation() function onClick() { setRevealAlternatives(true) @@ -58,7 +60,7 @@ export function Repeater({ items = [], moreItems = [], children }) { )) : null} {moreItems.length > 0 && !revealAlternatives ? ( - + ) : null} ) diff --git a/web/src/i18n.js b/web/src/i18n.js index 5045de4..ab86d18 100644 --- a/web/src/i18n.js +++ b/web/src/i18n.js @@ -14,7 +14,7 @@ i18n backends: [LocalStorageBackend, XHR], backendOptions: [ { - versions: { en: '1.2', ja: '1.2' }, + versions: { en: '1.3', ja: '1.3' }, }, ], },