From 8531cc5249848161c07ef01b470ff9a1710f4574 Mon Sep 17 00:00:00 2001 From: Eugene Yokota Date: Tue, 16 Sep 2025 02:13:26 -0400 Subject: [PATCH] Localize why sbt exists into Chinese --- po/summary/getting-started.zh-cn.po | 13 +++-- .../getting-started/why-sbt-exists.zh-cn.po | 51 ++++++++++++++----- 2 files changed, 48 insertions(+), 16 deletions(-) diff --git a/po/summary/getting-started.zh-cn.po b/po/summary/getting-started.zh-cn.po index 6b1db1af2..179a8ebfd 100644 --- a/po/summary/getting-started.zh-cn.po +++ b/po/summary/getting-started.zh-cn.po @@ -2,18 +2,19 @@ msgid "" msgstr "" "Project-Id-Version: The Book of sbt\n" "POT-Creation-Date: 2025-08-08T01:31:50-04:00\n" -"PO-Revision-Date: 2024-10-30T03:50:36-04:00\n" +"PO-Revision-Date: 2025-09-16 01:44-0400\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" -"Language: zh-cn\n" +"Language: zh_CN\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" +"X-Generator: Poedit 3.7\n" #: src/reference/guide/index.md:5 msgid "Getting Started with sbt" -msgstr "" +msgstr "sbt 入门" #: src/reference/guide/index.md:8 msgid "" @@ -22,13 +23,17 @@ msgid "" "other build systems and there are details you _will_ stumble on if you " "haven't read the documentation." msgstr "" +"sbt 使用少数的几个概念来支撑它灵活并且强大的构建定义。其实没有太多的概念,但" +"是 sbt 并不完全像其他的构建体系,而且如果您没有看过文档的话,您偶尔将会遇到一" +"些细节问题。" #: src/reference/guide/index.md:13 msgid "" "The Getting Started Guide covers the concepts you need to know to create and " "maintain an sbt build definition." msgstr "" +"这篇入门指南覆盖了一些您在创建和维护一个 sbt 构建定义时需要知道的概念。" #: src/reference/guide/index.md:16 msgid "It is _highly recommended_ to read the Getting Started Guide!" -msgstr "" +msgstr "强烈建议看完该入门指南。" diff --git a/po/summary/getting-started/why-sbt-exists.zh-cn.po b/po/summary/getting-started/why-sbt-exists.zh-cn.po index 0b1651039..45d50d055 100644 --- a/po/summary/getting-started/why-sbt-exists.zh-cn.po +++ b/po/summary/getting-started/why-sbt-exists.zh-cn.po @@ -2,22 +2,23 @@ msgid "" msgstr "" "Project-Id-Version: The Book of sbt\n" "POT-Creation-Date: 2025-09-15T01:45:13-04:00\n" -"PO-Revision-Date: 2024-10-30T03:50:36-04:00\n" +"PO-Revision-Date: 2025-09-16 02:11-0400\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" -"Language: zh-cn\n" +"Language: zh_CN\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" +"X-Generator: Poedit 3.7\n" #: src/reference/guide/why-sbt-exists.md:1 msgid "Why sbt exists" -msgstr "" +msgstr "sbt 的存在理由" #: src/reference/guide/why-sbt-exists.md:4 msgid "Preliminaries" -msgstr "" +msgstr "预备知识" #: src/reference/guide/why-sbt-exists.md:7 msgid "" @@ -25,6 +26,8 @@ msgid "" "`scalac`, as documented in the [Scala 3 Book](https://docs.scala-lang.org/" "scala3/book/taste-hello-world.html):" msgstr "" +"在 Scala 中,库或程序使用 Scala 编译器 `scalac` 进行编译,正如 [Scala 3 Book]" +"(https://docs.scala-lang.org/scala3/book/taste-hello-world.html) 中所记录的:" #: src/reference/guide/why-sbt-exists.md:10 msgid "\"Hello, World!\"" @@ -35,6 +38,8 @@ msgid "" "This process gets tedious and slow if we were to invoke `scalac` directly " "since we'd have to pass all the Scala source file names." msgstr "" +"如果我们直接调用 `scalac`,这个过程会变得乏味且缓慢,因为我们必须传递所有 " +"Scala 源文件名。" #: src/reference/guide/why-sbt-exists.md:21 msgid "" @@ -44,12 +49,17 @@ msgid "" "Scala 2.12, 2.13 ecosystem, Scala 3.x ecosystem, JVM, JS, and Native " "platforms." msgstr "" +"此外,大多数非平凡的程序可能会有库依赖,因此也会传递性地依赖于它们的依赖项。" +"对于 Scala 生态系统来说,这更加复杂,因为我们有 Scala 2.12,2.13 生态系统," +"Scala 3.x 生态系统,以及 JVM,JS 和 Native 平台。" #: src/reference/guide/why-sbt-exists.md:24 msgid "" "Rather than working with JAR files and `scalac`, we can avoid manual toil by " "introducing a higher-level subproject abstraction and by using a build tool." msgstr "" +"与其使用 JAR 文件和 `scalac`,我们可以通过引入更高级别的子项目抽象概念并使用" +"构建工具来避免手动劳作。" #: src/reference/guide/why-sbt-exists.md:26 msgid "sbt" @@ -61,48 +71,54 @@ msgid "" "subprojects and their various dependencies and custom tasks to ensure that " "we'll always get a fast, repeatable build." msgstr "" +"_sbt_ 是为 Scala 和 Java 创建的简单构建工具。它允许我们声明子项目及其各种依赖" +"项和自定义任务,以确保我们始终能获得快速,可重复的构建。" #: src/reference/guide/why-sbt-exists.md:32 msgid "To accomplish this goal, sbt does several things:" -msgstr "" +msgstr "为了实现这一目标,sbt 做了几件事:" #: src/reference/guide/why-sbt-exists.md:34 msgid "The version of sbt itself is tracked in `project/build.properties`." -msgstr "" +msgstr "sbt 本身的版本记录在 `project/build.properties` 中。" #: src/reference/guide/why-sbt-exists.md:35 msgid "" "Defines a domain-specific language (DSL) called **build.sbt DSL** that can " "declare the Scala version and other subproject information in `build.sbt`." msgstr "" +"定义了一种称为 **build.sbt DSL** 的领域特定语言,可以在 `build.sbt` 中声明 " +"Scala 版本和其他子项目信息。" #: src/reference/guide/why-sbt-exists.md:36 msgid "Uses Coursier to fetch subprojects dependencies and their dependencies." -msgstr "" +msgstr "使用 Coursier 获取子项目依赖及其依赖项。" #: src/reference/guide/why-sbt-exists.md:37 msgid "Invokes Zinc to incrementally compile Scala and Java sources." -msgstr "" +msgstr "调用 Zinc 增量编译 Scala 和 Java 源代码。" #: src/reference/guide/why-sbt-exists.md:38 msgid "Automatically runs tasks in parallel whenever possible." -msgstr "" +msgstr "在可能的情况下自动并行运行任务。" #: src/reference/guide/why-sbt-exists.md:39 msgid "" "Defines conventions on how packages are published to Maven repositories to " "interoperate with the wider JVM ecosystem." msgstr "" +"定义了如何将包发布到 Maven 仓库的约定,以便与更广泛的 JVM 生态系统进行互操" +"作。" #: src/reference/guide/why-sbt-exists.md:41 msgid "" "To a large extent, sbt standardizes the commands needed to build a given " "program or library." -msgstr "" +msgstr "在很大程度上,sbt 标准化了构建给定程序或库所需的命令。" #: src/reference/guide/why-sbt-exists.md:43 msgid "Why build.sbt DSL?" -msgstr "" +msgstr "build.sbt DSL 的必要性" #: src/reference/guide/why-sbt-exists.md:46 msgid "" @@ -112,6 +128,9 @@ msgid "" "Google's Bazel, Meta's Buck, and Apple's SwiftPM use DSL to define the " "subproject." msgstr "" +"sbt 采用基于 Scala 的 build.sbt DSL 来声明子项目和任务图。如今,使用 DSL 而" +"非 YAML 和 XML 等配置格式几乎不再是 sbt 的独特之处。许多构建工具,如 Gradle," +"Google 的 Bazel,Meta 的 Buck 以及 Apple 的 SwiftPM 都使用 DSL 来定义子项目。" #: src/reference/guide/why-sbt-exists.md:48 msgid "" @@ -119,18 +138,21 @@ msgid "" "and `libraryDependencies`, but it can scale as your need for the build " "system grows:" msgstr "" +"`build.sbt` 最初几乎可以像 YAML 文件一样,仅声明 `scalaVersion` 和 " +"`libraryDependencies`,但随着您对构建系统需求的增长,它可以进行扩展:" #: src/reference/guide/why-sbt-exists.md:51 msgid "" "To avoid repeating the same information, like the version number for a " "library, `build.sbt` can declare variables using `val`." msgstr "" +"为了避免重复相同的信息,例如库的版本号,`build.sbt` 可以使用 `val` 声明变量。" #: src/reference/guide/why-sbt-exists.md:52 msgid "" "Uses Scala language constructs like `if` to define settings and tasks, when " "needed." -msgstr "" +msgstr "在需要时使用 Scala 语言结构(如 `if`)来定义设置和任务。" #: src/reference/guide/why-sbt-exists.md:53 msgid "" @@ -138,15 +160,20 @@ msgid "" "the build starts. The type also helps passing data from one task from " "another." msgstr "" +"静态类型的设置和任务,可在构建开始前捕获拼写错误和类型错误。类型还有助于将数" +"据从一个任务传递到另一个任务。" #: src/reference/guide/why-sbt-exists.md:54 msgid "" "Provides **structured concurrency** via `Initialized[Task[A]]`. The DSL uses " "_direct style_ `.value` syntax to concisely define task graphs." msgstr "" +"通过 `Initialized[Task[A]]` 提供**结构化并发**。DSL 使用所谓的**直接风格** " +"`.value` 语法来简洁地定义任务图。" #: src/reference/guide/why-sbt-exists.md:55 msgid "" "Enpowers the community to extend sbt with plugins that provide custom tasks " "or language extensions like Scala.JS." msgstr "" +"使社区能够通过插件扩展 sbt,这些插件提供自定义任务或语言扩展,如 Scala.JS。"