12 changed files with 221 additions and 40 deletions
@ -0,0 +1,46 @@ |
|||||||
|
{ |
||||||
|
"global": { |
||||||
|
"name": "movie-web" |
||||||
|
}, |
||||||
|
"search": { |
||||||
|
"loading": "Fetching your favourite shows...", |
||||||
|
"providersFailed": "{{fails}}/{{total}} providers failed!", |
||||||
|
"allResults": "That's all we have!", |
||||||
|
"noResults": "We couldn't find anything!", |
||||||
|
"allFailed": "All providers have failed!", |
||||||
|
"headingTitle": "Search results", |
||||||
|
"headingLink": "Back to home", |
||||||
|
"bookmarks": "Bookmarks", |
||||||
|
"continueWatching": "Continue Watching", |
||||||
|
"tagline": "Because watching legally is boring", |
||||||
|
"title": "What do you want to watch?", |
||||||
|
"placeholder": "What do you want to watch?" |
||||||
|
}, |
||||||
|
"media": { |
||||||
|
"invalidUrl": "Your URL may be invalid", |
||||||
|
"arrowText": "Go back" |
||||||
|
}, |
||||||
|
"notFound": { |
||||||
|
"backArrow": "Back to home", |
||||||
|
"media": { |
||||||
|
"title": "Couldn't find that media", |
||||||
|
"description": "We couldn't find the media you requested. Either it's been removed or you tampered with the URL" |
||||||
|
}, |
||||||
|
"provider": { |
||||||
|
"title": "This provider has been disabled", |
||||||
|
"description": "We had issues with the provider or it was too unstable to use, so we had to disable it." |
||||||
|
}, |
||||||
|
"page": { |
||||||
|
"title": "Couldn't find that page", |
||||||
|
"description": "We looked everywhere: under the bins, in the closet, behind the proxy but ultimately couldn't find the page you are looking for." |
||||||
|
} |
||||||
|
}, |
||||||
|
"searchBar": { |
||||||
|
"movie": "Movie", |
||||||
|
"series": "Series", |
||||||
|
"Search": "Search" |
||||||
|
}, |
||||||
|
"errorBoundary": { |
||||||
|
"text": "The app encountered an error and wasn't able to recover, please report it to the" |
||||||
|
} |
||||||
|
} |
@ -1,16 +1,18 @@ |
|||||||
import { Icon, Icons } from "@/components/Icon"; |
import { Icon, Icons } from "@/components/Icon"; |
||||||
|
import { useTranslation } from "react-i18next"; |
||||||
|
|
||||||
export function BrandPill(props: { clickable?: boolean }) { |
export function BrandPill(props: { clickable?: boolean }) { |
||||||
|
const { t } = useTranslation(); |
||||||
|
|
||||||
return ( |
return ( |
||||||
<div |
<div |
||||||
className={`flex items-center space-x-2 rounded-full bg-bink-100 bg-opacity-50 px-4 py-2 text-bink-600 ${ |
className={`flex items-center space-x-2 rounded-full bg-bink-100 bg-opacity-50 px-4 py-2 text-bink-600 ${props.clickable |
||||||
props.clickable |
|
||||||
? "transition-[transform,background-color] hover:scale-105 hover:bg-bink-200 hover:text-bink-700 active:scale-95" |
? "transition-[transform,background-color] hover:scale-105 hover:bg-bink-200 hover:text-bink-700 active:scale-95" |
||||||
: "" |
: "" |
||||||
}`}
|
}`}
|
||||||
> |
> |
||||||
<Icon className="text-xl" icon={Icons.MOVIE_WEB} /> |
<Icon className="text-xl" icon={Icons.MOVIE_WEB} /> |
||||||
<span className="font-semibold text-white">movie-web</span> |
<span className="font-semibold text-white">{t('global.name')}</span> |
||||||
</div> |
</div> |
||||||
); |
); |
||||||
} |
} |
||||||
|
@ -0,0 +1,28 @@ |
|||||||
|
import i18n from 'i18next'; |
||||||
|
import { initReactI18next } from 'react-i18next'; |
||||||
|
|
||||||
|
import Backend from 'i18next-http-backend'; |
||||||
|
import LanguageDetector from 'i18next-browser-languagedetector'; |
||||||
|
|
||||||
|
i18n |
||||||
|
// load translation using http -> see /public/locales (i.e. https://github.com/i18next/react-i18next/tree/master/example/react/public/locales)
|
||||||
|
// learn more: https://github.com/i18next/i18next-http-backend
|
||||||
|
// want your translations to be loaded from a professional CDN? => https://github.com/locize/react-tutorial#step-2---use-the-locize-cdn
|
||||||
|
.use(Backend) |
||||||
|
// detect user language
|
||||||
|
// learn more: https://github.com/i18next/i18next-browser-languageDetector
|
||||||
|
.use(LanguageDetector) |
||||||
|
// pass the i18n instance to react-i18next.
|
||||||
|
.use(initReactI18next) |
||||||
|
// init i18next
|
||||||
|
// for all options read: https://www.i18next.com/overview/configuration-options
|
||||||
|
.init({ |
||||||
|
fallbackLng: 'en-GB', |
||||||
|
|
||||||
|
interpolation: { |
||||||
|
escapeValue: false, // not needed for react as it escapes by default
|
||||||
|
} |
||||||
|
}); |
||||||
|
|
||||||
|
|
||||||
|
export default i18n; |
Loading…
Reference in new issue