Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[no-Jira] Import i18n from src/lib/i18n #933

Merged
merged 1 commit into from
Apr 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pages/login.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ import Head from 'next/head';
import React, { ReactElement, useEffect } from 'react';
import SubjectIcon from '@mui/icons-material/Subject';
import { Button } from '@mui/material';
import i18n from 'i18next';
import { getSession, signIn } from 'next-auth/react';
import BaseLayout from 'src/components/Layouts/Basic';
import Loading from 'src/components/Loading';
import Welcome from 'src/components/Welcome';
import useGetAppSettings from 'src/hooks/useGetAppSettings';
import { extractCookie } from 'src/lib/extractCookie';
import i18n from 'src/lib/i18n';

export interface LoginProps {
signInButtonText: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React from 'react';
import { Box, IconButton, Typography } from '@mui/material';
import { styled } from '@mui/material/styles';
import i18n from 'i18next';
import { useTranslation } from 'react-i18next';
import { PreferredContactMethodEnum } from 'src/graphql/types.generated';
import i18n from 'src/lib/i18n';
import { EditIcon } from '../StyledComponents';
import { ContactOtherFragment } from './ContactOther.generated';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { TFunction } from 'i18next';
import { TFunction } from 'react-i18next';

export const validateAvatar = ({
file,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ import {
Typography,
} from '@mui/material';
import { styled } from '@mui/material/styles';
import { TFunction } from 'i18next';
import { useSnackbar } from 'notistack';
import { useTranslation } from 'react-i18next';
import { TFunction, useTranslation } from 'react-i18next';
import {
CancelButton,
SubmitButton,
Expand Down
2 changes: 1 addition & 1 deletion src/components/Tool/Appeal/AddAppealForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
} from '@mui/material';
import { styled } from '@mui/material/styles';
import { Field, Form, Formik } from 'formik';
import i18n from 'i18next';
import { useSnackbar } from 'notistack';
import { useTranslation } from 'react-i18next';
import { makeStyles } from 'tss-react/mui';
import * as yup from 'yup';
import { useContactFiltersQuery } from 'pages/accountLists/[accountListId]/contacts/Contacts.generated';
import { MultiselectFilter } from 'src/graphql/types.generated';
import i18n from 'src/lib/i18n';

Check warning on line 25 in src/components/Tool/Appeal/AddAppealForm.tsx

View check run for this annotation

Codecov / codecov/patch

src/components/Tool/Appeal/AddAppealForm.tsx#L25

Added line #L25 was not covered by tests
import { useAccountListId } from '../../../hooks/useAccountListId';
import theme from '../../../theme';
import AnimatedCard from '../../AnimatedCard';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
import Icon from '@mdi/react';
import { Box, IconButton } from '@mui/material';
import { DataGrid, GridSelectionModel } from '@mui/x-data-grid';
import i18n from 'i18next';
import { makeStyles } from 'tss-react/mui';
import { TestAppeal } from 'pages/accountLists/[accountListId]/tools/appeals/testAppeal';
import i18n from 'src/lib/i18n';

Check warning on line 8 in src/components/Tool/Appeal/AppealDetails/AppealDetailsAsked.tsx

View check run for this annotation

Codecov / codecov/patch

src/components/Tool/Appeal/AppealDetails/AppealDetailsAsked.tsx#L8

Added line #L8 was not covered by tests
import theme from '../../../../theme';
import { useAppealContext } from '../AppealContextProvider/AppealContextProvider';
import AppealDetailsNoData from './AppealDetailsNoData';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
import Icon from '@mdi/react';
import { Box, IconButton } from '@mui/material';
import { DataGrid, GridSelectionModel } from '@mui/x-data-grid';
import i18n from 'i18next';
import { makeStyles } from 'tss-react/mui';
import { TestAppeal } from 'pages/accountLists/[accountListId]/tools/appeals/testAppeal';
import i18n from 'src/lib/i18n';

Check warning on line 8 in src/components/Tool/Appeal/AppealDetails/AppealDetailsCommitted.tsx

View check run for this annotation

Codecov / codecov/patch

src/components/Tool/Appeal/AppealDetails/AppealDetailsCommitted.tsx#L8

Added line #L8 was not covered by tests
import theme from '../../../../theme';
import { useAppealContext } from '../AppealContextProvider/AppealContextProvider';
import AppealDetailsNoData from './AppealDetailsNoData';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
import Icon from '@mdi/react';
import { Box, IconButton } from '@mui/material';
import { DataGrid } from '@mui/x-data-grid';
import i18n from 'i18next';
import { makeStyles } from 'tss-react/mui';
import { TestAppeal } from 'pages/accountLists/[accountListId]/tools/appeals/testAppeal';
import i18n from 'src/lib/i18n';

Check warning on line 8 in src/components/Tool/Appeal/AppealDetails/AppealDetailsExcluded.tsx

View check run for this annotation

Codecov / codecov/patch

src/components/Tool/Appeal/AppealDetails/AppealDetailsExcluded.tsx#L8

Added line #L8 was not covered by tests
import theme from '../../../../theme';
import AppealDetailsNoData from './AppealDetailsNoData';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
import Icon from '@mdi/react';
import { Box, IconButton } from '@mui/material';
import { DataGrid, GridSelectionModel } from '@mui/x-data-grid';
import i18n from 'i18next';
import { makeStyles } from 'tss-react/mui';
import { TestAppeal } from 'pages/accountLists/[accountListId]/tools/appeals/testAppeal';
import i18n from 'src/lib/i18n';

Check warning on line 8 in src/components/Tool/Appeal/AppealDetails/AppealDetailsGiven.tsx

View check run for this annotation

Codecov / codecov/patch

src/components/Tool/Appeal/AppealDetails/AppealDetailsGiven.tsx#L8

Added line #L8 was not covered by tests
import theme from '../../../../theme';
import { useAppealContext } from '../AppealContextProvider/AppealContextProvider';
import AppealDetailsNoData from './AppealDetailsNoData';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
import Icon from '@mdi/react';
import { Box, IconButton } from '@mui/material';
import { DataGrid, GridSelectionModel } from '@mui/x-data-grid';
import i18n from 'i18next';
import { makeStyles } from 'tss-react/mui';
import { TestAppeal } from 'pages/accountLists/[accountListId]/tools/appeals/testAppeal';
import i18n from 'src/lib/i18n';

Check warning on line 8 in src/components/Tool/Appeal/AppealDetails/AppealDetailsReceived.tsx

View check run for this annotation

Codecov / codecov/patch

src/components/Tool/Appeal/AppealDetails/AppealDetailsReceived.tsx#L8

Added line #L8 was not covered by tests
import theme from '../../../../theme';
import { useAppealContext } from '../AppealContextProvider/AppealContextProvider';
import AppealDetailsNoData from './AppealDetailsNoData';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import i18n from 'i18next';
import i18n from 'src/lib/i18n';

export const frequencies: { [key: string]: string } = {
WEEKLY: i18n.t('Weekly'),
Expand Down
2 changes: 1 addition & 1 deletion src/components/Tool/NoData.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
} from '@mdi/js';
import Icon from '@mdi/react';
import { Typography } from '@mui/material';
import i18n from 'i18next';
import i18n from 'src/lib/i18n';
import { NullStateBox } from '../Shared/Filters/NullState/NullStateBox';

interface Props {
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/useGetTimezones.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import i18n from 'i18next';
import i18n from 'src/lib/i18n';

export const useGetTimezones = (): Array<Record<string, string>> => {
const timezones = [
Expand Down
2 changes: 1 addition & 1 deletion src/utils/contacts/contactPartnershipStatus.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import i18n from 'i18next';
import i18n from 'src/lib/i18n';

export const contactPartnershipStatus = {
NEVER_CONTACTED: i18n.t('Never Contacted'),
Expand Down
Loading