From 6637ab4eaeec229e9553a9183303cb7bc87bb2d8 Mon Sep 17 00:00:00 2001 From: Alibek Date: Thu, 29 Feb 2024 14:09:37 +0600 Subject: [PATCH] added next-intl, composed next-auth and next-intl in middleware, fixed some bugs, completed details page, added google auth --- lib/next-auth.d.ts | 10 +- messages/en.json | 186 ++++++++++++++++++ messages/kg.json | 186 ++++++++++++++++++ messages/ru.json | 186 ++++++++++++++++++ next.config.mjs | 9 +- package.json | 1 + src/app/{ => [locale]}/App.scss | 0 src/app/{ => [locale]}/Providers.tsx | 0 src/app/{ => [locale]}/about-us/AboutUs.scss | 0 .../{ => [locale]}/about-us/assets/header.svg | 0 src/app/{ => [locale]}/about-us/page.tsx | 0 .../create-report/CreateReport.scss | 0 src/app/{ => [locale]}/create-report/page.tsx | 2 +- src/app/{ => [locale]}/globals.scss | 0 src/app/[locale]/layout.tsx | 34 ++++ src/app/{ => [locale]}/news/News.scss | 0 .../{ => [locale]}/news/[id]/NewsDetails.scss | 0 .../news/[id]/icons/calendar.svg | 0 .../news/[id]/icons/message.svg | 0 src/app/{ => [locale]}/news/[id]/page.tsx | 0 src/app/{ => [locale]}/news/page.tsx | 2 - src/app/{ => [locale]}/page.tsx | 10 +- src/app/{ => [locale]}/profile/AuthGuard.tsx | 10 +- src/app/{ => [locale]}/profile/Profile.scss | 0 src/app/{ => [locale]}/profile/layout.tsx | 1 - .../profile/my-reports/page.tsx | 2 +- src/app/{ => [locale]}/profile/page.tsx | 2 - .../{ => [locale]}/profile/personal/page.tsx | 2 +- .../[locale]/report/[id]/ReportDetails.scss | 37 ++++ .../report/[id]/icons/def_image.svg | 0 src/app/[locale]/report/[id]/page.tsx | 66 +++++++ .../sign-in/forgot-password/page.tsx | 2 +- .../sign-in/icons/sign-in_icon.svg | 0 src/app/{ => [locale]}/sign-in/page.tsx | 4 +- .../sign-in/reset-code/icons/key.svg | 0 .../sign-in/reset-code/page.tsx | 2 +- .../sign-up/confirm-email/icons/mail.svg | 0 .../sign-up/confirm-email/page.tsx | 2 +- src/app/{ => [locale]}/sign-up/icons/flag.svg | 0 src/app/{ => [locale]}/sign-up/page.tsx | 4 +- .../{ => [locale]}/statistics/Statistics.scss | 0 src/app/{ => [locale]}/statistics/page.tsx | 5 +- .../{ => [locale]}/volunteers/Volunteers.scss | 0 src/app/{ => [locale]}/volunteers/page.tsx | 2 +- src/app/layout.tsx | 30 +-- src/app/not-found.tsx | 13 ++ src/app/report/[id]/page.tsx | 138 ------------- src/entities/NewsCard/NewsCard.tsx | 4 +- src/features/BreadCrumbs/BreadCrumbs.scss | 5 + src/features/BreadCrumbs/BreadCrumbs.tsx | 9 + src/features/GoogleButton/GoogleButton.tsx | 19 +- src/features/ProfileAvatar/ProfileAvatar.tsx | 20 +- src/features/ReportLike/ReportLike.tsx | 9 +- src/features/SearchForm/SearchForm.tsx | 4 +- .../ShowMapButton/ShowMapButton.scss} | 0 src/features/ShowMapButton/ShowMapButton.tsx | 20 ++ .../ShowMapButton}/icons/map-pin.svg | 0 src/i18n.ts | 11 ++ src/middleware.ts | 54 ++++- src/shared/config/apiConfig.ts | 10 + src/shared/config/authConfig.ts | 91 ++++++--- src/shared/config/navigation.ts | 7 + src/shared/types/location-type.ts | 2 +- src/shared/types/token-type.ts | 5 + src/shared/variables/links.ts | 30 ++- src/shared/variables/month.ts | 14 ++ src/shared/variables/road-types.ts | 18 +- src/widgets/Footer/Footer.tsx | 12 +- src/widgets/Navbar/NavAuth/NavAuth.tsx | 8 +- .../Navbar/NavLanguage/NavLanguage.tsx | 53 ++++- src/widgets/Navbar/NavLanguage/variables.ts | 11 ++ src/widgets/Navbar/NavMenu/NavMenu.tsx | 10 +- src/widgets/Navbar/Navbar.tsx | 7 +- src/widgets/ProfileNav/ProfileNav.tsx | 3 +- src/widgets/ReviewSection/ReviewSection.scss | 26 +++ src/widgets/ReviewSection/ReviewSection.tsx | 99 ++++++---- .../ConfirmEmailForm/ConfirmEmailForm.scss | 0 .../ConfirmEmailForm/ConfirmEmailForm.tsx | 4 +- .../ForgotPasswordForm.scss} | 0 .../ForgotPasswordForm/ForgotPasswordForm.tsx | 0 .../confirm-code/confirm-code.scss | 0 .../confirm-code/confirm-code.tsx | 2 +- .../confirm-code/icons/key.svg | 0 .../send-email/icons/mail.svg | 0 .../send-email/send-email.scss | 0 .../send-email/send-email.tsx | 0 .../ChangePassword/ChangePassword.scss | 0 .../ChangePassword/ChangePassword.tsx | 0 .../ChangePasswordInput.scss | 0 .../ChangePasswordInput.tsx | 0 .../ChangePasswordInput/icons/eye-off.svg | 0 .../ChangePasswordInput/icons/eye-on.svg | 0 .../{ => forms}/ProfileForm/ProfileForm.scss | 0 .../{ => forms}/ProfileForm/ProfileForm.tsx | 6 +- .../{ => forms}/ProfileForm/icons/pen.svg | 0 .../CreateReportMap/CreateReportMap.scss | 0 .../CreateReportMap/CreateReportMap.tsx | 0 .../{ => forms}/ReportForm/ReportForm.scss | 0 .../{ => forms}/ReportForm/ReportForm.tsx | 2 +- .../ReportForm/icons/arrow-right.svg | 0 .../{ => forms}/ReportForm/icons/clip.svg | 0 .../ReportForm/icons/pin-image.svg | 0 .../{ => forms}/ReportForm/icons/pin_icon.svg | 0 .../ResetCodeForm/ResetCodeForm.scss | 0 .../ResetCodeForm/ResetCodeForm.tsx | 2 +- .../{ => forms}/SignInForm/SignInForm.scss | 0 .../{ => forms}/SignInForm/SignInForm.tsx | 3 +- .../{ => forms}/SignUpForm/SignUpForm.scss | 0 .../{ => forms}/SignUpForm/SignUpForm.tsx | 4 +- src/widgets/{ => home}/Header/Header.scss | 1 + src/widgets/{ => home}/Header/Header.tsx | 10 +- .../Header/HeaderLink/HeaderLink.scss | 0 .../Header/HeaderLink/HeaderLink.tsx | 7 +- .../HeaderLink/icons/arrow-right-circle.svg | 0 .../{ => home}/Header/assets/background.svg | 0 .../MapSection/HomeMap/HomeMap.scss | 0 .../{ => home}/MapSection/HomeMap/HomeMap.tsx | 12 +- .../MapSection/HomeMap/icons/geo-green.svg | 0 .../MapSection/HomeMap/icons/geo-orange.svg | 0 .../MapSection/HomeMap/icons/geo-pink.svg | 0 .../MapSection/HomeMap/icons/geo-purple.svg | 0 .../MapSection/HomeMap/icons/geo-red.svg | 0 .../MapSection/HomeMap/icons/geo-white.svg | 0 .../MapSection/HomeMap/icons/geo-yellow.svg | 0 .../MapSection/MapSearch/MapSearch.scss | 0 .../MapSection/MapSearch/MapSearch.tsx | 9 +- .../{ => home}/MapSection/MapSearch/action.ts | 0 .../MapSection/MapSearch/icons/search.svg | 0 .../{ => home}/MapSection/MapSection.scss | 0 .../{ => home}/MapSection/MapSection.tsx | 32 +-- .../{ => home}/MapSection/Switch/Switch.scss | 0 .../{ => home}/MapSection/Switch/Switch.tsx | 0 .../{ => home}/MapSection/mapSectionStore.ts | 0 .../{ => home}/NewsSection/NewsSection.scss | 2 +- .../{ => home}/NewsSection/NewsSection.tsx | 10 +- .../NewsSection/icons/arrow-right.svg | 0 .../NewsSection/newsSectionStore.ts | 0 .../RatingSection/RatingSection.scss | 2 +- .../RatingSection/RatingSection.tsx | 52 ++--- .../{ => home}/RatingSection/helpers.ts | 7 - .../{ => home}/RatingSection/icons/like.svg | 0 .../RatingSection/icons/message.svg | 0 .../RatingSection/ratingSectionStore.ts | 0 .../StatisticsSection/StatisticsSection.scss | 2 +- .../StatisticsSection/StatisticsSection.tsx | 14 +- .../ReportImages/ReportImages.scss | 52 +++++ .../ReportImages/ReportImages.tsx | 56 ++++++ .../ReportInformation/ReportInformation.scss} | 73 ------- .../ReportInformation/ReportInformation.tsx | 75 +++++++ .../ReportInformation}/icons/calendar.svg | 0 .../report-details/ReportMap/ReportMap.scss | 44 +++++ .../report-details/ReportMap/ReportMap.tsx | 108 ++++++++++ .../ReportMap/icons/geo-green.svg | 5 + .../ReportMap/icons/geo-orange.svg | 5 + .../ReportMap/icons/geo-pink.svg | 5 + .../ReportMap/icons/geo-purple.svg | 5 + .../ReportMap/icons/geo-red.svg | 5 + .../ReportMap/icons/geo-white.svg | 17 ++ .../ReportMap/icons/geo-yellow.svg | 5 + src/widgets/report-details/reportStore.ts | 13 ++ .../ProfileTable/ProfileTable.scss | 0 .../ProfileTable/ProfileTable.tsx | 3 +- .../{ => tables}/ProfileTable/helpers.ts | 0 .../ProfileTable/profile-reports.store.ts | 0 .../StatisticsTable/StatisticsTable.scss | 0 .../StatisticsTable/StatisticsTable.tsx | 3 +- .../StatisticsTable/icons/chevron-down.svg | 0 .../StatisticsTable/statistics.store.ts | 0 .../VolunteersTable/VolunteersTable.scss | 0 .../VolunteersTable/VolunteersTable.tsx | 13 +- .../VolunteersTable/volunteers.store.ts | 0 yarn.lock | 95 ++++++++- 172 files changed, 1772 insertions(+), 502 deletions(-) create mode 100644 messages/en.json create mode 100644 messages/kg.json create mode 100644 messages/ru.json rename src/app/{ => [locale]}/App.scss (100%) rename src/app/{ => [locale]}/Providers.tsx (100%) rename src/app/{ => [locale]}/about-us/AboutUs.scss (100%) rename src/app/{ => [locale]}/about-us/assets/header.svg (100%) rename src/app/{ => [locale]}/about-us/page.tsx (100%) rename src/app/{ => [locale]}/create-report/CreateReport.scss (100%) rename src/app/{ => [locale]}/create-report/page.tsx (92%) rename src/app/{ => [locale]}/globals.scss (100%) create mode 100644 src/app/[locale]/layout.tsx rename src/app/{ => [locale]}/news/News.scss (100%) rename src/app/{ => [locale]}/news/[id]/NewsDetails.scss (100%) rename src/app/{ => [locale]}/news/[id]/icons/calendar.svg (100%) rename src/app/{ => [locale]}/news/[id]/icons/message.svg (100%) rename src/app/{ => [locale]}/news/[id]/page.tsx (100%) rename src/app/{ => [locale]}/news/page.tsx (85%) rename src/app/{ => [locale]}/page.tsx (67%) rename src/app/{ => [locale]}/profile/AuthGuard.tsx (78%) rename src/app/{ => [locale]}/profile/Profile.scss (100%) rename src/app/{ => [locale]}/profile/layout.tsx (96%) rename src/app/{ => [locale]}/profile/my-reports/page.tsx (79%) rename src/app/{ => [locale]}/profile/page.tsx (72%) rename src/app/{ => [locale]}/profile/personal/page.tsx (94%) create mode 100644 src/app/[locale]/report/[id]/ReportDetails.scss rename src/app/{ => [locale]}/report/[id]/icons/def_image.svg (100%) create mode 100644 src/app/[locale]/report/[id]/page.tsx rename src/app/{ => [locale]}/sign-in/forgot-password/page.tsx (68%) rename src/app/{ => [locale]}/sign-in/icons/sign-in_icon.svg (100%) rename src/app/{ => [locale]}/sign-in/page.tsx (89%) rename src/app/{ => [locale]}/sign-in/reset-code/icons/key.svg (100%) rename src/app/{ => [locale]}/sign-in/reset-code/page.tsx (90%) rename src/app/{ => [locale]}/sign-up/confirm-email/icons/mail.svg (100%) rename src/app/{ => [locale]}/sign-up/confirm-email/page.tsx (89%) rename src/app/{ => [locale]}/sign-up/icons/flag.svg (100%) rename src/app/{ => [locale]}/sign-up/page.tsx (89%) rename src/app/{ => [locale]}/statistics/Statistics.scss (100%) rename src/app/{ => [locale]}/statistics/page.tsx (74%) rename src/app/{ => [locale]}/volunteers/Volunteers.scss (100%) rename src/app/{ => [locale]}/volunteers/page.tsx (86%) create mode 100644 src/app/not-found.tsx delete mode 100644 src/app/report/[id]/page.tsx create mode 100644 src/features/BreadCrumbs/BreadCrumbs.scss create mode 100644 src/features/BreadCrumbs/BreadCrumbs.tsx rename src/{widgets/ForgotPasswordForm/ForgotPasswordForm.scss => features/ShowMapButton/ShowMapButton.scss} (100%) create mode 100644 src/features/ShowMapButton/ShowMapButton.tsx rename src/{app/report/[id] => features/ShowMapButton}/icons/map-pin.svg (100%) create mode 100644 src/i18n.ts create mode 100644 src/shared/config/navigation.ts create mode 100644 src/shared/variables/month.ts create mode 100644 src/widgets/Navbar/NavLanguage/variables.ts rename src/widgets/{ => forms}/ConfirmEmailForm/ConfirmEmailForm.scss (100%) rename src/widgets/{ => forms}/ConfirmEmailForm/ConfirmEmailForm.tsx (98%) rename src/widgets/{ReportForm/CreateReportMap/CreateReportMap.scss => forms/ForgotPasswordForm/ForgotPasswordForm.scss} (100%) rename src/widgets/{ => forms}/ForgotPasswordForm/ForgotPasswordForm.tsx (100%) rename src/widgets/{ => forms}/ForgotPasswordForm/confirm-code/confirm-code.scss (100%) rename src/widgets/{ => forms}/ForgotPasswordForm/confirm-code/confirm-code.tsx (97%) rename src/widgets/{ => forms}/ForgotPasswordForm/confirm-code/icons/key.svg (100%) rename src/widgets/{ => forms}/ForgotPasswordForm/send-email/icons/mail.svg (100%) rename src/widgets/{ => forms}/ForgotPasswordForm/send-email/send-email.scss (100%) rename src/widgets/{ => forms}/ForgotPasswordForm/send-email/send-email.tsx (100%) rename src/widgets/{ => forms}/ProfileForm/ChangePassword/ChangePassword.scss (100%) rename src/widgets/{ => forms}/ProfileForm/ChangePassword/ChangePassword.tsx (100%) rename src/widgets/{ => forms}/ProfileForm/ChangePassword/ChangePasswordInput/ChangePasswordInput.scss (100%) rename src/widgets/{ => forms}/ProfileForm/ChangePassword/ChangePasswordInput/ChangePasswordInput.tsx (100%) rename src/widgets/{ => forms}/ProfileForm/ChangePassword/ChangePasswordInput/icons/eye-off.svg (100%) rename src/widgets/{ => forms}/ProfileForm/ChangePassword/ChangePasswordInput/icons/eye-on.svg (100%) rename src/widgets/{ => forms}/ProfileForm/ProfileForm.scss (100%) rename src/widgets/{ => forms}/ProfileForm/ProfileForm.tsx (95%) rename src/widgets/{ => forms}/ProfileForm/icons/pen.svg (100%) create mode 100644 src/widgets/forms/ReportForm/CreateReportMap/CreateReportMap.scss rename src/widgets/{ => forms}/ReportForm/CreateReportMap/CreateReportMap.tsx (100%) rename src/widgets/{ => forms}/ReportForm/ReportForm.scss (100%) rename src/widgets/{ => forms}/ReportForm/ReportForm.tsx (99%) rename src/widgets/{ => forms}/ReportForm/icons/arrow-right.svg (100%) rename src/widgets/{ => forms}/ReportForm/icons/clip.svg (100%) rename src/widgets/{ => forms}/ReportForm/icons/pin-image.svg (100%) rename src/widgets/{ => forms}/ReportForm/icons/pin_icon.svg (100%) rename src/widgets/{ => forms}/ResetCodeForm/ResetCodeForm.scss (100%) rename src/widgets/{ => forms}/ResetCodeForm/ResetCodeForm.tsx (98%) rename src/widgets/{ => forms}/SignInForm/SignInForm.scss (100%) rename src/widgets/{ => forms}/SignInForm/SignInForm.tsx (97%) rename src/widgets/{ => forms}/SignUpForm/SignUpForm.scss (100%) rename src/widgets/{ => forms}/SignUpForm/SignUpForm.tsx (97%) rename src/widgets/{ => home}/Header/Header.scss (98%) rename src/widgets/{ => home}/Header/Header.tsx (71%) rename src/widgets/{ => home}/Header/HeaderLink/HeaderLink.scss (100%) rename src/widgets/{ => home}/Header/HeaderLink/HeaderLink.tsx (65%) rename src/widgets/{ => home}/Header/HeaderLink/icons/arrow-right-circle.svg (100%) rename src/widgets/{ => home}/Header/assets/background.svg (100%) rename src/widgets/{ => home}/MapSection/HomeMap/HomeMap.scss (100%) rename src/widgets/{ => home}/MapSection/HomeMap/HomeMap.tsx (95%) rename src/widgets/{ => home}/MapSection/HomeMap/icons/geo-green.svg (100%) rename src/widgets/{ => home}/MapSection/HomeMap/icons/geo-orange.svg (100%) rename src/widgets/{ => home}/MapSection/HomeMap/icons/geo-pink.svg (100%) rename src/widgets/{ => home}/MapSection/HomeMap/icons/geo-purple.svg (100%) rename src/widgets/{ => home}/MapSection/HomeMap/icons/geo-red.svg (100%) rename src/widgets/{ => home}/MapSection/HomeMap/icons/geo-white.svg (100%) rename src/widgets/{ => home}/MapSection/HomeMap/icons/geo-yellow.svg (100%) rename src/widgets/{ => home}/MapSection/MapSearch/MapSearch.scss (100%) rename src/widgets/{ => home}/MapSection/MapSearch/MapSearch.tsx (92%) rename src/widgets/{ => home}/MapSection/MapSearch/action.ts (100%) rename src/widgets/{ => home}/MapSection/MapSearch/icons/search.svg (100%) rename src/widgets/{ => home}/MapSection/MapSection.scss (100%) rename src/widgets/{ => home}/MapSection/MapSection.tsx (86%) rename src/widgets/{ => home}/MapSection/Switch/Switch.scss (100%) rename src/widgets/{ => home}/MapSection/Switch/Switch.tsx (100%) rename src/widgets/{ => home}/MapSection/mapSectionStore.ts (100%) rename src/widgets/{ => home}/NewsSection/NewsSection.scss (95%) rename src/widgets/{ => home}/NewsSection/NewsSection.tsx (77%) rename src/widgets/{ => home}/NewsSection/icons/arrow-right.svg (100%) rename src/widgets/{ => home}/NewsSection/newsSectionStore.ts (100%) rename src/widgets/{ => home}/RatingSection/RatingSection.scss (98%) rename src/widgets/{ => home}/RatingSection/RatingSection.tsx (85%) rename src/widgets/{ => home}/RatingSection/helpers.ts (69%) rename src/widgets/{ => home}/RatingSection/icons/like.svg (100%) rename src/widgets/{ => home}/RatingSection/icons/message.svg (100%) rename src/widgets/{ => home}/RatingSection/ratingSectionStore.ts (100%) rename src/widgets/{ => home}/StatisticsSection/StatisticsSection.scss (95%) rename src/widgets/{ => home}/StatisticsSection/StatisticsSection.tsx (68%) create mode 100644 src/widgets/report-details/ReportImages/ReportImages.scss create mode 100644 src/widgets/report-details/ReportImages/ReportImages.tsx rename src/{app/report/[id]/ReportDetails.scss => widgets/report-details/ReportInformation/ReportInformation.scss} (62%) create mode 100644 src/widgets/report-details/ReportInformation/ReportInformation.tsx rename src/{app/report/[id] => widgets/report-details/ReportInformation}/icons/calendar.svg (100%) create mode 100644 src/widgets/report-details/ReportMap/ReportMap.scss create mode 100644 src/widgets/report-details/ReportMap/ReportMap.tsx create mode 100644 src/widgets/report-details/ReportMap/icons/geo-green.svg create mode 100644 src/widgets/report-details/ReportMap/icons/geo-orange.svg create mode 100644 src/widgets/report-details/ReportMap/icons/geo-pink.svg create mode 100644 src/widgets/report-details/ReportMap/icons/geo-purple.svg create mode 100644 src/widgets/report-details/ReportMap/icons/geo-red.svg create mode 100644 src/widgets/report-details/ReportMap/icons/geo-white.svg create mode 100644 src/widgets/report-details/ReportMap/icons/geo-yellow.svg create mode 100644 src/widgets/report-details/reportStore.ts rename src/widgets/{ => tables}/ProfileTable/ProfileTable.scss (100%) rename src/widgets/{ => tables}/ProfileTable/ProfileTable.tsx (98%) rename src/widgets/{ => tables}/ProfileTable/helpers.ts (100%) rename src/widgets/{ => tables}/ProfileTable/profile-reports.store.ts (100%) rename src/widgets/{ => tables}/StatisticsTable/StatisticsTable.scss (100%) rename src/widgets/{ => tables}/StatisticsTable/StatisticsTable.tsx (98%) rename src/widgets/{ => tables}/StatisticsTable/icons/chevron-down.svg (100%) rename src/widgets/{ => tables}/StatisticsTable/statistics.store.ts (100%) rename src/widgets/{ => tables}/VolunteersTable/VolunteersTable.scss (100%) rename src/widgets/{ => tables}/VolunteersTable/VolunteersTable.tsx (91%) rename src/widgets/{ => tables}/VolunteersTable/volunteers.store.ts (100%) diff --git a/lib/next-auth.d.ts b/lib/next-auth.d.ts index eb66a0c..e27115c 100644 --- a/lib/next-auth.d.ts +++ b/lib/next-auth.d.ts @@ -4,7 +4,13 @@ declare module "next-auth" { interface Session { refresh_token: string; access_token: string; - expires_in: string; + expires_in?: string; + } + + interface User { + refresh_token: string; + access_token: string; + expires_in?: string; } } @@ -14,6 +20,6 @@ declare module "next-auth/jwt" { interface JWT { refresh_token: string; access_token: string; - expires_in: string; + expires_in?: string; } } diff --git a/messages/en.json b/messages/en.json new file mode 100644 index 0000000..2dcb808 --- /dev/null +++ b/messages/en.json @@ -0,0 +1,186 @@ +{ + "general": { + "date": "Date", + "address": "Address", + "status": "Status", + "description": "Description", + "reviews": "Reviews", + "rating": "Rating", + "review": "Review", + "write_comment": "Write Comment", + "search": "Search", + "search_for": "Search For", + "city": "City", + "added_roads": "Added Roads", + "broken_roads": "Broken Roads", + "accident_hotspots": "Accident Hotspots", + "local_defects": "Local Defects", + "repair_plans": "Repair Plans", + "repaired": "Repaired", + "fixed_local_defects": "Fixed Local Defects", + "news": "News", + "details": "Details", + "navigation": "Navigation", + "contacts": "Contacts", + "download_our_app": "Download our app", + "back": "Back", + "save": "Save", + "saving": "Saving", + "cancel": "Cancel", + "cancellation": "Cancellation", + "save_changes": "Save Changes", + "send": "Send", + "receive": "Receive", + "delete": "Delete", + "show_on_map": "Show on Map", + "author_of_appeal": "Author of Appeal", + "enter_city": "Enter City", + "page_not_found": "Page Not Found (404)", + "incorrect_address_or_nonexistent_page": "Incorrect Address or Nonexistent Page.", + "home": "Home", + "first_name": "First Name", + "last_name": "Last Name", + "email": "Email" + }, + "navigation": { + "home": "Home", + "about_us": "About Us", + "statistics": "Statistics", + "news": "News", + "volunteers": "Volunteers", + "profile": "Profile", + "login": "Login" + }, + "home": { + "title": "Roads of Kyrgyzstan", + "subtitle": "Let's Make Roads Safe!", + "info": "Current information about the state of roads", + "report_broken_road": "Report Broken Road", + "road_map": "Road Map", + "latest_news": "Stay informed about the latest news on traffic, construction, and events!", + "enter_location": "Enter city, village, or region", + "broken_roads": "Broken road", + "accident_hotspots": "Accident hotspot", + "local_defects": "Local defect", + "repair_plans": "In repair plan", + "repaired": "Repaired", + "fixed_local_defects": "Fixed local defect", + "rating": "Rating", + "road_discussions": "Discussing roads: rating, experience, comfort on the way!", + "enter_address": "Enter address", + "read_more": "Read More" + }, + "about_us": { + "name": "Transparency International-Kyrgyzstan", + "description": "Branch of the international organization Transparency International in the Kyrgyz Republic.", + "mission": "Promoting effective public policy and good governance to prevent corruption and strengthen democracy in the country.", + "goals_and_priorities": { + "anti-corruption_education": "Anti-corruption education of the population, raising public awareness of the importance and significance of the fight against corruption in Kyrgyzstan;", + "study_of_corruption_practices": "Organization of the study of the practice and theory of combating corruption and the participation of civil society structures in Kyrgyzstan and other countries;", + "supporting_citizens_and_organizations": "Assistance to citizens and organizations in the implementation of their constitutional rights and freedoms;", + "international_experience": "Preferential orientation to international experience in reducing corruption, mastering its technologies and resources, as well as involving civil society structures in the international dialogue on combating corruption." + } + }, + "volunteers": { + "activists": "Activists", + "received_votes": "Received Votes", + "left_votes": "Left Votes", + "rating": "Rating" + }, + "profile": { + "personal_cabinet": "Personal Cabinet", + "personal_data": "Personal Data", + "my_appeals": "My Appeals", + "logout": "Logout", + "write_appeal": "Write Appeal", + "profile_photo": "Profile Photo", + "others_identification": "With a profile photo, other people will recognize you, and it will be easier for you to determine which account you logged into.", + "add_profile_photo": "Add Profile Photo", + "profile_photo_updated": "Profile Photo Updated", + "delete": "Delete", + "change": "Change" + }, + "authorization": { + "change_password": "Change Password", + "old_password": "Old Password", + "enter_old_password": "Enter Old Password", + "new_password": "New Password", + "enter_new_password": "Enter New Password", + "confirm_new_password": "Confirm New Password", + "confirm_new_password_prompt": "Please confirm the new password", + "password": "Password", + "forgot_password": "Forgot Password?", + "login": "Login", + "register": "Register", + "sign_in_account": "Sign in to Account", + "enter_credentials": "Please enter your credentials", + "login_via_google": "Login via Google", + "enter_password": "Enter Password", + "password_requirements": "Minimum 8 characters, 1 uppercase letter, and 1 digit", + "no_account_yet": "Don't have an account yet? Register", + "registration": "Registration", + "register_now": "Register Now", + "already_have_account": "Already have an account? Sign in", + "enter_email": "Enter Email", + "enter_email_for_code": "Enter email, and we will send a code to reset the password", + "send_code": "Send Code", + "confirm_code": "Confirm Code", + "enter_code": "Enter Code", + "enter_reset_code": "Enter code to reset and recover the password", + "reset_code": "Reset Code", + "reset_password": "Reset Password", + "check_email": "Check Your Email", + "code_sent_to": "We sent a code to the email name@gmail.com", + "confirmation_code": "Confirmation Code", + "confirm": "Confirm", + "resend_code_in": "Resend Code in", + "resend_code": "Resend Code" + }, + "send_report": { + "how_to_mark_road_section": "How to mark a road section?", + "mark_road_instructions": "Place a pin and start drawing a road section (it can consist of any number of broken lines).", + "remove_segment_instruction": "To remove a segment, click on the points again.", + "add_problem_description": "Add a problem description", + "enter_description": "Enter description", + "add_photos": "Add Photos", + "upload_photos_instructions": "Upload up to 5 photos related to the road you want to mark. Photos will help better understand the problem.", + "attach_file": "Attach File (up to 5 MB)", + "submit_for_moderation": "Submit for Moderation", + "appeal_submitted": "Your appeal has been submitted", + "thanks_for_appeal": "Thank you for your appeal. It is currently under moderation.", + "view_my_appeals": "View My Appeals" + }, + "months": { + "january": "January", + "february": "February", + "march": "March", + "april": "April", + "may": "May", + "june": "June", + "july": "July", + "august": "August", + "september": "September", + "october": "October", + "november": "November", + "december": "December" + }, + "validation_errors": { + "invalid_email_format": "Invalid email format.", + "passwords_do_not_match": "Passwords do not match.", + "required_field_not_filled": "Required field not filled.", + "exceeded_maximum_length": "Exceeded maximum length of the field.", + "login_required_before_commenting": "Please log in or register before leaving a comment.", + "login_required_before_like": "Please log in or register before liking." + }, + "server_errors": { + "invalid_email_or_password": "Invalid email or password.", + "server_error_auth_attempt": "Server error during authentication attempt.", + "login_failed": "Failed to log in. Something went wrong, please try again later.", + "account_already_exists": "An account with this email already exists.", + "account_not_found": "Account not found.", + "invalid_activation_code": "Invalid activation code.", + "invalid_activation_code_reset": "Invalid activation code for reset.", + "invalid_password_reset_code": "Invalid password reset code.", + "invalid_code": "Invalid code." + } +} diff --git a/messages/kg.json b/messages/kg.json new file mode 100644 index 0000000..2f3fe5e --- /dev/null +++ b/messages/kg.json @@ -0,0 +1,186 @@ +{ + "general": { + "date": "Күн", + "address": "Дарек", + "status": "Статус", + "description": "Сүрөт", + "reviews": "Комментарийлер", + "rating": "Рейтинг", + "review": "Комментарий", + "write_comment": "Комментарий жазуу", + "search": "Издөө", + "search_for": "Издөө", + "city": "Шаар", + "added_roads": "Кошулган жолдор", + "broken_roads": "Тас тастаган жолдор", + "accident_hotspots": "Авариялуу жерлер", + "local_defects": "Жерги дефекттер", + "repair_plans": "Түзөө планттары", + "repaired": "Түзөлгөн", + "fixed_local_defects": "Жерги дефекттерди түзөлгөн", + "news": "Жаңылыктар", + "details": "Эчти маалымат", + "navigation": "Навигация", + "contacts": "Контакттар", + "download_our_app": "Биздин приложениямызды жүктөп алыңыз", + "back": "Кайтуу", + "save": "Сактоо", + "saving": "Сакталат", + "cancel": "Жокко чыгаруу", + "cancellation": "Жокко чыгаруу", + "save_changes": "Өзгөртүүлөрдү сактоо", + "send": "Жиберүү", + "receive": "Алуу", + "delete": "Жок кылуу", + "show_on_map": "Картада көрсөтүү", + "author_of_appeal": "Өтүнчүнүн автору", + "enter_city": "Шаарды киргизиңиз", + "page_not_found": "Бет табылган эмес (404)", + "incorrect_address_or_nonexistent_page": "Туура эмес дарек же бет жок", + "home": "Башкы бет", + "first_name": "Аты", + "last_name": "Фамилия", + "email": "Электрондук почта" + }, + "navigation": { + "home": "Башкы бет", + "about_us": "Биз тууралуу", + "statistics": "Статистика", + "news": "Жаңылыктар", + "volunteers": "Волонтёрлер", + "profile": "Профиль", + "login": "Кириш" + }, + "home": { + "title": "Кыргызстандын жолдору", + "subtitle": "Жолдорду бекемделүү жасаңыз!", + "info": "Жолдордун жаңы күйү", + "report_broken_road": "Тас тастаган жолду турганды таратуу", + "road_map": "Жол картасы", + "latest_news": "Трафик, өндүрүү жана тапшыруудагы соңгосу турган жаңылыктардан кабардар болуңуз!", + "enter_location": "Шаар, айыл жана регионду киргизиңиз", + "broken_roads": "Жол кирпич", + "accident_hotspots": "Авариянын жатактоо жерлери", + "local_defects": "Жерги дефект", + "repair_plans": "Тозгоондоо жатактоо планында", + "repaired": "Тозотулду", + "fixed_local_defects": "Тозотулган жерги дефект", + "rating": "Рейтинг", + "road_discussions": "Жолдорду талкуулоо: рейтинг, тажрыйба, жолдоо боюнча комфорт!", + "enter_address": "Даректи киргизиңиз", + "read_more": "Көбүрөөк окуу" + }, + "transparency_international_kyrgyzstan": { + "name": "Транспаренттыктык Интернационал-Кыргызстан", + "description": "Транспаренттыктык Интернационалдын Кыргызстан Республикасы бөлүмү.", + "mission": "Коррупциянын ыкмасы менен демократияны күтүтүп, эффективдүү жамааттык саясат жана жакшы мамлекеттүү башкаруунун бириктирилүү үчүн.", + "goals_and_priorities": { + "anti-corruption_education": "Коррупция менен борбордук бийикти ашуу, Кыргызстанда коррупцияга каршы болгондоо маанилүүдүн жана азаттыктардын маанилүүлүгү үчүн жалпы айткынуу;", + "study_of_corruption_practices": "Коррупцияга каршы борбордукты тартуу жана учуруу теориясы менен, Кыргызстан менен башка өлкөлердеги кызмат көрсөтүүсү үчүн азаттыктыктын долбоорлорун жана каттоого жаткантыруу;", + "supporting_citizens_and_organizations": "Граждандар менен биздин же компаниялардын конституциялык башкаруу менен жандуулаткануу;", + "international_experience": "Коррупциянын аздоого чейинки жыйынтыкты башкаруу үчүн көздөр тартуу, улуттуктары менен биргелеп, коррупцияга каршы көрсөткүчтөрдү мамлекеттик диалогга киргизүү." + } + }, + "volunteers": { + "activists": "Активисттер", + "received_votes": "Алынган баллдар", + "left_votes": "Калган баллдар", + "rating": "Рейтинг" + }, + "profile": { + "personal_cabinet": "Жеке кабинет", + "personal_data": "Жеке дайындар", + "my_appeals": "Менин жардам кылган жалпылыгым", + "logout": "Чыгуу", + "write_appeal": "Жардам кылуу", + "profile_photo": "Профиль сүрөтү", + "others_identification": "Профиль сүрөтү аркылуу башка адамдар сизди танышат, жана сизге кирген аккаунтту тандашуу өттүрүлгөн болот.", + "add_profile_photo": "Профиль сүрөтү кошуу", + "profile_photo_updated": "Профиль сүрөтү жаңыртылды", + "delete": "Жок кылуу", + "change": "Өзгөртүү" + }, + "authorization": { + "change_password": "Сыр сөздү өзгөртүү", + "old_password": "Эски сыр сөз", + "enter_old_password": "Эски сыр сөздү киргизиңиз", + "new_password": "Жаңы сыр сөз", + "enter_new_password": "Жаңы сыр сөздү киргизиңиз", + "confirm_new_password": "Жаңы сыр сөздү растоо", + "confirm_new_password_prompt": "Жаңы сыр сөздү растоо, аны кайра чалыңыз", + "password": "Сыр сөз", + "forgot_password": "Сыр сөздү унуттуңузбу?", + "login": "Кириш", + "register": "Тизмеге кирүү", + "sign_in_account": "Аккаунтка кириңиз", + "enter_credentials": "Киргизген дайындарыңызды киргизиңиз", + "login_via_google": "Google аркылуу кириңиз", + "enter_password": "Сыр сөздү киргизиңиз", + "password_requirements": "Минимум 8 белги, 1 башкы буюк тамга жана 1 сандар", + "no_account_yet": "Өйткені, аккаунт жоок? Тизмеге кирүү", + "registration": "Тизмеге кирүү", + "register_now": "Азыр тизмеге кирүү", + "already_have_account": "Аккаунт бар болсо, кириңиз", + "enter_email": "Электрондук почтаны киргизиңиз", + "enter_email_for_code": "Электрондук почта киргизиңиз, биз сизге сыр сөздү калыпта тапшыруу үчүн код жөнөтөт", + "send_code": "Код жөнөтүү", + "confirm_code": "Кодду растоо", + "enter_code": "Кодду киргизиңиз", + "enter_reset_code": "Сыр сөздү өзгөртүп жаңыртуу үчүн кодду киргизиңиз", + "reset_code": "Сыр сөздү өзгөртүү коду", + "reset_password": "Сыр сөздү өзгөртүү", + "check_email": "Почтаны текшериңиз", + "code_sent_to": "Биз кодду name@gmail.com почтасына жөнөттүк", + "confirmation_code": "Тастыгы код", + "confirm": "Растоо", + "resend_code_in": "Кодду кайталап жөнөтүү", + "resend_code": "Кодду кайталап жөнөтүү" + }, + "send_report": { + "how_to_mark_road_section": "Жол бөлүмүн белгилөө үчүн", + "mark_road_instructions": "Чек салып, жол бөлүмүн белгилөөгө ээсиңиз (ал булактардан турат).", + "remove_segment_instruction": "Жол бөлүмүн каттоо үчүн бир маандын жакшысына басыңыз.", + "add_problem_description": "Проблеманын сүрөтүн кошуңуз", + "enter_description": "Сүрөттөмөнү киргизиңиз", + "add_photos": "Фотографияларды кошуңуз", + "upload_photos_instructions": "Жолдун байланышты 5 фотосун жүктөп алыңыз, анткени жататат жана туура түшүнүүдү макул болот.", + "attach_file": "Файлды тиштөө (5 МБга чейин)", + "submit_for_moderation": "Модерацияга жиберүү", + "appeal_submitted": "Сиздин жалпылыгыңыз жиберилди", + "thanks_for_appeal": "Сиздин жалпылыгыңуз үчүн рахмат. Азырынча аны модерацияда.", + "view_my_appeals": "Менин жалпылыгымдарымды көрүү" + }, + "months": { + "january": "Жанварь", + "february": "Февраль", + "march": "Март", + "april": "Апрель", + "may": "Май", + "june": "Июнь", + "july": "Июль", + "august": "Август", + "september": "Сентябрь", + "october": "Октябрь", + "november": "Ноябрь", + "december": "Декабрь" + }, + "validation_errors": { + "invalid_email_format": "Туура эмес электрондук почта форматы.", + "passwords_do_not_match": "Сыр сөздөрдүн туура келмейт.", + "required_field_not_filled": "Милдеттүү талаа толтурулган жок.", + "exceeded_maximum_length": "Талаанын эң ылдам узундугу өткөнчү болду.", + "login_required_before_commenting": "Комментарий бир ар каайыпты таштоо алганда, ал кайталап киргизиңиз же тизмеге киргизиңиз.", + "login_required_before_like": "Лайк койгондо, кайталап киргизиңиз же тизмеге киргизиңиз керек." + }, + "server_errors": { + "invalid_email_or_password": "Туура эмес почта же сыр сөз.", + "server_error_auth_attempt": "Авторизация учуруу учурастыктан кайталап сервердеги ката.", + "login_failed": "Кирүүгө мүмкүн болгон эмес. Негизги нече кайталап уруксат бериңиз.", + "account_already_exists": "Бул почтага ар бир аккаунт бар.", + "account_not_found": "Аккаунт табылган жок.", + "invalid_activation_code": "Четке калган иштеш коду.", + "invalid_activation_code_reset": "Сыр сөздү калыпта тапшыруу үчүн четке калган иштеш коду.", + "invalid_password_reset_code": "Сыр сөздү өзгөртүү коду четке калган эмес.", + "invalid_code": "Четке калган иштеш коду." + } +} diff --git a/messages/ru.json b/messages/ru.json new file mode 100644 index 0000000..d7f005a --- /dev/null +++ b/messages/ru.json @@ -0,0 +1,186 @@ +{ + "general": { + "date": "Дата", + "address": "Адрес", + "status": "Статус", + "description": "Описание", + "reviews": "Комментарии", + "rating": "Рейтинг", + "review": "Комментарий", + "write_comment": "Написать комментарий", + "search": "Поиск", + "search_for": "Искать", + "city": "Город", + "added_roads": "Добавлено дорог", + "broken_roads": "Разбитых дорог", + "accident_hotspots": "Очагов аварийности", + "local_defects": "Локальных дефектов", + "repair_plans": "В планах ремонта", + "repaired": "Отремонтировано", + "fixed_local_defects": "Локальных дефектов исправлено", + "news": "Новости", + "details": "Подробнее", + "navigation": "Навигация", + "contacts": "Контакты", + "download_our_app": "Скачивай наше приложение", + "back": "Назад", + "save": "Сохранить", + "saving": "Сохранение", + "cancel": "Отменить", + "cancellation": "Отмена", + "save_changes": "Сохранить изменения", + "send": "Отправить", + "receive": "Получить", + "delete": "Удалить", + "show_on_map": "Показать на карте", + "author_of_appeal": "Автор обращения", + "enter_city": "Введите населенный пункт", + "page_not_found": "Страница не найдена (404)", + "incorrect_address_or_nonexistent_page": "Неправильно набран адрес или такой страницы не существует.", + "home": "На главную", + "first_name": "Имя", + "last_name": "Фамилия", + "email": "Электронная почта" + }, + "navigation": { + "home": "Главная", + "about_us": "О нас", + "statistics": "Статистика", + "news": "Новости", + "volunteers": "Волонтеры", + "profile": "Профиль", + "login": "Войти" + }, + "home": { + "title": "Дороги Кыргызстана", + "subtitle": "Сделаем дороги безопасными!", + "info": "Актуальная информация о состоянии дорог", + "report_broken_road": "Отметить разбитую дорогу", + "road_map": "Карта дорог", + "latest_news": "Будьте в курсе последних новостей о дорожном движении, строительствах и мероприятиях!", + "enter_location": "Введите город, село или регион", + "broken_roads": "Разбитая дорога", + "accident_hotspots": "Очаг аварийности", + "local_defects": "Локальный дефект", + "repair_plans": "В плане ремонта", + "repaired": "Отремонтировано", + "fixed_local_defects": "Локальный дефект исправлен", + "rating": "Рейтинг", + "road_discussions": "Обсуждаем дороги: рейтинг, опыт, комфорт в пути!", + "enter_address": "Введите адрес", + "read_more": "Читать" + }, + "about_us": { + "name": "Transparency International-Кыргызстан", + "description": "Филиал международной организации Transparency International в Кыргызской Республике.", + "mission": "Продвижение эффективной общественной политики и надлежащего управления в целях предотвращения коррупции и усиления демократии в стране.", + "goals_and_priorities": { + "anti-corruption_education": "Антикоррупционное просвещение населения, повышение общественного осознания значимости и важности борьбы с коррупцией в Кыргызстане;", + "study_of_corruption_practices": "Организация изучения практики и теории борьбы с коррупцией и участия в ней структур гражданского общества в Кыргызстане и других странах;", + "supporting_citizens_and_organizations": "Содействие гражданам и организациям в реализации их конституционных прав и свобод;", + "international_experience": "Преимущественная ориентация на международный опыт уменьшения коррупции, освоение его технологий, ресурсов, а также включение структур гражданского общества в международный диалог борьбы с коррупцией." + } + }, + "volunteers": { + "activists": "Активисты", + "received_votes": "Получено голосов", + "left_votes": "Оставлено голосов", + "rating": "Рейтинг" + }, + "profile": { + "personal_cabinet": "Личный кабинет", + "personal_data": "Личные данные", + "my_appeals": "Мои обращения", + "logout": "Выйти из аккаунта", + "write_appeal": "Написать обращение", + "profile_photo": "Фото профиля", + "others_identification": "По фото профиля другие люди смогут вас узнавать, а вам будет проще определять, в какой аккаунт вы вошли.", + "add_profile_photo": "Добавить фото профиля", + "profile_photo_updated": "Фото профиля обновлено", + "delete": "Удалить", + "change": "Сменить" + }, + "authorization": { + "change_password": "Изменить пароль", + "old_password": "Старый пароль", + "enter_old_password": "Введите старый пароль", + "new_password": "Новый пароль", + "enter_new_password": "Введите новый пароль", + "confirm_new_password": "Подтвердить новый пароль", + "confirm_new_password_prompt": "Пожалуйста, подтвердите новый пароль", + "password": "Пароль", + "forgot_password": "Забыли пароль?", + "login": "Войти", + "register": "Зарегистрироваться", + "sign_in_account": "Войдите в аккаунт", + "enter_credentials": "Пожалуйста, введите свои данные", + "login_via_google": "Войти через Google", + "enter_password": "Введите пароль", + "password_requirements": "Минимум 8 символов, 1 заглавная буква и цифра", + "no_account_yet": "Еще нет аккаунта? Зарегистрируйтесь", + "registration": "Регистрация", + "register_now": "Зарегистрировать", + "already_have_account": "Уже есть аккаунт? Войти в аккаунт", + "enter_email": "Введите электронную почту", + "enter_email_for_code": "Введите электронную почту и мы отправим код для восстановления пароля", + "send_code": "Отправить код", + "confirm_code": "Потвердить код", + "enter_code": "Введите код", + "enter_reset_code": "Введите код для сброса и восстановления пароля", + "reset_code": "Код сброса пароля", + "reset_password": "Сбросить пароль", + "check_email": "Проверьте свою почту", + "code_sent_to": "Мы отправили код на почту name@gmail.com", + "confirmation_code": "Код подтверждения", + "confirm": "Подтвердить", + "resend_code_in": "Отправить код повторно через", + "resend_code": "Отправить код повторно" + }, + "send_report": { + "how_to_mark_road_section": "Как отметить участок дороги?", + "mark_road_instructions": "Поставьте булавку и начните рисовать участок дороги (он может состоять из любого количества ломаных линий).", + "remove_segment_instruction": "Чтобы удалить отрезок, нажмите на точки повторно.", + "add_problem_description": "Добавьте описание проблемы", + "enter_description": "Введите описание", + "add_photos": "Добавьте фотографии", + "upload_photos_instructions": "Загрузите до 5 фотографий, связанных с дорогой, которую вы хотите отметить. Фотографии помогут лучше понять проблему.", + "attach_file": "Прикрепить файл (до 5 МБ)", + "submit_for_moderation": "Отправить на модерацию", + "appeal_submitted": "Ваше обращение отправлено", + "thanks_for_appeal": "Спасибо за ваше обращение. На данный момент оно в модерации.", + "view_my_appeals": "Смотреть мои обращения" + }, + "months": { + "january": "Январь", + "february": "Февраль", + "march": "Март", + "april": "Апрель", + "may": "Май", + "june": "Июнь", + "july": "Июль", + "august": "Август", + "september": "Сентябрь", + "october": "Октябрь", + "november": "Ноябрь", + "december": "Декабрь" + }, + "validation_errors": { + "invalid_email_format": "Неверный формат электронной почты.", + "passwords_do_not_match": "Пароли не совпадают.", + "required_field_not_filled": "Обязательное поле не заполнено.", + "exceeded_maximum_length": "Превышена максимальная длина поля.", + "login_required_before_commenting": "Перед тем как оставить комментарий, пожалуйста, войдите или зарегистрируйтесь.", + "login_required_before_like": "Перед тем как поставить лайк, пожалуйста, войдите или зарегистрируйтесь." + }, + "server_errors": { + "invalid_email_or_password": "Неверная почта или пароль.", + "server_error_auth_attempt": "Серверная ошибка при попытке авторизации.", + "login_failed": "Не удалось войти в систему. Что-то пошло не так, попробуйте еще раз немного позже.", + "account_already_exists": "Такая учетная запись уже существует.", + "account_not_found": "Такой учетной записи не существует.", + "invalid_activation_code": "Код не действителен.", + "invalid_activation_code_reset": "Код активации не действителен.", + "invalid_password_reset_code": "Код сброса пароля не действителен.", + "invalid_code": "Неверный код." + } +} diff --git a/next.config.mjs b/next.config.mjs index 22adadb..b7e04b8 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -1,3 +1,6 @@ +import createNextIntlPlugin from "next-intl/plugin"; +const withNextIntl = createNextIntlPlugin(); + /** @type {import('next').NextConfig} */ const nextConfig = { distDir: "build", @@ -9,6 +12,10 @@ const nextConfig = { }, ], }, + env: { + CLIENT_ID: process.env.CLIENT_ID, + CLIENT_SECRET: process.env.CLIENT_SECRET, + }, }; -export default nextConfig; +export default withNextIntl(nextConfig); diff --git a/package.json b/package.json index f2aae33..68649ef 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "leaflet": "^1.9.4", "next": "14.1.0", "next-auth": "^4.24.5", + "next-intl": "^3.9.0", "react": "^18", "react-dom": "^18", "react-leaflet": "^4.2.1", diff --git a/src/app/App.scss b/src/app/[locale]/App.scss similarity index 100% rename from src/app/App.scss rename to src/app/[locale]/App.scss diff --git a/src/app/Providers.tsx b/src/app/[locale]/Providers.tsx similarity index 100% rename from src/app/Providers.tsx rename to src/app/[locale]/Providers.tsx diff --git a/src/app/about-us/AboutUs.scss b/src/app/[locale]/about-us/AboutUs.scss similarity index 100% rename from src/app/about-us/AboutUs.scss rename to src/app/[locale]/about-us/AboutUs.scss diff --git a/src/app/about-us/assets/header.svg b/src/app/[locale]/about-us/assets/header.svg similarity index 100% rename from src/app/about-us/assets/header.svg rename to src/app/[locale]/about-us/assets/header.svg diff --git a/src/app/about-us/page.tsx b/src/app/[locale]/about-us/page.tsx similarity index 100% rename from src/app/about-us/page.tsx rename to src/app/[locale]/about-us/page.tsx diff --git a/src/app/create-report/CreateReport.scss b/src/app/[locale]/create-report/CreateReport.scss similarity index 100% rename from src/app/create-report/CreateReport.scss rename to src/app/[locale]/create-report/CreateReport.scss diff --git a/src/app/create-report/page.tsx b/src/app/[locale]/create-report/page.tsx similarity index 92% rename from src/app/create-report/page.tsx rename to src/app/[locale]/create-report/page.tsx index 6dfba99..3bb680f 100644 --- a/src/app/create-report/page.tsx +++ b/src/app/[locale]/create-report/page.tsx @@ -10,7 +10,7 @@ export const metadata: Metadata = { }; const DynamicForm = dynamic( - () => import("@/widgets/ReportForm/ReportForm"), + () => import("@/widgets/forms/ReportForm/ReportForm"), { ssr: false, } diff --git a/src/app/globals.scss b/src/app/[locale]/globals.scss similarity index 100% rename from src/app/globals.scss rename to src/app/[locale]/globals.scss diff --git a/src/app/[locale]/layout.tsx b/src/app/[locale]/layout.tsx new file mode 100644 index 0000000..95ab16d --- /dev/null +++ b/src/app/[locale]/layout.tsx @@ -0,0 +1,34 @@ +import type { Metadata } from "next"; +import "./globals.scss"; +import "./App.scss"; +// import "@/shared/fonts/fonts.scss"; +import Navbar from "@/widgets/Navbar/Navbar"; +import Footer from "@/widgets/Footer/Footer"; +import { NextIntlClientProvider, useMessages } from "next-intl"; +import { Providers } from "./Providers"; + +export default function LocaleLayout({ + children, + params, +}: Readonly<{ + children: React.ReactNode; + params: { locale: string }; +}>) { + const messages = useMessages(); + return ( + + + + + +
{children}
+