From 71c211b1dc48192e5d83ce83004ade4d87ab1f2e Mon Sep 17 00:00:00 2001 From: Kasra Bigdeli Date: Sun, 21 Apr 2024 11:11:28 -0700 Subject: [PATCH] Disable language support for prod due to low coverage of translations --- .vscode/settings.json | 2 +- src/containers/Login.tsx | 25 ++++++++++++++----------- src/containers/apps/CreateNewApp.tsx | 5 ++++- src/utils/Language.ts | 3 +++ 4 files changed, 22 insertions(+), 13 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 0ebd829b..2b2bfd49 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -8,7 +8,7 @@ }, "editor.formatOnSave": true, "editor.codeActionsOnSave": { - "source.organizeImports": true + "source.organizeImports": "explicit" }, "typescript.referencesCodeLens.enabled": true, "tslint.ignoreDefinitionFiles": false, diff --git a/src/containers/Login.tsx b/src/containers/Login.tsx index b2b6e0fc..8b9a131c 100644 --- a/src/containers/Login.tsx +++ b/src/containers/Login.tsx @@ -1,11 +1,12 @@ import { LockOutlined } from '@ant-design/icons' -import { Button, Card, Collapse, Input, Radio, Row, Layout, Select } from 'antd' +import { Button, Card, Collapse, Input, Layout, Radio, Row, Select } from 'antd' import React, { ReactComponentElement } from 'react' import { Redirect, RouteComponentProps } from 'react-router' import ApiManager from '../api/ApiManager' import ErrorFactory from '../utils/ErrorFactory' import { currentLanguageOption, + isLanguageEnabled, languagesOptions, localize, } from '../utils/Language' @@ -81,16 +82,18 @@ export default class Login extends ApiComponent, any> { )} style={{ width: 380 }} extra={ - { + StorageHelper.setLanguageInLocalStorage( + value + ) + window.location.reload() + }} + /> + ) : undefined } > - Has Persistent Data + {localize( + 'create_new_app.has_persistent_data', + 'Has Persistent Data' + )}{' '}