Skip to content
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

Open
wants to merge 12 commits into
base: v2
Choose a base branch
from

Conversation

Yaxnice301
Copy link

i18(zh-CN): Translation /features/clipboard.mdx

Copy link

netlify bot commented Dec 6, 2023

Deploy Preview for tauri-v2 failed.

Built without sensitive environment variables

Name Link
🔨 Latest commit 8ab70cf
🔍 Latest deploy log https://app.netlify.com/sites/tauri-v2/deploys/664ce62494f94c00092c0b33

@Yaxnice301
Copy link
Author

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();
Copy link
Contributor

@vasfvitor vasfvitor Dec 6, 2023

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();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const platform = await platform();
const currentPlatform = await platform();

import { platform } from '@tauri-apps/plugin-os';

const platform = await platform();
console.log(platform);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
console.log(platform);
console.log(currentPlatform);

@Yaxnice301
Copy link
Author

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.

@vasfvitor
Copy link
Contributor

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?

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.

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.

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

@Yaxnice301
Copy link
Author

I'm going to say something

  • Thank you for your reply
  • Nope

Copy link
Member

@lorenzolewis lorenzolewis left a 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?

Copy link
Member

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?

Copy link
Member

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?

@github-actions github-actions bot added the i18n Is this related to translations? label Dec 11, 2023
Copy link
Contributor

@dklassic dklassic left a 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` 以初始化插件:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
2. 修改 `lib.rs` 以初始化插件:
2. 修改 `lib.rs` 以初始化插件

Formatting correction.

</TabItem>
<TabItem label="Manual">

1. 运行 `cargo add tauri-plugin-clipboard-manager` 将插件添加到项目依赖 `Cargo.toml` 中.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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` 以初始化插件:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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:
Copy link
Contributor

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中都可用。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
剪贴板插件在JavaScript和Rust中都可用
剪贴板插件在 JavaScript 和 Rust 中都可用

Formatting nitpick.

}
```

3. 如果您想在JavaScript中使用,请同时安装npm包:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
3. 如果您想在JavaScript中使用,请同时安装npm包
3. 如果您想在 JavaScript 中使用,请同时安装 npm 包

Formatting nitpick.


## 使用

使用此插件,您可以从当前操作系统查询多个信息。在 [JavaScript API](/2/reference/js/os/) 或 [Rust API](https://docs.rs/tauri-plugin-os/) 中查看所有可用函数.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
使用此插件,您可以从当前操作系统查询多个信息。在 [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`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`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
Copy link
Contributor

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

untranslated comment?

@simonhyll simonhyll modified the milestones: Version 2.0, Version 2.x Feb 26, 2024
@simonhyll simonhyll requested a review from a team February 29, 2024 00:58
@simonhyll simonhyll added i18n: zh-cn Is this related to zh-cn translations? help wanted Can the core maintainers not handle this themselves? and removed i18n Is this related to translations? labels May 21, 2024
@github-actions github-actions bot added the i18n Is this related to translations? label May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Can the core maintainers not handle this themselves? i18n: zh-cn Is this related to zh-cn translations? i18n Is this related to translations?
Projects
Status: 📋 In review
Development

Successfully merging this pull request may close these issues.

None yet

5 participants