From 8be42a4e57928f82830be71fa6c9bc17ac63aa8a Mon Sep 17 00:00:00 2001 From: Ben Woodward Date: Fri, 6 Aug 2021 07:52:22 -0700 Subject: Refactor translation plumbing (#168) - Centralize user-defined translations into a single file - Automatically sort the language dropdown - Update the translation contribution guide --- src/components/Settings.js | 29 ++++++----------------------- 1 file changed, 6 insertions(+), 23 deletions(-) (limited to 'src/components') diff --git a/src/components/Settings.js b/src/components/Settings.js index 1c28dab..1cbe74a 100644 --- a/src/components/Settings.js +++ b/src/components/Settings.js @@ -2,6 +2,7 @@ import { Checkbox, Pane, RadioGroup, SelectField } from 'evergreen-ui'; import { useEffect, useState } from 'react'; import { useTranslation } from 'react-i18next'; import i18n from '../i18n'; +import { Translations } from '../translations'; import './style.css'; export const Settings = (props) => { @@ -28,29 +29,11 @@ export const Settings = (props) => { selected={i18n.language} onChange={(e) => props.onLanguageChange(e.target.value)} > - - - - - - - - - - - - - - - - - - - - - - - + {Translations.map((t) => ( + + ))}