diff options
Diffstat (limited to 'frontend/src/components/settings/pages/general/StoreSelect.tsx')
| -rw-r--r-- | frontend/src/components/settings/pages/general/StoreSelect.tsx | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/frontend/src/components/settings/pages/general/StoreSelect.tsx b/frontend/src/components/settings/pages/general/StoreSelect.tsx index 40e70301..ebf1bd81 100644 --- a/frontend/src/components/settings/pages/general/StoreSelect.tsx +++ b/frontend/src/components/settings/pages/general/StoreSelect.tsx @@ -1,5 +1,6 @@ import { Dropdown, Field, TextField } from 'decky-frontend-lib'; import { FunctionComponent } from 'react'; +import { useTranslation } from 'react-i18next'; import { FaShapes } from 'react-icons/fa'; import Logger from '../../../../logger'; @@ -11,17 +12,23 @@ const logger = new Logger('StoreSelect'); const StoreSelect: FunctionComponent<{}> = () => { const [selectedStore, setSelectedStore] = useSetting<Store>('store', Store.Default); const [selectedStoreURL, setSelectedStoreURL] = useSetting<string | null>('store-url', null); + const { t } = useTranslation(); + const tStores = [ + t('StoreSelect.store_channel.default'), + t('StoreSelect.store_channel.testing'), + t('StoreSelect.store_channel.custom'), + ]; // Returns numerical values from 0 to 2 (with current branch setup as of 8/28/22) // 0 being Default, 1 being Testing and 2 being Custom return ( <> - <Field label="Plugin Store Channel" childrenContainerWidth={'fixed'}> + <Field label={t('StoreSelect.store_channel.label')} childrenContainerWidth={'fixed'}> <Dropdown rgOptions={Object.values(Store) .filter((store) => typeof store == 'string') .map((store) => ({ - label: store, + label: tStores[Store[store]], data: Store[store], }))} selectedOption={selectedStore} @@ -33,11 +40,11 @@ const StoreSelect: FunctionComponent<{}> = () => { </Field> {selectedStore == Store.Custom && ( <Field - label="Custom Store" + label={t('StoreSelect.custom_store.label')} indentLevel={1} description={ <TextField - label={'URL'} + label={t('StoreSelect.custom_store.url_label')} value={selectedStoreURL || undefined} onChange={(e) => setSelectedStoreURL(e?.target.value || null)} /> |
