Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/content/docs/develop/configuration-files.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ tauri = { version = "2.0.0", features = [ ] }

The most important parts to take note of are the `tauri-build` and `tauri` dependencies. Generally, they must both be on the same latest minor versions as the Tauri CLI, but this is not strictly required. If you encounter issues while trying to run your app you should check that any Tauri versions (`tauri` and `tauri-cli`) are on the latest versions for their respective minor releases.

Cargo version numbers use [Semantic Versioning]. Running `cargo update` in the `src-tauri` folder will pull the latest available Semver-compatible versions of all dependencies. For example, if you specify `2.0.0` as the version for `tauri-build`, Cargo will detect and download version `2.0.0.0` because it is the latest Semver-compatible version available. Tauri will update the major version number whenever a breaking change is introduced, meaning you should always be capable of safely upgrading to the latest minor and patch versions without fear of your code breaking.
Cargo version numbers use [Semantic Versioning]. Running `cargo update` in the `src-tauri` folder will pull the latest available Semver-compatible versions of all dependencies. For example, if you specify `2.0.0` as the version for `tauri-build`, Cargo will detect and download version `2.0.0` because it is the latest Semver-compatible version available. Tauri will update the major version number whenever a breaking change is introduced, meaning you should always be capable of safely upgrading to the latest minor and patch versions without fear of your code breaking.

If you want to use a specific crate version you can use exact versions instead by prepending `=` to the version number of the dependency:

Expand Down Expand Up @@ -231,8 +231,8 @@ An example of a barebones `package.json` file for a Tauri project might look a l
"tauri": "tauri"
},
"dependencies": {
"@tauri-apps/api": "^2.0.0.0",
"@tauri-apps/cli": "^2.0.0.0"
"@tauri-apps/api": "^2.0.0",
"@tauri-apps/cli": "^2.0.0"
}
}
```
Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/develop/sidecar.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ You may need to embed external binaries to add additional functionality to your

Binaries are executables written in any programming language. Common use cases are Python CLI applications or API servers bundled using `pyinstaller`.

To bundle the binaries of your choice, you can add the `externalBin` property to the `tauri > bundle` object in your `tauri.conf.json`.
To bundle the binaries of your choice, you can add the `externalBin` property to the `bundle` object in your `tauri.conf.json`.
The `externalBin` configuration expects a list of strings targeting binaries either with absolute or relative paths.

Here is a Tauri configuration snippet to illustrate a sidecar configuration:
Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/es/plugin/notification.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Instala el plugin de notificaciones para comenzar.
npm="npm install @tauri-apps/plugin-notification"
yarn="yarn add @tauri-apps/plugin-notification"
pnpm="pnpm add @tauri-apps/plugin-notification"
deno="bun add npm:@tauri-apps/plugin-notification"
deno="deno add npm:@tauri-apps/plugin-notification"
bun="bun add @tauri-apps/plugin-notification"
/>

Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/es/start/migrate/from-tauri-1.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ tauri::Builder::default()

### Migrar al Plugin del Sistema de Archivos

Las APIs de Rust `App::get_cli_matches` y JavaScript `@tauri-apps/api/fs` han sido eliminadas. En su lugar, utiliza [`std::fs`](https://doc.rust-lang.org/std/fs/) para Rust y el plugin `@tauri-apps/plugin-fs` para JavaScript:
Las APIs de Rust `tauri::api::fs` y JavaScript `@tauri-apps/api/fs` han sido eliminadas. En su lugar, utiliza [`std::fs`](https://doc.rust-lang.org/std/fs/) para Rust y el plugin `@tauri-apps/plugin-fs` para JavaScript:

1. Agrega a las dependencias de Cargo:

Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/fr/start/migrate/from-tauri-1.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ tauri::Builder::default()

### Migrer vers un "File System Plugin"

Les APIs Rust `App::get_cli_matches` et JavaScript `@tauri-apps/api/fs` ont été retirées. Utilisez le plugin [`std::fs`](https://doc.rust-lang.org/std/fs/) for Rust et `@tauri-apps/plugin-fs` for JavaScript à la place:
Les APIs Rust `tauri::api::fs` et JavaScript `@tauri-apps/api/fs` ont été retirées. Utilisez le plugin [`std::fs`](https://doc.rust-lang.org/std/fs/) for Rust et `@tauri-apps/plugin-fs` for JavaScript à la place:

1. Ajoutez vos dépendances Cargo:

Expand Down
6 changes: 3 additions & 3 deletions src/content/docs/ja/develop/configuration-files.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ tauri = { version = "2.0.0", features = [ ] }

注意を払うべき最も重要な部分は、`tauri-build` と `tauri` の依存関係です。通常、このふたつは両方とも Tauri CLI と同様、最新の「最新バグ修正版(マイナー・バージョン)」である必要がありますが、これは厳密には必須ではありません。アプリの実行中に問題が発生した場合には、すべての Tauri バージョン (`tauri` と `tauri-cli`)がそれぞれの「最新バグ修正版」(マイナー・リリースの最新バージョン)であることを確認する必要があります。

Cargo のバージョン番号は [セマンティック・バージョニング] (Semver)方式[[参考](https://ja.wikipedia.org/wiki/セマンティックバージョニング)]を使用しています。`src-tauri` フォルダー内の `cargo update` を実行すると、すべての依存関係に対して Semver 互換の最新バージョンが取得されます。たとえば、`tauri-build` のバージョンとして `2.0.0` を指定すると、Cargo は最新の Semver 互換バージョンである `2.0.0.0` を検出してダウンロードします。Tauri は、重大な変更が導入されるときには「メジャー・バージョン番号」を更新します。つまり、最新のマイナー・バージョンとパッチ・バージョンの更新では、自分のコードが〔最新機能で〕破壊されることを心配することなく、常に安全にアップグレード可能です。
Cargo のバージョン番号は [セマンティック・バージョニング] (Semver)方式[[参考](https://ja.wikipedia.org/wiki/セマンティックバージョニング)]を使用しています。`src-tauri` フォルダー内の `cargo update` を実行すると、すべての依存関係に対して Semver 互換の最新バージョンが取得されます。たとえば、`tauri-build` のバージョンとして `2.0.0` を指定すると、Cargo は最新の Semver 互換バージョンである `2.0.0` を検出してダウンロードします。Tauri は、重大な変更が導入されるときには「メジャー・バージョン番号」を更新します。つまり、最新のマイナー・バージョンとパッチ・バージョンの更新では、自分のコードが〔最新機能で〕破壊されることを心配することなく、常に安全にアップグレード可能です。

特定のクレート・バージョンを使用したい場合には、依存関係のバージョン番号の前に `=` を追加することで、指定したバージョンを使用できます:

Expand Down Expand Up @@ -239,8 +239,8 @@ Tauri プロジェクトの必要最低限​​の `package.json` ファイル
"tauri": "tauri"
},
"dependencies": {
"@tauri-apps/api": "^2.0.0.0",
"@tauri-apps/cli": "^2.0.0.0"
"@tauri-apps/api": "^2.0.0",
"@tauri-apps/cli": "^2.0.0"
}
}
```
Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/ja/develop/sidecar.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ i18nReady: true

バイナリは、任意のプログラミング言語で記述された実行ファイルです。一般的な使用例としては、`pyinstaller` を使用してバンドルされた Python CLI アプリケーションや API サーバーなどが挙げられます。

お望みのバイナリをバンドルするには、`tauri.conf.json` の `tauri > bundle` オブジェクトに `externalBin` プロパティを追加します。
お望みのバイナリをバンドルするには、`tauri.conf.json` の `bundle` オブジェクトに `externalBin` プロパティを追加します。
`externalBin` の設定では、絶対パスまたは相対パスのいずれかを使用して対象のバイナリを指定する「文字列のリスト」が必要です。

以下は、「サイドカー」の設定を説明するための「Tauri の設定」の抜粋(スニペット)です:
Expand Down
10 changes: 5 additions & 5 deletions src/content/docs/ja/learn/system-tray.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,12 @@ const tray = await TrayIcon.new(options);

```rust
use tauri::{
menu::{Menu, MenuItem},
menu::{MenuBuilder, MenuItemBuilder},
tray::TrayIconBuilder,
};

let quit_i = MenuItem::with_id(app, "quit", "Quit", true, None::<&str>)?;
let menu = Menu::with_items(app, &[&quit_i])?;
let quit_i = MenuItemBuilder::with_id("quit", "Quit").build(app)?;
let menu = MenuBuilder::new(app).item(&quit_i).build()?;

let tray = TrayIconBuilder::new()
.menu(&menu)
Expand Down Expand Up @@ -213,13 +213,13 @@ JavaScript では、「メニュー・クリック・イベント・リスナー
use tauri::tray::TrayIconBuilder;

TrayIconBuilder::new()
.on_menu_event(|app, event| match event.id.as_ref() {
.on_menu_event(|app, event| match event.id().as_ref() {
"quit" => {
println!("quit menu item was clicked");
app.exit(0);
}
_ => {
println!("menu item {:?} not handled", event.id);
println!("menu item {:?} not handled", event.id());
}
})
```
Expand Down
32 changes: 11 additions & 21 deletions src/content/docs/ja/learn/window-menu.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,8 @@ fn main() {
.build(app)?;

let check_sub_item_2 = CheckMenuItemBuilder::new("Chinese")
.id("en")
.checked(lang_str == "en")
.id("zh")
.checked(lang_str == "zh")
.enabled(false)
.build(app)?;

Expand Down Expand Up @@ -465,7 +465,7 @@ await menu.setAsAppMenu();

use tauri::{
image::Image,
menu::{CheckMenuItemBuilder, IconMenuItem, MenuBuilder, MenuItem, SubmenuBuilder},
menu::{CheckMenuItemBuilder, IconMenuItemBuilder, MenuBuilder, MenuItemBuilder, SubmenuBuilder},
};

fn main() {
Expand All @@ -479,24 +479,14 @@ fn main() {
.checked(false)
.build(app)?;

let text_menu = MenuItem::with_id(
app,
"change_text",
&"Change menu".to_string(),
true,
Some("Ctrl+Z"),
)
.unwrap();

let icon_menu = IconMenuItem::with_id(
app,
"change_icon",
&"Change icon menu",
true,
Some(Image::from_bytes(include_bytes!("../icons/icon.png")).unwrap()),
Some("Ctrl+F"),
)
.unwrap();
let text_menu = MenuItemBuilder::with_id("change_text", "Change menu")
.accelerator("Ctrl+Z")
.build(app)?;

let icon_menu = IconMenuItemBuilder::with_id("change_icon", "Change icon menu")
.icon(Image::from_bytes(include_bytes!("../icons/icon.png")).unwrap())
.accelerator("Ctrl+F")
.build(app)?;

let menu_item = SubmenuBuilder::new(app, "Change menu")
.item(&text_menu)
Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/ja/plugin/deep-linking.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ iOS 上のリンクからアプリを開くには、次の二つの方法があ

</TranslationNote>

上記 json にある "appIDs” の `$DEVELOPMENT_TEAM_ID` は `tauri.conf.json > tauri > bundle > iOS > developmentTeam` または `TAURI_APPLE_DEVELOPMENT_TEAM` 環境変数で定義された値であり、
上記 json にある "appIDs” の `$DEVELOPMENT_TEAM_ID` は `tauri.conf.json > bundle > iOS > developmentTeam` または `TAURI_APPLE_DEVELOPMENT_TEAM` 環境変数で定義された値であり、
`$APP_BUNDLE_ID` は [`tauri.conf.json > identifier`](英語版参考資料)で定義された値です。

自分のドメインがアプリの関連付けを公開するように適切に設定されているかどうかを確認するには、
Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/ja/plugin/notification.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ import TranslationNote from '@components/i18n/TranslationNote.astro';
npm="npm install @tauri-apps/plugin-notification"
yarn="yarn add @tauri-apps/plugin-notification"
pnpm="pnpm add @tauri-apps/plugin-notification"
deno="bun add npm:@tauri-apps/plugin-notification"
deno="deno add npm:@tauri-apps/plugin-notification"
bun="bun add @tauri-apps/plugin-notification"
/>

Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/ja/start/migrate/from-tauri-1.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ tauri::Builder::default()

### File System プラグインの移行

Rust の `App::get_cli_matches` および `@tauri-apps/api/fs` API は削除されました。代わりに、Rust には [`std::fs`](https://doc.rust-lang.org/std/fs/) を、JavaScript には `@tauri-apps/plugin-fs` プラグインを使用してください:
Rust の `tauri::api::fs` および `@tauri-apps/api/fs` API は削除されました。代わりに、Rust には [`std::fs`](https://doc.rust-lang.org/std/fs/) を、JavaScript には `@tauri-apps/plugin-fs` プラグインを使用してください:

1. Cargo へ依存関係を追加します:

Expand Down
6 changes: 3 additions & 3 deletions src/content/docs/ko/develop/configuration-files.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ tauri = { version = "2.0.0", features = [ ] }

주의해야 할 가장 중요한 부분은 `tauri-build`와 `tauri`의 종속성입니다. 일반적으로 이 둘은 모두 Tauri CLI와 마찬가지로 최신 "최신 버그 수정판(마이너 버전)"이어야 하지만, 이는 엄격하게 필수는 아닙니다. 앱 실행 중에 문제가 발생하면 모든 Tauri 버전(`tauri` 및 `tauri-cli`)이 각각의 "최신 버그 수정판"(마이너 릴리스의 최신 버전)인지 확인해야 합니다.

Cargo의 버전 번호는 [시맨틱 버전 관리](Semver) 방식([참고](https://ko.wikipedia.org/wiki/유의적_버전))을 사용합니다. `src-tauri` 폴더 내에서 `cargo update`를 실행하면 모든 종속성에 대해 Semver 호환 최신 버전이 가져옵니다. 예를 들어, `tauri-build`의 버전으로 `2.0.0`을 지정하면 Cargo는 최신 Semver 호환 버전인 `2.0.0.0`을 감지하고 다운로드합니다. Tauri는 중대한 변경이 도입될 때 "메이저 버전 번호"를 업데이트합니다. 즉, 최신 마이너 버전과 패치 버전 업데이트에서는 자신의 코드가 [최신 기능으로] 손상될 걱정 없이 항상 안전하게 업그레이드할 수 있습니다.
Cargo의 버전 번호는 [시맨틱 버전 관리](Semver) 방식([참고](https://ko.wikipedia.org/wiki/유의적_버전))을 사용합니다. `src-tauri` 폴더 내에서 `cargo update`를 실행하면 모든 종속성에 대해 Semver 호환 최신 버전이 가져옵니다. 예를 들어, `tauri-build`의 버전으로 `2.0.0`을 지정하면 Cargo는 최신 Semver 호환 버전인 `2.0.0`을 감지하고 다운로드합니다. Tauri는 중대한 변경이 도입될 때 "메이저 버전 번호"를 업데이트합니다. 즉, 최신 마이너 버전과 패치 버전 업데이트에서는 자신의 코드가 [최신 기능으로] 손상될 걱정 없이 항상 안전하게 업그레이드할 수 있습니다.

특정 크레이트 버전을 사용하려면 종속성 버전 번호 앞에 `=`를 추가하여 지정한 버전을 사용할 수 있습니다:

Expand Down Expand Up @@ -239,8 +239,8 @@ Tauri 프로젝트의 최소한의 `package.json` 파일은 다음 예와 같습
"tauri": "tauri"
},
"dependencies": {
"@tauri-apps/api": "^2.0.0.0",
"@tauri-apps/cli": "^2.0.0.0"
"@tauri-apps/api": "^2.0.0",
"@tauri-apps/cli": "^2.0.0"
}
}
```
Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/ko/develop/sidecar.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ i18nReady: true

바이너리는 모든 프로그래밍 언어로 작성된 실행 파일입니다. 일반적인 사용 예로는 `pyinstaller`를 사용하여 번들된 Python CLI 애플리케이션이나 API 서버 등이 있습니다.

원하는 바이너리를 번들링하려면 `tauri.conf.json`의 `tauri > bundle` 객체에 `externalBin` 속성을 추가합니다.
원하는 바이너리를 번들링하려면 `tauri.conf.json`의 `bundle` 객체에 `externalBin` 속성을 추가합니다.
`externalBin` 설정에는 절대 경로 또는 상대 경로를 사용하여 대상 바이너리를 지정하는 "문자열 목록"이 필요합니다.

다음은 "사이드카" 설정을 설명하기 위한 "Tauri 설정"의 발췌(스니펫)입니다:
Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/ko/start/migrate/from-tauri-1.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ tauri::Builder::default()

### File System 플러그인 마이그레이션

Rust의 `App::get_cli_matches` 및 `@tauri-apps/api/fs` API가 삭제되었습니다. 대신 Rust에는 [`std::fs`](https://doc.rust-lang.org/std/fs/)를, JavaScript에는 `@tauri-apps/plugin-fs` 플러그인을 사용하십시오:
Rust의 `tauri::api::fs` 및 `@tauri-apps/api/fs` API가 삭제되었습니다. 대신 Rust에는 [`std::fs`](https://doc.rust-lang.org/std/fs/)를, JavaScript에는 `@tauri-apps/plugin-fs` 플러그인을 사용하십시오:

1. Cargo에 종속성을 추가합니다:

Expand Down
10 changes: 5 additions & 5 deletions src/content/docs/learn/system-tray.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,12 @@ const tray = await TrayIcon.new(options);

```rust
use tauri::{
menu::{Menu, MenuItem},
menu::{MenuBuilder, MenuItemBuilder},
tray::TrayIconBuilder,
};

let quit_i = MenuItem::with_id(app, "quit", "Quit", true, None::<&str>)?;
let menu = Menu::with_items(app, &[&quit_i])?;
let quit_i = MenuItemBuilder::with_id("quit", "Quit").build(app)?;
let menu = MenuBuilder::new(app).item(&quit_i).build()?;

let tray = TrayIconBuilder::new()
.menu(&menu)
Expand Down Expand Up @@ -206,13 +206,13 @@ Use the [`TrayIconBuilder::on_menu_event`] method to attach a tray menu click ev
use tauri::tray::TrayIconBuilder;

TrayIconBuilder::new()
.on_menu_event(|app, event| match event.id.as_ref() {
.on_menu_event(|app, event| match event.id().as_ref() {
"quit" => {
println!("quit menu item was clicked");
app.exit(0);
}
_ => {
println!("menu item {:?} not handled", event.id);
println!("menu item {:?} not handled", event.id());
}
})
```
Expand Down
32 changes: 11 additions & 21 deletions src/content/docs/learn/window-menu.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -292,8 +292,8 @@ fn main() {
.build(app)?;

let check_sub_item_2 = CheckMenuItemBuilder::new("Chinese")
.id("en")
.checked(lang_str == "en")
.id("zh")
.checked(lang_str == "zh")
.enabled(false)
.build(app)?;

Expand Down Expand Up @@ -516,7 +516,7 @@ await menu.setAsAppMenu();

use tauri::{
image::Image,
menu::{CheckMenuItemBuilder, IconMenuItem, MenuBuilder, MenuItem, SubmenuBuilder},
menu::{CheckMenuItemBuilder, IconMenuItemBuilder, MenuBuilder, MenuItemBuilder, SubmenuBuilder},
};

fn main() {
Expand All @@ -530,24 +530,14 @@ fn main() {
.checked(false)
.build(app)?;

let text_menu = MenuItem::with_id(
app,
"change_text",
&"Change menu".to_string(),
true,
Some("Ctrl+Z"),
)
.unwrap();

let icon_menu = IconMenuItem::with_id(
app,
"change_icon",
&"Change icon menu",
true,
Some(Image::from_bytes(include_bytes!("../icons/icon.png")).unwrap()),
Some("Ctrl+F"),
)
.unwrap();
let text_menu = MenuItemBuilder::with_id("change_text", "Change menu")
.accelerator("Ctrl+Z")
.build(app)?;

let icon_menu = IconMenuItemBuilder::with_id("change_icon", "Change icon menu")
.icon(Image::from_bytes(include_bytes!("../icons/icon.png")).unwrap())
.accelerator("Ctrl+F")
.build(app)?;

let menu_item = SubmenuBuilder::new(app, "Change menu")
.item(&text_menu)
Expand Down
Loading
Loading