Skip to content

Commit

Permalink
add translations using i18n for webview (#394)
Browse files Browse the repository at this point in the history
* add i18n and translations throughout the webview

* 3.19.3
  • Loading branch information
rjmacarthy authored Nov 14, 2024
1 parent eec6001 commit 543008c
Show file tree
Hide file tree
Showing 18 changed files with 423 additions and 119 deletions.
120 changes: 118 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "twinny",
"displayName": "twinny - AI Code Completion and Chat",
"description": "Locally hosted AI code completion plugin for vscode",
"version": "3.19.2",
"version": "3.19.3",
"icon": "assets/icon.png",
"keywords": [
"code-inference",
Expand Down Expand Up @@ -482,12 +482,15 @@
"handlebars-loader": "^1.7.3",
"hypercore-crypto": "^3.4.2",
"hyperswarm": "^4.7.15",
"i18next": "^23.16.5",
"i18next-http-backend": "^2.6.2",
"ignore": "^6.0.2",
"js-yaml": "^4.1.0",
"node-polyfill-webpack-plugin": "^3.0.0",
"onnxruntime-web": "^1.18.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-i18next": "^15.1.1",
"react-markdown": "^9.0.1",
"react-syntax-highlighter": "^15.5.0",
"rehype-raw": "^7.0.0",
Expand Down
90 changes: 90 additions & 0 deletions src/webview/assets/locales/en.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
{
"accept-solution": "Accept Solution",
"api-key-placeholder": "Enter your API key here",
"api-key": "API Key",
"api-path-placeholder": "Enter a hostname e.g 'localhost'",
"api-path": "API Path",
"applicable-ollama": "Applicable for some providers like Ollama",
"auto-connect-as-provider": "Auto connect as provider",
"automatic": "Automatic",
"cancel-edit": "Cancel edit",
"cancel": "Cancel",
"chat": "Chat",
"clear-conversations": "Clear conversations",
"connect": "Connect",
"connected": "Connected!",
"connecting": "Connecting...",
"connection-failed": "Connection failed! Please check your connection and try again.",
"consumer-connection": "Consumer Connection",
"conversation-history": "Conversation History",
"copy-code": "Copy Code",
"copy-provider": "Copy Provider",
"delete-message": "Delete message",
"delete-provider": "Delete Provider",
"disconnect": "Disconnect",
"edit-default-templates-description": "Edit the default templates used in the twinny extension.",
"edit-default-templates": "Edit default templates",
"edit-message": "Edit message",
"edit-provider": "Edit Provider",
"embed-documents": "Embed documents",
"embedding-provider": "Embedding provider",
"fim-template": "FIM Template",
"fim": "Fill-in-middle",
"hostname-placeholder": "Enter a hostname e.g 'localhost'",
"hostname": "Hostname",
"label-placeholder": "Enter a label for your provider.",
"label": "Label",
"loading-available-models": "Loading available models...",
"max-chunk-size": "Max chunk size",
"min-chunk-size": "Min chunk size",
"model-name-placeholder": "Enter a model name e.g 'llama3'",
"model-name": "Model Name",
"new-conversation": "New Conversation",
"new-document": "New Document",
"no-connections-found": "No connections found. Please add a new connection to get started.",
"no-result": "No result",
"nothing-to-see-here": "Nothing to see here.",
"number-code-filepaths": "The number of file paths to be used as context.",
"number-code-snippets": "The number of code snippets to be used as context.",
"open-diff": "Open Diff",
"open-template-editor": "Open template editor",
"overlap-size": "Overlap size",
"owner-repo-name": "This tab will help you review pull requests in your repository, enter the owner and repository name below to get started. For now only GitHub is supported, set your GitHub token in the settings tab to get started.",
"path": "Path",
"placeholder": "How can twinny help you today?",
"port-placeholder": "Enter a port number e.g '11434'",
"port": "Port",
"protocol": "Protocol",
"provider-connection": "Provider Connection",
"provider-name": "Provider Name",
"provider-placeholder": "Enter a provider name",
"provider-type": "Provider Type",
"provider": "Provider",
"providers": "Providers",
"pull-requests": "Pull Requests",
"regenerate-message": "Regenerate message",
"relevant-code-snippets": "Relevant code snippets",
"relevant-file-paths": "Relevant file paths",
"repository-level": "Repository level",
"rerank-probability-threshold": "Rerank probability threshold",
"rerank-threshold-description": "The lower the threshold, the more likely a result is to be included.",
"rerank-threshold": "Rerank threshold",
"reset-providers": "Reset Providers",
"reset-to-default": "Reset to default",
"review-pull-requests": "Review pull requests",
"save-edit": "Save edit",
"save": "Save",
"scroll-down": "Scroll down to the bottom",
"share-gpu-resources": "You can also share your GPU resources by connecting to Symmetry as a provider using your active twinny provider configuration. All connections are peer to peer, encrypted end-to-end and secure.",
"status": "Status",
"stop-generation": "Stop generation",
"symmetry-description": "Symmetry is a peer-to-peer AI inference network that allows secure, direct connections between users. When you connect as a consumer, Symmetry matches you with a provider based on your model selection.",
"symmetry-inference-network": "Symmetry Inference Network",
"template-settings-description": "Select the templates you want to use in the chat interface.",
"template-settings": "Template settings",
"thinking": "Thinking...",
"toggle-auto-scroll": "Toggle auto scroll on/off",
"toggle-embedding-options": "Toggle embedding options on/off",
"toggle-provider-selection": "Toggle provider selection",
"type": "Type"
}
Loading

0 comments on commit 543008c

Please sign in to comment.