Skip to content

Commit

Permalink
Merge pull request #2507 from ever-co/2498-use-single-lib-for-transla…
Browse files Browse the repository at this point in the history
…tion

2498 use single lib for translation
  • Loading branch information
evereq authored May 8, 2024
2 parents 5e48056 + 5de5563 commit 2180437
Show file tree
Hide file tree
Showing 17 changed files with 2 additions and 7,754 deletions.
1 change: 0 additions & 1 deletion .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,6 @@
"Chatwoot",
"CHATWOOT",
"apps/web/messages/*.json",
"apps/web/public/locales/**",
"apps/web/lib/i18n/*.ts",
"apps/web/lib/settings/timezones.js",
"apps/mobile/app/screens/DemoShowroomScreen/demos/**",
Expand Down
6 changes: 2 additions & 4 deletions apps/web/app/hooks/useLanguage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@
import { currentLanguageState } from '@app/stores';
import { useRouter } from 'next/navigation';
import { useCallback, useEffect } from 'react';
import { useTranslation } from 'react-i18next';
import { useRecoilState } from 'recoil';

export function useLanguage() {
const { i18n } = useTranslation();
const router = useRouter();
const [currentLanguage, setCurrentLanguage] = useRecoilState(currentLanguageState);

Expand All @@ -30,7 +28,7 @@ export function useLanguage() {
}
// router.refresh();
},
[router, i18n]
[router]
);
return { currentLanguage, changeLanguage, i18n };
return { currentLanguage, changeLanguage,};
}
21 changes: 0 additions & 21 deletions apps/web/ni18n.config.ts

This file was deleted.

1 change: 0 additions & 1 deletion apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@
"react-dom": "^18.2.0",
"react-google-recaptcha": "^2.1.0",
"react-hook-form": "^7.42.1",
"react-i18next": "^13.3.1",
"react-icons": "^5.2.0",
"react-loading-skeleton": "^3.1.1",
"react-paginate": "^8.2.0",
Expand Down
595 changes: 0 additions & 595 deletions apps/web/public/locales/ar/common.json

This file was deleted.

603 changes: 0 additions & 603 deletions apps/web/public/locales/bg/common.json

This file was deleted.

Loading

0 comments on commit 2180437

Please sign in to comment.