improve claude.ai login prompt

This commit is contained in:
josc146
2023-10-15 23:01:49 +08:00
parent 843bfc357f
commit 4cc414457f
14 changed files with 25 additions and 1 deletions
+1
View File
@@ -44,6 +44,7 @@
"Save Conversation": "Konversation speichern",
"UNAUTHORIZED": "Unbefugt",
"Please login at https://chat.openai.com first": "Bitte zuerst bei https://chat.openai.com anmelden",
"Please login at https://claude.ai first": "Bitte zuerst bei https://claude.ai anmelden",
"Then open https://chat.openai.com/api/auth/session": "Dann öffne https://chat.openai.com/api/auth/sitzung",
"And refresh this page or type you question again": "Klicken Sie anschließend auf die Schaltfläche Wiederholen in der oberen rechten Ecke",
"Consider creating an api key at https://platform.openai.com/account/api-keys": "Erwägen Sie ein API-Schlüssel unter https://platform.openai.com/account/api-keys zu erstellen",
+1
View File
@@ -44,6 +44,7 @@
"Save Conversation": "Save Conversation",
"UNAUTHORIZED": "UNAUTHORIZED",
"Please login at https://chat.openai.com first": "Please login at https://chat.openai.com first",
"Please login at https://claude.ai first": "Please login at https://claude.ai first",
"Then open https://chat.openai.com/api/auth/session": "Then open https://chat.openai.com/api/auth/session",
"And refresh this page or type you question again": "And click the retry button in the top right corner",
"Consider creating an api key at https://platform.openai.com/account/api-keys": "Consider creating an api key at https://platform.openai.com/account/api-keys",
+1
View File
@@ -44,6 +44,7 @@
"Save Conversation": "Guardar conversación",
"UNAUTHORIZED": "NO AUTORIZADO",
"Please login at https://chat.openai.com first": "Por favor, inicie sesión en https://chat.openai.com primero",
"Please login at https://claude.ai first": "Por favor, inicie sesión en https://claude.ai primero",
"Then open https://chat.openai.com/api/auth/session": "Luego abra https://chat.openai.com/api/auth/session",
"And refresh this page or type you question again": "A continuación, pulse el botón Reintentar situado en la esquina superior derecha.",
"Consider creating an api key at https://platform.openai.com/account/api-keys": "Considere crear una clave de API en https://platform.openai.com/account/api-keys",
+1
View File
@@ -44,6 +44,7 @@
"Save Conversation": "Enregistrer la conversation",
"UNAUTHORIZED": "NON AUTORISÉ",
"Please login at https://chat.openai.com first": "Veuillez vous connecter d'abord sur https://chat.openai.com",
"Please login at https://claude.ai first": "Veuillez vous connecter d'abord sur https://claude.ai",
"Then open https://chat.openai.com/api/auth/session": "Puis ouvrez https://chat.openai.com/api/auth/session",
"And refresh this page or type you question again": "Cliquez ensuite sur le bouton Réessayer dans le coin supérieur droit",
"Consider creating an api key at https://platform.openai.com/account/api-keys": "Pensez à créer une clé API sur https://platform.openai.com/account/api-keys",
+1
View File
@@ -44,6 +44,7 @@
"Save Conversation": "Simpan Percakapan",
"UNAUTHORIZED": "TIDAK DIIZINKAN",
"Please login at https://chat.openai.com first": "Silakan masuk di https://chat.openai.com terlebih dahulu",
"Please login at https://claude.ai first": "Silakan masuk di https://claude.ai terlebih dahulu",
"Then open https://chat.openai.com/api/auth/session": "Lalu buka https://chat.openai.com/api/auth/session",
"And refresh this page or type you question again": "Setelah itu klik tombol Coba Lagi di sudut kanan atas",
"Consider creating an api key at https://platform.openai.com/account/api-keys": "Pertimbangkan untuk membuat kunci API di https://platform.openai.com/account/api-keys",
+1
View File
@@ -44,6 +44,7 @@
"Save Conversation": "Salva la conversazione",
"UNAUTHORIZED": "Non autorizzato",
"Please login at https://chat.openai.com first": "Effettua il login su https://chat.openai.com prima",
"Please login at https://claude.ai first": "Effettua il login su https://claude.ai prima",
"Then open https://chat.openai.com/api/auth/session": "Quindi apri https://chat.openai.com/api/auth/session",
"And refresh this page or type you question again": "Quindi fare clic sul pulsante Riprova nell'angolo in alto a destra",
"Consider creating an api key at https://platform.openai.com/account/api-keys": "Considera la creazione di una chiave API su https://platform.openai.com/account/api-keys",
+1
View File
@@ -44,6 +44,7 @@
"Save Conversation": "会話を保存",
"UNAUTHORIZED": "認証されていません",
"Please login at https://chat.openai.com first": "最初にhttps://chat.openai.com/にログインしてください",
"Please login at https://claude.ai first": "最初にhttps://claude.ai/にログインしてください",
"Then open https://chat.openai.com/api/auth/session": "次にhttps://chat.openai.com/api/auth/sessionにアクセス",
"And refresh this page or type you question again": "次に、右上の「再試行」ボタンをクリックします",
"Consider creating an api key at https://platform.openai.com/account/api-keys": "https://platform.openai.com/account/api-keysでAPIキーを作成してください",
+1
View File
@@ -44,6 +44,7 @@
"Save Conversation": "대화 저장",
"UNAUTHORIZED": "인증되지 않음",
"Please login at https://chat.openai.com first": "https://chat.openai.com에서 로그인하세요.",
"Please login at https://claude.ai first": "https://claude.ai에서 로그인하세요.",
"Then open https://chat.openai.com/api/auth/session": "그런 다음 https://chat.openai.com/api/auth/session을 열거나 다시 질문을 입력하세요.",
"And refresh this page or type you question again": "그런 다음 오른쪽 상단의 재시도 버튼을 클릭합니다.",
"Consider creating an api key at https://platform.openai.com/account/api-keys": "https://platform.openai.com/account/api-keys에서 API 키를 생성하는 것을 고려하세요.",
+1
View File
@@ -44,6 +44,7 @@
"Save Conversation": "Salvar Conversa",
"UNAUTHORIZED": "NÃO AUTORIZADO",
"Please login at https://chat.openai.com first": "Por favor, faça login em https://chat.openai.com primeiro",
"Please login at https://claude.ai first": "Por favor, faça login em https://claude.ai primeiro",
"Then open https://chat.openai.com/api/auth/session": "Então, abra https://chat.openai.com/api/auth/session",
"And refresh this page or type you question again": "Depois clique no botão Retry, no canto superior direito",
"Consider creating an api key at https://platform.openai.com/account/api-keys": "Considere criar uma chave de API em https://platform.openai.com/account/api-keys",
+1
View File
@@ -44,6 +44,7 @@
"Save Conversation": "Сохранить разговор",
"UNAUTHORIZED": "Несанкционированный",
"Please login at https://chat.openai.com first": "Пожалуйста, сначала войдите на https://chat.openai.com",
"Please login at https://claude.ai first": "Пожалуйста, сначала войдите на https://claude.ai",
"Then open https://chat.openai.com/api/auth/session": "Затем откройте https://chat.openai.com/api/auth/session",
"And refresh this page or type you question again": "После этого нажмите кнопку Retry в правом верхнем углу",
"Consider creating an api key at https://platform.openai.com/account/api-keys": "Рассмотрите возможность создания ключа API на https://platform.openai.com/account/api-keys",
+1
View File
@@ -44,6 +44,7 @@
"Save Conversation": "Konuşmayı Kaydet",
"UNAUTHORIZED": "Yetkilendirilmemiş",
"Please login at https://chat.openai.com first": "Lütfen önce https://chat.openai.com adresinde oturum açın",
"Please login at https://claude.ai first": "Lütfen önce https://claude.ai adresinde oturum açın",
"Then open https://chat.openai.com/api/auth/session": "Ardından https://chat.openai.com/api/auth/session adresini açın",
"And refresh this page or type you question again": "Ve bu sayfayı yenileyin veya sorunuzu tekrar yazın",
"Consider creating an api key at https://platform.openai.com/account/api-keys": "https://platform.openai.com/account/api-keys adresinde bir api anahtarı oluşturmayı düşünün",
+1
View File
@@ -44,6 +44,7 @@
"Save Conversation": "保存对话",
"UNAUTHORIZED": "未授权",
"Please login at https://chat.openai.com first": "请先登录 https://chat.openai.com",
"Please login at https://claude.ai first": "请先登录 https://claude.ai",
"Then open https://chat.openai.com/api/auth/session": "然后打开 https://chat.openai.com/api/auth/session",
"And refresh this page or type you question again": "之后点击右上角的重试按钮",
"Consider creating an api key at https://platform.openai.com/account/api-keys": "考虑在 https://platform.openai.com/account/api-keys 创建一个API Key",
+1
View File
@@ -44,6 +44,7 @@
"Save Conversation": "儲存對話",
"UNAUTHORIZED": "未授權",
"Please login at https://chat.openai.com first": "請先在 https://chat.openai.com 登入",
"Please login at https://claude.ai first": "請先在 https://claude.ai 登入",
"Then open https://chat.openai.com/api/auth/session": "然後開啟 https://chat.openai.com/api/auth/session",
"And refresh this page or type you question again": "接著點擊右上角的「重試」按鈕",
"Consider creating an api key at https://platform.openai.com/account/api-keys": "建議在 https://platform.openai.com/account/api-keys 建立一個 API 金鑰",
+12 -1
View File
@@ -1,4 +1,10 @@
import { clearOldAccessToken, getUserConfig, Models, setAccessToken } from '../config/index.mjs'
import {
claudeWebModelKeys,
clearOldAccessToken,
getUserConfig,
Models,
setAccessToken,
} from '../config/index.mjs'
import Browser from 'webextension-polyfill'
import { t } from 'i18next'
@@ -74,6 +80,11 @@ export function registerPortListener(executor) {
port.postMessage({ error: t('Rate limit') + '\n\n' + err.message })
else if (['authentication token has expired'].some((m) => err.message.includes(m)))
port.postMessage({ error: 'UNAUTHORIZED' })
else if (
claudeWebModelKeys.includes(session.modelName) &&
['Invalid authorization'].some((m) => err.message.includes(m))
)
port.postMessage({ error: t('Please login at https://claude.ai first') })
else port.postMessage({ error: err.message })
}
}