Fix i18n failures (#3810)

* synced 0.18 i18n docs
This commit is contained in:
Siyuan Yan 2025-02-24 06:38:47 +09:00 committed by GitHub
parent 3c6fed4834
commit e822833f40
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
19 changed files with 39 additions and 166 deletions

View File

@ -436,5 +436,9 @@
"theme.contentVisibility.draftBanner.message": {
"message": "This page is a draft. It will only be visible in dev and be excluded from the production build.",
"description": "The draft content banner message"
},
"theme.blog.author.noPosts": {
"message": "この著者による投稿はまだありません。",
"description": "The text for authors with 0 blog post"
}
}

View File

@ -62,7 +62,7 @@ impl Component for MyComponent {
}
```
使い方については[`html!`ガイド](html.mdx)をご確認ください。
使い方については[`html!`ガイド](../html/introduction.mdx)をご確認ください。
### Rendered

View File

@ -1,6 +1,7 @@
---
title: Introduction
description: The procedural macro for generating HTML and SVG
title: 'HTML'
sidebar_label: Introduction
description: 'The procedural macro for generating HTML and SVG'
---
`html!`マクロによって HTML と SVG のコードを宣言的に書くことができます。
@ -8,7 +9,7 @@ JSX \(HTML のようなコードを JavaScript 内部に書くことができる
**重要な注意**
1. `html!`マクロはルートの HTML ノードのみ受け付けます \([フラグメントかイテレータを使う](html/lists.mdx)ことでやり取りできます\)
1. `html!`マクロはルートの HTML ノードのみ受け付けます \([フラグメントかイテレータを使う](lists.mdx)ことでやり取りできます\)
2. 空の`html! {}`の呼び出しは可能ですが何もレンダリングしません
3. リテラルはクオーテーションがつけられ、ブレースで囲う必要があります: `html! { "Hello, World" }`

View File

@ -1,10 +0,0 @@
---
title: Introduction
description: Yew's glue to browser APIs
---
# サービス
:::note
このセクションはまだ WIP です。
:::

View File

@ -0,0 +1,11 @@
---
title: 'Services'
sidebar_label: Overview
description: "Yew's glue to browser APIs"
---
# サービス
:::note
このセクションはまだ WIP です。
:::

View File

@ -1,6 +1,7 @@
---
title: Introduction
description: Set yourself up for success
title: 'Project Setup'
sidebar_label: Introduction
description: 'Set yourself up for success'
---
# 始める
@ -22,15 +23,6 @@ Webpack には[`wasm-pack-plugin`](https://github.com/wasm-tool/wasm-pack-plugin
[`wasm-pack`で始める](project-setup/using-wasm-pack.mdx)
### [**`wasm-bindgen`**](https://rustwasm.github.io/docs/wasm-bindgen/)
Rust/Wasm 活動チームによって開発されているライブラリと CLI ツールで、JS / WebAssembly の互換性を持たせるための低レベルなツールです
(`wasm-pack`で内部的に使われています)。
`wasm-bindgen`は手書きの JavaScript で WebAssembly のバイナリを使う必要があるため、直接使うのは非推奨です。
しかし、詳細な情報については[**`wasm-bindgen` ガイド**](https://rustwasm.github.io/docs/wasm-bindgen/)から得られます。
[`wasm-bindgen`で始める。](project-setup/using-wasm-bindgen.mdx)
### [**`cargo-web`**](https://github.com/koute/cargo-web)
`wasm-pack`と`wasm-bindgen`を導入する前は好まれた Web ワークフローツールです。
@ -47,9 +39,6 @@ Rust/Wasm 活動チームによって開発されているライブラリと CLI
<th style={{ textAlign: 'left' }}>
<code>wasm-pack</code>
</th>
<th style={{ textAlign: 'left' }}>
<code>wasm-bindgen</code>
</th>
<th style={{ textAlign: 'left' }}>
<code>cargo-web</code>
</th>
@ -62,10 +51,6 @@ Rust/Wasm 活動チームによって開発されているライブラリと CLI
<a href="https://rustwasm.github.io/">Rust / Wasm活動チーム</a>
により活発にメンテナンス
</td>
<td style={{ textAlign: 'left' }}>
<a href="https://rustwasm.github.io/">Rust / Wasm 活動チーム</a>
により活発にメンテナンス
</td>
<td style={{ textAlign: 'left' }}>
6ヶ月間GitHubでの活発な活動無し
</td>
@ -75,9 +60,6 @@ Rust/Wasm 活動チームによって開発されているライブラリと CLI
<td style={{ textAlign: 'left' }}>
ほぼ大丈夫! <code>webpack</code>があればなお良い。
</td>
<td style={{ textAlign: 'left' }}>
だいたい大丈夫。開発においては少し流れを書かないといけない。
</td>
<td style={{ textAlign: 'left' }}>
しっかり動く!完結していて、外部ライブラリに頼る必要無し。
</td>
@ -87,7 +69,6 @@ Rust/Wasm 活動チームによって開発されているライブラリと CLI
<td style={{ textAlign: 'left' }}>
<code>webpack</code>プラグインによるサポートあり
</td>
<td style={{ textAlign: 'left' }}>サポート無し</td>
<td style={{ textAlign: 'left' }}>サポートあり</td>
</tr>
<tr>
@ -97,7 +78,6 @@ Rust/Wasm 活動チームによって開発されているライブラリと CLI
<td style={{ textAlign: 'left' }}>
<code>webpack</code>プラグインによるサポートあり
</td>
<td style={{ textAlign: 'left' }}>サポート無し</td>
<td style={{ textAlign: 'left' }}>サポートあり</td>
</tr>
<tr>
@ -107,11 +87,6 @@ Rust/Wasm 活動チームによって開発されているライブラリと CLI
サポートあり
</a>
</td>
<td style={{ textAlign: 'left' }}>
<a href="https://rustwasm.github.io/docs/wasm-bindgen/wasm-bindgen-test/index.html">
サポートあり
</a>
</td>
<td style={{ textAlign: 'left' }}>
<a href="https://github.com/koute/cargo-web#features">
サポートあり
@ -127,13 +102,6 @@ Rust/Wasm 活動チームによって開発されているライブラリと CLI
</li>
</ul>
</td>
<td style={{ textAlign: 'left' }}>
<ul>
<li>
<code>wasm32-unknown-unknown</code>
</li>
</ul>
</td>
<td style={{ textAlign: 'left' }}>
<ul>
<li>
@ -153,7 +121,6 @@ Rust/Wasm 活動チームによって開発されているライブラリと CLI
<code>web-sys</code>
</td>
<td style={{ textAlign: 'left' }}>互換性あり</td>
<td style={{ textAlign: 'left' }}>互換性あり</td>
<td style={{ textAlign: 'left' }}>互換性無し</td>
</tr>
<tr>
@ -162,7 +129,6 @@ Rust/Wasm 活動チームによって開発されているライブラリと CLI
</td>
<td style={{ textAlign: 'left' }}>互換性あり</td>
<td style={{ textAlign: 'left' }}>互換性あり</td>
<td style={{ textAlign: 'left' }}>互換性あり</td>
</tr>
<tr>
<td style={{ textAlign: 'left' }}>使用例</td>
@ -171,12 +137,6 @@ Rust/Wasm 活動チームによって開発されているライブラリと CLI
入門用テンプレート
</a>
</td>
<td style={{ textAlign: 'left' }}>
Yewで
<a href="https://github.com/yewstack/yew/blob/master/examples/build.sh">
作る例
</a>
</td>
<td style={{ textAlign: 'left' }}>
Yewで
<a href="https://www.github.com/yewstack/yew/tree/master/packages/yew-stdweb/examples">

View File

@ -1,51 +0,0 @@
---
title: Using wasm-bindgen
---
## インストール
```bash
cargo install wasm-bindgen-cli
```
## ビルド
はじめに、Wasm ファイルを生成するアプリをビルドしましょう。
[サンプルアプリをビルド](../build-a-sample-app.md)のアプリをビルドしたいとします。
生成されたファイルのパスは`target/wasm32-unknown-unknown/debug/yew-app.wasm`にあるはずです。
もしクレートに何か別の名前をつけた場合、Wasm ファイルの名前は`yew-app.wasm`ではなく、`Cargo.toml`ファイルに
`package.name`として名前をつけたものになるでしょう。
```bash
cargo build --target wasm32-unknown-unknown
```
次に、wasm-bindgen の CLI を動かしましょう。
このコマンドは`--out-dir`のディレクトリにいくつかのファイルを生成し、その中には Wasm バイナリを読み込んで動かすための
コンパイルされた WebAssembly と JavaScript のラッパーが入っています。
現在のブラウザは直接 WebAssembly ファイルを読み込むことができないため、代わりに JavaScript 経由で読み込まれるなければならず、
そのためにこれらのラッパーが必要となります。
[サンプルアプリを作る(../build-a-sample-app.md)の例では`static`フォルダにファイルが生成されるようにしており
(そのために`wasm-bindgen`へ`--out-dir static`と渡す必要があります)、
`wasm.js`と`wasm_bg.wasm`という名前になります(`wasm-bindgen`へ`--out-name wasm`と渡すことで実現できます)
```bash
wasm-bindgen --target web --out-dir static --out-name wasm target/wasm32-unknown-unknown/debug/appname.wasm --no-typescript
```
## アプリをサーブする
好きなサーバーを使ってください。
ここではシンプルな Python のサーバーを使います。
```bash
python -m http.server 8000
```
## サポートされているターゲット
- `wasm32-unknown-unknown`
## 参考ドキュメント
- [The `wasm-bindgen` docs](https://rustwasm.github.io/docs/wasm-bindgen/)

View File

@ -436,5 +436,9 @@
"theme.contentVisibility.draftBanner.message": {
"message": "This page is a draft. It will only be visible in dev and be excluded from the production build.",
"description": "The draft content banner message"
},
"theme.blog.author.noPosts": {
"message": "This author has not written any posts yet.",
"description": "The text for authors with 0 blog post"
}
}

View File

@ -56,7 +56,7 @@ impl Component for MyComponent {
}
```
有关用法的详细信息,请查看 [`html!` 宏指南](html.mdx)。
有关用法的详细信息,请查看 [`html!` 宏指南](../html/introduction.mdx)。
### Rendered

View File

@ -8,7 +8,7 @@ description: 用于生成 HTML 和 SVG 的宏程序
**重要提示**
1. `html!` 宏调用中只能有一个根节点(你可以通过[使用片段fragments或迭代器](html/lists.mdx)来绕过这一点)
1. `html!` 宏调用中只能有一个根节点(你可以通过[使用片段fragments或迭代器](../html/lists.mdx)来绕过这一点)
2. 空的 `html! {}` 宏调用是有效的但不会渲染任何内容
3. 常量必须始终被引号括起来并被包含在大括号里:`html! { "Hello, World" }`
@ -117,7 +117,7 @@ html! {
有一些特殊的属性不会直接影响 DOM而是充当 Yew 虚拟 DOM 的指令。目前,有这样两个特殊的 props `ref`和`key` 。
`ref`允许您直接访问和操作底层 DOM 节点。见[参考文献](components/refs)获取的更多细节。
`ref`允许您直接访问和操作底层 DOM 节点。见[参考文献](../components/refs.mdx)获取的更多细节。
`key`为元素提供了一个唯一标识符Yew 可以将其用于优化。

View File

@ -1,5 +0,0 @@
# 使用 wasm-bindgen
:::note
`Contribute to our docs:` [Explain how to use wasm-bindgen to build an app](https://github.com/yewstack/docs/issues/34)
:::

View File

@ -436,5 +436,9 @@
"theme.contentVisibility.draftBanner.message": {
"message": "This page is a draft. It will only be visible in dev and be excluded from the production build.",
"description": "The draft content banner message"
},
"theme.blog.author.noPosts": {
"message": "This author has not written any posts yet.",
"description": "The text for authors with 0 blog post"
}
}

View File

@ -1,4 +1,5 @@
---
title: 介绍
description: 元件,以及生命周期鉤子
---
@ -57,7 +58,7 @@ impl Component for MyComponent {
}
```
更多使用細節,請參考 [`html!` 教學](html.md)。
更多使用細節,請參考 [`html!` 教學](../html/introduction.mdx)。
### Rendered

View File

@ -6,4 +6,4 @@ description: Yew 與瀏覽器的 API 的接合劑
這個區塊有的文章:
- [Format](services/format.md)
- [Format](format.mdx)

View File

@ -16,19 +16,13 @@ description: Set yourself up for success
一套 CLI 工具,由 Rust/Wasm Working Group 為了編譯並打包 WebAssembly 所開發的。最好與 Webpack 的 [`wasm-pack-plugin`](https://github.com/wasm-tool/wasm-pack-plugin) 搭配使用。
[開始使用 wasm-pack](project-setup/using-wasm-pack.md)
### [**`wasm-bindgen`**](https://rustwasm.github.io/docs/wasm-bindgen/)
同時是套件,也是 CLI 工具,並由 Rust / Wasm Working Group 開發。他是一套較底層的工具(通常是 `wasm-pack` 內部使用),用以增加 JavaScript 與 WebAssembly 的互操作性。我們不建議直接使用 `wasm-bindgen`,因為你需要多寫一些 JavaScript 的程式碼來引入你的 WebAssembly 二進位檔案。雖然如此,你仍然可以使用 wasm-bindgen更多資訊請參考 [**`wasm-bindgen` guide**](https://rustwasm.github.io/docs/wasm-bindgen/)**。**
[開始使用 wasm-bindgen](project-setup/using-wasm-bindgen.md)
[開始使用 wasm-pack](project-setup/using-wasm-pack.mdx)
### [**`cargo-web`**](https://github.com/koute/cargo-web)
在 `wasm-pack` 與 `wasm-bindgen` 出來之前,這是我們的首選工具。在安裝與執行方面,他的速度仍是最快的,我們推薦你安裝他去執行我們的那些還沒有使用 `wasm-pack` 的範例。
[開始使用 cargo-web](project-setup/using-cargo-web.md)
[開始使用 cargo-web](project-setup/using-cargo-web.mdx)
### 比較
@ -39,9 +33,6 @@ description: Set yourself up for success
<th style={{ textAlign: 'left' }}>
<code>wasm-pack</code>
</th>
<th style={{ textAlign: 'left' }}>
<code>wasm-bindgen</code>
</th>
<th style={{ textAlign: 'left' }}>
<code>cargo-web</code>
</th>
@ -59,13 +50,6 @@ description: Set yourself up for success
</a>{' '}
&#x7DAD;&#x8B77;&#x4E2D;
</td>
<td style={{ textAlign: 'left' }}>
&#x6301;&#x7E8C;&#x7531;{' '}
<a href="https://rustwasm.github.io/">
Rust / Wasm Working Group
</a>{' '}
&#x7DAD;&#x8B77;&#x4E2D;
</td>
<td style={{ textAlign: 'left' }}>
GitHub Repo
&#x5DF2;&#x7D93;&#x516D;&#x500B;&#x6708;&#x4EE5;&#x4E0A;&#x6C92;&#x6709;&#x52D5;&#x975C;&#x4E86;
@ -79,9 +63,6 @@ description: Set yourself up for success
&#x9084;&#x53EF;&#x4EE5;&#xFF0C;&#x9700;&#x8981;&#x642D;&#x914D;
Webpack
</td>
<td style={{ textAlign: 'left' }}>
&#x592A;&#x904E;&#x5E95;&#x5C64;&#xFF0C;&#x4F60;&#x9700;&#x8981;&#x5BEB;&#x4E00;&#x8173;&#x672C;&#x4F86;&#x512A;&#x5316;&#x958B;&#x767C;&#x9AD4;&#x9A57;
</td>
<td style={{ textAlign: 'left' }}>
&#x53EF;&#x4EE5;&#x52D5;&#xFF01;&#x53E6;&#x5916;&#x7121;&#x9700;&#x5916;&#x90E8;&#x5957;&#x4EF6;&#x652F;&#x63F4;
</td>
@ -94,7 +75,6 @@ description: Set yourself up for success
<td style={{ textAlign: 'left' }}>
&#x642D;&#x914D; <code>webpack</code> &#x63D2;&#x4EF6;
</td>
<td style={{ textAlign: 'left' }}>&#x4E0D;&#x652F;&#x63F4;</td>
<td style={{ textAlign: 'left' }}>&#x652F;&#x63F4;</td>
</tr>
<tr>
@ -104,7 +84,6 @@ description: Set yourself up for success
<td style={{ textAlign: 'left' }}>
&#x642D;&#x914D; <code>webpack</code> &#x63D2;&#x4EF6;
</td>
<td style={{ textAlign: 'left' }}>&#x4E0D;&#x652F;&#x63F4;</td>
<td style={{ textAlign: 'left' }}>&#x652F;&#x63F4;</td>
</tr>
<tr>
@ -116,11 +95,6 @@ description: Set yourself up for success
Supported
</a>
</td>
<td style={{ textAlign: 'left' }}>
<a href="https://rustwasm.github.io/docs/wasm-bindgen/wasm-bindgen-test/index.html">
Supported
</a>
</td>
<td style={{ textAlign: 'left' }}>
<a href="https://github.com/koute/cargo-web#features">
Supported
@ -138,13 +112,6 @@ description: Set yourself up for success
</li>
</ul>
</td>
<td style={{ textAlign: 'left' }}>
<ul>
<li>
<code>wasm32-unknown-unknown</code>
</li>
</ul>
</td>
<td style={{ textAlign: 'left' }}>
<ul>
<li>
@ -164,7 +131,6 @@ description: Set yourself up for success
<code>web-sys</code>
</td>
<td style={{ textAlign: 'left' }}>&#x76F8;&#x5BB9;</td>
<td style={{ textAlign: 'left' }}>&#x76F8;&#x5BB9;</td>
<td style={{ textAlign: 'left' }}>&#x4E0D;&#x76F8;&#x5BB9;</td>
</tr>
<tr>
@ -173,7 +139,6 @@ description: Set yourself up for success
</td>
<td style={{ textAlign: 'left' }}>&#x76F8;&#x5BB9;</td>
<td style={{ textAlign: 'left' }}>&#x76F8;&#x5BB9;</td>
<td style={{ textAlign: 'left' }}>&#x76F8;&#x5BB9;</td>
</tr>
<tr>
<td style={{ textAlign: 'left' }}>
@ -190,12 +155,6 @@ description: Set yourself up for success
&#x7DE8;&#x8B6F;&#x8173;&#x672C;
</a>
</td>
<td style={{ textAlign: 'left' }}>
Yew &#x7BC4;&#x4F8B;&#x7684;
<a href="https://github.com/yewstack/yew/blob/master/examples/build_all.sh">
&#x7DE8;&#x8B6F;&#x8173;&#x672C;
</a>
</td>
</tr>
</tbody>
</table>

View File

@ -1,5 +0,0 @@
# 使用 wasm-bindgen
:::note
`歡迎來貢獻文件:`[`解說如何用 wasm-bindgen 建立一個應用程式`](https://github.com/yewstack/docs/issues/34)\`\`
:::