Browse Source
fix: add 'tags' translation to multiple languages and update navigation links for localization
main
fix: add 'tags' translation to multiple languages and update navigation links for localization
main
sina_sajjadi
7 days ago
60 changed files with 399 additions and 236 deletions
-
9package-lock.json
-
1package.json
-
4public/locales/ar/common.json
-
6public/locales/ar/navigation.json
-
3public/locales/en/common.json
-
6public/locales/en/navigation.json
-
4public/locales/id/common.json
-
6public/locales/id/navigation.json
-
3public/locales/ru/common.json
-
6public/locales/ru/navigation.json
-
190src/app/[locale]/(account-pages)/bills/[slug]/page.tsx
-
4src/app/[locale]/(account-pages)/bills/page.tsx
-
3src/app/[locale]/(account-pages)/my-trips/page.tsx
-
3src/app/[locale]/(account-pages)/passengers-list/PassengerTable.tsx
-
3src/app/[locale]/(account-pages)/passengers-list/[id]/page.tsx
-
3src/app/[locale]/(account-pages)/passengers-list/page.tsx
-
24src/app/[locale]/(client-components)/(Header)/LangDropdown.tsx
-
3src/app/[locale]/(client-components)/(HeroSearchForm)/GuestsInput.tsx
-
3src/app/[locale]/(client-components)/(HeroSearchForm2Mobile)/LocationInput.tsx
-
3src/app/[locale]/(server-components)/SectionHero.tsx
-
5src/app/[locale]/about/SectionHero.tsx
-
4src/app/[locale]/about/page.tsx
-
3src/app/[locale]/add-listing/[[...stepIndex]]/PageAddListing1.tsx
-
2src/app/[locale]/add-listing/[[...stepIndex]]/PageAddListing10.tsx
-
3src/app/[locale]/add-listing/[[...stepIndex]]/page.tsx
-
3src/app/[locale]/add-new-passenger/page.tsx
-
5src/app/[locale]/blog/Card12.tsx
-
5src/app/[locale]/blog/Card13.tsx
-
42src/app/[locale]/blog/[...slug]/Survey.tsx
-
26src/app/[locale]/blog/[...slug]/page.tsx
-
3src/app/[locale]/custom-history/page.tsx
-
6src/app/[locale]/custom-trip/page.tsx
-
2src/app/[locale]/faq/Table.tsx
-
96src/app/[locale]/faq/page.tsx
-
5src/app/[locale]/forgot-password/page.tsx
-
7src/app/[locale]/login/page.tsx
-
3src/app/[locale]/page.tsx
-
5src/app/[locale]/signup/methodes/page.tsx
-
5src/app/[locale]/signup/otp-code/page.tsx
-
7src/app/[locale]/signup/page.tsx
-
5src/app/[locale]/tours/Card.tsx
-
18src/app/[locale]/tours/SectionGridFilterCard.tsx
-
2src/app/[locale]/tours/TabFilters.tsx
-
3src/app/[locale]/tours/[slug]/page.tsx
-
3src/components/Footer.tsx
-
3src/components/FooterNav.tsx
-
3src/components/MobileFooterSticky.tsx
-
3src/components/SearchCard.tsx
-
3src/components/SectionCustomTour.tsx
-
3src/components/SectionGridFeaturePlaces.tsx
-
5src/components/UserMenu.tsx
-
3src/components/contexts/userContext.tsx
-
5src/components/listing-image-gallery/ListingImageGallery.tsx
-
8src/data/navigation.ts
-
BINsrc/images/about-hero-right.jpg
-
3src/shared/Logo.tsx
-
3src/shared/Navigation/Navigation.tsx
-
6src/shared/Navigation/NavigationItem.tsx
-
19src/utils/routes.ts
-
5yarn.lock
@ -1,42 +0,0 @@ |
|||||
"use client"; |
|
||||
|
|
||||
import { useState } from "react"; |
|
||||
import { BiDislike, BiLike } from "react-icons/bi"; |
|
||||
|
|
||||
function Survey() { |
|
||||
const [checked, setChecked] = useState(false); |
|
||||
|
|
||||
return ( |
|
||||
<div className="max-w-screen-md mx-auto flex items-center gap-6 "> |
|
||||
{!checked ? ( |
|
||||
<> |
|
||||
<h1 className="mb-2">Was this article helpfull ?</h1> |
|
||||
<div className="flex"> |
|
||||
<div |
|
||||
onClick={() => { |
|
||||
setChecked(true); |
|
||||
}} |
|
||||
className="cursor-pointer hover:bg-green-200 nc-Tag flex items-center gap-1 bg-white text-sm text-neutral-600 dark:text-neutral-300 py-2 rounded-lg border border-neutral-100 md:px-4 dark:bg-neutral-700 dark:border-neutral-700 hover:border-neutral-200 dark:hover:border-neutral-6000 mr-2 mb-2" |
|
||||
> |
|
||||
<p>Yes</p> |
|
||||
<BiLike /> |
|
||||
</div> |
|
||||
<div |
|
||||
onClick={() => { |
|
||||
setChecked(true); |
|
||||
}} |
|
||||
className="cursor-pointer hover:bg-red-300 nc-Tag flex items-center gap-1 bg-white text-sm text-neutral-600 dark:text-neutral-300 py-2 rounded-lg border border-neutral-100 md:px-4 dark:bg-neutral-700 dark:border-neutral-700 hover:border-neutral-200 dark:hover:border-neutral-6000 mr-2 mb-2" |
|
||||
> |
|
||||
<p>No</p> |
|
||||
<BiDislike /> |
|
||||
</div> |
|
||||
</div> |
|
||||
</> |
|
||||
) : ( |
|
||||
<h1>Thank you</h1> |
|
||||
)} |
|
||||
</div> |
|
||||
); |
|
||||
} |
|
||||
|
|
||||
export default Survey; |
|
After Width: 830 | Height: 646 | Size: 79 KiB |
@ -0,0 +1,19 @@ |
|||||
|
import Cookies from 'js-cookie'; |
||||
|
|
||||
|
// Define the type for the routes object
|
||||
|
interface Routes { |
||||
|
[key: string]: string; |
||||
|
} |
||||
|
|
||||
|
// Function to get the localized route
|
||||
|
function getLocalizedRoute(routeKey: string,): string { |
||||
|
// Get the locale from cookies
|
||||
|
const locale: string = Cookies.get('locale') || 'en'; // Default to 'en' if locale is not set
|
||||
|
|
||||
|
// Check if the routeKey exists in the routes object
|
||||
|
return `/${locale}/${routeKey}`; |
||||
|
|
||||
|
} |
||||
|
|
||||
|
|
||||
|
export default getLocalizedRoute; |
Write
Preview
Loading…
Cancel
Save
Reference in new issue