uncloseai.com/public/src/languages/en.js
russell@unturf.com 52b08894c6 Add unsandbox.com API key settings to modal
- Add public/src/unsandbox.js browser SDK with HMAC-SHA256 auth
- Add settings UI for unsandbox public/secret keys in modal
- Refactor code-execution.js to use SDK when keys configured
- Falls back to unauthenticated endpoint when not configured
- Add English translations for new settings
2026-01-23 08:34:18 -05:00

120 lines
No EOL
5.3 KiB
JavaScript

// English UI Translations
export const en = {
// Main buttons
readPage: "📖 Read Page",
ttsAnything: "🔊 TTS Anything",
translate: "🌐 Translate",
smartTranslate: "🤖 Smart Translate",
uploadFile: "📁 Upload File",
// Actions
refreshModels: "🔄 Refresh Models",
clearChat: "🗑️ Clear Chat",
fullChatRaw: "📋 Full Chat Raw",
fullChatHTML: "📄 Full Chat HTML",
fullPageRaw: "📝 Full Page Raw",
downloadChat: "💾 Download Chat",
// Chat UI
sendButton: "Send",
typePlaceholder: "Type your message...",
askPagePlaceholder: "Ask about this page...",
askAnythingPlaceholder: "Ask anything...",
enterTextToSpeakPlaceholder: "Enter text to speak...",
clearChatConfirm: "Clear all conversation history?",
// Modal headers
aiAssistantTitle: "AI Assistant",
ttsModalTitle: "Text-to-Speech",
translateModalTitle: "Translate",
// System messages
pageContentPrefix: "Here's the content of the webpage:",
additionalContext:
"You are embedded on this page. When answering questions, consider the page content and context.",
// Notifications and alerts
languageChanged:
"Language set to {lang}. Refresh the page to see all interface elements in your preferred language.",
translationFailed: "Translation failed: {error}",
ttsFailed: "TTS failed: {error}",
fullChatCopied: "Full chat copied as raw markdown!",
fullChatHTMLCopied: "Full chat copied as HTML!",
fullPageCopied: "Full page copied as markdown!",
failedToCopy: "Failed to copy: {error}",
failedToCopyPage: "Failed to copy page: {error}",
failedToCopyCode: "Failed to copy code: {error}",
errorOpeningModal: "Error opening AI modal: {error}",
failedToReadPage: "Failed to read page: {error}",
languageDetectionFailed: "Language detection failed: {error}",
// Dropdown labels
currentPage: "Current page: {lang}",
translatingTo: "Translating...",
detectingLanguage: "🔍 Detecting...",
// Intro/header text
hermesIntro:
'presents nous research\'s <a href="https://nousresearch.com/hermes3/" target="_blank" style="color: rgba(255,255,255,0.9); text-decoration: underline;">hermes</a> large language model',
discussingPage: "You are discussing",
// TTS placeholder
ttsPlaceholder:
"text-to-speech: write any message & have the artificial intelligence speak it!",
translatePlaceholder: "Enter any text to translate...",
// Read page status messages
processingContent: "Processing content...",
readingPageClickToPause: "Reading page... Click to pause",
pausedClickToResume: "Paused. Click to resume",
downloadPageAudio: "Download the text to speech .mp3 file for this page.",
downloadChatAudio: "Download this message as an .mp3 file.",
deleteMessage: "Delete message",
copyRawMarkdown: "Copy raw (Markdown)",
copyHTML: "Copy HTML",
// Translation modal tabs
translatePageTab: "📄 Translate Page",
customTextTab: "✏️ Custom Text",
remoteUrlTab: "🌐 Remote URL",
// TTS modal components
speedLabel: "Speed:",
playText: "Play Text",
// Translation modal content
translatePageInfo: "Translate the current page content into your chosen language:",
translateToLabel: "Translate to:",
translateButton: "🌐 Translate",
translatePageButton: "🌐 Translate Page",
translateTextButton: "🌐 Translate Text",
remoteUrlInfo: "Enter a URL to fetch and translate:",
remoteUrlPlaceholder: "https://example.com",
fetchAndTranslate: "🌐 Fetch & Translate",
processingText: "Processing...",
processingTokens: "🤖 Processing {tokens} tokens...",
// Button labels for UI
translationModal: "🌐 Translation Modal",
translationModalHeading: "Translation Modal",
// System prompt components
systemPromptIntro: "You are Hermes AI, powered by Nous Research, embedded on a webpage via uncloseai.com. Your task is to generate a contextually intelligent 3-paragraph introduction that demonstrates deep understanding of the specific page content, its purpose, and its audience.",
systemPromptTask1: "1. Open naturally by identifying what this page is about - be specific: mention the page title, main topic, author name if present, or key purpose. Show immediate understanding of the content type (article, documentation, product page, etc.)",
systemPromptTask2: "2. Reference 2-3 highly specific details from the page - quote exact phrases, cite specific data points, mention particular sections or features you notice. Demonstrate that you've analyzed the actual content, not just skimmed it.",
systemPromptTask3: "3. Offer contextually relevant assistance based on the page type - for technical docs, offer to explain concepts; for articles, offer to discuss ideas; for products, answer about features. Be specific about HOW you can help with THIS particular content.",
systemPromptInstructions: "Be conversational yet knowledgeable. Ground your introduction in the actual page content. Avoid generic statements. Write naturally in",
// More alerts and messages
pleaseEnterText: "Please enter some text first!",
pleaseSelectFile: "Please select a file first!",
pleaseEnterTranslateText: "Please enter some text to translate!",
aiModalNotAvailable: "AI modal not available in this context",
useCustomAPI: "Use a custom openai compatible endpoint.",
// Unsandbox code execution settings
useUnsandbox: "Use unsandbox.com API keys for code execution.",
unsandboxPublicKey: "Public Key (unsb-pk-...)",
unsandboxSecretKey: "Secret Key (unsb-sk-...)",
};