Skip to content

Commit

Permalink
补充部分翻译
Browse files Browse the repository at this point in the history
  • Loading branch information
hltj committed Oct 18, 2023
1 parent 059c57d commit 12e2120
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
28 changes: 14 additions & 14 deletions docs/topics/multiplatform/multiplatform.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,34 +45,34 @@ JVM、web 与原生平台的特定于平台的实现来创建多平台库。 发

### 桌面应用程序

Compose Multiplatform helps share UIs across desktop platforms like Windows, macOS, and Linux. Many applications,
including the [JetBrains Toolbox app](https://blog.jetbrains.com/kotlin/2021/12/compose-multiplatform-toolbox-case-study/),
have already adopted this approach.
Compose 多平台有助于跨桌面平台(如 WindowsmacOS Linux)共享 UI。 包括
[JetBrains Toolbox 应用](https://blog.jetbrains.com/kotlin/2021/12/compose-multiplatform-toolbox-case-study/)在内的许多应用程序<!--
-->都已经采用了这种方式。

Try this [Compose Multiplatform desktop application](https://github.com/JetBrains/compose-multiplatform-desktop-template#readme)
template to create your own project with UIs shared among desktop platforms.
尝试使用这个 [Compose 多平台桌面应用程序](https://github.com/JetBrains/compose-multiplatform-desktop-template#readme)<!--
-->模板来创建自己的项目,并在桌面平台间共享 UI。

## 不同平台间共享代码

Kotlin Multiplatform allows you to maintain a single codebase of the application logic for [different platforms](multiplatform-dsl-reference.md#目标).
You also get advantages of native programming, including great performance and full access to platform SDKs.
Kotlin 多平台让你能为[不同平台](multiplatform-dsl-reference.md#目标)的应用程序逻辑维护一份代码。
还可以获得原生程序设计的优势,包括出色的性能以及对平台 SDK 的完全访问能力。

Kotlin provides the following code sharing mechanisms:
Kotlin 提供了以下代码共享机制:

* Share common code among [all platforms](multiplatform-share-on-platforms.md#对所有平台共享代码) used in your project.
* Share code among [some platforms](multiplatform-share-on-platforms.md#对相似平台共享代码) included in your project to reuse much of the code in similar platforms:
* 在项目中使用的[所有平台](multiplatform-share-on-platforms.md#对所有平台共享代码)之间共享公共代码。
* 在项目中包含的[一些平台](multiplatform-share-on-platforms.md#对相似平台共享代码)之间共享代码,以便在类似平台中复用大量代码:

![Code shared across different platforms](kotlin-multiplatform-hierarchical-structure.svg){width=700}
![在不同平台间共享代码](kotlin-multiplatform-hierarchical-structure.svg){width=700}

* 如果需要从共享代码中访问平台相关的 API,请使用 Kotlin 的<!--
-->[预期声明与实际声明](multiplatform-connect-to-apis.md)机制。

## 入门

* Begin with the [Get started with Kotlin Multiplatform for mobile](multiplatform-mobile-getting-started.md) if you want to create iOS and Android applications with shared code
* Explore [sharing code principles and examples](multiplatform-share-on-platforms.md) if you want to create applications or libraries targeting other platforms
* 如果想使用共享代码创建 iOS 与 Android 应用程序,请从[用于移动端的 Kotlin 多平台入门](multiplatform-mobile-getting-started.md)开始
* 如果想创建面向其他平台的应用程序或库,请研读[共享代码原则与示例](multiplatform-share-on-platforms.md)

> New to Kotlin? Take a look at [Getting started with Kotlin](getting-started.md).
> 刚接触 Kotlin?可以看看 [Kotlin 入门](getting-started.md)
>
{type="tip"}

Expand Down
2 changes: 1 addition & 1 deletion docs/topics/native/native-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ JetBrains' declarative UI framework based on Kotlin and [Jetpack Compose](https:

## 如何入门

刚接触 Kotlin?可以看看 [Kotlin 入门](getting-started.md)
刚接触 Kotlin?可以看看 [Kotlin 入门](getting-started.md)

推荐文档:

Expand Down
6 changes: 3 additions & 3 deletions docs/topics/server-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ Kotlin 非常适合开发服务器端应用程序。它可以让你编写简明

## 使用 Kotlin 进行服务器端开发的框架

Here are some examples of the server-side frameworks for Kotlin:
以下是 Kotlin 服务器端框架的一些示例:

* [Spring](https://spring.io) 利用 Kotlin 的语言功能提供[更简洁的 API](https://hltj.me/kotlin/2017/05/23/kotlin-support-in-spring5.html)
从版本 5.0 开始。[在线项目生成器](https://start.spring.io/#!language=kotlin)可以让你用 Kotlin 快速生成一个新项目。

* [Ktor](https://ktor.kotlincn.net) 是 JetBrains 为在 Kotlin 中创建 Web 应用程序而构建的框架,利用协程实现高可伸缩性,并提供易于使用且合乎惯用法的 API。

* [Quarkus](https://quarkus.io/guides/kotlin) provides first class support for using Kotlin. The framework is open source and maintained by Red Hat. Quarkus was built from the ground up for Kubernetes and provides a cohesive full-stack framework by leveraging a growing list of hundreds of best-of-breed libraries.
* [Quarkus](https://quarkus.io/guides/kotlin) 为使用 Kotlin 提供了头等支持。 它是由 Red Hat 维护的开源框架。 Quarkus 是为 Kubernetes 全新构建、并利用数百个(还在增加)最佳库提供内聚的全栈框架。

* [Vert.x](https://vertx.io) 是在 JVM 上构建反应式 Web 应用程序的框架,
为 Kotlin 提供了[专门支持](https://github.com/vert-x3/vertx-lang-kotlin),包括[完整的文档](https://vertx.io/docs/vertx-core/kotlin/)
Expand All @@ -42,7 +42,7 @@ Here are some examples of the server-side frameworks for Kotlin:
对于 JPA,[kotlin-jpa 编译器插件](no-arg-plugin.md#jpa-支持)使
Kotlin 编译的类适应框架的要求。

> You can find more frameworks at [https://kotlin.link/](https://kotlin.link/resources).
> 可以在 [https://kotlin.link/](https://kotlin.link/resources) 找到更多框架。
>
{type="note"}

Expand Down

0 comments on commit 12e2120

Please sign in to comment.