Skip to content

Commit

Permalink
improvement: fix the folder structure (#2609)
Browse files Browse the repository at this point in the history
* improvement: fix the folder structure

* improvement: fix the folder structure

* improvement: fix the folder structure

* improvement: fix the folder structure

* improvement: fix the folder structure

* improvement: final build
  • Loading branch information
Anishali2 authored Jun 14, 2024
1 parent 30cfded commit 01c6af2
Show file tree
Hide file tree
Showing 19 changed files with 18 additions and 17 deletions.
3 changes: 2 additions & 1 deletion .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,8 @@
"signin",
"Chatwoot",
"CHATWOOT",
"apps/web/messages/*.json",
"apps/web/locales/*.json",
"apps/web/i18n.ts",
"apps/web/lib/i18n/*.ts",
"apps/web/lib/settings/timezones.js",
"apps/mobile/app/screens/DemoShowroomScreen/demos/**",
Expand Down
2 changes: 1 addition & 1 deletion apps/web/app/[locale]/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ const LocaleLayout = ({ children, params: { locale }, pageProps }: Props) => {
const name = searchParams?.get('name');

// eslint-disable-next-line @typescript-eslint/no-var-requires
const messages = require(`../../messages/${locale}.json`);
const messages = require(`../../locales/${locale}.json`);

useEffect(() => {
if (!isApiWork && !loading) router.push(`/maintenance`);
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion apps/web/app/constants.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { JitsuOptions } from '@jitsu/jitsu-react/dist/useJitsu';
import { I_SMTPRequest } from './interfaces/ISmtp';
import { getNextPublicEnv } from './env';
import enLanguage from '../messages/en.json';
import enLanguage from '../locales/en.json';
// import { } from 'country-flag-icons/react/3x2'
import { BG, CN, DE, ES, FR, IS, IT, NL, PL, PT, RU, SA, US } from 'country-flag-icons/react/1x1';
export const API_BASE_URL = '/api';
Expand Down
2 changes: 1 addition & 1 deletion apps/web/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ import { getRequestConfig } from 'next-intl/server';
// }));

export default getRequestConfig(async ({ locale }) => ({
messages: (await import(`./messages/${locale}.json`)).default
messages: (await import(`./locales/${locale}.json`)).default
}));
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
26 changes: 13 additions & 13 deletions apps/web/types/local.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import en from '../messages/en.json';
import zh from '../messages/zh.json';
import he from '../messages/he.json';
import it from '../messages/it.json';
import pl from '../messages/pl.json';
import pt from '../messages/pt.json';
import ru from '../messages/ru.json';
import es from '../messages/es.json';
import fr from '../messages/fr.json';
import ar from '../messages/ar.json';
import bg from '../messages/bg.json';
import nl from '../messages/nl.json';
import de from '../messages/de.json';
import en from '../locales/en.json';
import zh from '../locales/zh.json';
import he from '../locales/he.json';
import it from '../locales/it.json';
import pl from '../locales/pl.json';
import pt from '../locales/pt.json';
import ru from '../locales/ru.json';
import es from '../locales/es.json';
import fr from '../locales/fr.json';
import ar from '../locales/ar.json';
import bg from '../locales/bg.json';
import nl from '../locales/nl.json';
import de from '../locales/de.json';

type Locale = 'en' | 'de' | 'ar' | 'bg' | 'zh' | 'nl' | 'he' | 'it' | 'pl' | 'pt' | 'ru' | 'es' | 'fr';
type EnTYPE = typeof en;
Expand Down

0 comments on commit 01c6af2

Please sign in to comment.