Skip to content

Commit

Permalink
Merge pull request #26 from ChatCRM/branding-01
Browse files Browse the repository at this point in the history
Merged Branding-01
  • Loading branch information
parsa-asgari authored Feb 21, 2024
2 parents 3592c03 + cdd6fe9 commit 51ae679
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 22 deletions.
3 changes: 1 addition & 2 deletions app/admin/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ export default function SettingsLayout({ children }: SettingsLayoutProps) {
<GetTranslation text="Administration" />
</h2>
<p className="text-muted-foreground" dir={TextDirection}>
{/* {TranslationData["Manage your BizGPT instance"]} */}
<GetTranslation text="Manage your BizGPT instance" />
<GetTranslation text="Manage your system" />
</p>
</div>
<Separator className="my-6" />
Expand Down
8 changes: 5 additions & 3 deletions app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@ import { TailwindIndicator } from '@/components/tailwind-indicator'
import { Providers } from '@/components/providers'
import { Header } from '@/components/header'

const defaultTabName = process.env.NEXT_PUBLIC_CLIENT_BRANDING_NAME

export const metadata: Metadata = {
title: {
default: 'BizGPT',
template: `%s - BizGPT`
default: defaultTabName ? defaultTabName : 'BizGPT',
template: `%s - ${defaultTabName ? defaultTabName : 'BizGPT'}`
},
description: 'A chatbot powered by BizGPT',
description: `A chatbot powered by ${defaultTabName ? defaultTabName : 'BizGPT'}`,
themeColor: [
{ media: '(prefers-color-scheme: light)', color: 'white' },
{ media: '(prefers-color-scheme: dark)', color: 'black' }
Expand Down
4 changes: 2 additions & 2 deletions components/empty-screen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import ArrowBackIcon from '@mui/icons-material/ArrowBack';
import GlobalConfig from '@/app/app.config.js'

const TextDirection = process.env.TEXT_DIRECTION

const clientFooterName = process.env.NEXT_PUBLIC_CLIENT_BRANDING_NAME ? process.env.NEXT_PUBLIC_CLIENT_BRANDING_NAME : 'BizGPT'

export function EmptyScreen({ setInput }: Pick<UseChatHelpers, 'setInput'>) {

Expand All @@ -30,7 +30,7 @@ export function EmptyScreen({ setInput }: Pick<UseChatHelpers, 'setInput'>) {
<div className="mx-auto max-w-2xl px-4">
<div className="rounded-lg border bg-background p-8">
<h1 className="mb-2 text-lg font-semibold" dir={TextDirection}>
{TranslationData["Welcome to BizGPT!"] }
{ `${TranslationData["Welcome to"]} ${clientFooterName}` }
</h1>
<p className="leading-normal text-muted-foreground" dir={TextDirection}>

Expand Down
4 changes: 3 additions & 1 deletion components/footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import { ExternalLink } from '@/components/external-link'
import GlobalConfig from '@/app/app.config.js'

const TextDirection = process.env.TEXT_DIRECTION
const clientFooterName = process.env.NEXT_PUBLIC_CLIENT_BRANDING_NAME ? process.env.NEXT_PUBLIC_CLIENT_BRANDING_NAME : 'BizGPT'


export function FooterText({ className, ...props }: React.ComponentProps<'p'>) {
// Language and Translation
Expand All @@ -19,7 +21,7 @@ export function FooterText({ className, ...props }: React.ComponentProps<'p'>) {
)}
{...props}
>
{TranslationData["Made with ❤️ by BizGPT"]}
{`${TranslationData["Made with ❤️ by"]} ${clientFooterName}`}

</p>
)
Expand Down
6 changes: 4 additions & 2 deletions components/user-menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export function UserMenu({ user }: UserMenuProps) {

// Language and Translation
var TranslationData = require(`@/translation/${process.env.BIZGPT_FRONTEND_LANGUAGE}.json`);
const clientFooterName = process.env.NEXT_PUBLIC_CLIENT_BRANDING_NAME ? process.env.NEXT_PUBLIC_CLIENT_BRANDING_NAME : 'BizGPT'

return (
<div className="flex items-center justify-between">
Expand Down Expand Up @@ -76,14 +77,15 @@ export function UserMenu({ user }: UserMenuProps) {
<DropdownMenuSeparator />
<DropdownMenuItem asChild>
<a
href="https://bizgpt.info"
href={process.env.NEXT_PUBLIC_CLIENT_BRANDING_WEBSITE ? process.env.NEXT_PUBLIC_CLIENT_BRANDING_WEBSITE : 'https://bizgpt.info' }
target="_blank"
rel="noopener noreferrer"
className="inline-flex w-full items-center justify-between text-xs"
dir={TextDirection}
>

{TranslationData["BizGPT Homepage"]}
{/* {TranslationData["BizGPT Homepage"]} */}
{`${clientFooterName} ${TranslationData["Homepage"]} `}
<IconExternalLink className="ml-auto h-3 w-3" />
</a>
</DropdownMenuItem>
Expand Down
8 changes: 4 additions & 4 deletions translation/EN.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
"Go Back": "Go Back",
"Ask Something...": "Ask Something...",
"Send message": "Send message",
"Made with ❤️ by BizGPT": "Made with ❤️ by BizGPT",
"BizGPT Homepage": "BizGPT Homepage",
"Made with ❤️ by": "Made with ❤️ by",
"Homepage": "Homepage",
"Logout": "Logout",
"Administration": "Administration",
"Manage your BizGPT instance": "Manage your BizGPT instance",
"Manage your system": "Manage your system",
"Knowledgebase": "Knowledgebase",
"Upload": "Upload",
"Details": "Details",
Expand Down Expand Up @@ -71,7 +71,7 @@
"No bookmarks yet!": "No bookmarks yet!",
"You can start by bookmarking some question-answers.": "You can start by bookmarking some question-answers.",
"Bookmarks": "Bookmarks",
"Welcome to BizGPT!": "Welcome to BizGPT!",
"Welcome to": "Welcome to",
"You can start a conversation by asking something or try the following examples:": "You can start a conversation by asking something or try the following examples:",
"Check your inbox!": "Check your inbox!",
"Password reset successfully. You could go back using the button.": "Password reset successfully. You could go back using the button.",
Expand Down
8 changes: 4 additions & 4 deletions translation/FA.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
"Go Back": "بازگشت",
"Ask Something...": "یک سوال بپرسید...",
"Send message": "ارسال",
"Made with ❤️ by BizGPT": "تهیه شده توسط BizGPT",
"BizGPT Homepage": "سایت BizGPT",
"Made with ❤️ by": "تهیه شده توسط ",
"Homepage": "سایت",
"Logout" : "خروج",
"Administration": "بخش مدیریت",
"Manage your BizGPT instance": "به وسیله این پنل سیستم BizGPT خود را مدیریت کنید",
"Manage your system": "به وسیله این پنل سیستم خود را مدیریت کنید",
"Knowledgebase": "مخزن دانش",
"Upload": "بارگذاری",
"Details": "جزئیات",
Expand Down Expand Up @@ -71,7 +71,7 @@
"No bookmarks yet!": "هیچ نشانکی یافت نشد!",
"You can start by bookmarking some question-answers.": "برای شروع چند پرسش-پاسخ را نشانک‌گذاری کنید.",
"Bookmarks": "نشانک‌ها",
"Welcome to BizGPT!": "به BizGPT خوش آمدید!",
"Welcome to": "خوش آمدید به",
"You can start a conversation by asking something or try the following examples:" : "با پرسیدن یک سوال و یا استفاده از مثال‌های زیر، مکالمه خود با هوش مصنوعی را هم‌اکنون آغاز کنید:",
"Check your inbox!": "لطفا ایمیل خود را چک کنید",
"Password reset successfully. You could go back using the button.": "گذرواژه با موفقیت تغییر کرد. با استفاده از دکمه بازگشت به صفحه قبل بازگردید.",
Expand Down
8 changes: 4 additions & 4 deletions translation/FR.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
"Go Back": "Revenir en arrière",
"Ask Something...": "Poser une question...",
"Send message": "Envoyer le message",
"Made with ❤️ by BizGPT": "Réalisé avec ❤️ par BizGPT",
"BizGPT Homepage": "BizGPT Page d'accueil",
"Made with ❤️ by": "Réalisé avec ❤️ par",
"Homepage": "Page d'accueil",
"Logout": "Logout",
"Administration": "Administration",
"Manage your BizGPT instance": "Gérez votre instance BizGPT",
"Manage your system": "Gérez votre system",
"Knowledgebase": "Base de connaissances",
"Upload": "Télécharger",
"Details": "Détails",
Expand Down Expand Up @@ -71,7 +71,7 @@
"No bookmarks yet!": "Aucun signet pour le moment !",
"You can start by bookmarking some question-answers.": "Vous pouvez commencer par mettre en signet certaines questions-réponses.",
"Bookmarks": "Signets",
"Welcome to BizGPT!": "Bienvenue sur BizGPT !",
"Welcome to": "Bienvenue sur",
"You can start a conversation by asking something or try the following examples:": "Vous pouvez commencer une conversation en posant une question ou essayer les exemples suivants :",
"Check your inbox!": "Consultez votre boîte de réception !",
"Password reset successfully. You could go back using the button.": "Réinitialisation du mot de passe réussie. Vous pouvez revenir en arrière en utilisant le bouton.",
Expand Down

0 comments on commit 51ae679

Please sign in to comment.