diff --git a/src/_locales/de/main.json b/src/_locales/de/main.json index 1fa7535..111041c 100644 --- a/src/_locales/de/main.json +++ b/src/_locales/de/main.json @@ -127,5 +127,6 @@ "Rate limit": "Rate-Limit erreicht", "Jump to bottom": "Zum Ende springen", "Explain": "Erklären", - "Failed to get arkose token, please keep https://chat.openai.com open": "Arkose-Token konnten nicht abgerufen werden. Bitte halten Sie https://chat.openai.com geöffnet" + "Failed to get arkose token, please keep https://chat.openai.com open": "Arkose-Token konnten nicht abgerufen werden. Bitte halten Sie https://chat.openai.com geöffnet", + "Please keep https://chat.openai.com open and try again. If it still doesn't work, type some characters in the input box of chatgpt web page and try again.": "Bitte halten Sie https://chat.openai.com geöffnet und versuchen Sie es erneut. Wenn es immer noch nicht funktioniert, geben Sie einige Zeichen in das Eingabefeld der ChatGPT-Webseite ein und versuchen Sie es erneut." } diff --git a/src/_locales/en/main.json b/src/_locales/en/main.json index cabe9ac..9c64fa7 100644 --- a/src/_locales/en/main.json +++ b/src/_locales/en/main.json @@ -127,5 +127,6 @@ "Rate limit": "Rate limit exceeded", "Jump to bottom": "Jump to bottom", "Explain": "Explain", - "Failed to get arkose token, please keep https://chat.openai.com open": "Failed to get arkose token, please keep https://chat.openai.com open" + "Failed to get arkose token, please keep https://chat.openai.com open": "Failed to get arkose token, please keep https://chat.openai.com open", + "Please keep https://chat.openai.com open and try again. If it still doesn't work, type some characters in the input box of chatgpt web page and try again.": "Please keep https://chat.openai.com open and try again. If it still doesn't work, type some characters in the input box of chatgpt web page and try again." } diff --git a/src/_locales/es/main.json b/src/_locales/es/main.json index d460fbc..127f4fc 100644 --- a/src/_locales/es/main.json +++ b/src/_locales/es/main.json @@ -127,5 +127,6 @@ "Rate limit": "Límite de velocidad alcanzado", "Jump to bottom": "Saltar al final", "Explain": "Explicar", - "Failed to get arkose token, please keep https://chat.openai.com open": "No se pudo obtener el token de arkose, por favor mantenga https://chat.openai.com abierto" + "Failed to get arkose token, please keep https://chat.openai.com open": "No se pudo obtener el token de arkose, por favor mantenga https://chat.openai.com abierto", + "Please keep https://chat.openai.com open and try again. If it still doesn't work, type some characters in the input box of chatgpt web page and try again.": "Por favor, mantenga https://chat.openai.com abierto e inténtelo de nuevo. Si aún no funciona, escriba algunos caracteres en el cuadro de entrada de la página web de chatgpt e inténtelo de nuevo." } diff --git a/src/_locales/fr/main.json b/src/_locales/fr/main.json index a020240..6c9c207 100644 --- a/src/_locales/fr/main.json +++ b/src/_locales/fr/main.json @@ -127,5 +127,6 @@ "Rate limit": "Limite de taux atteinte", "Jump to bottom": "Aller en bas", "Explain": "Expliquer", - "Failed to get arkose token, please keep https://chat.openai.com open": "Impossible d'obtenir le jeton arkose, veuillez garder https://chat.openai.com ouvert" + "Failed to get arkose token, please keep https://chat.openai.com open": "Impossible d'obtenir le jeton arkose, veuillez garder https://chat.openai.com ouvert", + "Please keep https://chat.openai.com open and try again. If it still doesn't work, type some characters in the input box of chatgpt web page and try again.": "Veuillez garder https://chat.openai.com ouvert et réessayer. Si cela ne fonctionne toujours pas, tapez quelques caractères dans la boîte de saisie de la page web chatgpt et réessayez." } diff --git a/src/_locales/in/main.json b/src/_locales/in/main.json index 9c2cecf..cf877db 100644 --- a/src/_locales/in/main.json +++ b/src/_locales/in/main.json @@ -127,5 +127,6 @@ "Rate limit": "Batas penggunaan terlampaui", "Jump to bottom": "Lompat ke bawah", "Explain": "Jelaskan", - "Failed to get arkose token, please keep https://chat.openai.com open": "Gagal mendapatkan token arkose, harap tetap buka https://chat.openai.com" + "Failed to get arkose token, please keep https://chat.openai.com open": "Gagal mendapatkan token arkose, harap tetap buka https://chat.openai.com", + "Please keep https://chat.openai.com open and try again. If it still doesn't work, type some characters in the input box of chatgpt web page and try again.": "Harap tetap buka https://chat.openai.com dan coba lagi. Jika masih tidak berhasil, ketik beberapa karakter di kotak masukan halaman web chatgpt dan coba lagi." } diff --git a/src/_locales/it/main.json b/src/_locales/it/main.json index f3ee2fa..1022a2e 100644 --- a/src/_locales/it/main.json +++ b/src/_locales/it/main.json @@ -127,5 +127,6 @@ "Rate limit": "Limite di frequenza delle richieste raggiunto", "Jump to bottom": "Salta in fondo", "Explain": "Spiega", - "Failed to get arkose token, please keep https://chat.openai.com open": "Impossibile ottenere il token arkose, per favore mantieni aperto https://chat.openai.com" + "Failed to get arkose token, please keep https://chat.openai.com open": "Impossibile ottenere il token arkose, per favore mantieni aperto https://chat.openai.com", + "Please keep https://chat.openai.com open and try again. If it still doesn't work, type some characters in the input box of chatgpt web page and try again.": "Per favore, mantieni aperto https://chat.openai.com e riprova. Se ancora non funziona, digita alcuni caratteri nella casella di input della pagina web di chatgpt e riprova." } diff --git a/src/_locales/ja/main.json b/src/_locales/ja/main.json index 4aafb88..97271b6 100644 --- a/src/_locales/ja/main.json +++ b/src/_locales/ja/main.json @@ -127,5 +127,6 @@ "Rate limit": "レート制限", "Jump to bottom": "最下部にジャンプ", "Explain": "説明", - "Failed to get arkose token, please keep https://chat.openai.com open": "arkoseトークンを取得できませんでした。https://chat.openai.com を開いたままにしてください" + "Failed to get arkose token, please keep https://chat.openai.com open": "arkoseトークンを取得できませんでした。https://chat.openai.com を開いたままにしてください", + "Please keep https://chat.openai.com open and try again. If it still doesn't work, type some characters in the input box of chatgpt web page and try again.": "https://chat.openai.com を開いたままにして、もう一度試してください。それでもうまくいかない場合は、chatgpt webページの入力ボックスにいくつかの文字を入力してからもう一度試してください。" } diff --git a/src/_locales/ko/main.json b/src/_locales/ko/main.json index cbddfbb..57ebbab 100644 --- a/src/_locales/ko/main.json +++ b/src/_locales/ko/main.json @@ -127,5 +127,6 @@ "Rate limit": "요청 비율 제한", "Jump to bottom": "아래로 이동", "Explain": "설명", - "Failed to get arkose token, please keep https://chat.openai.com open": "arkose 토큰을 가져오지 못했습니다. https://chat.openai.com 을 열어두세요." + "Failed to get arkose token, please keep https://chat.openai.com open": "arkose 토큰을 가져오지 못했습니다. https://chat.openai.com 을 열어두세요.", + "Please keep https://chat.openai.com open and try again. If it still doesn't work, type some characters in the input box of chatgpt web page and try again.": "https://chat.openai.com 을 열어두고 다시 시도하세요. 여전히 작동하지 않으면 chatgpt 웹 페이지의 입력 상자에 몇 가지 문자를 입력한 다음 다시 시도하세요." } diff --git a/src/_locales/pt/main.json b/src/_locales/pt/main.json index d047ffa..3600d67 100644 --- a/src/_locales/pt/main.json +++ b/src/_locales/pt/main.json @@ -127,5 +127,6 @@ "Rate limit": "Limite de taxa atingido", "Jump to bottom": "Ir para o fundo", "Explain": "Explicar", - "Failed to get arkose token, please keep https://chat.openai.com open": "Falha ao obter o token arkose, por favor, mantenha https://chat.openai.com aberto" + "Failed to get arkose token, please keep https://chat.openai.com open": "Falha ao obter o token arkose, por favor, mantenha https://chat.openai.com aberto", + "Please keep https://chat.openai.com open and try again. If it still doesn't work, type some characters in the input box of chatgpt web page and try again.": "Por favor, mantenha https://chat.openai.com aberto e tente novamente. Se ainda não funcionar, digite alguns caracteres na caixa de entrada da página da web do chatgpt e tente novamente." } diff --git a/src/_locales/ru/main.json b/src/_locales/ru/main.json index 6c67bfd..3a8fc66 100644 --- a/src/_locales/ru/main.json +++ b/src/_locales/ru/main.json @@ -127,5 +127,6 @@ "Rate limit": "Лимит запросов", "Jump to bottom": "Перейти вниз", "Explain": "Объяснить", - "Failed to get arkose token, please keep https://chat.openai.com open": "Не удалось получить токен arkose, пожалуйста, оставьте открытым https://chat.openai.com" + "Failed to get arkose token, please keep https://chat.openai.com open": "Не удалось получить токен arkose, пожалуйста, оставьте открытым https://chat.openai.com", + "Please keep https://chat.openai.com open and try again. If it still doesn't work, type some characters in the input box of chatgpt web page and try again.": "Пожалуйста, оставьте открытым https://chat.openai.com и попробуйте еще раз. Если это все еще не работает, введите несколько символов в поле ввода веб-страницы chatgpt и попробуйте еще раз." } diff --git a/src/_locales/tr/main.json b/src/_locales/tr/main.json index 70872c6..57db7cf 100644 --- a/src/_locales/tr/main.json +++ b/src/_locales/tr/main.json @@ -127,5 +127,6 @@ "Rate limit": "Hız sınırı aşıldı", "Jump to bottom": "En alta git", "Explain": "Açıkla", - "Failed to get arkose token, please keep https://chat.openai.com open": "Arkose jetonu alınamadı, lütfen https://chat.openai.com adresini açık tutun" + "Failed to get arkose token, please keep https://chat.openai.com open": "Arkose jetonu alınamadı, lütfen https://chat.openai.com adresini açık tutun", + "Please keep https://chat.openai.com open and try again. If it still doesn't work, type some characters in the input box of chatgpt web page and try again.": "Lütfen https://chat.openai.com adresini açık tutun ve tekrar deneyin. Hala çalışmazsa, chatgpt web sayfasının girdi kutusuna bazı karakterler yazın ve tekrar deneyin." } diff --git a/src/_locales/zh-hans/main.json b/src/_locales/zh-hans/main.json index 19ee001..c586b00 100644 --- a/src/_locales/zh-hans/main.json +++ b/src/_locales/zh-hans/main.json @@ -127,5 +127,6 @@ "Rate limit": "请求频率过高", "Jump to bottom": "跳转到底部", "Explain": "解释", - "Failed to get arkose token, please keep https://chat.openai.com open": "获取arkose token失败, 请保持 https://chat.openai.com 打开" + "Failed to get arkose token, please keep https://chat.openai.com open": "获取arkose token失败, 请保持 https://chat.openai.com 打开", + "Please keep https://chat.openai.com open and try again. If it still doesn't work, type some characters in the input box of chatgpt web page and try again.": "请保持 https://chat.openai.com 打开并重试. 如果仍然不起作用, 请在chatgpt网页的输入框中输入一些字符, 然后再试一次." } diff --git a/src/_locales/zh-hant/main.json b/src/_locales/zh-hant/main.json index 8e6a6de..d6d6f8d 100644 --- a/src/_locales/zh-hant/main.json +++ b/src/_locales/zh-hant/main.json @@ -127,5 +127,6 @@ "Rate limit": "請求太頻繁,超過限制次數", "Jump to bottom": "轉跳至底部", "Explain": "解釋", - "Failed to get arkose token, please keep https://chat.openai.com open": "無法取得 arkose token,請保持 https://chat.openai.com 開啟" + "Failed to get arkose token, please keep https://chat.openai.com open": "無法取得 arkose token,請保持 https://chat.openai.com 開啟", + "Please keep https://chat.openai.com open and try again. If it still doesn't work, type some characters in the input box of chatgpt web page and try again.": "請保持 https://chat.openai.com 開啟並重試,如果還是無法通過驗證,請在 ChatGPT 網頁版輸入框輸入一些文字後再重試" } diff --git a/src/components/ConversationCard/index.jsx b/src/components/ConversationCard/index.jsx index de22ef8..f8f25a3 100644 --- a/src/components/ConversationCard/index.jsx +++ b/src/components/ConversationCard/index.jsx @@ -174,11 +174,11 @@ function ConversationCard(props) { if (conversationItemData.length > 0) lastItem = conversationItemData[conversationItemData.length - 1] if (lastItem && (lastItem.content.includes('gpt-loading') || lastItem.type === 'error')) - updateAnswer(msg.error, false, 'error') + updateAnswer(t(msg.error), false, 'error') else setConversationItemData([ ...conversationItemData, - new ConversationItemData('error', msg.error), + new ConversationItemData('error', t(msg.error)), ]) break } diff --git a/src/services/apis/chatgpt-web.mjs b/src/services/apis/chatgpt-web.mjs index 62164d3..e885609 100644 --- a/src/services/apis/chatgpt-web.mjs +++ b/src/services/apis/chatgpt-web.mjs @@ -145,6 +145,14 @@ export async function generateAnswersWithChatgptWebApi(port, question, session, console.debug('json error', error) return } + if (data.error) { + if (data.error.includes('unusual activity')) + throw new Error( + "Please keep https://chat.openai.com open and try again. If it still doesn't work, type some characters in the input box of chatgpt web page and try again.", + ) + else throw new Error(data.error) + } + if (data.conversation_id) session.conversationId = data.conversation_id if (data.message?.id) session.parentMessageId = data.message.id