From b216cf2900be590cfaf49264bdf7c03ac5a18e66 Mon Sep 17 00:00:00 2001 From: Cogent Apps Date: Thu, 16 Mar 2023 19:06:29 +0000 Subject: [PATCH 1/3] update strings --- app/public/lang/en-us.json | 19 ++++- app/src/components/auth/modals.tsx | 35 +++++---- app/src/components/pages/about.tsx | 79 --------------------- app/src/components/settings/index.tsx | 3 +- app/src/components/settings/options.tsx | 10 ++- app/src/components/sidebar/index.tsx | 8 +-- app/src/components/sidebar/recent-chats.tsx | 5 +- app/src/index.tsx | 13 +--- 8 files changed, 59 insertions(+), 113 deletions(-) delete mode 100644 app/src/components/pages/about.tsx diff --git a/app/public/lang/en-us.json b/app/public/lang/en-us.json index 3dcabff..b472b15 100644 --- a/app/public/lang/en-us.json +++ b/app/public/lang/en-us.json @@ -1,31 +1,47 @@ { "+G35mR": "Open sidebar", "/OKZrc": "Find your API key here.", + "0vL5u1": "Create an account", + "1W07dM": "No chats yet.", + "2GFjIN": "Enter your password", "3T9nRn": "Your API key is stored only on this device and never transmitted to anyone except OpenAI.", + "3kbIhS": "Untitled", "47FYwb": "Cancel", + "4I+enA": "GPT 4 (requires invite)", "4l6vz1": "Copy", + "5sg7KC": "Password", "6PgVSe": "Regenerate", + "8HJxXG": "Sign up", "A4iXFN": "Temperature: {temperature, number, ::.0}", + "AfTuRr": "User settings", "BdPrnc": "Chat with GPT - Unofficial ChatGPT app", "BwIZY+": "System Prompt", + "CJwO9s": "GPT 3.5 Turbo (default)", "ECx3EW": "Chat with GPT", "ExZfjk": "Sign in to sync", "HIqSlE": "Preview voice", "HyS0qp": "Close sidebar", "J3ca41": "Play", "KKa5Br": "Give ChatGPT a realisic human voice by connecting your ElevenLabs account (preview the available voices below). Click here to sign up.", + "KMq1sg": "Or create an account", "KbaJTs": "Loading audio...", "L5s+z7": "OpenAI API key usage is billed at a pay-as-you-go rate, separate from your ChatGPT subscription.", + "MI5gZ+": "Download SVG", "NRJ4IQ": "Note: GPT-4 will only work if your OpenAI account has been granted access to the new model. Request access here.", + "NgCT/u": "Enter your email address", "O83lC6": "Enter a message here...", "OKhRC6": "Share", "Q97T+z": "Paste your API key here", + "SQJto2": "Sign in", "UT7Nkj": "New Chat", "Ua8luY": "Hello, how can I help you today?", "VL24Xt": "Search your chats", "X0ha1a": "Save changes", "Xzm66E": "Connect your OpenAI account to get started", + "b/VC/6": "Or sign in to an existing account", "c60o5M": "Your OpenAI API Key", + "ghuZox": "Save and Close", + "hJZwTS": "Email address", "jkpK/t": "Your ElevenLabs Text-to-Speech API Key (optional)", "jtu3jt": "You can find your API key by clicking your avatar or initials in the top right of the ElevenLabs website, then clicking Profile. Your API key is stored only on this device and never transmitted to anyone except ElevenLabs.", "mhtiX2": "Customize system prompt", @@ -37,8 +53,9 @@ "role-system": "System", "role-user": "You", "role-user-formal": "User", + "rvqkVI": "Chat History", "sPtnbA": "The System Prompt is shown to ChatGPT by the "System" before your first message. The '{{ datetime }}' tag is automatically replaced by the current date and time.", "ss6kle": "Reset to default", "tZdXp/": "The temperature parameter controls the randomness of the AI's responses. Lower values will make the AI more predictable, while higher values will make it more creative.", "wEQDC6": "Edit" -} \ No newline at end of file +} diff --git a/app/src/components/auth/modals.tsx b/app/src/components/auth/modals.tsx index 673a88c..27f7c12 100644 --- a/app/src/components/auth/modals.tsx +++ b/app/src/components/auth/modals.tsx @@ -1,6 +1,7 @@ import styled from "@emotion/styled"; import { Button, Modal, PasswordInput, TextInput } from "@mantine/core"; import { useCallback, useState } from "react"; +import { FormattedMessage, useIntl } from "react-intl"; import { useAppDispatch, useAppSelector } from "../../store"; import { closeModals, openLoginModal, openSignupModal, selectModal } from "../../store/ui"; @@ -35,6 +36,7 @@ const Container = styled.form` export function LoginModal(props: any) { const modal = useAppSelector(selectModal); const dispatch = useAppDispatch(); + const intl = useIntl(); const onClose = useCallback(() => dispatch(closeModals()), [dispatch]); const onCreateAccountClick = useCallback(() => dispatch(openSignupModal()), [dispatch]); @@ -42,24 +44,26 @@ export function LoginModal(props: any) { return

- Sign in +

- -
@@ -68,6 +72,7 @@ export function LoginModal(props: any) { export function CreateAccountModal(props: any) { const modal = useAppSelector(selectModal); const dispatch = useAppDispatch(); + const intl = useIntl(); const onClose = useCallback(() => dispatch(closeModals()), [dispatch]); const onSignInClick = useCallback(() => dispatch(openLoginModal()), [dispatch]); @@ -75,25 +80,27 @@ export function CreateAccountModal(props: any) { return

- Create an account +

- -
diff --git a/app/src/components/pages/about.tsx b/app/src/components/pages/about.tsx deleted file mode 100644 index bc4b865..0000000 --- a/app/src/components/pages/about.tsx +++ /dev/null @@ -1,79 +0,0 @@ -import styled from "@emotion/styled"; -import { Markdown } from "../markdown"; -import { Page } from "../page"; - -const title = "Learn about Chat with GPT"; - -const content = ` -# About Chat with GPT - -Chat with GPT is an open-source, unofficial ChatGPT app with extra features and more ways to customize your experience. - -ChatGPT is an AI assistant developed by OpenAI. It's designed to understand natural language and generate human-like responses to a wide range of questions and prompts. ChatGPT has been trained on a massive dataset of text from the internet, which allows it to draw on a vast amount of knowledge and information to answer questions and engage in conversation. ChatGPT is constantly being improved. Feel free to ask it anything! - -[Join the Discord.](https://discord.gg/mS5QvKykvv) - -## Features - -- 🚀 **Fast** response times. -- 🔎 **Search** through your past chat conversations. -- 📄 View and customize the System Prompt - the **secret prompt** the system shows the AI before your messages. -- 🌡 Adjust the **creativity and randomness** of responses by setting the Temperature setting. Higher temperature means more creativity. -- 💬 Give ChatGPT AI a **realistic human voice** by connecting your ElevenLabs text-to-speech account. -- ✉ **Share** your favorite chat sessions online using public share URLs. -- 📋 Easily **copy-and-paste** ChatGPT messages. -- 🖼 **Full markdown support** including code, tables, and math. -- 🫰 Pay for only what you use with the ChatGPT API. - -## Bring your own API keys - -### OpenAI - -To get started with Chat with GPT, you will need to add your OpenAI API key on the settings screen. Click "Connect your OpenAI account to get started" on the home page to begin. Once you have added your API key, you can start chatting with ChatGPT. - -Your API key is stored only on your device and is never transmitted to anyone except OpenAI. Please note that OpenAI API key usage is billed at a pay-as-you-go rate, separate from your ChatGPT subscription. - -### ElevenLabs - -To use the realistic AI text-to-speech feature, you will need to add your ElevenLabs API key by clicking "Play" next to any message. - -Your API key is stored only on your device and never transmitted to anyone except ElevenLabs. - -## Roadmap - -- Edit messages (coming soon) -- Regenerate messages (coming soon) -- [Suggest feature ideas on the Discord](https://discord.gg/mS5QvKykvv) -`; - -const Container = styled.div` - flex-grow: 1; - overflow-y: auto; - padding-top: 2rem; - padding-bottom: 3rem; - - .inner { - max-width: 50rem; - margin-left: auto; - margin-right: auto; - font-weight: "Work Sans", sans-serif; - - * { - color: white !important; - } - - h1, h2 { - border-bottom: thin solid rgba(255, 255, 255, 0.2); - padding-bottom: 1rem; - margin-bottom: 1rem; - } - } -`; - -export default function AboutPage(props: any) { - return - - - - ; -} \ No newline at end of file diff --git a/app/src/components/settings/index.tsx b/app/src/components/settings/index.tsx index 9b482b5..5cda7ef 100644 --- a/app/src/components/settings/index.tsx +++ b/app/src/components/settings/index.tsx @@ -7,6 +7,7 @@ import GenerationOptionsTab from './options'; import { useAppDispatch, useAppSelector } from '../../store'; import { closeSettingsUI, selectSettingsTab, setTab } from '../../store/settings-ui'; import SpeechOptionsTab from './speech'; +import { FormattedMessage } from 'react-intl'; const Container = styled.div` padding: .4rem 1rem 1rem 1rem; @@ -102,7 +103,7 @@ export default function SettingsDrawer(props: SettingsDrawerProps) {
diff --git a/app/src/components/settings/options.tsx b/app/src/components/settings/options.tsx index aee8563..bbf02a0 100644 --- a/app/src/components/settings/options.tsx +++ b/app/src/components/settings/options.tsx @@ -54,8 +54,14 @@ export default function GenerationOptionsTab(props: any) {