diff --git a/Dockerfile b/Dockerfile index 1fad5a25e..c8ebe98e3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -30,6 +30,7 @@ FROM dependencies AS build WORKDIR /usr/app COPY ./public ./public COPY ./src ./src +copy ./language ./language COPY index.html tsconfig.json tsconfig.node.json vite.config.ts eslint.config.mjs .prettierrc ./ ARG VITE_APP_API_ENDPOINT diff --git a/language/translations/en.json b/language/translations/en.json index 48e46d9a1..df10d6e62 100644 --- a/language/translations/en.json +++ b/language/translations/en.json @@ -1272,9 +1272,9 @@ "Your project is live and can receive contributions. Share your project to get more visibility.": "Your project is live and can receive contributions. Share your project to get more visibility.", "Your project is in review and therefore cannot receive contributions, and is not visible by the public.": "Your project is in review and therefore cannot receive contributions, and is not visible by the public.", "You project has been flagged for violating our Terms & Conditions. You should have received an email with further detail on how to proceed. Your project is currently not visible to the public.": "You project has been flagged for violating our Terms & Conditions. You should have received an email with further detail on how to proceed. Your project is currently not visible to the public.", - "Post saved successfully!": "Post saved successfully!", - "failed to upload image": "failed to upload image", - "Contribute without login": "Contribute without login", + "To a goal": "To a goal", + "Email and Updates": "Email and Updates", + "Rewards total": "Rewards total", "Follow Project and receive direct project updates to your email": "Follow Project and receive direct project updates to your email", "See all badges": "See all badges", "No projects": "No projects", @@ -1315,7 +1315,6 @@ "Receive One Time Password": "Receive One Time Password", "We sent you an OTP code to": "We sent you an OTP code to", "Paste (or type) it below to continue.": "Paste (or type) it below to continue.", - "Resend code": "Resend code", "No contributions have been made to this project.": "No contributions have been made to this project.", "Banner": "Banner", "Spread the word": "Spread the word", @@ -1353,5 +1352,7 @@ "Contributor Ranking": "Contributor Ranking", "Ambassador Ranking": "Ambassador Ranking", "Current month": "Current month", - "Current week": "Current week" + "Current week": "Current week", + "Resend code": "Resend code", + "Geyser Manifesto": "Geyser Manifesto" } \ No newline at end of file diff --git a/src/config/i18next.ts b/src/config/i18next.ts index b9d0f32b0..8380caa44 100644 --- a/src/config/i18next.ts +++ b/src/config/i18next.ts @@ -5,8 +5,85 @@ import { initReactI18next } from 'react-i18next' import { __development__, VITE_APP_LNG_PORT } from '@/shared/constants' +import { + ArabicTranslations, + ChineseTranslations, + CzechTranslations, + EnglishTranslations, + FrenchTranslations, + GermanTranslations, + GreekTranslations, + ItalianTranslations, + JapaneseTranslations, + PolishTranslations, + PortugueseTranslation, + SpanishTranslations, + SwahiliTranslations, + TurkishTranslations, +} from '../../language/translations' +import { lng } from '../shared/constants' + const languagePostUrl = `http://localhost:${VITE_APP_LNG_PORT}/language/{{lng}}` +const initOptions = __development__ + ? { + fallbackLng: 'en', + debug: true, + saveMissing: true, + backend: { + loadPath: '/language/translations/{{lng}}.json', + addPath: languagePostUrl, + }, + } + : { + fallbackLng: 'en', + resources: { + [lng.en]: { + translation: EnglishTranslations, + }, + + [lng.fr]: { + translation: FrenchTranslations, + }, + [lng.de]: { + translation: GermanTranslations, + }, + [lng.it]: { + translation: ItalianTranslations, + }, + [lng.el]: { + translation: GreekTranslations, + }, + [lng.pl]: { + translation: PolishTranslations, + }, + [lng.cz]: { + translation: CzechTranslations, + }, + [lng.zh]: { + translation: ChineseTranslations, + }, + [lng.es]: { + translation: SpanishTranslations, + }, + [lng.pt]: { + translation: PortugueseTranslation, + }, + [lng.ar]: { + translation: ArabicTranslations, + }, + [lng.sw]: { + translation: SwahiliTranslations, + }, + [lng.tr]: { + translation: TurkishTranslations, + }, + [lng.ja]: { + translation: JapaneseTranslations, + }, + }, + } + i18next // detect user language // learn more: https://github.com/i18next/i18next-browser-languageDetector @@ -16,14 +93,6 @@ i18next .use(initReactI18next) // init i18next // for all options read: https://www.i18next.com/overview/configuration-options - .init({ - debug: Boolean(__development__), - fallbackLng: 'en', - saveMissing: Boolean(__development__), - backend: { - loadPath: '/language/translations/{{lng}}.json', - addPath: languagePostUrl, - }, - }) + .init(initOptions) export default i18next diff --git a/src/modules/discovery/pages/landing/views/defaultView/sections/Featured.tsx b/src/modules/discovery/pages/landing/views/defaultView/sections/Featured.tsx index 569c0f1fb..866b7c520 100644 --- a/src/modules/discovery/pages/landing/views/defaultView/sections/Featured.tsx +++ b/src/modules/discovery/pages/landing/views/defaultView/sections/Featured.tsx @@ -12,8 +12,8 @@ import { FeaturedGrantCard } from '../components/FeaturedGrantCard' import { FeaturedCardSkeleton, FeaturedProjectCard } from '../components/FeaturedProjectCard' import { ProjectRowLayout } from '../components/ProjectRowLayout' -const GEYSER_PROJECT_NAME = 'geyser' -const GEYSER_GET_FEATURED_REWARD_ID = '4957' +const GEYSER_PROMOTIONS_PROJECT_NAME = 'geyserpromotions' +const GEYSER_GET_FEATURED_REWARD_ID = '5332' export type FeatureAirtableData = { Name: string @@ -68,7 +68,7 @@ export const Featured = () => { return (