diff --git a/web/components/news/english-only-warning.tsx b/web/components/news/english-only-warning.tsx new file mode 100644 index 00000000..ad18c6fe --- /dev/null +++ b/web/components/news/english-only-warning.tsx @@ -0,0 +1,17 @@ +import {useT} from 'web/lib/locale' +import {useLocale} from 'web/lib/locale' + +export function EnglishOnlyWarning() { + const t = useT() + const {locale} = useLocale() + + if (locale === 'en') { + return null + } + + return ( +
+ {t('news.note', 'Note: Unfortunately, this page is only available in English.')} +
+ ) +} diff --git a/web/components/votes/vote-info.tsx b/web/components/votes/vote-info.tsx index ea3602e4..613a3517 100644 --- a/web/components/votes/vote-info.tsx +++ b/web/components/votes/vote-info.tsx @@ -8,6 +8,7 @@ import toast from 'react-hot-toast' import {Button} from 'web/components/buttons/button' import {Col} from 'web/components/layout/col' import {Row} from 'web/components/layout/row' +import {EnglishOnlyWarning} from 'web/components/news/english-only-warning' import {Vote, VoteItem} from 'web/components/votes/vote-item' import {TextEditor, useTextEditor} from 'web/components/widgets/editor' import {Input} from 'web/components/widgets/input' @@ -124,6 +125,8 @@ export function VoteComponent() { )} +