diff --git a/.github/workflows/dev-build.yaml b/.github/workflows/dev-build.yaml index 353c99da8f8..3698868b1ce 100644 --- a/.github/workflows/dev-build.yaml +++ b/.github/workflows/dev-build.yaml @@ -6,7 +6,7 @@ concurrency: on: push: - branches: ['3625-bypass-ip-check'] # put your current branch to create a build. Core team only. + branches: ['3698-main-screen-localization'] # put your current branch to create a build. Core team only. paths-ignore: - '**.md' - 'cloud-deployments/*' diff --git a/frontend/src/locales/ar/common.js b/frontend/src/locales/ar/common.js index 7e05a8db463..6ec72d70eb7 100644 --- a/frontend/src/locales/ar/common.js +++ b/frontend/src/locales/ar/common.js @@ -732,6 +732,86 @@ const TRANSLATIONS = { }, }, }, + "main-page": { + noWorkspaceError: null, + checklist: { + title: null, + tasksLeft: null, + completed: null, + dismiss: null, + tasks: { + create_workspace: { + title: null, + description: null, + action: null, + }, + send_chat: { + title: null, + description: null, + action: null, + }, + embed_document: { + title: null, + description: null, + action: null, + }, + setup_system_prompt: { + title: null, + description: null, + action: null, + }, + define_slash_command: { + title: null, + description: null, + action: null, + }, + visit_community: { + title: null, + description: null, + action: null, + }, + }, + }, + quickLinks: { + title: null, + sendChat: null, + embedDocument: null, + createWorkspace: null, + }, + exploreMore: { + title: null, + features: { + customAgents: { + title: null, + description: null, + primaryAction: null, + secondaryAction: null, + }, + slashCommands: { + title: null, + description: null, + primaryAction: null, + secondaryAction: null, + }, + systemPrompts: { + title: null, + description: null, + primaryAction: null, + secondaryAction: null, + }, + }, + }, + announcements: { + title: null, + }, + resources: { + title: null, + links: { + docs: null, + star: null, + }, + }, + }, }; export default TRANSLATIONS; diff --git a/frontend/src/locales/da/common.js b/frontend/src/locales/da/common.js index 186f95f84ba..3ea6de01b48 100644 --- a/frontend/src/locales/da/common.js +++ b/frontend/src/locales/da/common.js @@ -771,6 +771,86 @@ const TRANSLATIONS = { }, }, }, + "main-page": { + noWorkspaceError: null, + checklist: { + title: null, + tasksLeft: null, + completed: null, + dismiss: null, + tasks: { + create_workspace: { + title: null, + description: null, + action: null, + }, + send_chat: { + title: null, + description: null, + action: null, + }, + embed_document: { + title: null, + description: null, + action: null, + }, + setup_system_prompt: { + title: null, + description: null, + action: null, + }, + define_slash_command: { + title: null, + description: null, + action: null, + }, + visit_community: { + title: null, + description: null, + action: null, + }, + }, + }, + quickLinks: { + title: null, + sendChat: null, + embedDocument: null, + createWorkspace: null, + }, + exploreMore: { + title: null, + features: { + customAgents: { + title: null, + description: null, + primaryAction: null, + secondaryAction: null, + }, + slashCommands: { + title: null, + description: null, + primaryAction: null, + secondaryAction: null, + }, + systemPrompts: { + title: null, + description: null, + primaryAction: null, + secondaryAction: null, + }, + }, + }, + announcements: { + title: null, + }, + resources: { + title: null, + links: { + docs: null, + star: null, + }, + }, + }, }; export default TRANSLATIONS; diff --git a/frontend/src/locales/de/common.js b/frontend/src/locales/de/common.js index f81776bbe33..dd6d5f3f7a2 100644 --- a/frontend/src/locales/de/common.js +++ b/frontend/src/locales/de/common.js @@ -769,6 +769,93 @@ const TRANSLATIONS = { }, }, }, + "main-page": { + noWorkspaceError: + "Bitte erstellen Sie einen Arbeitsbereich, bevor Sie einen Chat beginnen.", + checklist: { + title: "Erste Schritte", + tasksLeft: "Aufgaben übrig", + completed: "Sie sind auf dem Weg, ein AnythingLLM-Experte zu werden!", + dismiss: "schließen", + tasks: { + create_workspace: { + title: "Einen Arbeitsbereich erstellen", + description: + "Erstellen Sie Ihren ersten Arbeitsbereich, um zu beginnen", + action: "Erstellen", + }, + send_chat: { + title: "Einen Chat senden", + description: "Starten Sie ein Gespräch mit Ihrem KI-Assistenten", + action: "Chat", + }, + embed_document: { + title: "Ein Dokument einbetten", + description: + "Fügen Sie Ihr erstes Dokument zu Ihrem Arbeitsbereich hinzu", + action: "Einbetten", + }, + setup_system_prompt: { + title: "Ein System-Prompt einrichten", + description: "Konfigurieren Sie das Verhalten Ihres KI-Assistenten", + action: "Einrichten", + }, + define_slash_command: { + title: "Einen Slash-Befehl definieren", + description: + "Erstellen Sie benutzerdefinierte Befehle für Ihren Assistenten", + action: "Definieren", + }, + visit_community: { + title: "Community Hub besuchen", + description: "Entdecken Sie Community-Ressourcen und Vorlagen", + action: "Stöbern", + }, + }, + }, + quickLinks: { + title: "Schnellzugriffe", + sendChat: "Chat senden", + embedDocument: "Dokument einbetten", + createWorkspace: "Arbeitsbereich erstellen", + }, + exploreMore: { + title: "Weitere Funktionen erkunden", + features: { + customAgents: { + title: "Benutzerdefinierte KI-Agenten", + description: + "Erstellen Sie leistungsstarke KI-Agenten und Automatisierungen ohne Code.", + primaryAction: "Chatten mit @agent", + secondaryAction: "Einen Agenten-Flow erstellen", + }, + slashCommands: { + title: "Slash-Befehle", + description: + "Sparen Sie Zeit und fügen Sie Eingabeaufforderungen mit benutzerdefinierten Slash-Befehlen ein.", + primaryAction: "Einen Slash-Befehl erstellen", + secondaryAction: "Im Hub erkunden", + }, + systemPrompts: { + title: "System-Eingabeaufforderungen", + description: + "Ändern Sie die System-Eingabeaufforderung, um die KI-Antworten eines Arbeitsbereichs anzupassen.", + primaryAction: "Eine System-Eingabeaufforderung ändern", + secondaryAction: "Eingabevariablen verwalten", + }, + }, + }, + announcements: { + title: "Updates & Ankündigungen", + }, + resources: { + title: "Ressourcen", + links: { + docs: "Dokumentation", + star: "Auf Github mit Stern versehen", + }, + }, + }, }; export default TRANSLATIONS; diff --git a/frontend/src/locales/en/common.js b/frontend/src/locales/en/common.js index 726f7e39c24..3ab9e20c918 100644 --- a/frontend/src/locales/en/common.js +++ b/frontend/src/locales/en/common.js @@ -152,6 +152,89 @@ const TRANSLATIONS = { contact: "Contact Mintplex Labs", }, + "main-page": { + noWorkspaceError: "Please create a workspace before starting a chat.", + checklist: { + title: "Getting Started", + tasksLeft: "tasks left", + completed: "You're on your way to becoming an AnythingLLM expert!", + dismiss: "close", + tasks: { + create_workspace: { + title: "Create a workspace", + description: "Create your first workspace to get started", + action: "Create", + }, + send_chat: { + title: "Send a chat", + description: "Start a conversation with your AI assistant", + action: "Chat", + }, + embed_document: { + title: "Embed a document", + description: "Add your first document to your workspace", + action: "Embed", + }, + setup_system_prompt: { + title: "Set up a system prompt", + description: "Configure your AI assistant's behavior", + action: "Set Up", + }, + define_slash_command: { + title: "Define a slash command", + description: "Create custom commands for your assistant", + action: "Define", + }, + visit_community: { + title: "Visit Community Hub", + description: "Explore community resources and templates", + action: "Browse", + }, + }, + }, + quickLinks: { + title: "Quick Links", + sendChat: "Send Chat", + embedDocument: "Embed a Document", + createWorkspace: "Create Workspace", + }, + exploreMore: { + title: "Explore more features", + features: { + customAgents: { + title: "Custom AI Agents", + description: "Build powerful AI Agents and automations with no code.", + primaryAction: "Chat using @agent", + secondaryAction: "Build an agent flow", + }, + slashCommands: { + title: "Slash Commands", + description: + "Save time and inject prompts using custom slash commands.", + primaryAction: "Create a Slash Command", + secondaryAction: "Explore on Hub", + }, + systemPrompts: { + title: "System Prompts", + description: + "Modify the system prompt to customize the AI replies of a workspace.", + primaryAction: "Modify a System Prompt", + secondaryAction: "Manage prompt variables", + }, + }, + }, + announcements: { + title: "Updates & Announcements", + }, + resources: { + title: "Resources", + links: { + docs: "Docs", + star: "Star on Github", + }, + }, + }, + "new-workspace": { title: "New Workspace", placeholder: "My Workspace", diff --git a/frontend/src/locales/es/common.js b/frontend/src/locales/es/common.js index e5587797f82..82fe86933d3 100644 --- a/frontend/src/locales/es/common.js +++ b/frontend/src/locales/es/common.js @@ -731,6 +731,91 @@ const TRANSLATIONS = { }, }, }, + "main-page": { + noWorkspaceError: + "Por favor, crea un espacio de trabajo antes de iniciar un chat.", + checklist: { + title: "Comenzando", + tasksLeft: "tareas restantes", + completed: + "¡Estás en camino de convertirte en un experto en AnythingLLM!", + dismiss: "cerrar", + tasks: { + create_workspace: { + title: "Crear un espacio de trabajo", + description: "Crea tu primer espacio de trabajo para comenzar", + action: "Crear", + }, + send_chat: { + title: "Enviar un chat", + description: "Inicia una conversación con tu asistente de IA", + action: "Chatear", + }, + embed_document: { + title: "Incrustar un documento", + description: "Añade tu primer documento a tu espacio de trabajo", + action: "Incrustar", + }, + setup_system_prompt: { + title: "Configurar un prompt del sistema", + description: "Configura el comportamiento de tu asistente de IA", + action: "Configurar", + }, + define_slash_command: { + title: "Definir un comando de barra", + description: "Crea comandos personalizados para tu asistente", + action: "Definir", + }, + visit_community: { + title: "Visitar el Centro de la Comunidad", + description: "Explora recursos y plantillas de la comunidad", + action: "Explorar", + }, + }, + }, + quickLinks: { + title: "Enlaces Rápidos", + sendChat: "Enviar Chat", + embedDocument: "Incrustar un Documento", + createWorkspace: "Crear Espacio de Trabajo", + }, + exploreMore: { + title: "Explora más características", + features: { + customAgents: { + title: "Agentes de IA Personalizados", + description: + "Crea poderosos agentes de IA y automatizaciones sin código.", + primaryAction: "Chatear usando @agente", + secondaryAction: "Crear un flujo de agente", + }, + slashCommands: { + title: "Comandos de Barra", + description: + "Ahorra tiempo e inyecta prompts utilizando comandos de barra personalizados.", + primaryAction: "Crear un Comando de Barra", + secondaryAction: "Explorar en el Hub", + }, + systemPrompts: { + title: "Prompts del Sistema", + description: + "Modifica el prompt del sistema para personalizar las respuestas de IA de un espacio de trabajo.", + primaryAction: "Modificar un Prompt del Sistema", + secondaryAction: "Gestionar variables de prompt", + }, + }, + }, + announcements: { + title: "Actualizaciones y Anuncios", + }, + resources: { + title: "Recursos", + links: { + docs: "Documentación", + star: "Destacar en Github", + }, + }, + }, }; export default TRANSLATIONS; diff --git a/frontend/src/locales/fa/common.js b/frontend/src/locales/fa/common.js index 88288f3a4eb..b80235971e0 100644 --- a/frontend/src/locales/fa/common.js +++ b/frontend/src/locales/fa/common.js @@ -724,6 +724,86 @@ const TRANSLATIONS = { }, }, }, + "main-page": { + noWorkspaceError: null, + checklist: { + title: null, + tasksLeft: null, + completed: null, + dismiss: null, + tasks: { + create_workspace: { + title: null, + description: null, + action: null, + }, + send_chat: { + title: null, + description: null, + action: null, + }, + embed_document: { + title: null, + description: null, + action: null, + }, + setup_system_prompt: { + title: null, + description: null, + action: null, + }, + define_slash_command: { + title: null, + description: null, + action: null, + }, + visit_community: { + title: null, + description: null, + action: null, + }, + }, + }, + quickLinks: { + title: null, + sendChat: null, + embedDocument: null, + createWorkspace: null, + }, + exploreMore: { + title: null, + features: { + customAgents: { + title: null, + description: null, + primaryAction: null, + secondaryAction: null, + }, + slashCommands: { + title: null, + description: null, + primaryAction: null, + secondaryAction: null, + }, + systemPrompts: { + title: null, + description: null, + primaryAction: null, + secondaryAction: null, + }, + }, + }, + announcements: { + title: null, + }, + resources: { + title: null, + links: { + docs: null, + star: null, + }, + }, + }, }; export default TRANSLATIONS; diff --git a/frontend/src/locales/fr/common.js b/frontend/src/locales/fr/common.js index bf02d7372a7..527ce41ffce 100644 --- a/frontend/src/locales/fr/common.js +++ b/frontend/src/locales/fr/common.js @@ -732,6 +732,86 @@ const TRANSLATIONS = { }, }, }, + "main-page": { + noWorkspaceError: null, + checklist: { + title: null, + tasksLeft: null, + completed: null, + dismiss: null, + tasks: { + create_workspace: { + title: null, + description: null, + action: null, + }, + send_chat: { + title: null, + description: null, + action: null, + }, + embed_document: { + title: null, + description: null, + action: null, + }, + setup_system_prompt: { + title: null, + description: null, + action: null, + }, + define_slash_command: { + title: null, + description: null, + action: null, + }, + visit_community: { + title: null, + description: null, + action: null, + }, + }, + }, + quickLinks: { + title: null, + sendChat: null, + embedDocument: null, + createWorkspace: null, + }, + exploreMore: { + title: null, + features: { + customAgents: { + title: null, + description: null, + primaryAction: null, + secondaryAction: null, + }, + slashCommands: { + title: null, + description: null, + primaryAction: null, + secondaryAction: null, + }, + systemPrompts: { + title: null, + description: null, + primaryAction: null, + secondaryAction: null, + }, + }, + }, + announcements: { + title: null, + }, + resources: { + title: null, + links: { + docs: null, + star: null, + }, + }, + }, }; export default TRANSLATIONS; diff --git a/frontend/src/locales/he/common.js b/frontend/src/locales/he/common.js index 74a331def58..e468b18a3a9 100644 --- a/frontend/src/locales/he/common.js +++ b/frontend/src/locales/he/common.js @@ -717,6 +717,86 @@ const TRANSLATIONS = { }, }, }, + "main-page": { + noWorkspaceError: null, + checklist: { + title: null, + tasksLeft: null, + completed: null, + dismiss: null, + tasks: { + create_workspace: { + title: null, + description: null, + action: null, + }, + send_chat: { + title: null, + description: null, + action: null, + }, + embed_document: { + title: null, + description: null, + action: null, + }, + setup_system_prompt: { + title: null, + description: null, + action: null, + }, + define_slash_command: { + title: null, + description: null, + action: null, + }, + visit_community: { + title: null, + description: null, + action: null, + }, + }, + }, + quickLinks: { + title: null, + sendChat: null, + embedDocument: null, + createWorkspace: null, + }, + exploreMore: { + title: null, + features: { + customAgents: { + title: null, + description: null, + primaryAction: null, + secondaryAction: null, + }, + slashCommands: { + title: null, + description: null, + primaryAction: null, + secondaryAction: null, + }, + systemPrompts: { + title: null, + description: null, + primaryAction: null, + secondaryAction: null, + }, + }, + }, + announcements: { + title: null, + }, + resources: { + title: null, + links: { + docs: null, + star: null, + }, + }, + }, }; export default TRANSLATIONS; diff --git a/frontend/src/locales/it/common.js b/frontend/src/locales/it/common.js index 70e7aa2aa46..7839bdd5871 100644 --- a/frontend/src/locales/it/common.js +++ b/frontend/src/locales/it/common.js @@ -730,6 +730,86 @@ const TRANSLATIONS = { }, }, }, + "main-page": { + noWorkspaceError: null, + checklist: { + title: null, + tasksLeft: null, + completed: null, + dismiss: null, + tasks: { + create_workspace: { + title: null, + description: null, + action: null, + }, + send_chat: { + title: null, + description: null, + action: null, + }, + embed_document: { + title: null, + description: null, + action: null, + }, + setup_system_prompt: { + title: null, + description: null, + action: null, + }, + define_slash_command: { + title: null, + description: null, + action: null, + }, + visit_community: { + title: null, + description: null, + action: null, + }, + }, + }, + quickLinks: { + title: null, + sendChat: null, + embedDocument: null, + createWorkspace: null, + }, + exploreMore: { + title: null, + features: { + customAgents: { + title: null, + description: null, + primaryAction: null, + secondaryAction: null, + }, + slashCommands: { + title: null, + description: null, + primaryAction: null, + secondaryAction: null, + }, + systemPrompts: { + title: null, + description: null, + primaryAction: null, + secondaryAction: null, + }, + }, + }, + announcements: { + title: null, + }, + resources: { + title: null, + links: { + docs: null, + star: null, + }, + }, + }, }; export default TRANSLATIONS; diff --git a/frontend/src/locales/ja/common.js b/frontend/src/locales/ja/common.js index e1ed2c3fd3f..b1f8bac6cbe 100644 --- a/frontend/src/locales/ja/common.js +++ b/frontend/src/locales/ja/common.js @@ -763,6 +763,89 @@ const TRANSLATIONS = { }, }, }, + "main-page": { + noWorkspaceError: + "チャットを開始する前にワークスペースを作成してください。", + checklist: { + title: "はじめに", + tasksLeft: "残りのタスク", + completed: "AnythingLLMの達人への道を進んでいます!", + dismiss: "閉じる", + tasks: { + create_workspace: { + title: "ワークスペースを作成する", + description: "始めるには最初のワークスペースを作成してください", + action: "作成", + }, + send_chat: { + title: "チャットを送信する", + description: "AIアシスタントとの会話を開始する", + action: "チャット", + }, + embed_document: { + title: "ドキュメントを埋め込む", + description: "ワークスペースに最初のドキュメントを追加する", + action: "埋め込む", + }, + setup_system_prompt: { + title: "システムプロンプトを設定する", + description: "AIアシスタントの動作を設定する", + action: "設定", + }, + define_slash_command: { + title: "スラッシュコマンドを定義する", + description: "アシスタント用のカスタムコマンドを作成する", + action: "定義", + }, + visit_community: { + title: "コミュニティハブを訪問する", + description: "コミュニティリソースとテンプレートを探索する", + action: "閲覧", + }, + }, + }, + quickLinks: { + title: "クイックリンク", + sendChat: "チャットを送信", + embedDocument: "ドキュメントを埋め込む", + createWorkspace: "ワークスペースを作成", + }, + exploreMore: { + title: "その他の機能を探索", + features: { + customAgents: { + title: "カスタムAIエージェント", + description: "コードなしで強力なAIエージェントと自動化を構築。", + primaryAction: "@エージェントを使用してチャット", + secondaryAction: "エージェントフローを構築", + }, + slashCommands: { + title: "スラッシュコマンド", + description: + "カスタムスラッシュコマンドで時間を節約しプロンプトを挿入。", + primaryAction: "スラッシュコマンドを作成", + secondaryAction: "ハブで探索", + }, + systemPrompts: { + title: "システムプロンプト", + description: + "システムプロンプトを変更してワークスペースのAI返答をカスタマイズ。", + primaryAction: "システムプロンプトを変更", + secondaryAction: "プロンプト変数を管理", + }, + }, + }, + announcements: { + title: "更新とお知らせ", + }, + resources: { + title: "リソース", + links: { + docs: "ドキュメント", + star: "Githubでスター", + }, + }, + }, }; export default TRANSLATIONS; diff --git a/frontend/src/locales/ko/common.js b/frontend/src/locales/ko/common.js index 99d1de24658..11c4383d461 100644 --- a/frontend/src/locales/ko/common.js +++ b/frontend/src/locales/ko/common.js @@ -717,6 +717,86 @@ const TRANSLATIONS = { }, }, }, + "main-page": { + noWorkspaceError: null, + checklist: { + title: null, + tasksLeft: null, + completed: null, + dismiss: null, + tasks: { + create_workspace: { + title: null, + description: null, + action: null, + }, + send_chat: { + title: null, + description: null, + action: null, + }, + embed_document: { + title: null, + description: null, + action: null, + }, + setup_system_prompt: { + title: null, + description: null, + action: null, + }, + define_slash_command: { + title: null, + description: null, + action: null, + }, + visit_community: { + title: null, + description: null, + action: null, + }, + }, + }, + quickLinks: { + title: null, + sendChat: null, + embedDocument: null, + createWorkspace: null, + }, + exploreMore: { + title: null, + features: { + customAgents: { + title: null, + description: null, + primaryAction: null, + secondaryAction: null, + }, + slashCommands: { + title: null, + description: null, + primaryAction: null, + secondaryAction: null, + }, + systemPrompts: { + title: null, + description: null, + primaryAction: null, + secondaryAction: null, + }, + }, + }, + announcements: { + title: null, + }, + resources: { + title: null, + links: { + docs: null, + star: null, + }, + }, + }, }; export default TRANSLATIONS; diff --git a/frontend/src/locales/nl/common.js b/frontend/src/locales/nl/common.js index 586250ac1ef..ec975e8ad50 100644 --- a/frontend/src/locales/nl/common.js +++ b/frontend/src/locales/nl/common.js @@ -727,6 +727,86 @@ const TRANSLATIONS = { }, }, }, + "main-page": { + noWorkspaceError: null, + checklist: { + title: null, + tasksLeft: null, + completed: null, + dismiss: null, + tasks: { + create_workspace: { + title: null, + description: null, + action: null, + }, + send_chat: { + title: null, + description: null, + action: null, + }, + embed_document: { + title: null, + description: null, + action: null, + }, + setup_system_prompt: { + title: null, + description: null, + action: null, + }, + define_slash_command: { + title: null, + description: null, + action: null, + }, + visit_community: { + title: null, + description: null, + action: null, + }, + }, + }, + quickLinks: { + title: null, + sendChat: null, + embedDocument: null, + createWorkspace: null, + }, + exploreMore: { + title: null, + features: { + customAgents: { + title: null, + description: null, + primaryAction: null, + secondaryAction: null, + }, + slashCommands: { + title: null, + description: null, + primaryAction: null, + secondaryAction: null, + }, + systemPrompts: { + title: null, + description: null, + primaryAction: null, + secondaryAction: null, + }, + }, + }, + announcements: { + title: null, + }, + resources: { + title: null, + links: { + docs: null, + star: null, + }, + }, + }, }; export default TRANSLATIONS; diff --git a/frontend/src/locales/pt_BR/common.js b/frontend/src/locales/pt_BR/common.js index 1614eac6748..ea295acb543 100644 --- a/frontend/src/locales/pt_BR/common.js +++ b/frontend/src/locales/pt_BR/common.js @@ -728,6 +728,86 @@ const TRANSLATIONS = { }, }, }, + "main-page": { + noWorkspaceError: null, + checklist: { + title: null, + tasksLeft: null, + completed: null, + dismiss: null, + tasks: { + create_workspace: { + title: null, + description: null, + action: null, + }, + send_chat: { + title: null, + description: null, + action: null, + }, + embed_document: { + title: null, + description: null, + action: null, + }, + setup_system_prompt: { + title: null, + description: null, + action: null, + }, + define_slash_command: { + title: null, + description: null, + action: null, + }, + visit_community: { + title: null, + description: null, + action: null, + }, + }, + }, + quickLinks: { + title: null, + sendChat: null, + embedDocument: null, + createWorkspace: null, + }, + exploreMore: { + title: null, + features: { + customAgents: { + title: null, + description: null, + primaryAction: null, + secondaryAction: null, + }, + slashCommands: { + title: null, + description: null, + primaryAction: null, + secondaryAction: null, + }, + systemPrompts: { + title: null, + description: null, + primaryAction: null, + secondaryAction: null, + }, + }, + }, + announcements: { + title: null, + }, + resources: { + title: null, + links: { + docs: null, + star: null, + }, + }, + }, }; export default TRANSLATIONS; diff --git a/frontend/src/locales/ru/common.js b/frontend/src/locales/ru/common.js index 232cd0b44fa..20f6c62b00a 100644 --- a/frontend/src/locales/ru/common.js +++ b/frontend/src/locales/ru/common.js @@ -772,6 +772,86 @@ const TRANSLATIONS = { }, }, }, + "main-page": { + noWorkspaceError: null, + checklist: { + title: null, + tasksLeft: null, + completed: null, + dismiss: null, + tasks: { + create_workspace: { + title: null, + description: null, + action: null, + }, + send_chat: { + title: null, + description: null, + action: null, + }, + embed_document: { + title: null, + description: null, + action: null, + }, + setup_system_prompt: { + title: null, + description: null, + action: null, + }, + define_slash_command: { + title: null, + description: null, + action: null, + }, + visit_community: { + title: null, + description: null, + action: null, + }, + }, + }, + quickLinks: { + title: null, + sendChat: null, + embedDocument: null, + createWorkspace: null, + }, + exploreMore: { + title: null, + features: { + customAgents: { + title: null, + description: null, + primaryAction: null, + secondaryAction: null, + }, + slashCommands: { + title: null, + description: null, + primaryAction: null, + secondaryAction: null, + }, + systemPrompts: { + title: null, + description: null, + primaryAction: null, + secondaryAction: null, + }, + }, + }, + announcements: { + title: null, + }, + resources: { + title: null, + links: { + docs: null, + star: null, + }, + }, + }, }; export default TRANSLATIONS; diff --git a/frontend/src/locales/tr/common.js b/frontend/src/locales/tr/common.js index 5e64bf519b9..db212a0056b 100644 --- a/frontend/src/locales/tr/common.js +++ b/frontend/src/locales/tr/common.js @@ -727,6 +727,86 @@ const TRANSLATIONS = { }, }, }, + "main-page": { + noWorkspaceError: null, + checklist: { + title: null, + tasksLeft: null, + completed: null, + dismiss: null, + tasks: { + create_workspace: { + title: null, + description: null, + action: null, + }, + send_chat: { + title: null, + description: null, + action: null, + }, + embed_document: { + title: null, + description: null, + action: null, + }, + setup_system_prompt: { + title: null, + description: null, + action: null, + }, + define_slash_command: { + title: null, + description: null, + action: null, + }, + visit_community: { + title: null, + description: null, + action: null, + }, + }, + }, + quickLinks: { + title: null, + sendChat: null, + embedDocument: null, + createWorkspace: null, + }, + exploreMore: { + title: null, + features: { + customAgents: { + title: null, + description: null, + primaryAction: null, + secondaryAction: null, + }, + slashCommands: { + title: null, + description: null, + primaryAction: null, + secondaryAction: null, + }, + systemPrompts: { + title: null, + description: null, + primaryAction: null, + secondaryAction: null, + }, + }, + }, + announcements: { + title: null, + }, + resources: { + title: null, + links: { + docs: null, + star: null, + }, + }, + }, }; export default TRANSLATIONS; diff --git a/frontend/src/locales/vn/common.js b/frontend/src/locales/vn/common.js index 11a5c46331a..4f138e936d4 100644 --- a/frontend/src/locales/vn/common.js +++ b/frontend/src/locales/vn/common.js @@ -726,6 +726,86 @@ const TRANSLATIONS = { }, }, }, + "main-page": { + noWorkspaceError: null, + checklist: { + title: null, + tasksLeft: null, + completed: null, + dismiss: null, + tasks: { + create_workspace: { + title: null, + description: null, + action: null, + }, + send_chat: { + title: null, + description: null, + action: null, + }, + embed_document: { + title: null, + description: null, + action: null, + }, + setup_system_prompt: { + title: null, + description: null, + action: null, + }, + define_slash_command: { + title: null, + description: null, + action: null, + }, + visit_community: { + title: null, + description: null, + action: null, + }, + }, + }, + quickLinks: { + title: null, + sendChat: null, + embedDocument: null, + createWorkspace: null, + }, + exploreMore: { + title: null, + features: { + customAgents: { + title: null, + description: null, + primaryAction: null, + secondaryAction: null, + }, + slashCommands: { + title: null, + description: null, + primaryAction: null, + secondaryAction: null, + }, + systemPrompts: { + title: null, + description: null, + primaryAction: null, + secondaryAction: null, + }, + }, + }, + announcements: { + title: null, + }, + resources: { + title: null, + links: { + docs: null, + star: null, + }, + }, + }, }; export default TRANSLATIONS; diff --git a/frontend/src/locales/zh/common.js b/frontend/src/locales/zh/common.js index c6a30ca5062..c31e9d02cbc 100644 --- a/frontend/src/locales/zh/common.js +++ b/frontend/src/locales/zh/common.js @@ -705,6 +705,86 @@ const TRANSLATIONS = { }, }, }, + "main-page": { + noWorkspaceError: "请在开始聊天前创建一个工作区。", + checklist: { + title: "入门指南", + tasksLeft: "剩余任务", + completed: "你正在成为AnythingLLM专家的路上!", + dismiss: "关闭", + tasks: { + create_workspace: { + title: "创建工作区", + description: "创建你的第一个工作区以开始使用", + action: "创建", + }, + send_chat: { + title: "发送聊天", + description: "开始与你的AI助手对话", + action: "聊天", + }, + embed_document: { + title: "嵌入文档", + description: "添加你的第一个文档到工作区", + action: "嵌入", + }, + setup_system_prompt: { + title: "设置系统提示", + description: "配置你的AI助手的行为", + action: "设置", + }, + define_slash_command: { + title: "定义斜杠命令", + description: "为你的助手创建自定义命令", + action: "定义", + }, + visit_community: { + title: "访问社区中心", + description: "探索社区资源和模板", + action: "浏览", + }, + }, + }, + quickLinks: { + title: "快捷链接", + sendChat: "发送聊天", + embedDocument: "嵌入文档", + createWorkspace: "创建工作区", + }, + exploreMore: { + title: "探索更多功能", + features: { + customAgents: { + title: "自定义AI代理", + description: "无需编程即可构建强大的AI代理和自动化流程。", + primaryAction: "使用@agent聊天", + secondaryAction: "构建代理流程", + }, + slashCommands: { + title: "斜杠命令", + description: "使用自定义斜杠命令节省时间并注入提示。", + primaryAction: "创建斜杠命令", + secondaryAction: "在中心探索", + }, + systemPrompts: { + title: "系统提示", + description: "修改系统提示以自定义工作区的AI回复。", + primaryAction: "修改系统提示", + secondaryAction: "管理提示变量", + }, + }, + }, + announcements: { + title: "更新与公告", + }, + resources: { + title: "资源", + links: { + docs: "文档", + star: "在Github上加星标", + }, + }, + }, }; export default TRANSLATIONS; diff --git a/frontend/src/locales/zh_TW/common.js b/frontend/src/locales/zh_TW/common.js index 30cab3aff83..af689f48fb1 100644 --- a/frontend/src/locales/zh_TW/common.js +++ b/frontend/src/locales/zh_TW/common.js @@ -708,6 +708,86 @@ const TRANSLATIONS = { }, }, }, + "main-page": { + noWorkspaceError: "請先建立工作空間才能開始對話。", + checklist: { + title: "開始使用", + tasksLeft: "個任務未完成", + completed: "你已經走在成為AnythingLLM專家的路上!", + dismiss: "關閉", + tasks: { + create_workspace: { + title: "建立工作空間", + description: "建立你的第一個工作空間來開始使用", + action: "建立", + }, + send_chat: { + title: "發送對話", + description: "開始與你的AI助理對話", + action: "對話", + }, + embed_document: { + title: "嵌入文件", + description: "將你的第一個文件添加到工作空間", + action: "嵌入", + }, + setup_system_prompt: { + title: "設置系統提示", + description: "設定你的AI助理的行為模式", + action: "設置", + }, + define_slash_command: { + title: "定義斜線命令", + description: "為你的助理創建自定義命令", + action: "定義", + }, + visit_community: { + title: "訪問社群中心", + description: "探索社群資源和模板", + action: "瀏覽", + }, + }, + }, + quickLinks: { + title: "快速連結", + sendChat: "發送對話", + embedDocument: "嵌入文件", + createWorkspace: "建立工作空間", + }, + exploreMore: { + title: "探索更多功能", + features: { + customAgents: { + title: "自定義AI代理", + description: "無需編碼即可建立強大的AI代理和自動化流程。", + primaryAction: "使用@代理進行對話", + secondaryAction: "建立代理流程", + }, + slashCommands: { + title: "斜線命令", + description: "節省時間並使用自定義斜線命令注入提示。", + primaryAction: "創建斜線命令", + secondaryAction: "在中心探索", + }, + systemPrompts: { + title: "系統提示", + description: "修改系統提示以自定義工作空間的AI回覆。", + primaryAction: "修改系統提示", + secondaryAction: "管理提示變數", + }, + }, + }, + announcements: { + title: "更新與公告", + }, + resources: { + title: "資源", + links: { + docs: "文檔", + star: "在Github上加星標", + }, + }, + }, }; export default TRANSLATIONS; diff --git a/frontend/src/pages/Main/Home/Checklist/constants.js b/frontend/src/pages/Main/Home/Checklist/constants.js index 85dd005786a..6e3766b3644 100644 --- a/frontend/src/pages/Main/Home/Checklist/constants.js +++ b/frontend/src/pages/Main/Home/Checklist/constants.js @@ -7,6 +7,8 @@ import { } from "@phosphor-icons/react"; import SlashCommandIcon from "./ChecklistItem/icons/SlashCommand"; import paths from "@/utils/paths"; +import { t } from "i18next"; + const noop = () => {}; export const CHECKLIST_UPDATED_EVENT = "anythingllm_checklist_updated"; @@ -34,13 +36,16 @@ export const CHECKLIST_HIDDEN = "anythingllm_checklist_dismissed"; * @property {boolean} completed */ -/** @type {ChecklistItem[]} */ -export const CHECKLIST_ITEMS = [ +/** + * Function to generate the checklist items + * @returns {ChecklistItem[]} + */ +export const CHECKLIST_ITEMS = () => [ { id: "create_workspace", - title: "Create a workspace", - description: "Create your first workspace to get started", - action: "Create", + title: t("main-page.checklist.tasks.create_workspace.title"), + description: t("main-page.checklist.tasks.create_workspace.description"), + action: t("main-page.checklist.tasks.create_workspace.action"), handler: ({ showNewWsModal = noop }) => { showNewWsModal(); return true; @@ -49,9 +54,9 @@ export const CHECKLIST_ITEMS = [ }, { id: "send_chat", - title: "Send a chat", - description: "Start a conversation with your AI assistant", - action: "Chat", + title: t("main-page.checklist.tasks.send_chat.title"), + description: t("main-page.checklist.tasks.send_chat.description"), + action: t("main-page.checklist.tasks.send_chat.action"), handler: ({ workspaces = [], navigate = noop, @@ -59,11 +64,9 @@ export const CHECKLIST_ITEMS = [ showNewWsModal = noop, }) => { if (workspaces.length === 0) { - showToast( - "Please create a workspace before starting a chat.", - "warning", - { clear: true } - ); + showToast(t("main-page.noWorkspaceError"), "warning", { + clear: true, + }); showNewWsModal(); return false; } @@ -74,9 +77,9 @@ export const CHECKLIST_ITEMS = [ }, { id: "embed_document", - title: "Embed a document", - description: "Add your first document to your workspace", - action: "Embed", + title: t("main-page.checklist.tasks.embed_document.title"), + description: t("main-page.checklist.tasks.embed_document.description"), + action: t("main-page.checklist.tasks.embed_document.action"), handler: ({ workspaces = [], setSelectedWorkspace = noop, @@ -85,11 +88,10 @@ export const CHECKLIST_ITEMS = [ showNewWsModal = noop, }) => { if (workspaces.length === 0) { - showToast( - "Please create a workspace before embedding documents.", - "warning", - { clear: true } - ); + debugger; + showToast(t("main-page.noWorkspaceError"), "warning", { + clear: true, + }); showNewWsModal(); return false; } @@ -101,9 +103,9 @@ export const CHECKLIST_ITEMS = [ }, { id: "setup_system_prompt", - title: "Set up a system prompt", - description: "Configure your AI assistant's behavior", - action: "Set Up", + title: t("main-page.checklist.tasks.setup_system_prompt.title"), + description: t("main-page.checklist.tasks.setup_system_prompt.description"), + action: t("main-page.checklist.tasks.setup_system_prompt.action"), handler: ({ workspaces = [], navigate = noop, @@ -111,11 +113,9 @@ export const CHECKLIST_ITEMS = [ showToast = noop, }) => { if (workspaces.length === 0) { - showToast( - "Please create a workspace before setting up system prompts.", - "warning", - { clear: true } - ); + showToast(t("main-page.noWorkspaceError"), "warning", { + clear: true, + }); showNewWsModal(); return false; } @@ -130,9 +130,11 @@ export const CHECKLIST_ITEMS = [ }, { id: "define_slash_command", - title: "Define a slash command", - description: "Create custom commands for your assistant", - action: "Define", + title: t("main-page.checklist.tasks.define_slash_command.title"), + description: t( + "main-page.checklist.tasks.define_slash_command.description" + ), + action: t("main-page.checklist.tasks.define_slash_command.action"), handler: ({ workspaces = [], navigate = noop, @@ -140,11 +142,7 @@ export const CHECKLIST_ITEMS = [ showToast = noop, }) => { if (workspaces.length === 0) { - showToast( - "Please create a workspace before setting up slash commands.", - "warning", - { clear: true } - ); + showToast(t("main-page.noWorkspaceError"), "warning", { clear: true }); showNewWsModal(); return false; } @@ -159,9 +157,9 @@ export const CHECKLIST_ITEMS = [ }, { id: "visit_community", - title: "Visit Community Hub", - description: "Explore community resources and templates", - action: "Browse", + title: t("main-page.checklist.tasks.visit_community.title"), + description: t("main-page.checklist.tasks.visit_community.description"), + action: t("main-page.checklist.tasks.visit_community.action"), handler: () => window.open(paths.communityHub.website(), "_blank"), icon: UsersThree, }, diff --git a/frontend/src/pages/Main/Home/Checklist/index.jsx b/frontend/src/pages/Main/Home/Checklist/index.jsx index 7dde88c8ba5..80e28557d64 100644 --- a/frontend/src/pages/Main/Home/Checklist/index.jsx +++ b/frontend/src/pages/Main/Home/Checklist/index.jsx @@ -17,9 +17,11 @@ import { } from "./constants"; import ConfettiExplosion from "react-confetti-explosion"; import { safeJsonParse } from "@/utils/request"; +import { useTranslation } from "react-i18next"; const MemoizedChecklistItem = React.memo(ChecklistItem); export default function Checklist() { + const { t } = useTranslation(); const [loading, setLoading] = useState(true); const [isHidden, setIsHidden] = useState(false); const [completedCount, setCompletedCount] = useState(0); @@ -70,7 +72,7 @@ export default function Checklist() { const checklist = window.localStorage.getItem(CHECKLIST_STORAGE_KEY); const existingChecklist = checklist ? safeJsonParse(checklist, {}) : {}; const isCompleted = - Object.keys(existingChecklist).length === CHECKLIST_ITEMS.length; + Object.keys(existingChecklist).length === CHECKLIST_ITEMS().length; setIsCompleted(isCompleted); if (isCompleted) return; @@ -124,7 +126,7 @@ export default function Checklist() { const completedItems = safeJsonParse(checklist, {}); setCompletedCount(Object.keys(completedItems).length); setIsCompleted( - Object.keys(completedItems).length === CHECKLIST_ITEMS.length + Object.keys(completedItems).length === CHECKLIST_ITEMS().length ); } catch (error) { console.error(error); @@ -155,7 +157,7 @@ export default function Checklist() { className="bg-[rgba(54,70,61,0.5)] light:bg-[rgba(216,243,234,0.5)] w-full h-full flex items-center justify-center bg-theme-checklist-item-completed-bg/50 rounded-lg" >
- You're on your way to becoming an AnythingLLM expert! + {t("main-page.checklist.completed")}
@@ -166,11 +168,12 @@ export default function Checklist() {- {CHECKLIST_ITEMS.length - completedCount} tasks left + {CHECKLIST_ITEMS().length - completedCount}{" "} + {t("main-page.checklist.tasksLeft")}
)}