diff --git a/packages/webapp/src/classes/app-i18n/index.ts b/packages/webapp/src/classes/app-i18n/index.ts index 8e63fb18..b43cf02e 100644 --- a/packages/webapp/src/classes/app-i18n/index.ts +++ b/packages/webapp/src/classes/app-i18n/index.ts @@ -59,7 +59,7 @@ export const localeFromStr = (code: string): Locale => { .find((l) => l.code == code); if (!result) { - throw `Langunage code could not be found in list of default supported: + ${code}` + throw `Language code could not be found in list of default supported: + ${code}` } return result; diff --git a/packages/webapp/src/compiled-lang/es.json b/packages/webapp/src/compiled-lang/es.json index 670a6a2a..8c7ffcbf 100644 --- a/packages/webapp/src/compiled-lang/es.json +++ b/packages/webapp/src/compiled-lang/es.json @@ -44,7 +44,7 @@ "header.donthaveaccount": [ { "type": 0, - "value": "No tienes una cuenta ?" + "value": "No tienes una cuenta contraseƱa?" } ], "login.email": [ diff --git a/packages/webapp/src/components/maps-page/index.tsx b/packages/webapp/src/components/maps-page/index.tsx index 127d21c7..33f4766e 100644 --- a/packages/webapp/src/components/maps-page/index.tsx +++ b/packages/webapp/src/components/maps-page/index.tsx @@ -8,7 +8,7 @@ import IconButton from '@material-ui/core/IconButton'; import ListItem from '@material-ui/core/ListItem'; import ListItemIcon from '@material-ui/core/ListItemIcon'; import { useStyles } from './style'; -import { AcUnitTwoTone, AddCircleTwoTone, CloudUploadTwoTone, DeleteOutlineTwoTone, LabelTwoTone, PersonOutlineTwoTone, PublicTwoTone, ShareTwoTone, StarTwoTone } from '@material-ui/icons'; +import { AddCircleTwoTone, CloudUploadTwoTone, DeleteOutlineTwoTone, LabelTwoTone, PersonOutlineTwoTone, PublicTwoTone, ScatterPlotTwoTone, ShareTwoTone, StarTwoTone } from '@material-ui/icons'; import { Button, Link, ListItemSecondaryAction, ListItemText, Tooltip } from '@material-ui/core'; import { MapsList } from './maps-list'; import { FormattedMessage, IntlProvider, useIntl } from 'react-intl'; @@ -80,7 +80,7 @@ const MapsPage = () => { const filterButtons: ToolbarButtonInfo[] = [{ filter: { type: 'all' }, label: 'All', - icon: + icon: }, { filter: { type: 'owned' }, label: 'Owned', @@ -171,7 +171,7 @@ const MapsPage = () => { }), }}> -
+
logo
@@ -190,7 +190,7 @@ const MapsPage = () => { )} -
+
Powered By WiseMapping diff --git a/packages/webapp/src/components/maps-page/language-menu/index.tsx b/packages/webapp/src/components/maps-page/language-menu/index.tsx index 27a64282..44d4919e 100644 --- a/packages/webapp/src/components/maps-page/language-menu/index.tsx +++ b/packages/webapp/src/components/maps-page/language-menu/index.tsx @@ -1,4 +1,4 @@ -import { Button, Divider, Menu, MenuItem, Tooltip } from '@material-ui/core'; +import { Button, Dialog, DialogActions, DialogContent, DialogContentText, DialogTitle, Divider, Menu, MenuItem, Tooltip } from '@material-ui/core'; import { TranslateTwoTone } from '@material-ui/icons'; import React from "react"; import { useMutation, useQueryClient } from "react-query"; @@ -13,13 +13,14 @@ const LanguageMenu = () => { const queryClient = useQueryClient(); const client: Client = useSelector(activeInstance); const [anchorEl, setAnchorEl] = React.useState(null); + const [helpDialogOpen, setHelpDialogOpen] = React.useState(false); + const open = Boolean(anchorEl); const intl = useIntl(); const mutation = useMutation((locale: LocaleCode) => client.updateAccountLanguage(locale), { onSuccess: () => { - queryClient.invalidateQueries('account') handleClose(); } @@ -39,7 +40,7 @@ const LanguageMenu = () => { mutation.mutate(localeCode); } - const accountInfo = fetchAccount(); + const accountInfo = fetchAccount(); return ( @@ -48,8 +49,9 @@ const LanguageMenu = () => { variant="outlined" disableElevation={true} color="primary" + style={{ borderColor: 'gray', color: 'gray' }} onClick={handleMenu} - startIcon={} + startIcon={} > {accountInfo?.locale?.label} @@ -86,10 +88,36 @@ const LanguageMenu = () => { - - + { handleClose(); setHelpDialogOpen(true) }} > + + setHelpDialogOpen(false)} /> ); } -export default LanguageMenu; \ No newline at end of file + +type HelpUsToTranslateDialogProp = { + open: boolean, + onClose: () => void +} +const HelpUsToTranslateDialog = ({ open, onClose }: HelpUsToTranslateDialogProp) => { + + return ( + + Help us to Translate ! + + + We need your help !. You could help us to support more languages. If you are interested, send us an email to team@wisemapping.com. + + + + + + + ); +} + +export default LanguageMenu;