diff --git a/doc/locales/zh_Hans/LC_MESSAGES/framework-docs.po b/doc/locales/zh_Hans/LC_MESSAGES/framework-docs.po index 87af28422d56..4a3330806129 100644 --- a/doc/locales/zh_Hans/LC_MESSAGES/framework-docs.po +++ b/doc/locales/zh_Hans/LC_MESSAGES/framework-docs.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: Flower main\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2023-11-23 18:31+0100\n" -"PO-Revision-Date: 2023-11-25 19:00+0000\n" +"PO-Revision-Date: 2023-11-28 20:03+0000\n" "Last-Translator: Yan Gao \n" "Language-Team: Chinese (Simplified) \n" @@ -17,7 +17,7 @@ msgstr "" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Weblate 5.2.1-rc\n" +"X-Generator: Weblate 5.3-dev\n" "Generated-By: Babel 2.13.1\n" #: ../../source/contributor-explanation-architecture.rst:2 @@ -62,31 +62,32 @@ msgstr "创建新信息" msgid "" "This is a simple guide for creating a new type of message between the " "server and clients in Flower." -msgstr "" +msgstr "这是一个如何用Flower在服务器和客户端之间创建新类型的信息的简要指导。" #: ../../source/contributor-how-create-new-messages.rst:6 msgid "" "Let's suppose we have the following example functions in " ":code:`server.py` and :code:`numpy_client.py`..." -msgstr "" +msgstr "假设我们在脚本code:`server.py`和code:`numpy_client.py`中有以下的示例函数..." #: ../../source/contributor-how-create-new-messages.rst:8 msgid "Server's side:" -msgstr "" +msgstr "在服务器端:" #: ../../source/contributor-how-create-new-messages.rst:17 msgid "Client's side:" -msgstr "" +msgstr "在客户端:" #: ../../source/contributor-how-create-new-messages.rst:26 msgid "" "Let's now see what we need to implement in order to get this simple " "function between the server and client to work!" -msgstr "" +msgstr "现在让我们来看看,为了让服务器和客户端之间的这个简单的函数正常工作,我们需要" +"实现哪些功能!" #: ../../source/contributor-how-create-new-messages.rst:30 msgid "Message Types for Protocol Buffers" -msgstr "" +msgstr "协议缓冲区的信息类型" #: ../../source/contributor-how-create-new-messages.rst:32 msgid "" @@ -96,32 +97,36 @@ msgid "" "proto3, please see the `official documentation " "`_." msgstr "" +"我们需要做的第一件事是在脚本code:`transport.proto`中定义 RPC " +"系统的消息类型。请注意,我们必须对请求信息和响应信息都这样做。有关 proto3 " +"语法的更多详情,请参阅官方文档 `_。" #: ../../source/contributor-how-create-new-messages.rst:35 msgid "Within the :code:`ServerMessage` block:" -msgstr "" +msgstr "在 :code:`ServerMessage` 代码块中:" #: ../../source/contributor-how-create-new-messages.rst:52 msgid "Within the ClientMessage block:" -msgstr "" +msgstr "在 ClientMessage 代码块中:" #: ../../source/contributor-how-create-new-messages.rst:70 msgid "" "Make sure to also add a field of the newly created message type in " ":code:`oneof msg`." -msgstr "" +msgstr "确保在 :code:`oneof msg` 中也添加一个新创建的消息类型字段。" #: ../../source/contributor-how-create-new-messages.rst:72 msgid "Once that is done, we will compile the file with:" -msgstr "" +msgstr "完成后,我们将使用:" #: ../../source/contributor-how-create-new-messages.rst:78 msgid "If it compiles succesfully, you should see the following message:" -msgstr "" +msgstr "如果编译成功,你应该会看到以下信息:" #: ../../source/contributor-how-create-new-messages.rst:87 msgid "Serialization and Deserialization Functions" -msgstr "" +msgstr "序列化和反序列化函数" #: ../../source/contributor-how-create-new-messages.rst:89 msgid "" @@ -129,24 +134,28 @@ msgid "" "datatypes to or from our defined RPC message types. You should add these " "functions in :code:`serde.py`." msgstr "" +"下一步是添加函数,以便将 Python 数据类型序列化和反序列化为我们定义的 RPC " +"消息类型或从我们定义的 RPC 消息类型反序列化和反序列化 Python 数据类型。" +"您应该在 :code:`serde.py` 中添加这些函数。" #: ../../source/contributor-how-create-new-messages.rst:91 msgid "The four functions:" -msgstr "" +msgstr "四种函数:" #: ../../source/contributor-how-create-new-messages.rst:112 msgid "Sending the Message from the Server" -msgstr "" +msgstr "从服务器发送信息" #: ../../source/contributor-how-create-new-messages.rst:114 msgid "" "Now write the request function in your Client Proxy class (e.g., " ":code:`grpc_client_proxy.py`) using the serde functions you just created:" -msgstr "" +msgstr "现在,在客户端代理类(例如 :code:`grpc_client_proxy.py`)中使用刚才创建的 " +"serde 函数编写请求函数:" #: ../../source/contributor-how-create-new-messages.rst:128 msgid "Receiving the Message by the Client" -msgstr "" +msgstr "由客户端接收信息" #: ../../source/contributor-how-create-new-messages.rst:130 msgid "" @@ -154,22 +163,24 @@ msgid "" "field of your message and call the :code:`example_response` function. " "Remember to use the serde functions!" msgstr "" +"最后一步 修改 :code:`message_handler.py` 中的代码,检查信息的字段并调用 " +":code:`example_response` 函数。记住使用 serde 函数!" #: ../../source/contributor-how-create-new-messages.rst:132 msgid "Within the handle function:" -msgstr "" +msgstr "在句柄函数内:" #: ../../source/contributor-how-create-new-messages.rst:139 msgid "And add a new function:" -msgstr "" +msgstr "并增加一个新函数:" #: ../../source/contributor-how-create-new-messages.rst:149 msgid "Hopefully, when you run your program you will get the intended result!" -msgstr "" +msgstr "希望您在运行程序时能得到预期的结果!" #: ../../source/contributor-how-to-contribute-translations.rst:2 msgid "Contribute translations" -msgstr "" +msgstr "贡献译文" #: ../../source/contributor-how-to-contribute-translations.rst:4 msgid "" @@ -182,6 +193,11 @@ msgid "" "also be a great opportunity for those wanting to become open source " "contributors with little prerequistes." msgstr "" +"从 `Flower 1.5 `_ 开始,我们在文档页面中引入了翻译,但正如你可能已经" +"注意到的,这些翻译往往并不完美。如果您会说英语以外的语言,也许您可以帮助我们" +"翻译这些文档,让更多的人了解 Federated " +"Learning!对于那些想成为开源贡献者的人来说,这也是一个很好的机会。" #: ../../source/contributor-how-to-contribute-translations.rst:13 msgid "" @@ -189,10 +205,12 @@ msgid "" "`_, this " "where most of the work will happen." msgstr "" +"我们的翻译项目已在 \"Weblate `_\"上公开,大部分工作都将在这里进行。" #: ../../source/contributor-how-to-contribute-translations.rst:18 msgid "Contribute to existing languages" -msgstr "" +msgstr "为现有语言作出贡献" #: ../../source/contributor-how-to-contribute-translations.rst:23 msgid "" @@ -202,6 +220,9 @@ msgid "" " profile settings can be found `here " "`_." msgstr "" +"您需要做的第一件事就是在本`网页`_上创建一个免费的Weblate帐户。有关个人资料设置的更多信息,请参阅`这里 " +"`_。" #: ../../source/contributor-how-to-contribute-translations.rst:29 msgid "" @@ -210,12 +231,15 @@ msgid "" "docs/framework/>`_. Here, you should see the different existing languages" " that can be found on the website." msgstr "" +"登录到Weblate后,您可以导航到 \"Flower Framework \"项目`_。在这里,您可以看到网站上现有的各种语言。" #: ../../source/contributor-how-to-contribute-translations.rst:34 msgid "" "Once you have selected the language you want to contribute to, you should" " see a similar interface to this:" -msgstr "" +msgstr "选择您要贡献的语言后,您应该会看到与此类似的界面:" #: ../../source/contributor-how-to-contribute-translations.rst:39 msgid "" @@ -223,11 +247,12 @@ msgid "" "button on the top right (in the ``Translation status`` section). This " "will automatically bring you to the translation interface for " "untranslated strings." -msgstr "" +msgstr "最简单的方法是点击右上角(\"翻译状态 \"部分)的 \"翻译 \"按钮" +"。这将自动带您进入未翻译字符串的翻译界面。" #: ../../source/contributor-how-to-contribute-translations.rst:43 msgid "This is what the interface looks like:" -msgstr "" +msgstr "这就是界面的样子:" #: ../../source/contributor-how-to-contribute-translations.rst:47 msgid "" @@ -238,6 +263,11 @@ msgid "" "your translation to suggestions for other users to view), or ``Skip`` (to" " go to the next untranslated string without saving anything)." msgstr "" +"您可以在顶部的文本框中输入翻译内容,满意后按 \"保存并继续\"" +"(保存翻译内容并转到下一个未翻译的字符串)、\"保存并停留\"" +"(保存翻译内容并停留在同一页面)、\"建议\"" +"(将您的翻译添加到建议中供其他用户查看)或 \"跳过\"" +"(转到下一个未翻译的字符串而不保存任何内容)。" #: ../../source/contributor-how-to-contribute-translations.rst:54 msgid "" @@ -247,13 +277,17 @@ msgid "" "translations in ``Other languages``, and the ``History`` of translations " "for this string." msgstr "" +"为了帮助翻译,您可以在底部看到 \"邻近字符串\"、\"评论\"(来自其他贡献者)、" +"\"自动建议\"(来自机器翻译引擎)、\"其他语言 \"中的翻译以及该字符串的 " +"\"历史翻译\"。" #: ../../source/contributor-how-to-contribute-translations.rst:59 msgid "" "On the right, under the ``String information`` section, you can also " "click the link under ``Source string location`` in order to view the " "source of the doc file containing the string." -msgstr "" +msgstr "在右侧的 \"字符串信息 \"部分,您还可以单击 \"源字符串位置 \"下的链接," +"以查看包含字符串的 doc 文件的源文件。" #: ../../source/contributor-how-to-contribute-translations.rst:63 msgid "" @@ -261,10 +295,12 @@ msgid "" "this `in-depth guide " "`_." msgstr "" +"有关使用 Weblate 进行翻译的更多信息,您可以查看本 \"深入指南 `_\"。" #: ../../source/contributor-how-to-contribute-translations.rst:67 msgid "Add new languages" -msgstr "" +msgstr "添加新语言" #: ../../source/contributor-how-to-contribute-translations.rst:69 msgid "" @@ -272,10 +308,13 @@ msgid "" "either on `Slack `_, or by opening an " "issue on our `GitHub repo `_." msgstr "" +"如果您想添加新语言,请先联系我们,可以在 `Slack `_ 上联系,也可以在我们的 `GitHub repo `_ 上提交问题。" #: ../../source/contributor-how-to-develop-in-vscode-dev-containers.rst:2 msgid "Develop in VSCode Dev Containers" -msgstr "" +msgstr "使用 VSCode Dev Containers 进行开发" #: ../../source/contributor-how-to-develop-in-vscode-dev-containers.rst:4 msgid "" @@ -284,6 +323,8 @@ msgid "" "tests. For this purpose we are using the VSCode Remote Containers " "extension. What is it? Read the following quote:" msgstr "" +"在开发 Flower 框架时,我们希望确保所有贡献者使用相同的开发环境来格式化代码或" +"运行测试。为此,我们使用了 VSCode 远程容器扩展。这是什么?请阅读下面这段话:" #: ../../source/contributor-how-to-develop-in-vscode-dev-containers.rst:7 msgid "" @@ -297,6 +338,11 @@ msgid "" "separate tools, libraries, or runtimes needed for working with a " "codebase." msgstr "" +"Visual Studio Code Remote - Containers扩展可让你将Docker容器用作功能齐全的开" +"发环境。它允许你打开容器内(或挂载到容器内)的任何文件夹,并利用 Visual " +"Studio Code 的全部功能集。项目中的 :code:`devcontainer.json` 文件会告诉 VS " +"Code 如何访问(或创建)一个带有定义明确的工具和运行时栈的开发容器。该容器可用" +"于运行应用程序,也可用于分离处理代码库所需的工具、库或运行时。" #: ../../source/contributor-how-to-develop-in-vscode-dev-containers.rst:9 msgid "" @@ -306,16 +352,21 @@ msgid "" "system. This means that you can seamlessly switch your entire development" " environment just by connecting to a different container." msgstr "" +"工作区文件从本地文件系统加载,或复制或克隆到容器中。扩展在容器内安装和运行," +"在容器内它们可以完全访问工具、平台和文件系统。这意味着,只需连接到不同的容器" +",就能无缝切换整个开发环境。" #: ../../source/contributor-how-to-develop-in-vscode-dev-containers.rst:11 msgid "" "Source: `Official VSCode documentation " "`_" msgstr "" +"来源:`VSCode 官方文档 `_" #: ../../source/contributor-how-to-develop-in-vscode-dev-containers.rst:15 msgid "Getting started" -msgstr "" +msgstr "开始" #: ../../source/contributor-how-to-develop-in-vscode-dev-containers.rst:17 msgid "" @@ -326,6 +377,10 @@ msgid "" "Additionally, install the `VSCode Containers Extension `_." msgstr "" +"配置和设置 :code:`Dockerfile` 以及 devcontainer " +"的配置可能比较复杂。好在你想做就得做。通常只需在系统中安装 Docker " +"并确保其在命令行中可用即可。此外,请安装 `VSCode Containers Extension " +"`_。" #: ../../source/contributor-how-to-develop-in-vscode-dev-containers.rst:19 msgid "" @@ -336,12 +391,16 @@ msgid "" "area in the bottom left corner of your VSCode window and select the " "option *(Re)Open Folder in Container*." msgstr "" +"现在你应该可以开始了。启动 VSCode " +"时,它会要求你在容器环境中运行,如果你确认,它会自动构建容器并使用它。" +"要手动指示 VSCode 使用 devcontainer,可以在安装扩展后,点击 VSCode " +"窗口左下角的绿色区域,然后选择 \"*(重新)在容器中打开文件夹*\"选项。" #: ../../source/contributor-how-to-develop-in-vscode-dev-containers.rst:21 msgid "" "In some cases your setup might be more involved. For those cases consult " "the following sources:" -msgstr "" +msgstr "在某些情况下,您的设置可能更复杂。有关这些情况,请参考以下资料:" #: ../../source/contributor-how-to-develop-in-vscode-dev-containers.rst:23 msgid "" @@ -349,24 +408,28 @@ msgid "" "`_" msgstr "" +"在容器内开发 `_" #: ../../source/contributor-how-to-develop-in-vscode-dev-containers.rst:24 msgid "" "`Remote development in Containers " "`_" msgstr "" +"容器中的远程开发 `_" #: ../../source/contributor-how-to-install-development-versions.rst:2 msgid "Install development versions" -msgstr "" +msgstr "安装开发版本" #: ../../source/contributor-how-to-install-development-versions.rst:5 msgid "Install development versions of Flower" -msgstr "" +msgstr "安装 Flower 的开发版本" #: ../../source/contributor-how-to-install-development-versions.rst:8 msgid "Using Poetry (recommended)" -msgstr "" +msgstr "使用诗歌(推荐)" #: ../../source/contributor-how-to-install-development-versions.rst:10 msgid "" @@ -374,38 +437,46 @@ msgid "" "in ``pyproject.toml`` and then reinstall (don't forget to delete " "``poetry.lock`` (``rm poetry.lock``) before running ``poetry install``)." msgstr "" +"安装来自 PyPI 的 ``flwr`` 预发布版本:更新 ``pyproject.toml`` 中的 ``flwr`` " +"依赖关系,然后重新安装(运行 ``poetry install` 前,别忘了删除 ``poetry.lock` " +"(``rm poetry.lock`))。" #: ../../source/contributor-how-to-install-development-versions.rst:12 msgid "" "``flwr = { version = \"1.0.0a0\", allow-prereleases = true }`` (without " "extras)" -msgstr "" +msgstr "``flwr = { version = \"1.0.0a0\", allow-prereleases = true }`` " +"(不含额外内容)" #: ../../source/contributor-how-to-install-development-versions.rst:13 msgid "" "``flwr = { version = \"1.0.0a0\", allow-prereleases = true, extras = " "[\"simulation\"] }`` (with extras)" msgstr "" +"``flwr = { version = \"1.0.0a0\", allow-prereleases = true, extras = [" +"\"simulation\"] }`` (包含额外内容)" #: ../../source/contributor-how-to-install-development-versions.rst:15 msgid "" "Install ``flwr`` from a local copy of the Flower source code via " "``pyproject.toml``:" -msgstr "" +msgstr "通过 ``pyproject.toml`` 从 Flower 源代码的本地副本安装 ``flwr``:" #: ../../source/contributor-how-to-install-development-versions.rst:17 msgid "``flwr = { path = \"../../\", develop = true }`` (without extras)" -msgstr "" +msgstr "``flwr = { path = \"../../\", develop = true }`` (不含额外内容)" #: ../../source/contributor-how-to-install-development-versions.rst:18 msgid "" "``flwr = { path = \"../../\", develop = true, extras = [\"simulation\"] " "}`` (with extras)" msgstr "" +"``flwr = { path = \"../../\", develop = true, extras = [\"simulation\"] }`` " +"(包含额外内容)" #: ../../source/contributor-how-to-install-development-versions.rst:20 msgid "Install ``flwr`` from a local wheel file via ``pyproject.toml``:" -msgstr "" +msgstr "通过 ``pyproject.toml`` 从本地轮子文件安装 ``flwr``:" #: ../../source/contributor-how-to-install-development-versions.rst:22 msgid ""