-
Notifications
You must be signed in to change notification settings - Fork 489
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
i18n(zh-cn): Translation /features/clipboard.mdx #1734
base: v2
Are you sure you want to change the base?
Conversation
❌ Deploy Preview for tauri-v2 failed.Built without sensitive environment variables
|
Why did I add this page in the zh-cn directory, but it is not displayed in the menu bar? Did I forget to write some configuration? |
```js | ||
import { platform } from '@tauri-apps/plugin-os'; | ||
|
||
const platform = await platform(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could this wait until #1733 is in so lines 90, 91 are updated accordingly?
```js | ||
import { platform } from '@tauri-apps/plugin-os'; | ||
|
||
const platform = await platform(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const platform = await platform(); | |
const currentPlatform = await platform(); |
import { platform } from '@tauri-apps/plugin-os'; | ||
|
||
const platform = await platform(); | ||
console.log(platform); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
console.log(platform); | |
console.log(currentPlatform); |
I don't understand, do you mean there will be an update to this document? If there is an update, just send me a message, and I will update the translation when I get the email. |
No no at all, I'm looking into it now and the issue is on the website. I'll open a pr to fix it soon.
exactly, I left a suggestion with the updated code, but you can look at the mentioned pr and make the changes yourself thank you very much for this translations, I'm sorry for this trouble |
I'm going to say something
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much for this @Yaxnice301 ! I merged in #1747 and #1735 for the issue you raised (thanks @vasfvitor !)
I put a comment on two of the pages as they are not ready to be translated right now (but I really appreciate the eagerness to contribute!) You can check https://beta.tauri.app/contribute/translate-status to see which pages are ready for translation in the future.
@dklassic would you be able to help with a review please?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This page is not ready to be translated because it is only a placeholder. Could you remove this file from the PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This page is not ready to be translated because the content will be updated soon. Could you remove this file from the PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for contributing! The translation is generally in good shape but there are some formatting issues and missing translations from place to place. One thing in particular stand out is that both clipboard
and dialog
plugins have full translated names while OS Information
is translated in the title but left untouched within the article, is there a reason behind this?
pnpm="pnpm tauri add clipboard-manager" | ||
cargo="cargo tauri add clipboard-manager" /> | ||
|
||
2. 修改 `lib.rs` 以初始化插件: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2. 修改 `lib.rs` 以初始化插件: | |
2. 修改 `lib.rs` 以初始化插件: |
Formatting correction.
</TabItem> | ||
<TabItem label="Manual"> | ||
|
||
1. 运行 `cargo add tauri-plugin-clipboard-manager` 将插件添加到项目依赖 `Cargo.toml` 中. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1. 运行 `cargo add tauri-plugin-clipboard-manager` 将插件添加到项目依赖 `Cargo.toml` 中. | |
1. 运行 `cargo add tauri-plugin-clipboard-manager` 将插件添加到项目依赖 `Cargo.toml` 中。 |
Formatting correction.
|
||
1. 运行 `cargo add tauri-plugin-clipboard-manager` 将插件添加到项目依赖 `Cargo.toml` 中. | ||
|
||
2. 修改 `lib.rs` 以初始化插件: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2. 修改 `lib.rs` 以初始化插件: | |
2. 修改 `lib.rs` 以初始化插件: |
Formatting correction.
} | ||
``` | ||
|
||
3. If you'd like to manage the clipboard in JavaScript then install the npm package as well: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing translation
|
||
{/* TODO: Link to which language to use, frontend vs. backend guide when it's made */} | ||
|
||
剪贴板插件在JavaScript和Rust中都可用。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
剪贴板插件在JavaScript和Rust中都可用。 | |
剪贴板插件在 JavaScript 和 Rust 中都可用。 |
Formatting nitpick.
} | ||
``` | ||
|
||
3. 如果您想在JavaScript中使用,请同时安装npm包: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3. 如果您想在JavaScript中使用,请同时安装npm包: | |
3. 如果您想在 JavaScript 中使用,请同时安装 npm 包: |
Formatting nitpick.
|
||
## 使用 | ||
|
||
使用此插件,您可以从当前操作系统查询多个信息。在 [JavaScript API](/2/reference/js/os/) 或 [Rust API](https://docs.rs/tauri-plugin-os/) 中查看所有可用函数. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
使用此插件,您可以从当前操作系统查询多个信息。在 [JavaScript API](/2/reference/js/os/) 或 [Rust API](https://docs.rs/tauri-plugin-os/) 中查看所有可用函数. | |
使用此插件,您可以从当前操作系统查询多个信息。在 [JavaScript API](/2/reference/js/os/) 或 [Rust API](https://docs.rs/tauri-plugin-os/) 中查看所有可用函数。 |
Formatting correction.
|
||
#### 示例:操作系统平台 | ||
|
||
`platform` 返回一个描述所使用操作系统的字符串。该值在编译时设置。可能的值是 `linux`, `macos`, `ios`, `freebsd`, `dragonfly`, `netbsd`, `openbsd`, `solaris`, `android`, `windows`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
`platform` 返回一个描述所使用操作系统的字符串。该值在编译时设置。可能的值是 `linux`, `macos`, `ios`, `freebsd`, `dragonfly`, `netbsd`, `openbsd`, `solaris`, `android`, `windows`. | |
`platform` 返回一个描述所使用操作系统的字符串。该值在编译时设置。可能的值是 `linux`、`macos`、`ios`、`freebsd`、`dragonfly`、`netbsd`、`openbsd`、`solaris`、`android`、`windows`。 |
Formatting correction.
```rust | ||
let platform = tauri_plugin_os::platform(); | ||
println!("Platform: {}", platform); | ||
// Prints "windows" to the terminal |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
untranslated comment?
#[cfg_attr(mobile, tauri::mobile_entry_point)] | ||
pub fn run() { | ||
tauri::Builder::default() | ||
// Initialize the plugin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
untranslated comment?
i18(zh-CN): Translation /features/clipboard.mdx