Browse Source

fix(docs): translate missing parts (#2724)

- fix incorrect format in sidebar.json
- add custom_sandbox_guide.md to other language folders
Arno.Edwards 1 year ago
parent
commit
c224a6f3f6

+ 41 - 41
docs/i18n/fr/code.json

@@ -3,23 +3,23 @@
     "message": "OpenDevin"
   },
   "footer.docs": {
-    "message": "Docs"
+    "message": "Documents"
   },
   "footer.community": {
-    "message": "Community"
+    "message": "Communauté"
   },
   "footer.copyright": {
-    "message": "Copyright © {year} OpenDevin"
+    "message": "© {year} OpenDevin"
   },
   "faq.title": {
-    "message": "Frequently Asked Questions",
+    "message": "Questions Fréquemment Posées",
     "description": "FAQ Title"
   },
   "faq.description": {
-    "message": "Frequently Asked Questions"
+    "message": "Questions Fréquemment Posées"
   },
   "faq.section.title.1": {
-    "message": "What is OpenDevin?",
+    "message": "Qu'est-ce qu'OpenDevin ?",
     "description": "First Section Title"
   },
   "faq.section.highlight": {
@@ -27,11 +27,11 @@
     "description": "Highlight Text"
   },
   "faq.section.description.1": {
-    "message": "is an autonomous software engineer that can solve software engineering and web-browsing tasks end-to-end. It can perform data science queries, such as \"Find the number of pull requests to the OpenDevin repository in the last month,\" and software engineering tasks, such as \"Please add tests to this file and verify that all the tests pass. If they don't fix the file.\"",
+    "message": "est un ingénieur logiciel autonome qui peut résoudre des tâches d'ingénierie logicielle et de navigation web à tout moment. Il peut exécuter des requêtes en sciences des données, telles que \"Trouver le nombre de demandes de pull à l'repository OpenDevin dans les derniers mois\", et des tâches d'ingénierie logicielle, comme \"Veuillez ajouter des tests à ce fichier et vérifier si tous les tests passent. Si ce n'est pas le cas, réparez le fichier.\"",
     "description": "Description for OpenDevin"
   },
   "faq.section.description.2": {
-    "message": "At the same time, OpenDevin is a platform and community for agent developers to test out and evaluate new agents.",
+    "message": "De plus, OpenDevin est une plateforme et communauté pour les développeurs d'agents qui souhaitent tester et évaluer de nouveaux agents.",
     "description": "Further Description for OpenDevin"
   },
   "faq.section.title.2": {
@@ -39,51 +39,51 @@
     "description": "Support Section Title"
   },
   "faq.section.support.answer": {
-    "message": "Please file a bug on {githubLink} if you notice a problem that likely affects others. If you're having trouble installing, or have general questions, reach out on {discordLink} or {slackLink}.",
+    "message": "Si vous rencontrez un problème que d'autres utilisateurs peuvent également avoir, merci de le signaler sur {githubLink}. Si vous avez des difficultés à l'installation ou des questions générales, rejoignez-vous sur {discordLink} ou {slackLink}.",
     "description": "Support Answer"
   },
   "faq.section.title.3": {
-    "message": "How to fix a GitHub issue with OpenDevin?",
+    "message": "Comment résoudre un problème sur GitHub avec OpenDevin ?",
     "description": "GitHub Issue Section Title"
   },
   "faq.section.github.steps.intro": {
-    "message": "To fix an issue on GitHub using OpenDevin, send a prompt to OpenDevin asking it to follow steps like the following:",
+    "message": "Pour résoudre un problème sur GitHub en utilisant OpenDevin, envoyez une commande à OpenDevin demandant qu'il suit des étapes comme les suivantes :",
     "description": "GitHub Steps Introduction"
   },
   "faq.section.github.step1": {
-    "message": "Read the issue https://github.com/OpenDevin/OpenDevin/issues/1611",
+    "message": "Lisez l'issue https://github.com/OpenDevin/OpenDevin/issues/1611",
     "description": "GitHub Step 1"
   },
   "faq.section.github.step2": {
-    "message": "Clone the repository and check out a new branch",
+    "message": "Cloner le dépôt et vérifier une nouvelle branche",
     "description": "GitHub Step 2"
   },
   "faq.section.github.step3": {
-    "message": "Based on the instructions in the issue description, modify files to fix the issue",
+    "message": "Sur la base des instructions dans la description de l'issue, modifiez les fichiers pour résoudre le problème",
     "description": "GitHub Step 3"
   },
   "faq.section.github.step4": {
-    "message": "Push the resulting output to GitHub using the GITHUB_TOKEN environment variable",
+    "message": "Pousser le résultat à GitHub en utilisant la variable d'environnement GITHUB_TOKEN",
     "description": "GitHub Step 4"
   },
   "faq.section.github.step5": {
-    "message": "Tell me the link that I need to go to to send a pull request",
+    "message": "Dites-moi le lien que je dois utiliser pour envoyer une demande de pull",
     "description": "GitHub Step 5"
   },
   "faq.section.github.steps.preRun": {
-    "message": "Before you run OpenDevin, you can do:",
+    "message": "Avant de lancer OpenDevin, vous pouvez faire :",
     "description": "GitHub Steps Pre-Run"
   },
   "faq.section.github.steps.tokenInfo": {
-    "message": "where XXX is a GitHub token that you created that has permissions to push to the OpenDevin repo. If you don’t have write permission to the OpenDevin repo, you might need to change that to:",
+    "message": "où XXX est un jeton GitHub que vous avez créé et qui a les autorisations pour pousser dans le dépôt OpenDevin. Si vous n'avez pas d'autorisations de modification du dépôt OpenDevin, vous devrez peut-être changer cela en :",
     "description": "GitHub Steps Token Info"
   },
   "faq.section.github.steps.usernameInfo": {
-    "message": "where USERNAME is your GitHub username.",
+    "message": "où USERNAME est votre nom GitHub.",
     "description": "GitHub Steps Username Info"
   },
   "faq.section.title.4": {
-    "message": "How is OpenDevin different from Devin?",
+    "message": "Comment OpenDevin est-il différent de Devin ?",
     "description": "Devin Section Title"
   },
   "faq.section.devin.linkText": {
@@ -91,49 +91,49 @@
     "description": "Devin Link Text"
   },
   "faq.section.devin.description": {
-    "message": "is a commercial product by Cognition Inc., that served as the initial inspiration for OpenDevin. They both aim to do a good job at solving software engineering tasks, but OpenDevin you can download, use, and modify, while Devin you can only use through the Cognition site. In addition, OpenDevin has evolved beyond the initial inspiration, and now serves as a community-driven ecosystem for agent development in general, and we'd love to have you join and",
+    "message": "est un produit commercial par Cognition Inc., qui a servi d'inspiration initiale pour OpenDevin. Les deux visent à bien faire le travail d'ingénierie logicielle, mais vous pouvez télécharger, utiliser et modifier OpenDevin, tandis que Devin peut être utilisé uniquement via le site de Cognition. De plus, OpenDevin a évolué au-delà de l'inspiration initiale, et est maintenant un écosystème communautaire pour le développement d'agents en général, et nous serions ravis de vous voir rejoindre et",
     "description": "Devin Description"
   },
   "faq.section.devin.contribute": {
-    "message": "contribute",
+    "message": "contribuer",
     "description": "Contribute Link"
   },
   "faq.section.title.5": {
-    "message": "How is OpenDevin different from ChatGPT?",
+    "message": "Comment OpenDevin est-il différent de ChatGPT ?",
     "description": "ChatGPT Section Title"
   },
   "faq.section.chatgpt.description": {
-    "message": "ChatGPT you can access online, it does not interface with local files, and its ability to execute code is limited. So it can write code, but it is not easy to test or execute it.",
+    "message": "ChatGPT vous pouvez accéder en ligne, il ne se connecte pas aux fichiers locaux et ses capacités d'exécution du code sont limitées. Alors qu'il peut écrire du code, mais c'est difficile à tester ou à exécuter.",
     "description": "ChatGPT Description"
   },
   "homepage.description": {
-    "message": "AI-powered code generation for software engineering.",
+    "message": "Génération d'code AI pour l'ingénierie logicielle.",
     "description": "The homepage description"
   },
   "homepage.getStarted": {
-    "message": "Get Started"
+    "message": "Commencer"
   },
   "welcome.message": {
-    "message": "Welcome to OpenDevin, an open-source autonomous AI software engineer that is capable of executing complex engineering tasks and collaborating actively with users on software development projects."
+    "message": "Bienvenue à OpenDevin, un système d'IA autonome ingénieur logiciel capable d'exécuter des tâches d'ingénierie complexes et de collaborer activement avec les utilisateurs sur les projets de développement logiciel."
   },
   "theme.ErrorPageContent.title": {
     "message": "Cette page a planté.",
     "description": "The title of the fallback page when the page crashed"
   },
   "theme.BackToTopButton.buttonAriaLabel": {
-    "message": "Retour au début de la page",
+    "message": "Retourner en haut de la page",
     "description": "The ARIA label for the back to top button"
   },
   "theme.blog.archive.title": {
-    "message": "Archive",
+    "message": "Archives",
     "description": "The page & hero title of the blog archive page"
   },
   "theme.blog.archive.description": {
-    "message": "Archive",
+    "message": "Archives",
     "description": "The page & hero description of the blog archive page"
   },
   "theme.blog.paginator.navAriaLabel": {
-    "message": "Pagination de la liste des articles du blog",
+    "message": "Pagination des listes d'articles du blog",
     "description": "The ARIA label for the blog pagination"
   },
   "theme.blog.paginator.newerEntries": {
@@ -161,7 +161,7 @@
     "description": "Pluralized label for \"{count} posts\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)"
   },
   "theme.blog.tagTitle": {
-    "message": "{nPosts} tags avec « {tagName} »",
+    "message": "{nPosts} tags avec « {tagName} »",
     "description": "The title of the page for a blog tag"
   },
   "theme.tags.tagsPageLink": {
@@ -181,7 +181,7 @@
     "description": "The name for the light color mode"
   },
   "theme.docs.breadcrumbs.navAriaLabel": {
-    "message": "Fil d'Ariane",
+    "message": "Bouton de navigation des liens de la page",
     "description": "The ARIA label for the breadcrumbs"
   },
   "theme.docs.DocCard.categoryDescription.plurals": {
@@ -260,7 +260,7 @@
     "description": "The label alongside a tag list"
   },
   "theme.admonition.caution": {
-    "message": "attention",
+    "message": "prudence",
     "description": "The default label used for the Caution admonition (:::caution)"
   },
   "theme.admonition.danger": {
@@ -268,7 +268,7 @@
     "description": "The default label used for the Danger admonition (:::danger)"
   },
   "theme.admonition.info": {
-    "message": "info",
+    "message": "information",
     "description": "The default label used for the Info admonition (:::info)"
   },
   "theme.admonition.note": {
@@ -280,7 +280,7 @@
     "description": "The default label used for the Tip admonition (:::tip)"
   },
   "theme.admonition.warning": {
-    "message": "attention",
+    "message": "prudence",
     "description": "The default label used for the Warning admonition (:::warning)"
   },
   "theme.AnnouncementBar.closeButtonAriaLabel": {
@@ -288,7 +288,7 @@
     "description": "The ARIA label for close button of announcement bar"
   },
   "theme.blog.sidebar.navAriaLabel": {
-    "message": "Navigation article de blog récent",
+    "message": "Navigation vers les articles récents du blog",
     "description": "The ARIA label for recent posts in the blog sidebar"
   },
   "theme.CodeBlock.copied": {
@@ -356,11 +356,11 @@
     "description": "The title attribute for collapse button of doc sidebar"
   },
   "theme.docs.sidebar.collapseButtonAriaLabel": {
-    "message": "Réduire le menu latéral",
+    "message": "Réduire le menu latérale",
     "description": "The title attribute for collapse button of doc sidebar"
   },
   "theme.docs.sidebar.navAriaLabel": {
-    "message": "Docs sidebar",
+    "message": "Barre de navigation latérale des docs",
     "description": "The ARIA label for the sidebar navigation"
   },
   "theme.docs.sidebar.closeSidebarButtonAriaLabel": {
@@ -380,7 +380,7 @@
     "description": "The ARIA label and title attribute for expand button of doc sidebar"
   },
   "theme.docs.sidebar.expandButtonAriaLabel": {
-    "message": "Déplier le menu latéral",
+    "message": "Déployer le menu latérale",
     "description": "The ARIA label and title attribute for expand button of doc sidebar"
   },
   "theme.ErrorPageContent.tryAgain": {
@@ -388,7 +388,7 @@
     "description": "The label of the button to try again rendering when the React error boundary captures an error"
   },
   "theme.common.skipToMainContent": {
-    "message": "Aller au contenu principal",
+    "message": "Aller directement au contenu principal",
     "description": "The skip to content label used for accessibility, allowing to rapidly navigate to main content with keyboard tab/enter navigation"
   },
   "theme.tags.tagsPageTitle": {

+ 0 - 2
docs/i18n/fr/docusaurus-plugin-content-docs/current/python/sidebar.json

@@ -1,7 +1,5 @@
-```json
 {
   "items": ["python/python"],
   "label": "Backend",
   "type": "categorie"
 }
-```

+ 107 - 0
docs/i18n/fr/docusaurus-plugin-content-docs/current/usage/custom_sandbox_guide.md

@@ -0,0 +1,107 @@
+# 💿 Comment Créer un Soutien Docker sur Mesure
+
+Le sandbox par défaut OpenDevin est équipé d'une configuration ubuntu minimaliste. Votre cas d'utilisation pourrait nécessiter des logiciels installés par défaut. Cet article vous enseignera comment réaliser cela en utilisant une image docker personnalisée.
+
+## Configuration
+
+Assurez-vous de pouvoir utiliser OpenDevin en suivant la documentation [Development.md](https://github.com/OpenDevin/OpenDevin/blob/main/Development.md).
+
+## Créer Votre Image Docker
+
+Ensuite, vous devez créer votre image docker personnalisée qui doit être basée sur debian/ubuntu. Par exemple, si nous souhaitons que OpenDevin ait accès au "node" binaire, nous utiliserions ce Dockerfile:
+
+```bash
+# Commencez avec l'image ubuntu la plus récente
+FROM ubuntu:latest
+
+# Effectuez les mises à jour nécessaires
+RUN apt-get update && apt-get install
+
+# Installez nodejs
+RUN apt-get install -y nodejs
+```
+
+Ensuite, construisez votre image docker avec le nom de votre choix. Par exemple "image_personnalisée". Pour cela, créez un répertoire et placez le fichier à l'intérieur avec le nom "Dockerfile", puis dans le répertoire exécutez cette commande:
+
+```bash
+docker build -t image_personnalisée .
+```
+
+Cela produira une nouvelle image appelée ```image_personnalisée``` qui sera disponible dans Docker Engine.
+
+> Remarque: Dans la configuration décrite ici, OpenDevin va fonctionner en tant que utilisateur "opendevin" à l'intérieur du sandbox et donc tous les packages installés via le Dockerfile seront disponibles pour tous les utilisateurs sur le système, pas seulement root.
+>
+> L'installation avec apt-get ci-dessus installe nodejs pour tous les utilisateurs.
+
+## Spécifiez votre image personnalisée dans le fichier config.toml
+
+La configuration OpenDevin se fait via le fichier de niveau supérieur ```config.toml``` .
+Créez un fichier ```config.toml``` dans le répertoire OpenDevin et entrez ces contenus:
+
+```toml
+[core]
+workspace_base="./workspace"
+persist_sandbox=false
+run_as_devin=true
+sandbox_container_image="image_personnalisée"
+```
+
+> Assurez-vous que ```sandbox_container_image``` est défini sur le nom de votre image personnalisée précédente.
+
+## Exécution
+
+Exécutez OpenDevin en exécutant ```make run``` dans le répertoire racine.
+
+Naviguez vers ```localhost:3001``` et vérifiez si vos dépendances souhaitées sont disponibles.
+
+Dans le cas de l'exemple ci-dessus, la commande ```node -v``` dans la console produit ```v18.19.1```
+
+Félicitations !
+
+## Explication technique
+
+Le code pertinent est défini dans [ssh_box.py](https://github.com/OpenDevin/OpenDevin/blob/main/opendevin/runtime/docker/ssh_box.py) et [image_agnostic_util.py](https://github.com/OpenDevin/OpenDevin/blob/main/opendevin/runtime/docker/image_agnostic_util.py).
+
+En particulier, ssh_box.py vérifie l'objet config pour ```config.sandbox_container_image``` et ensuite tente de récupérer l'image à l'aide de [get_od_sandbox_image](https://github.com/OpenDevin/OpenDevin/blob/main/opendevin/runtime/docker/image_agnostic_util.py#L72), qui est défini dans image_agnostic_util.py.
+
+Lorsqu'une image personnalisée est utilisée pour la première fois, elle ne sera pas trouvée et donc elle sera construite (à l'exécution ultérieure, l'image construite sera trouvée et renvoyée).
+
+L'image personnalisée est construite avec [_build_sandbox_image()](https://github.com/OpenDevin/OpenDevin/blob/main/opendevin/runtime/docker/image_agnostic_util.py#L29), qui crée un fichier docker en utilisant votre image personnalisée comme base et configure ensuite l'environnement pour OpenDevin, comme ceci:
+
+```python
+dockerfile_content = (
+        f'FROM {base_image}\n'
+        'RUN apt update && apt install -y openssh-server wget sudo\n'
+        'RUN mkdir -p -m0755 /var/run/sshd\n'
+        'RUN mkdir -p /opendevin && mkdir -p /opendevin/logs && chmod 777 /opendevin/logs\n'
+        'RUN wget "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh"\n'
+        'RUN bash Miniforge3-$(uname)-$(uname -m).sh -b -p /opendevin/miniforge3\n'
+        'RUN bash -c ". /opendevin/miniforge3/etc/profile.d/conda.sh && conda config --set changeps1 False && conda config --append channels conda-forge"\n'
+        'RUN echo "export PATH=/opendevin/miniforge3/bin:$PATH" >> ~/.bashrc\n'
+        'RUN echo "export PATH=/opendevin/miniforge3/bin:$PATH" >> /opendevin/bash.bashrc\n'
+    ).strip()
+```
+
+> Remarque: Le nom de l'image est modifié via [_get_new_image_name()](https://github.com/OpenDevin/OpenDevin/blob/main/opendevin/runtime/docker/image_agnostic_util.py#L63) et c'est ce nom modifié qui sera recherché lors des exécutions ultérieures.
+
+## Dépannage / Erreurs
+
+### Erreur: ```useradd: UID 1000 est non unique```
+Si vous voyez cette erreur dans la sortie de la console, il s'agit du fait que OpenDevin essaie de créer le utilisateur opendevin dans le sandbox avec un ID d'utilisateur de 1000, cependant cet ID d'utilisateur est déjà utilisé dans l'image (pour une raison inconnue). Pour résoudre ce problème, changez la valeur du champ sandbox_user_id dans le fichier config.toml en une valeur différente:
+
+```toml
+[core]
+workspace_base="./workspace"
+persist_sandbox=false
+run_as_devin=true
+sandbox_container_image="image_personnalisée"
+sandbox_user_id="1001"
+```
+
+### Erreurs de port d'utilisation
+
+Si vous voyez un message d'erreur indiquant que le port est utilisé ou indisponible, essayez de supprimer toutes les containers docker en cours d'exécution (exécutez `docker ps` et `docker rm` des containers concernés) puis ré-exécutez ```make run```
+
+## Discuter
+
+Pour d'autres problèmes ou questions rejoignez le [Slack](https://join.slack.com/t/opendevin/shared_invite/zt-2jsrl32uf-fTeeFjNyNYxqSZt5NPY3fA) ou le [Discord](https://discord.gg/ESHStjSjD4) et demandez!

+ 30 - 30
docs/i18n/zh-Hans/code.json

@@ -3,23 +3,23 @@
     "message": "OpenDevin"
   },
   "footer.docs": {
-    "message": "Docs"
+    "message": "文档"
   },
   "footer.community": {
-    "message": "Community"
+    "message": "社区"
   },
   "footer.copyright": {
-    "message": "Copyright © {year} OpenDevin"
+    "message": "版权所有 © {year} OpenDevin"
   },
   "faq.title": {
-    "message": "Frequently Asked Questions",
+    "message": "常见问题解答",
     "description": "FAQ Title"
   },
   "faq.description": {
-    "message": "Frequently Asked Questions"
+    "message": "常见问题解答"
   },
   "faq.section.title.1": {
-    "message": "What is OpenDevin?",
+    "message": "什么是OpenDevin?",
     "description": "First Section Title"
   },
   "faq.section.highlight": {
@@ -27,63 +27,63 @@
     "description": "Highlight Text"
   },
   "faq.section.description.1": {
-    "message": "is an autonomous software engineer that can solve software engineering and web-browsing tasks end-to-end. It can perform data science queries, such as \"Find the number of pull requests to the OpenDevin repository in the last month,\" and software engineering tasks, such as \"Please add tests to this file and verify that all the tests pass. If they don't fix the file.\"",
+    "message": "是一个自主的软件工程师,能够端到端地解决软件工程和网页浏览任务。它能执行数据科学查询,如 \"查找上个月OpenDevin仓库中的拉取请求数量\",还能处理软件工程任务,例如 \"请为这个文件添加测试并验证所有测试都通过,如果没有修复该文件\"。",
     "description": "Description for OpenDevin"
   },
   "faq.section.description.2": {
-    "message": "At the same time, OpenDevin is a platform and community for agent developers to test out and evaluate new agents.",
+    "message": "同时,OpenDevin是一个代理开发者平台和社区,用于测试和评估新代理的环境。",
     "description": "Further Description for OpenDevin"
   },
   "faq.section.title.2": {
-    "message": "Support",
+    "message": "支持",
     "description": "Support Section Title"
   },
   "faq.section.support.answer": {
-    "message": "Please file a bug on {githubLink} if you notice a problem that likely affects others. If you're having trouble installing, or have general questions, reach out on {discordLink} or {slackLink}.",
+    "message": "如果您发现了可能影响他人的问题,请在 {githubLink} 上提交一个 bug。如果遇到安装困难或有其他疑问,可以访问 {discordLink} 或 {slackLink} 进行提问。",
     "description": "Support Answer"
   },
   "faq.section.title.3": {
-    "message": "How to fix a GitHub issue with OpenDevin?",
+    "message": "如何使用OpenDevin解决GitHub上的问题?",
     "description": "GitHub Issue Section Title"
   },
   "faq.section.github.steps.intro": {
-    "message": "To fix an issue on GitHub using OpenDevin, send a prompt to OpenDevin asking it to follow steps like the following:",
+    "message": "要通过OpenDevin解决GitHub上的问题,您可以发送一个提示给OpenDevin,请它按照以下步骤操作:",
     "description": "GitHub Steps Introduction"
   },
   "faq.section.github.step1": {
-    "message": "Read the issue https://github.com/OpenDevin/OpenDevin/issues/1611",
+    "message": "阅读问题 https://github.com/OpenDevin/OpenDevin/issues/1611",
     "description": "GitHub Step 1"
   },
   "faq.section.github.step2": {
-    "message": "Clone the repository and check out a new branch",
+    "message": "克隆仓库并创建新分支",
     "description": "GitHub Step 2"
   },
   "faq.section.github.step3": {
-    "message": "Based on the instructions in the issue description, modify files to fix the issue",
+    "message": "根据问题描述中的说明,修改文件以解决问题",
     "description": "GitHub Step 3"
   },
   "faq.section.github.step4": {
-    "message": "Push the resulting output to GitHub using the GITHUB_TOKEN environment variable",
+    "message": "使用GITHUB_TOKEN环境变量将结果推送到GitHub",
     "description": "GitHub Step 4"
   },
   "faq.section.github.step5": {
-    "message": "Tell me the link that I need to go to to send a pull request",
+    "message": "告诉我需要前往的链接来提交拉取请求",
     "description": "GitHub Step 5"
   },
   "faq.section.github.steps.preRun": {
-    "message": "Before you run OpenDevin, you can do:",
+    "message": "在运行OpenDevin之前,您可以:",
     "description": "GitHub Steps Pre-Run"
   },
   "faq.section.github.steps.tokenInfo": {
-    "message": "where XXX is a GitHub token that you created that has permissions to push to the OpenDevin repo. If you don’t have write permission to the OpenDevin repo, you might need to change that to:",
+    "message": "其中XXX是您创建的一个具有对OpenDevin仓库写权限的GitHub令牌。如果您的写入权限不足,请将其更改为:",
     "description": "GitHub Steps Token Info"
   },
   "faq.section.github.steps.usernameInfo": {
-    "message": "where USERNAME is your GitHub username.",
+    "message": "其中USERNAME是您的GitHub用户名。",
     "description": "GitHub Steps Username Info"
   },
   "faq.section.title.4": {
-    "message": "How is OpenDevin different from Devin?",
+    "message": "OpenDevin与Devin有何不同?",
     "description": "Devin Section Title"
   },
   "faq.section.devin.linkText": {
@@ -91,37 +91,37 @@
     "description": "Devin Link Text"
   },
   "faq.section.devin.description": {
-    "message": "is a commercial product by Cognition Inc., that served as the initial inspiration for OpenDevin. They both aim to do a good job at solving software engineering tasks, but OpenDevin you can download, use, and modify, while Devin you can only use through the Cognition site. In addition, OpenDevin has evolved beyond the initial inspiration, and now serves as a community-driven ecosystem for agent development in general, and we'd love to have you join and",
+    "message": "是由Cognition Inc.开发的商业产品,它最初为OpenDevin提供了灵感。它们都旨在擅长解决软件工程任务,但您可以下载、使用和修改OpenDevin,而Devin只能通过Cognition网站进行访问。此外,OpenDevin已超越最初的灵感,并成为一个面向代理开发者的社区驱动生态系统,在这里我们欢迎您加入并",
     "description": "Devin Description"
   },
   "faq.section.devin.contribute": {
-    "message": "contribute",
+    "message": "贡献",
     "description": "Contribute Link"
   },
   "faq.section.title.5": {
-    "message": "How is OpenDevin different from ChatGPT?",
+    "message": "OpenDevin与ChatGPT有何不同?",
     "description": "ChatGPT Section Title"
   },
   "faq.section.chatgpt.description": {
-    "message": "ChatGPT you can access online, it does not interface with local files, and its ability to execute code is limited. So it can write code, but it is not easy to test or execute it.",
+    "message": "您可以通过网络访问ChatGPT,它不与本地文件交互,并且其执行代码的能力有限。因此,它可以编写代码,但测试或执行起来可能不太容易。",
     "description": "ChatGPT Description"
   },
   "homepage.description": {
-    "message": "AI-powered code generation for software engineering.",
+    "message": "使用AI生成代码的软件工程工具。",
     "description": "The homepage description"
   },
   "homepage.getStarted": {
-    "message": "Get Started"
+    "message": "开始使用"
   },
   "welcome.message": {
-    "message": "Welcome to OpenDevin, an open-source autonomous AI software engineer that is capable of executing complex engineering tasks and collaborating actively with users on software development projects."
+    "message": "欢迎来到OpenDevin,这是一个开源自主AI软件工程师,能够执行复杂的工程任务,并积极参与用户在软件开发项目中的协作。"
   },
   "theme.ErrorPageContent.title": {
     "message": "页面已崩溃。",
     "description": "The title of the fallback page when the page crashed"
   },
   "theme.BackToTopButton.buttonAriaLabel": {
-    "message": "回顶部",
+    "message": "回顶部",
     "description": "The ARIA label for the back to top button"
   },
   "theme.blog.archive.title": {
@@ -296,7 +296,7 @@
     "description": "The copied button label on code blocks"
   },
   "theme.CodeBlock.copyButtonAriaLabel": {
-    "message": "复制代码到剪贴板",
+    "message": "将代码复制到剪贴板",
     "description": "The ARIA label for copy code blocks button"
   },
   "theme.CodeBlock.copy": {

+ 107 - 0
docs/i18n/zh-Hans/docusaurus-plugin-content-docs/current/usage/custom_sandbox_guide.md

@@ -0,0 +1,107 @@
+# 💿 如何创建自定义 Docker 沙箱
+
+默认的 OpenDevin 沙箱包含一个[最小化 ubuntu 配置](https://github.com/OpenDevin/OpenDevin/blob/main/containers/sandbox/Dockerfile)。您的应用场景可能需要在默认状态下安装额外的软件。本指南将教您如何通过使用自定义 Docker 映像来实现这一目标。
+
+## 环境设置
+
+确保您能够首先通过 [Development.md](https://github.com/OpenDevin/OpenDevin/blob/main/Development.md) 运行 OpenDevin。
+
+## 创建您的 Docker 映像
+
+接下来,您必须创建一个自定义的 Docker 映像,该映像是基于 Debian 或 Ubuntu 的。例如,如果我们希望 OpenDevin 能够访问 "node" 可执行文件,我们可以使用以下 `Dockerfile`:
+
+```bash
+# 从最新版 ubuntu 开始
+FROM ubuntu:latest
+
+# 运行必要的更新
+RUN apt-get update && apt-get install
+
+# 安装 node
+RUN apt-get install -y nodejs
+```
+
+然后构建您选择的映像,例如“custom_image”。为此可以在目录中创建文件夹并将 `Dockerfile` 放入其中,并在该目录内运行以下命令:
+
+```bash
+docker build -t custom_image .
+```
+
+这将生成一个名为 ```custom_image``` 的新映像,并使其可用于 Docker 服务引擎。
+
+> 注意:在本文档描述的配置中,OpenDevin 将在沙箱内部以“opendevin”用户身份运行。因此,通过 Dockerfile 安装的所有包应可供系统上的所有用户使用,而不仅仅是 root 用户。
+
+> 使用 `apt-get` 上面安装的 node 是为所有用户安装的。
+
+## 在 config.toml 文件中指定自定义映像
+
+在 OpenDevin 的配置通过顶层的 `config.toml` 文件发生。在 OpenDevin 目录下创建一个 ```config.toml``` 文件,并输入以下内容:
+
+```
+[core]
+workspace_base="./workspace"
+persist_sandbox=false
+run_as_devin=true
+sandbox_container_image="custom_image"
+```
+
+> 确保 `sandbox_container_image` 设置为您前一步中自定义映像的名称。
+
+## 运行
+
+通过运行 ```make run``` 在顶层目录下运行 OpenDevin。
+
+导航至 ```localhost:3001``` 并检查所需依赖是否可用。
+
+在上述示例的情况下,终端中运行 `node -v` 会输出 `v18.19.1`。
+
+恭喜您!
+
+## 技术解释
+
+相关代码定义在 [ssh_box.py](https://github.com/OpenDevin/OpenDevin/blob/main/opendevin/runtime/docker/ssh_box.py) 和 [image_agnostic_util.py](https://github.com/OpenDevin/OpenDevin/blob/main/opendevin/runtime/docker/image_agnostic_util.py) 中。
+
+特别是 ssh_box.py 检查配置对象中的 ```config.sandbox_container_image```,然后尝试使用 [get_od_sandbox_image](https://github.com/OpenDevin/OpenDevin/blob/main/opendevin/runtime/docker/image_agnostic_util.py#L72),在 image_agnostic_util.py 定义中进行检索。
+
+初次使用自定义映像时,该映像将不会被找到,因此将被构建(在后续运行中已构建的映像将被查找并返回)。
+
+自定义映像是通过 `_build_sandbox_image()` 构建的,在 [image_agnostic_util.py](https://github.com/OpenDevin/OpenDevin/blob/main/opendevin/runtime/docker/image_agnostic_util.py#L29) 中,使用您的 custom_image 作为基础,并为 OpenDevin 配置环境。例如:
+
+```python
+dockerfile_content = (
+        f'FROM {base_image}\n'
+        'RUN apt update && apt install -y openssh-server wget sudo\n'
+        'RUN mkdir -p -m0755 /var/run/sshd\n'
+        'RUN mkdir -p /opendevin && mkdir -p /opendevin/logs && chmod 777 /opendevin/logs\n'
+        'RUN wget "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh"\n'
+        'RUN bash Miniforge3-$(uname)-$(uname -m).sh -b -p /opendevin/miniforge3\n'
+        'RUN bash -c ". /opendevin/miniforge3/etc/profile.d/conda.sh && conda config --set changeps1 False && conda config --append channels conda-forge"\n'
+        'RUN echo "export PATH=/opendevin/miniforge3/bin:$PATH" >> ~/.bashrc\n'
+        'RUN echo "export PATH=/opendevin/miniforge3/bin:$PATH" >> /opendevin/bash.bashrc\n'
+    ).strip()
+```
+
+> 注意:映像名称通过 [_get_new_image_name()](https://github.com/OpenDevin/OpenDevin/blob/main/opendevin/runtime/docker/image_agnostic_util.py#L63) 修改,并且是后续运行中搜索的修改后的名称。
+
+## 故障排除 / 错误
+
+### 错误:```useradd: UID 1000 is not unique```
+
+如果在控制台输出中看到此错误,说明 OpenDevin 尝试在沙箱中以 UID 1000 创建 opendevin 用户,但该 UID 已经被映像中的其他部分使用(不知何故)。要解决这个问题,请更改 config.toml 文件中的 sandbox_user_id 字段为不同的值:
+
+```
+[core]
+workspace_base="./workspace"
+persist_sandbox=false
+run_as_devin=true
+sandbox_container_image="custom_image"
+sandbox_user_id="1001"
+```
+
+### 端口使用错误
+
+如果您看到关于端口被占用或不可用的错误,请尝试删除所有正在运行的 Docker 容器(通过运行 `docker ps` 和 `docker rm` 相关容器),然后重新运行 ```make run```。
+
+## 讨论
+
+对于其他问题或疑问,请加入 [Slack](https://join.slack.com/t/opendevin/shared_invite/zt-2jsrl32uf-fTeeFjNyNYxqSZt5NPY3fA) 或 [Discord](https://discord.gg/ESHStjSjD4),并提问!

+ 36 - 28
docs/modules/usage/custom_sandbox_guide.md

@@ -1,6 +1,6 @@
-# 💿 How to Create a Custom Docker Sandbox 
+# 💿 How to Create a Custom Docker Sandbox
 
-The default OpenDevin sandbox comes with a [minimal ubuntu configuration](https://github.com/OpenDevin/OpenDevin/blob/main/containers/sandbox/Dockerfile). Your use case may need additional software installed by default. This guide will teach you how to accomplish this by utilizing a custom docker image. 
+The default OpenDevin sandbox comes with a [minimal ubuntu configuration](https://github.com/OpenDevin/OpenDevin/blob/main/containers/sandbox/Dockerfile). Your use case may need additional software installed by default. This guide will teach you how to accomplish this by utilizing a custom docker image.
 
 ## Setup
 
@@ -8,7 +8,8 @@ Make sure you are able to run OpenDevin using the [Development.md](https://githu
 
 ## Create Your Docker Image
 
-Next you must create your custom docker image, which should be debian/ubuntu based. For example if we want want OpenDevin to have access to the "node" binary, we would use the following Dockerfile:  
+Next you must create your custom docker image, which should be debian/ubuntu based. For example if we want want OpenDevin to have access to the "node" binary, we would use the following Dockerfile:
+
 ```bash
 # Start with latest ubuntu image
 FROM ubuntu:latest
@@ -19,21 +20,26 @@ RUN apt-get update && apt-get install
 # Install node
 RUN apt-get install -y nodejs
 ```
-Next build your docker image with the name of your choice, for example "custom_image". To do this you can create a directory and put your file inside it with the name "Dockerfile", and inside the directory run the following command: 
-```docker build -t custom_image .``` 
 
-This will produce a new image called ```custom_image``` that will be available in Docker Engine. 
+Next build your docker image with the name of your choice, for example "custom_image". To do this you can create a directory and put your file inside it with the name "Dockerfile", and inside the directory run the following command:
+
+```bash
+docker build -t custom_image .
+```
+
+This will produce a new image called ```custom_image``` that will be available in Docker Engine.
 
 > Note that in the configuration described in this document, OpenDevin will run as user "opendevin" inside the sandbox and thus all packages installed via the docker file should be available to all users on the system, not just root.
-> 
+>
 > Installing with apt-get above installs node for all users.
 
 
 ## Specify your custom image in config.toml file
 
-OpenDevin configuration occurs via the top level ```config.toml``` file. 
-Create a ```config.toml``` file in the OpenDevin directory and enter these contents: 
-```
+OpenDevin configuration occurs via the top level ```config.toml``` file.
+Create a ```config.toml``` file in the OpenDevin directory and enter these contents:
+
+```toml
 [core]
 workspace_base="./workspace"
 persist_sandbox=false
@@ -42,25 +48,26 @@ sandbox_container_image="custom_image"
 ```
 > Ensure that sandbox_container_image is set to the name of your custom image from the previous step.
 
-## Run  
-Run OpenDevin by running ```make run``` in the top level directory.  
+## Run
+Run OpenDevin by running ```make run``` in the top level directory.
 
-Navigate to ```localhost:3001``` and check if your desired dependencies are available.  
+Navigate to ```localhost:3001``` and check if your desired dependencies are available.
 
-In the case of the example above, running ```node -v``` in the terminal produces ```v18.19.1``` 
+In the case of the example above, running ```node -v``` in the terminal produces ```v18.19.1```
 
-Congratulations! 
+Congratulations!
 
-## Technical Explanation 
+## Technical Explanation
 
-The relevant code is defined in [ssh_box.py](https://github.com/OpenDevin/OpenDevin/blob/main/opendevin/runtime/docker/ssh_box.py) and [image_agnostic_util.py](https://github.com/OpenDevin/OpenDevin/blob/main/opendevin/runtime/docker/image_agnostic_util.py). 
+The relevant code is defined in [ssh_box.py](https://github.com/OpenDevin/OpenDevin/blob/main/opendevin/runtime/docker/ssh_box.py) and [image_agnostic_util.py](https://github.com/OpenDevin/OpenDevin/blob/main/opendevin/runtime/docker/image_agnostic_util.py).
 
-In particular, ssh_box.py checks the config object for ```config.sandbox_container_image``` and then attempts to retrieve the image using [get_od_sandbox_image](https://github.com/OpenDevin/OpenDevin/blob/main/opendevin/runtime/docker/image_agnostic_util.py#L72) which is defined in image_agnostic_util.py. 
+In particular, ssh_box.py checks the config object for ```config.sandbox_container_image``` and then attempts to retrieve the image using [get_od_sandbox_image](https://github.com/OpenDevin/OpenDevin/blob/main/opendevin/runtime/docker/image_agnostic_util.py#L72) which is defined in image_agnostic_util.py.
 
-When first using a custom image, it will not be found and thus it will be built (on subsequent runs the built image will be found and returned). 
+When first using a custom image, it will not be found and thus it will be built (on subsequent runs the built image will be found and returned).
 
-The custom image is built using [_build_sandbox_image()](https://github.com/OpenDevin/OpenDevin/blob/main/opendevin/runtime/docker/image_agnostic_util.py#L29), which creates a docker file using your custom_image as a base and then configures the environment for OpenDevin, like this: 
-```
+The custom image is built using [_build_sandbox_image()](https://github.com/OpenDevin/OpenDevin/blob/main/opendevin/runtime/docker/image_agnostic_util.py#L29), which creates a docker file using your custom_image as a base and then configures the environment for OpenDevin, like this:
+
+```python
 dockerfile_content = (
         f'FROM {base_image}\n'
         'RUN apt update && apt install -y openssh-server wget sudo\n'
@@ -76,11 +83,12 @@ dockerfile_content = (
 
 > Note: the name of the image is modified via [_get_new_image_name()](https://github.com/OpenDevin/OpenDevin/blob/main/opendevin/runtime/docker/image_agnostic_util.py#L63) and it is the modified name that is searched for on subsequent runs.
 
-## Troubleshooting / Errors 
+## Troubleshooting / Errors
 
 ### Error: ```useradd: UID 1000 is not unique```
-If you see this error in the console output it is because OpenDevin is trying to create the opendevin user in the sandbox with a UID of 1000, however this UID is already being used in the image (for some reason). To fix this change the sandbox_user_id field in the config.toml file to a different value: 
-```
+If you see this error in the console output it is because OpenDevin is trying to create the opendevin user in the sandbox with a UID of 1000, however this UID is already being used in the image (for some reason). To fix this change the sandbox_user_id field in the config.toml file to a different value:
+
+```toml
 [core]
 workspace_base="./workspace"
 persist_sandbox=false
@@ -89,10 +97,10 @@ sandbox_container_image="custom_image"
 sandbox_user_id="1001"
 ```
 
-### Port use errors 
+### Port use errors
 
-If you see an error about a port being in use or unavailable, try deleting all running Docker Containers (run `docker ps` and `docker rm` relevant containers) and then re-running ```make run``` 
+If you see an error about a port being in use or unavailable, try deleting all running Docker Containers (run `docker ps` and `docker rm` relevant containers) and then re-running ```make run```
 
-## Discuss 
+## Discuss
 
-For other issues or questions join the [Slack](https://join.slack.com/t/opendevin/shared_invite/zt-2jsrl32uf-fTeeFjNyNYxqSZt5NPY3fA) or [Discord](https://discord.gg/ESHStjSjD4) and ask! 
+For other issues or questions join the [Slack](https://join.slack.com/t/opendevin/shared_invite/zt-2jsrl32uf-fTeeFjNyNYxqSZt5NPY3fA) or [Discord](https://discord.gg/ESHStjSjD4) and ask!