+

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+directory
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+`, }} />
+
+## Contributors
+
+
+
+
+
+
+
+
+
+
+
+## Special Mentions
+
+- [John Chadwick](https://github.com/jchv) - His amazing work on [go-webview2](https://github.com/jchv/go-webview2) and [go-winloader](https://github.com/jchv/go-winloader) have made the Windows version possible.
+- [Tad Vizbaras](https://github.com/tadvi) - His winc project was the first step down the path to a pure Go Wails.
+- [Mat Ryer](https://github.com/matryer) - For advice, support and bants.
+- [Dustin Krysak](https://wiki.ubuntu.com/bashfulrobot) - His support and feedback has been invaluable.
+- [Justen Walker](https://github.com/justenwalker/) - For helping wrangle COM issues which got v2 over the line.
+- [Wang, Chi](https://github.com/patr0nus/) - The DeskGap project was a huge influence on the direction of Wails v2.
+- [Serge Zaitsev](https://github.com/zserge) - Whilst Wails does not use the Webview project, it is still a source of inspiration.
diff --git a/website/i18n/ru/docusaurus-plugin-content-pages/faq.md b/website/i18n/ru/docusaurus-plugin-content-pages/faq.md
new file mode 100644
index 000000000..32cce9075
--- /dev/null
+++ b/website/i18n/ru/docusaurus-plugin-content-pages/faq.md
@@ -0,0 +1 @@
+# FAQ
\ No newline at end of file
diff --git a/website/i18n/ru/docusaurus-plugin-content-pages/markdown-page.md b/website/i18n/ru/docusaurus-plugin-content-pages/markdown-page.md
new file mode 100644
index 000000000..9756c5b66
--- /dev/null
+++ b/website/i18n/ru/docusaurus-plugin-content-pages/markdown-page.md
@@ -0,0 +1,7 @@
+---
+title: Markdown page example
+---
+
+# Markdown page example
+
+You don't need React to write simple standalone pages.
diff --git a/website/i18n/ru/docusaurus-plugin-content-pages/stats.mdx b/website/i18n/ru/docusaurus-plugin-content-pages/stats.mdx
new file mode 100644
index 000000000..dd174cd99
--- /dev/null
+++ b/website/i18n/ru/docusaurus-plugin-content-pages/stats.mdx
@@ -0,0 +1,24 @@
+# Website Stats
+
+To enable us to understand how better to focus our efforts on translations and platform support, we use [Plausible](https://plausible.io/privacy-focused-web-analytics) to gather **anonymous** stats like country and platform. We chose Plausible because we believe in respecting the privacy of our users. We also believe in transparency, therefore have made the dashboard public.
+
+If you have any concerns or suggestions, please raise them in the projects github discussions.
+
+
+
+
+
+export const NewComponent = () => (
+
+
+
+);
+
+
diff --git a/website/i18n/ru/docusaurus-theme-classic/footer.json b/website/i18n/ru/docusaurus-theme-classic/footer.json
new file mode 100644
index 000000000..bc52f458e
--- /dev/null
+++ b/website/i18n/ru/docusaurus-theme-classic/footer.json
@@ -0,0 +1,54 @@
+{
+ "link.title.Docs": {
+ "message": "Docs",
+ "description": "The title of the footer links column with title=Docs in the footer"
+ },
+ "link.title.Community": {
+ "message": "Community",
+ "description": "The title of the footer links column with title=Community in the footer"
+ },
+ "link.title.More": {
+ "message": "More",
+ "description": "The title of the footer links column with title=More in the footer"
+ },
+ "link.item.label.Introduction": {
+ "message": "Introduction",
+ "description": "The label of footer link with label=Introduction linking to /docs/introduction"
+ },
+ "link.item.label.Getting Started": {
+ "message": "Getting Started",
+ "description": "The label of footer link with label=Getting Started linking to /docs/gettingstarted/installation"
+ },
+ "link.item.label.Changelog": {
+ "message": "Changelog",
+ "description": "The label of footer link with label=Changelog linking to /changelog"
+ },
+ "link.item.label.Github": {
+ "message": "Github",
+ "description": "The label of footer link with label=Github linking to https://github.com/wailsapp/wails"
+ },
+ "link.item.label.Twitter": {
+ "message": "Twitter",
+ "description": "The label of footer link with label=Twitter linking to https://twitter.com/wailsapp"
+ },
+ "link.item.label.Slack": {
+ "message": "Slack",
+ "description": "The label of footer link with label=Slack linking to https://gophers.slack.com/messages/CJ4P9F7MZ/"
+ },
+ "link.item.label.Slack invite": {
+ "message": "Slack invite",
+ "description": "The label of footer link with label=Slack invite linking to https://invite.slack.golangbridge.org/"
+ },
+ "link.item.label.Blog": {
+ "message": "Blog",
+ "description": "The label of footer link with label=Blog linking to /blog"
+ },
+ "copyright": {
+ "message": "Copyright © 2022 Lea Anthony. Built with Docusaurus.",
+ "description": "The footer copyright"
+ },
+ "link.item.label.Awesome": {
+ "message": "Awesome",
+ "description": "The label of footer link with label=Awesome linking to https://github.com/wailsapp/awesome-wails"
+ }
+}
diff --git a/website/i18n/ru/docusaurus-theme-classic/navbar.json b/website/i18n/ru/docusaurus-theme-classic/navbar.json
new file mode 100644
index 000000000..9602346ce
--- /dev/null
+++ b/website/i18n/ru/docusaurus-theme-classic/navbar.json
@@ -0,0 +1,42 @@
+{
+ "item.label.Sponsor": {
+ "message": "Sponsor ❤",
+ "description": "Navbar item with label Sponsor"
+ },
+ "item.label.Docs": {
+ "message": "Docs",
+ "description": "Navbar item with label Docs"
+ },
+ "item.label.Blog": {
+ "message": "Blog",
+ "description": "Navbar item with label Blog"
+ },
+ "item.label.GitHub": {
+ "message": "GitHub",
+ "description": "Navbar item with label GitHub"
+ },
+ "item.label.About": {
+ "message": "About",
+ "description": "Navbar item with label About"
+ },
+ "item.label.FAQ": {
+ "message": "FAQ",
+ "description": "Navbar item with label FAQ"
+ },
+ "item.label.Changelog": {
+ "message": "Changelog",
+ "description": "Navbar item with label Changelog"
+ },
+ "item.label.Community Guide": {
+ "message": "Community Guide",
+ "description": "Navbar item with label Community Guide"
+ },
+ "item.label.Credits": {
+ "message": "Credits",
+ "description": "Navbar item with label Credits"
+ },
+ "item.label.Stats": {
+ "message": "Stats",
+ "description": "Navbar item with label Stats"
+ }
+}
diff --git a/website/i18n/zh-Hans/code.json b/website/i18n/zh-Hans/code.json
index 075f074bc..b6f728792 100644
--- a/website/i18n/zh-Hans/code.json
+++ b/website/i18n/zh-Hans/code.json
@@ -50,10 +50,6 @@
"message": "关闭",
"description": "The ARIA label for close button of announcement bar"
},
- "theme.BackToTopButton.buttonAriaLabel": {
- "message": "回到顶部",
- "description": "The ARIA label for the back to top button"
- },
"theme.blog.archive.title": {
"message": "历史博文",
"description": "The page & hero title of the blog archive page"
@@ -62,6 +58,10 @@
"message": "历史博文",
"description": "The page & hero description of the blog archive page"
},
+ "theme.BackToTopButton.buttonAriaLabel": {
+ "message": "回到顶部",
+ "description": "The ARIA label for the back to top button"
+ },
"theme.blog.paginator.navAriaLabel": {
"message": "博文列表分页导航",
"description": "The ARIA label for the blog pagination"
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-blog/2021-09-27-v2-beta1-release-notes.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-blog/2021-09-27-v2-beta1-release-notes.mdx
index 5470bb777..3d4790329 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-blog/2021-09-27-v2-beta1-release-notes.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-blog/2021-09-27-v2-beta1-release-notes.mdx
@@ -10,7 +10,7 @@ tags:
-

>
+
@@ -31,7 +31,7 @@ tags:
### WebView2 Chromium 渲染引擎
-

>
+
@@ -47,7 +47,7 @@ Gophers 欢呼吧! 单个二进制文件的构想依然存在!
### 新功能
-

>
+
@@ -59,7 +59,7 @@ Gophers 欢呼吧! 单个二进制文件的构想依然存在!
现在可以选择随项目生成 IDE 配置。 这意味着如果您在受支持的 IDE 中打开您的项目,它已经被配置为构建和调试您的应用程序。 目前支持 VSCode,但我们希望尽快支持其他 IDE,例如 Goland。
-

>
+
@@ -79,7 +79,7 @@ v1 的一个巨大痛点是需要将整个应用程序压缩为单个 JS 和 CSS
### 全新的开发体验
-

>
+
@@ -101,7 +101,7 @@ v1 的一个巨大痛点是需要将整个应用程序压缩为单个 JS 和 CSS
### 远程模板
-

>
+
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-blog/2021-11-08-v2-beta2-release-notes.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-blog/2021-11-08-v2-beta2-release-notes.mdx
index 2e8febe3e..8ff747330 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-blog/2021-11-08-v2-beta2-release-notes.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-blog/2021-11-08-v2-beta2-release-notes.mdx
@@ -10,7 +10,7 @@ tags:
-

>
+
@@ -24,7 +24,7 @@ tags:
### 新特性
-

>
+
@@ -72,7 +72,7 @@ v1 的一个巨大痛点是需要将整个应用程序压缩为单个 JS 和 CSS
### 远程模板
-

>
+
@@ -86,7 +86,7 @@ v1 的一个巨大痛点是需要将整个应用程序压缩为单个 JS 和 CSS
感谢[Mat Ryer](https://github.com/matryer/)的惊人支持,Wails 项目现在支持 M1 原生构建:
-

>
+
@@ -94,7 +94,7 @@ v1 的一个巨大痛点是需要将整个应用程序压缩为单个 JS 和 CSS
您也可以指定`darwin/amd64`为目标:
-

>
+
@@ -102,7 +102,7 @@ v1 的一个巨大痛点是需要将整个应用程序压缩为单个 JS 和 CSS
哦,我差点忘了....你也可以做`darwin/universal`....😉
-

>
+
@@ -112,7 +112,7 @@ v1 的一个巨大痛点是需要将整个应用程序压缩为单个 JS 和 CSS
因为 Windows 的 Wails v2 是纯 Go,所以你可以在没有 docker 的情况下针对 Windows 构建。
-

>
+
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-blog/2022-02-22-v2-beta3-release-notes.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-blog/2022-02-22-v2-beta3-release-notes.mdx
index bc849990c..fa16e241b 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-blog/2022-02-22-v2-beta3-release-notes.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-blog/2022-02-22-v2-beta3-release-notes.mdx
@@ -10,7 +10,7 @@ tags:
-

>
+
@@ -20,7 +20,7 @@ tags:
### 新功能
-

>
+
@@ -59,7 +59,7 @@ v1 的一个巨大痛点是需要将整个应用程序压缩为单个 JS 和 CSS
### 远程模板
-

>
+
@@ -73,7 +73,7 @@ v1 的一个巨大痛点是需要将整个应用程序压缩为单个 JS 和 CSS
因为适用于 Windows 的 Wails v2 是纯 Go,所以您可以在没有 docker 的情况下针对 Windows 构建。
-

>
+
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/community/showcase/encrypteasy.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/community/showcase/encrypteasy.mdx
index bdc0534b5..00aa6b52c 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/community/showcase/encrypteasy.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/community/showcase/encrypteasy.mdx
@@ -5,6 +5,6 @@

-**[EncryptEasy](https://www.encrypteasy.app) is a simple and easy to use PGP encryption tool, managing all your and your contacts keys. Encryption should be simple. Developed with Wails. Encryption should be simple. Developed with Wails.**
+**[EncryptEasy](https://www.encrypteasy.app) is a simple and easy to use PGP encryption tool, managing all your and your contacts keys. Encryption should be simple. Developed with Wails. Encryption should be simple. Developed with Wails. 加密应该是简单的。 使用Wails开发的。**
-Encrypting messages using PGP is the industry standard. Everyone has a private and a public key. Your private key, well, needs to be kept private so only you can read messages. Your public key is distributed to anyone who wants to send you secret, encrypted messages. Managing keys, encrypting messages and decrypting messages should be a smooth experience. EncryptEasy is all about making it easy. Everyone has a private and a public key. Your private key, well, needs to be kept private so only you can read messages. Your public key is distributed to anyone who wants to send you secret, encrypted messages. Managing keys, encrypting messages and decrypting messages should be a smooth experience. EncryptEasy is all about making it easy.
+Encrypting messages using PGP is the industry standard. Everyone has a private and a public key. Your private key, well, needs to be kept private so only you can read messages. Your public key is distributed to anyone who wants to send you secret, encrypted messages. Managing keys, encrypting messages and decrypting messages should be a smooth experience. EncryptEasy is all about making it easy. Everyone has a private and a public key. Your private key, well, needs to be kept private so only you can read messages. Your public key is distributed to anyone who wants to send you secret, encrypted messages. Managing keys, encrypting messages and decrypting messages should be a smooth experience. EncryptEasy is all about making it easy. Everyone has a private and a public key. Your private key, well, needs to be kept private so only you can read messages. Your public key is distributed to anyone who wants to send you secret, encrypted messages. Managing keys, encrypting messages and decrypting messages should be a smooth experience. EncryptEasy is all about making it easy.
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/community/showcase/filehound.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/community/showcase/filehound.mdx
index a46a3b95a..ba52dd0cb 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/community/showcase/filehound.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/community/showcase/filehound.mdx
@@ -7,7 +7,7 @@
[FileHound Export Utility](https://www.filehound.co.uk/) FileHound is a cloud document management platform made for secure file retention, business process automation and SmartCapture capabilities.
-The FileHound Export Utility allows FileHound Administrators the ability to run a secure document and data extraction tasks for alternative back-up and recovery purposes. This application will download all documents and/or meta data saved in FileHound based on the filters you choose. The metadata will be exported in both JSON and XML formats. This application will download all documents and/or meta data saved in FileHound based on the filters you choose. The metadata will be exported in both JSON and XML formats.
+The FileHound Export Utility allows FileHound Administrators the ability to run a secure document and data extraction tasks for alternative back-up and recovery purposes. This application will download all documents and/or meta data saved in FileHound based on the filters you choose. The metadata will be exported in both JSON and XML formats. This application will download all documents and/or meta data saved in FileHound based on the filters you choose. The metadata will be exported in both JSON and XML formats. This application will download all documents and/or meta data saved in FileHound based on the filters you choose. The metadata will be exported in both JSON and XML formats.
Backend built with: Go 1.15 Wails 1.11.0 go-sqlite3 1.14.6 go-linq 3.2
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/community/showcase/mollywallet.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/community/showcase/mollywallet.mdx
index 705b0ee0c..a8048439c 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/community/showcase/mollywallet.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/community/showcase/mollywallet.mdx
@@ -5,5 +5,5 @@

-[Molly Wallet](https://github.com/grvlle/constellation_wallet/) the official $DAG wallet of the Constellation Network. It'll let users interact with the Hypergraph Network in various ways, not limited to producing $DAG transactions. It'll let users interact with the Hypergraph Network in various ways, not limited to producing $DAG transactions.
+[Molly Wallet](https://github.com/grvlle/constellation_wallet/) the official $DAG wallet of the Constellation Network. It'll let users interact with the Hypergraph Network in various ways, not limited to producing $DAG transactions. It'll let users interact with the Hypergraph Network in various ways, not limited to producing $DAG transactions. It'll let users interact with the Hypergraph Network in various ways, not limited to producing $DAG transactions.
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/community/showcase/optimus.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/community/showcase/optimus.mdx
index 7e9d8c01e..7bfcfed11 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/community/showcase/optimus.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/community/showcase/optimus.mdx
@@ -5,5 +5,5 @@

-[Optimus](https://github.com/splode/optimus) is a desktop image optimization application. [Optimus](https://github.com/splode/optimus) is a desktop image optimization application. It supports conversion and compression between WebP, JPEG, and PNG image formats.
+[Optimus](https://github.com/splode/optimus) is a desktop image optimization application. [Optimus](https://github.com/splode/optimus) is a desktop image optimization application. It supports conversion and compression between WebP, JPEG, and PNG image formats. [Optimus](https://github.com/splode/optimus) is a desktop image optimization application. It supports conversion and compression between WebP, JPEG, and PNG image formats.
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/community/showcase/riftshare.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/community/showcase/riftshare.mdx
index a212c5e3d..9ef459161 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/community/showcase/riftshare.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/community/showcase/riftshare.mdx
@@ -5,7 +5,7 @@

-Easy, Secure, and Free file sharing for everyone. Learn more at [Riftshare.app](https://riftshare.app) Learn more at [Riftshare.app](https://riftshare.app)
+Easy, Secure, and Free file sharing for everyone. Learn more at [Riftshare.app](https://riftshare.app) Easy, Secure, and Free file sharing for everyone. Learn more at [Riftshare.app](https://riftshare.app) Learn more at [Riftshare.app](https://riftshare.app)
## Features
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/community/showcase/surge.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/community/showcase/surge.mdx
index 1bcf36de3..31c377f67 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/community/showcase/surge.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/community/showcase/surge.mdx
@@ -5,5 +5,5 @@

-[Surge](https://surge.rule110.io/) is a p2p filesharing app designed to utilize blockchain technologies to enable 100% anonymous file transfers. Surge is end-to-end encrypted, decentralized and open source. Surge is end-to-end encrypted, decentralized and open source.
+[Surge](https://surge.rule110.io/) is a p2p filesharing app designed to utilize blockchain technologies to enable 100% anonymous file transfers. Surge is end-to-end encrypted, decentralized and open source. Surge is end-to-end encrypted, decentralized and open source. Surge is end-to-end encrypted, decentralized and open source.
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/community/showcase/wally.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/community/showcase/wally.mdx
index 46108cfa1..331fee21a 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/community/showcase/wally.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/community/showcase/wally.mdx
@@ -5,5 +5,5 @@

-[Wally](https://ergodox-ez.com/pages/wally) is the official firmware flasher for [Ergodox](https://ergodox-ez.com/) keyboards. It looks great and is a fantastic example of what you can achieve with Wails: the ability to combine the power of Go and the rich graphical tools of the web development world. It looks great and is a fantastic example of what you can achieve with Wails: the ability to combine the power of Go and the rich graphical tools of the web development world.
+[Wally](https://ergodox-ez.com/pages/wally) is the official firmware flasher for [Ergodox](https://ergodox-ez.com/) keyboards. It looks great and is a fantastic example of what you can achieve with Wails: the ability to combine the power of Go and the rich graphical tools of the web development world. It looks great and is a fantastic example of what you can achieve with Wails: the ability to combine the power of Go and the rich graphical tools of the web development world. It looks great and is a fantastic example of what you can achieve with Wails: the ability to combine the power of Go and the rich graphical tools of the web development world.
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/contributing/developing-new-features.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/contributing/developing-new-features.mdx
index 59863b4b5..d6df36638 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/contributing/developing-new-features.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/contributing/developing-new-features.mdx
@@ -4,18 +4,18 @@ sidebar_position: 20
# 开发新功能
-We are always keen to add features to Wails and expand on what the project can do. The process for adding new features are as follows: The process for adding new features are as follows:
+We are always keen to add features to Wails and expand on what the project can do. The process for adding new features are as follows: The process for adding new features are as follows: The process for adding new features are as follows:
-- Pick an enhancement ticket with the "TODO" label. Pick an enhancement ticket with the "TODO" label. It's preferable to select one from the current [Backlog](https://github.com/orgs/wailsapp/projects/1/views/1) but the choice is yours.
+- Pick an enhancement ticket with the "TODO" label. Pick an enhancement ticket with the "TODO" label. Pick an enhancement ticket with the "TODO" label. It's preferable to select one from the current [Backlog](https://github.com/orgs/wailsapp/projects/1/views/1) but the choice is yours.
- Before developing, check that the ticket includes the following information:
- The purpose of the enhancement
- What is out of scope for the enhancement
- What platforms the enhancement targets (most features should be cross-platform unless there's a very specific reason)
-- If the ticket does not include this information, feel free to request the information from the person who opened the ticket. Sometimes placeholder tickets are created and require more details Sometimes placeholder tickets are created and require more details
+- If the ticket does not include this information, feel free to request the information from the person who opened the ticket. Sometimes placeholder tickets are created and require more details Sometimes placeholder tickets are created and require more details Sometimes placeholder tickets are created and require more details
- Comment on the ticket stating you wish to develop the feature
- Clone the repository and create a branch with the format `feature/
_`
- New features often require documentation so please ensure you have also added or updated the documentation as part of the changes
-- Once the feature is ready for testing, create a draft PR. Once the feature is ready for testing, create a draft PR. Please ensure the PR description has the test scenarios and test cases listed with checkmarks, so that others can know what still needs to be tested.
+- Once the feature is ready for testing, create a draft PR. Once the feature is ready for testing, create a draft PR. Once the feature is ready for testing, create a draft PR. Please ensure the PR description has the test scenarios and test cases listed with checkmarks, so that others can know what still needs to be tested.
- Once all the testing is completed, please update the status of the PR from draft and leave a message.
:::note
@@ -24,9 +24,12 @@ enhancement requests are reviewed for good fit. Not all ideas will be selected s
on the ticket first.
::: Not all ideas will be selected so it's best to have discussion
on the ticket first.
+::: Not all ideas will be selected so it's best to have discussion
+on the ticket first.
:::
:::warning
Any PRs opened without a corresponding ticket may be rejected.
::: :::
+:::
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/contributing/documenting.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/contributing/documenting.mdx
index 6243a9ed3..cbed6305c 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/contributing/documenting.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/contributing/documenting.mdx
@@ -6,7 +6,7 @@ sidebar_position: 40
This website is also the main documentation site for the project. Sometimes this gets out of date and needs some slight adjustments. Some of the documentation isn't written to the best standards either. Developing documentation is hard and so any contribution to this is greatly appreciated. This website is also the main documentation site for the project. Sometimes this gets out of date and needs some slight adjustments. Some of the documentation isn't written to the best standards either. Developing documentation is hard and so any contribution to this is greatly appreciated. Features without documentation are unfinished so to the project, it's *as important* as the code.
-We generally do not create tickets for updating documentation so if there is text you think should be updated or rephrased then feel free to submit a PR for that. This site is in the main repository under the `website` directory. We use [Docusaurus](https://docusaurus.io/) to create the site so there is plenty of existing documentation and tutorials around to get started. This site is in the main repository under the `website` directory. We use [Docusaurus](https://docusaurus.io/) to create the site so there is plenty of existing documentation and tutorials around to get started.
+We generally do not create tickets for updating documentation so if there is text you think should be updated or rephrased then feel free to submit a PR for that. This site is in the main repository under the `website` directory. We use [Docusaurus](https://docusaurus.io/) to create the site so there is plenty of existing documentation and tutorials around to get started. This site is in the main repository under the `website` directory. We use [Docusaurus](https://docusaurus.io/) to create the site so there is plenty of existing documentation and tutorials around to get started. This site is in the main repository under the `website` directory. We use [Docusaurus](https://docusaurus.io/) to create the site so there is plenty of existing documentation and tutorials around to get started.
To set up a local documentation development environment, do the following:
@@ -15,13 +15,13 @@ To set up a local documentation development environment, do the following:
- `npm install`
- `npm run start`
-After it has all installed and is running, you should see the site at [`http://localhost:3000`](http://localhost:3000). Any changes made to the site text will be immediately reflected in the browser. Any changes made to the site text will be immediately reflected in the browser.
+After it has all installed and is running, you should see the site at [`http://localhost:3000`](http://localhost:3000). Any changes made to the site text will be immediately reflected in the browser. Any changes made to the site text will be immediately reflected in the browser. Any changes made to the site text will be immediately reflected in the browser.
## Versioning
-We employ a versioning system where we have the "latest" documentation AKA "Next Version" which has all the changes that have occurred since the last release. We also keep the last release documentation as well as the version before that. We also keep the last release documentation as well as the version before that.
+We employ a versioning system where we have the "latest" documentation AKA "Next Version" which has all the changes that have occurred since the last release. We also keep the last release documentation as well as the version before that. We also keep the last release documentation as well as the version before that. We also keep the last release documentation as well as the version before that.
There isn't usually a reason to update released documentation so we don't generally update the documents in the `versioned_docs` or `versioned_sidebars` directories.
-The "next version" docs are mainly in `website/docs` with some "version independent" documents in `src/pages`. Any updates should be made in the `website/docs` directory. Any updates should be made in the `website/docs` directory.
+The "next version" docs are mainly in `website/docs` with some "version independent" documents in `src/pages`. Any updates should be made in the `website/docs` directory. Any updates should be made in the `website/docs` directory. Any updates should be made in the `website/docs` directory.
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/contributing/fixing-bugs.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/contributing/fixing-bugs.mdx
index 4ea121d87..c5932fd68 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/contributing/fixing-bugs.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/contributing/fixing-bugs.mdx
@@ -9,19 +9,21 @@ The process for fixing bugs are as follows:
- Check the current [Backlog](https://github.com/orgs/wailsapp/projects/1/views/1) and select a bug to fix
- Before developing, check that the ticket includes the following information:
- The scope of the issue including platforms affected
-- The steps to reproduce. The steps to reproduce. Sometimes bugs are opened that are not Wails issues and the onus is on the reporter to prove that it is a Wails issue with a minimal reproducible example
+- The steps to reproduce. The steps to reproduce. The steps to reproduce. Sometimes bugs are opened that are not Wails issues and the onus is on the reporter to prove that it is a Wails issue with a minimal reproducible example
- The output of `wails doctor`
- If the ticket does not include this information, feel free to request the information from the person who opened the ticket.
- Comment on the ticket stating you wish to develop a fix
- Clone the repository and create a branch with the format `bugfix/_`
-- Once the fix is ready for testing, create a draft PR. Once the fix is ready for testing, create a draft PR. Please ensure the PR description has the test scenarios and test cases listed with checkmarks, so that others can know what still needs to be tested.
+- Once the fix is ready for testing, create a draft PR. Once the fix is ready for testing, create a draft PR. Please ensure the PR description has the test scenarios and test cases listed with checkmarks, so that others can know what still needs to be tested. Once the fix is ready for testing, create a draft PR. Please ensure the PR description has the test scenarios and test cases listed with checkmarks, so that others can know what still needs to be tested.
- Once all the testing is completed, please update the status of the PR from draft and leave a message.
:::note
There is nothing stopping you from opening a ticket and working on it yourself, but please be aware that all
bugfixes should be discussed as the approach may have unintended side effects.
::: :::
+:::
:::warning
Any PRs opened without a corresponding ticket may be rejected.
-::: :::
\ No newline at end of file
+::: :::
+:::
\ No newline at end of file
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/contributing/testing.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/contributing/testing.mdx
index 1da6cef1b..5fcd55205 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/contributing/testing.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/contributing/testing.mdx
@@ -4,13 +4,13 @@ sidebar_position: 35
# 测试
-Testing is vitally important to ensure quality in the project. Testing is vitally important to ensure quality in the project. There are a couple of scenarios where testing can really help the project:
+Testing is vitally important to ensure quality in the project. Testing is vitally important to ensure quality in the project. There are a couple of scenarios where testing can really help the project: Testing is vitally important to ensure quality in the project. There are a couple of scenarios where testing can really help the project:
- Testing if a bug is reproducible on your local system
- Testing PRs to ensure that they work correctly
If you chose to test if someone's bug report is reproducible on your local system, then feel free to add a comment on the ticket confirming this with the output of `wails doctor`.
-To test PRs, choose a PR to test and check if the PR description has the testing scenarios listed. If not, please ask the person who opened the PR to provide that list. Once you have determined a valid test scenario, please report your findings on the PR. If not, please ask the person who opened the PR to provide that list. Once you have determined a valid test scenario, please report your findings on the PR.
+To test PRs, choose a PR to test and check if the PR description has the testing scenarios listed. If not, please ask the person who opened the PR to provide that list. Once you have determined a valid test scenario, please report your findings on the PR. If not, please ask the person who opened the PR to provide that list. Once you have determined a valid test scenario, please report your findings on the PR. If not, please ask the person who opened the PR to provide that list. Once you have determined a valid test scenario, please report your findings on the PR.
If you ever need more clarity or help on testing, please ask a question in the [Contributing to Wails](https://github.com/wailsapp/wails/discussions/1520) discussion or on slack.
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/contributing/ways-of-contributing.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/contributing/ways-of-contributing.mdx
index d871fe0c6..6cbcdc3f5 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/contributing/ways-of-contributing.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/contributing/ways-of-contributing.mdx
@@ -15,4 +15,4 @@ There are many ways to contribute to the project:
- Writing tutorials / guides
- Helping others on the issues + discussions boards
-Guides for these have been created in their own sections. Guides for these have been created in their own sections. Before getting started, please introduce yourself in the [Contributing to Wails](https://github.com/wailsapp/wails/discussions/1520) discussion.
\ No newline at end of file
+Guides for these have been created in their own sections. Guides for these have been created in their own sections. Guides for these have been created in their own sections. Before getting started, please introduce yourself in the [Contributing to Wails](https://github.com/wailsapp/wails/discussions/1520) discussion.
\ No newline at end of file
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/gettingstarted/building.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/gettingstarted/building.mdx
index 1dd41d092..85d69ab39 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/gettingstarted/building.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/gettingstarted/building.mdx
@@ -9,7 +9,7 @@ sidebar_position: 6
如果您运行二进制文件,您应该会看到默认应用程序:
-

>
+
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/gettingstarted/firstproject.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/gettingstarted/firstproject.mdx
index ee994ea3a..6b3034af9 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/gettingstarted/firstproject.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/gettingstarted/firstproject.mdx
@@ -2,6 +2,9 @@
sidebar_position: 2
---
+import Tabs from "@theme/Tabs";
+import TabItem from "@theme/TabItem";
+
# 创建项目
## 项目生成
@@ -10,9 +13,74 @@ sidebar_position: 2
Pick your favourite framework:
-import TabsFrameworks from "../../../../../src/components/frameworktabs";
+
-
+
+
+ Generate a Svelte project using Javascript with:
+
+ wails init -n myproject -t svelte
+If you would rather use Typescript:
+
+ wails init -n myproject -t svelte-ts
+
+
+ Generate a React project using Javascript with:
+
+ wails init -n myproject -t react
+If you would rather use Typescript:
+
+ wails init -n myproject -t react-ts
+
+
+ Generate a Vue project using Javascript with:
+
+ wails init -n myproject -t vue
+
+If you would rather use Typescript:
+
+ wails init -n myproject -t vue-ts
+
+
+ Generate a Preact project using Javascript with:
+
+ wails init -n myproject -t preact
+
+If you would rather use Typescript:
+
+ wails init -n myproject -t preact-ts
+
+
+ Generate a Lit project using Javascript with:
+
+ wails init -n myproject -t lit
+
+If you would rather use Typescript:
+
+ wails init -n myproject -t lit-ts
+
+
+ Generate a Vanilla project using Javascript with:
+
+ wails init -n myproject -t vanilla
+
+If you would rather use Typescript:
+
+ wails init -n myproject -t vanilla-ts
+
+
+
+
@@ -27,6 +95,7 @@ Wails projects have the following layout:
```
.
.
+.
├── build/
│ ├── appicon.png
│ ├── darwin/
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/gettingstarted/installation.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/gettingstarted/installation.mdx
index 5274fe06a..092bcdb7e 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/gettingstarted/installation.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/gettingstarted/installation.mdx
@@ -37,9 +37,40 @@ Wails 有许多安装前需要的常见依赖项:
您还需要安装指定平台的依赖项:
-import Tabs from "@theme/Tabs";
-import TabItem from "@theme/TabItem";
-
+
+
+
+
+ Wails requires that the xcode command line tools are installed. This can be done by running:
+ xcode-select --install
+
+
+ Wails requires that the WebView2{" "}
+ runtime is installed. Some Windows installations will already have this installed. You can check using
+ the{" "}
+ wails doctor
command (see below).
+
+
+ Linux required the standard gcc
build tools
+ plus libgtk3
and libwebkit
.
+ Rather than list a ton of commands for different distros, Wails can try to determine
+ what the installation commands are for your specific distribution. Run wails doctor
after
+ installation
+ to be shown how to install the dependencies.
+ If your distro/package manager is not supported, please consult the {" "}
+ Add Linux Distro guide.
+
+
+
+
## 可选依赖
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/application-development.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/application-development.mdx
index d8192436d..59786d0b0 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/application-development.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/application-development.mdx
@@ -28,7 +28,7 @@ func (a *App) shutdown(ctx context.Context) {
- `startup`方法会在 Wails 分配它需要的资源后立即调用,这是创建资源、设置事件侦听器以及应用程序在启动时需要的任何其他内容的好地方。 它提供了一个`context.Context`, 通常保存在结构字段中。 调用[运行时](../reference/runtime/intro)需要此`context.Context`。 如果此方法返回错误,则应用程序将终止。 在开发模式下,错误会输出到控制台。
-- The shutdown method will be called by Wails right at the end of the shutdown process. This is a good place to deallocate memory and perform any shutdown tasks.
+- The shutdown method will be called by Wails right at the end of the shutdown process. This is a good place to deallocate memory and perform any shutdown tasks. This is a good place to deallocate memory and perform any shutdown tasks.
`main.go`文件通常由对`wails.Run()`的单个调用组成,它接受应用程序配置。 模板使用的模式是,在调用`wails.Run()`之前, 我们创建并保存一个在`app.go`中定义的结构体的实例在名`app`的变量中。 这个配置是我们添加回调的地方:
@@ -180,7 +180,7 @@ Wails v2 处理资源的方式的伟大之处在于它没有! 您唯一需要
### AssetsHandler
-A Wails v2 app can optionally define a `http.Handler` in the `options.App`, which allows hooking into the AssetServer to create files on the fly or process POST/PUT requests. GET requests are always first handled by the `assets` FS. If the FS doesn't find the requested file the request will be forwarded to the `http.Handler` for serving. Any requests other than GET will be directly processed by the `AssetsHandler` if specified. It's also possible to only use the `AssetsHandler` by specifiy `nil` as the `Assets` option.
+A Wails v2 app can optionally define a `http.Handler` in the `options.App`, which allows hooking into the AssetServer to create files on the fly or process POST/PUT requests. GET requests are always first handled by the `assets` FS. If the FS doesn't find the requested file the request will be forwarded to the `http.Handler` for serving. Any requests other than GET will be directly processed by the `AssetsHandler` if specified. It's also possible to only use the `AssetsHandler` by specifiy `nil` as the `Assets` option. GET requests are always first handled by the `assets` FS. If the FS doesn't find the requested file the request will be forwarded to the `http.Handler` for serving. Any requests other than GET will be directly processed by the `AssetsHandler` if specified. It's also possible to only use the `AssetsHandler` by specifiy `nil` as the `Assets` option.
## 内置开发服务器
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/bleeding-edge.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/bleeding-edge.mdx
index 9927629ce..720148d26 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/bleeding-edge.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/bleeding-edge.mdx
@@ -37,7 +37,7 @@ Wails CLI 现在将是最新版本。 要更新项目以使用最新版本,请
## Testing a PR
-If you want to test a PR, follow the instructions above, but ensure you fetch the PR and switch the branch before installing. Please replace `[IDofThePR]` with the ID of the PR shown on github.com:
+If you want to test a PR, follow the instructions above, but ensure you fetch the PR and switch the branch before installing. Please replace `[IDofThePR]` with the ID of the PR shown on github.com: Please replace `[IDofThePR]` with the ID of the PR shown on github.com:
- `git clone https://github.com/wailsapp/wails`
- `cd wails`
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/dynamic-assets.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/dynamic-assets.mdx
index 41b62384b..1b9d375e5 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/dynamic-assets.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/dynamic-assets.mdx
@@ -1,6 +1,6 @@
# 动态资源
-If you want to load or generate assets for your frontend dynamically, you can achieve that using the [AssetsHandler](../reference/options#assetshandler) option. The AssetsHandler is a generic `http.Handler` which will be called for any non GET request on the assets server and for GET requests which can not be served from the bundled assets because the file is not found. The AssetsHandler is a generic `http.Handler` which will be called for any non GET request on the assets server and for GET requests which can not be served from the bundled assets because the file is not found.
+If you want to load or generate assets for your frontend dynamically, you can achieve that using the [AssetsHandler](../reference/options#assetshandler) option. The AssetsHandler is a generic `http.Handler` which will be called for any non GET request on the assets server and for GET requests which can not be served from the bundled assets because the file is not found. The AssetsHandler is a generic `http.Handler` which will be called for any non GET request on the assets server and for GET requests which can not be served from the bundled assets because the file is not found. The AssetsHandler is a generic `http.Handler` which will be called for any non GET request on the assets server and for GET requests which can not be served from the bundled assets because the file is not found.
By installing a custom AssetsHandler, you can serve your own assets using a custom asset server.
@@ -83,7 +83,7 @@ If you right click the main application and select "inspect" to bring up the dev
```
let response = await fetch('does-not-exist.txt');
```
-This will generate an error in the devtools. This will generate an error in the devtools. We can see that the error is what we expect, returned by our custom assets handler:
+This will generate an error in the devtools. This will generate an error in the devtools. This will generate an error in the devtools. We can see that the error is what we expect, returned by our custom assets handler:
@@ -95,7 +95,7 @@ However, if we request `go.mod`, we will see the following output:
-This technique can be used to load images directly into the page. This technique can be used to load images directly into the page. If we updated our default vanilla template and replaced the logo image:
+This technique can be used to load images directly into the page. This technique can be used to load images directly into the page. If we updated our default vanilla template and replaced the logo image: This technique can be used to load images directly into the page. If we updated our default vanilla template and replaced the logo image:
```html
```
@@ -114,5 +114,7 @@ Exposing your filesystem in this way is a security risk. It is recommended that
to your filesystem.
::: It is recommended that you properly manage access
to your filesystem.
+::: It is recommended that you properly manage access
+to your filesystem.
:::
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/ides.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/ides.mdx
index 0da6952e9..06ce50112 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/ides.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/ides.mdx
@@ -13,7 +13,7 @@ Wails 旨在提供出色的开发体验。 为此,我们现在支持生成 IDE
使用`-ide vscode`标志生成项目时,IDE 文件将与其他项目文件一起创建。 这些文件放置在`.vscode`目录中,并为调试应用程序提供正确的配置。
-生成的 2 个文件是`tasks.json`和`launch.json`. 以下是为默认 vanilla 项目生成的文件: Below are the files generated for the default vanilla project:
+生成的 2 个文件是`tasks.json`和`launch.json`. 以下是为默认 vanilla 项目生成的文件: 生成的 2 个文件是`tasks.json`和`launch.json`. 以下是为默认 vanilla 项目生成的文件: Below are the files generated for the default vanilla project:
```json title="tasks.json"
{
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/migrating.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/migrating.mdx
index 51ec31212..28b890ce9 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/migrating.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/migrating.mdx
@@ -60,7 +60,7 @@ Wails v2 与 v1 相比有重大变化。 本文档旨在重点介绍迁移现有
### 应用程序生命周期
-In v1, there were 2 special methods in a bound struct: `WailsInit()` and `WailsShutdown()`. These have been replaced with 3 lifecycle hooks as part of the [application options](../reference/options.mdx#application-options):
+In v1, there were 2 special methods in a bound struct: `WailsInit()` and `WailsShutdown()`. In v1, there were 2 special methods in a bound struct: `WailsInit()` and `WailsShutdown()`. These have been replaced with 3 lifecycle hooks as part of the [application options](../reference/options.mdx#application-options):
- [应用启动回调](../reference/options.mdx#onstartup)
- [应用退出回调](../reference/options.mdx#onshutdown)
@@ -93,6 +93,13 @@ func (b *Basic) startup(ctx context.Context) {
b.ctx = ctx
}
...
+type Basic struct {
+ ctx context.Context
+}
+func (b *Basic) startup(ctx context.Context) {
+ b.ctx = ctx
+}
+...
```
### 运行时
@@ -116,6 +123,7 @@ func (a *App) startup(ctx context.Context) {
runtime.LogInfo(ctx, "Application Startup called!")
}
}
+}
```
@@ -141,6 +149,7 @@ func (a *App) startup(ctx context.Context) {
```shell
.
.
+.
├── build/
├── frontend/
│ └── dist/
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/mouse-buttons.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/mouse-buttons.mdx
index 4293ed093..b640790f0 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/mouse-buttons.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/mouse-buttons.mdx
@@ -1,6 +1,6 @@
# 鼠标按钮
-The Wails runtime intercepts mouse clicks to determine whether a frameless window needs resizing or a window needs to be moved. It has been asked how to detect when a mouse click has occurred, because `window.onclick` doesn't report the mouse buttons correctly. The following code shows how to detect mouse clicks: It has been asked how to detect when a mouse click has occurred, because `window.onclick` doesn't report the mouse buttons correctly. The following code shows how to detect mouse clicks:
+The Wails runtime intercepts mouse clicks to determine whether a frameless window needs resizing or a window needs to be moved. It has been asked how to detect when a mouse click has occurred, because `window.onclick` doesn't report the mouse buttons correctly. The following code shows how to detect mouse clicks: It has been asked how to detect when a mouse click has occurred, because `window.onclick` doesn't report the mouse buttons correctly. The following code shows how to detect mouse clicks: It has been asked how to detect when a mouse click has occurred, because `window.onclick` doesn't report the mouse buttons correctly. The following code shows how to detect mouse clicks:
```javascript
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/routing.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/routing.mdx
index 9cf99c438..30e1bfa8c 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/routing.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/routing.mdx
@@ -17,6 +17,8 @@ const router = createRouter({
],
});
],
+})
+ ],
})
```
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/signing.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/signing.mdx
index 8e44ee8c9..c5a45b8b2 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/signing.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/signing.mdx
@@ -1,13 +1,13 @@
# 代码签名
-This is a guide on how you can sign your binaries generated with Wails on MacOS and Windows. The guide will target CI environments, more specifically GitHub Actions. The guide will target CI environments, more specifically GitHub Actions.
+This is a guide on how you can sign your binaries generated with Wails on MacOS and Windows. The guide will target CI environments, more specifically GitHub Actions. The guide will target CI environments, more specifically GitHub Actions. The guide will target CI environments, more specifically GitHub Actions.
## Windows
-First off you need a code signing certificate. If you do not already have one, Microsoft's info page lists some providers [here](https://docs.microsoft.com/en-us/windows-hardware/drivers/dashboard/get-a-code-signing-certificate). First off you need a code signing certificate. If you do not already have one, Microsoft's info page lists some providers [here](https://docs.microsoft.com/en-us/windows-hardware/drivers/dashboard/get-a-code-signing-certificate). Please note that an EV certificate is not required unless you need to write kernel-level software such as device drivers. For signing your Wails app, a standard code signing certificate will do just fine. For signing your Wails app, a standard code signing certificate will do just fine.
+First off you need a code signing certificate. First off you need a code signing certificate. If you do not already have one, Microsoft's info page lists some providers [here](https://docs.microsoft.com/en-us/windows-hardware/drivers/dashboard/get-a-code-signing-certificate). First off you need a code signing certificate. If you do not already have one, Microsoft's info page lists some providers [here](https://docs.microsoft.com/en-us/windows-hardware/drivers/dashboard/get-a-code-signing-certificate). Please note that an EV certificate is not required unless you need to write kernel-level software such as device drivers. For signing your Wails app, a standard code signing certificate will do just fine. For signing your Wails app, a standard code signing certificate will do just fine. First off you need a code signing certificate. If you do not already have one, Microsoft's info page lists some providers [here](https://docs.microsoft.com/en-us/windows-hardware/drivers/dashboard/get-a-code-signing-certificate). Please note that an EV certificate is not required unless you need to write kernel-level software such as device drivers. For signing your Wails app, a standard code signing certificate will do just fine. For signing your Wails app, a standard code signing certificate will do just fine.
It may be a good idea to check with your certificate provider how to sign your binaries on your local machine before targeting automated build systems, just so you know if there are any special requirements. For instance, [here](https://www.ssl.com/how-to/using-your-code-signing-certificate/) is SSL.com's code signing guide for Windows. If you know how to sign locally, it will be easier to troubleshoot any potential issues in a CI environment. For instance, SSL.com code signing certificates require the `/tr` flag for [SignTool.exe](https://docs.microsoft.com/en-us/windows/win32/seccrypto/signtool) while other providers may only need the `/t` flag for providing the timestamping server. Popular GitHub Actions for signing Windows binaries like [this one](https://github.com/Dana-Prajea/code-sign-action) does not support the `/tr` flag on SignTool.exe. Therefore this guide will focus on signing our app manually with PowerShell commands, but you can use actions like the [code-sign-action](https://github.com/Dana-Prajea/code-sign-action) Action if you prefer. For instance, [here](https://www.ssl.com/how-to/using-your-code-signing-certificate/) is SSL.com's code signing guide for Windows. If you know how to sign locally, it will be easier to troubleshoot any potential issues in a CI environment. For instance, SSL.com code signing certificates require the `/tr` flag for [SignTool.exe](https://docs.microsoft.com/en-us/windows/win32/seccrypto/signtool) while other providers may only need the `/t` flag for providing the timestamping server. Popular GitHub Actions for signing Windows binaries like [this one](https://github.com/Dana-Prajea/code-sign-action) does not support the `/tr` flag on SignTool.exe. Therefore this guide will focus on signing our app manually with PowerShell commands, but you can use actions like the [code-sign-action](https://github.com/Dana-Prajea/code-sign-action) Action if you prefer.
-First off, let's make sure we are able to build our Wails app in our GitHub CI. Here is a small workflow template: Here is a small workflow template:
+First off, let's make sure we are able to build our Wails app in our GitHub CI. Here is a small workflow template: Here is a small workflow template: Here is a small workflow template:
```yaml
name: "example"
on:
@@ -74,7 +74,7 @@ jobs:
path: build/bin/*
```
-Next we need to give the GitHub workflow access to our signing certificate. This is done by encoding your .pfx or .p12 certificate into a base64 string. To do this in PowerShell, you can use the following command assuming your certificate is called 'my-cert.p12': This is done by encoding your .pfx or .p12 certificate into a base64 string. To do this in PowerShell, you can use the following command assuming your certificate is called 'my-cert.p12':
+Next we need to give the GitHub workflow access to our signing certificate. This is done by encoding your .pfx or .p12 certificate into a base64 string. To do this in PowerShell, you can use the following command assuming your certificate is called 'my-cert.p12': This is done by encoding your .pfx or .p12 certificate into a base64 string. To do this in PowerShell, you can use the following command assuming your certificate is called 'my-cert.p12': This is done by encoding your .pfx or .p12 certificate into a base64 string. To do this in PowerShell, you can use the following command assuming your certificate is called 'my-cert.p12':
```PowerShell
certutil -encode .\my-cert.p12 my-cert-base64.txt
```
@@ -101,7 +101,7 @@ After the `"Build Wails app"` step, we can add the following step to our workflo
& 'C:/Program Files (x86)/Windows Kits/10/bin/10.0.17763.0/x86/signtool.exe' sign /fd /t /f certificate\certificate.pfx /p '${{ secrets.WIN_SIGNING_CERT_PASSWORD }}'
```
-This script creates a new directory for your certificate file, creates the certificate file from our base64 secret, converts it to a .pfx file, and finally signs the binary. The following variables needs to be replaced in the last line: The following variables needs to be replaced in the last line:
+This script creates a new directory for your certificate file, creates the certificate file from our base64 secret, converts it to a .pfx file, and finally signs the binary. The following variables needs to be replaced in the last line: The following variables needs to be replaced in the last line: The following variables needs to be replaced in the last line:
* **signing algorithm**: usually sha256.
* **timestamping server**: URL to the timestamping server to use with your certificate.
* **path to binary**: path to the binary you want to sign.
@@ -131,10 +131,10 @@ jobs:
with:
node-version: 14
# You may need to manually build you frontend here, unless you have configured frontend build and install commands in wails.json.
- name: "example"
+ name: "example combined"
on:
workflow_dispatch:
- # This Action only starts when you go to Actions and manually run the workflow.
+ # This Action only starts when you go to Actions and manually run the workflow.
jobs:
package:
@@ -159,6 +159,23 @@ jobs:
- name: Build Wails app
run: |
wails build
+ - name: MacOS download gon for code signing and app notarization
+ if: matrix.platform == 'macos-latest'
+ run: |
+ brew install mitchellh/gon/gon
+ - name: Import Code-Signing Certificates for macOS
+ if: matrix.platform == 'macos-latest'
+ uses: Apple-Actions/import-codesign-certs@v1
+ with:
+ # The certificates in a PKCS12 file encoded as a base64 string
+ p12-file-base64: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12_BASE64 }}
+ # The password used to import the PKCS12 file.
+ p12-password: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_PASSWORD }}
+ - name: Sign our macOS binary
+ if: matrix.platform == 'macos-latest'
+ run: |
+ echo "Signing Package"
+ gon -log-level=info ./build/darwin/gon-sign.json
- name: Sign Windows binaries
if: matrix.platform == 'windows-latest'
run: |
@@ -167,8 +184,7 @@ jobs:
Set-Content -Path certificate\certificate.txt -Value '${{ secrets.WIN_SIGNING_CERT }}'
certutil -decode certificate\certificate.txt certificate\certificate.pfx
echo "Signing our binaries"
- & 'C:/Program Files (x86)/Windows Kits/10/bin/10.0.17763.0/x86/signtool.exe' sign /fd sha256 /tr http://ts.ssl.com /f certificate\certificate.pfx /p '${{ secrets.WIN_SIGNING_CERT_PASSWORD }}' .\build\bin\app.exe
-
+ & 'C:/Program Files (x86)/Windows Kits/10/bin/10.0.17763.0/x86/signtool.exe' sign /fd sha256 /tr http://ts.ssl.com /f certificate\certificate.pfx /p '${{ secrets.WIN_SIGNING_CERT_PASSWORD }}' .\build\bin\Monitor.exe
- name: upload artifacts macOS
if: matrix.platform == 'macos-latest'
uses: actions/upload-artifact@v2
@@ -184,13 +200,13 @@ jobs:
```
### Method 2: automatically signing with Action
-It is possible to use a Windows code signing Action like [this](https://github.com/marketplace/actions/code-sign-a-file-with-pfx-certificate) one, but note it requires a SHA1 hash for the certificate and a certificate name. View an example of how to configure it on the Action's [marketplace](https://github.com/marketplace/actions/code-sign-a-file-with-pfx-certificate). View an example of how to configure it on the Action's [marketplace](https://github.com/marketplace/actions/code-sign-a-file-with-pfx-certificate).
+It is possible to use a Windows code signing Action like [this](https://github.com/marketplace/actions/code-sign-a-file-with-pfx-certificate) one, but note it requires a SHA1 hash for the certificate and a certificate name. View an example of how to configure it on the Action's [marketplace](https://github.com/marketplace/actions/code-sign-a-file-with-pfx-certificate). View an example of how to configure it on the Action's [marketplace](https://github.com/marketplace/actions/code-sign-a-file-with-pfx-certificate). View an example of how to configure it on the Action's [marketplace](https://github.com/marketplace/actions/code-sign-a-file-with-pfx-certificate).
---
## MacOS
-First off you need your code signing certificate from Apple. If you do not have one, a simple Google search will help you acquire one. Once you have your certificate, you need to export it and encode it to base64. [This tutorial](https://localazy.com/blog/how-to-automatically-sign-macos-apps-using-github-actions) shows you how to do that in an easy manner. Once you have exported your .p12 certificate file, you can encode it to base64 as seen in the tutorial with the following command: If you do not have one, a simple Google search will help you acquire one. Once you have your certificate, you need to export it and encode it to base64. [This tutorial](https://localazy.com/blog/how-to-automatically-sign-macos-apps-using-github-actions) shows you how to do that in an easy manner. Once you have exported your .p12 certificate file, you can encode it to base64 as seen in the tutorial with the following command:
+First off you need your code signing certificate from Apple. If you do not have one, a simple Google search will help you acquire one. Once you have your certificate, you need to export it and encode it to base64. [This tutorial](https://localazy.com/blog/how-to-automatically-sign-macos-apps-using-github-actions) shows you how to do that in an easy manner. Once you have exported your .p12 certificate file, you can encode it to base64 as seen in the tutorial with the following command: If you do not have one, a simple Google search will help you acquire one. Once you have your certificate, you need to export it and encode it to base64. [This tutorial](https://localazy.com/blog/how-to-automatically-sign-macos-apps-using-github-actions) shows you how to do that in an easy manner. Once you have exported your .p12 certificate file, you can encode it to base64 as seen in the tutorial with the following command: If you do not have one, a simple Google search will help you acquire one. Once you have your certificate, you need to export it and encode it to base64. [This tutorial](https://localazy.com/blog/how-to-automatically-sign-macos-apps-using-github-actions) shows you how to do that in an easy manner. Once you have exported your .p12 certificate file, you can encode it to base64 as seen in the tutorial with the following command:
```bash
base64 Certificates.p12 | pbcopy
```
@@ -200,7 +216,7 @@ Now you're ready to create some GitHub project secrets, just as with Windows:
* **APPLE_DEVELOPER_CERTIFICATE_PASSWORD** with the contents of your certificate password.
* **APPLE_PASSWORD** with the contents of an App-Specific password to your Apple-ID account which you can generate [here](https://appleid.apple.com/account/manage).
-Let's make sure we are able to build our Wails app in our GitHub Action workflow. Here is a small template: Here is a small template:
+Let's make sure we are able to build our Wails app in our GitHub Action workflow. Here is a small template: Here is a small template: Here is a small template:
```yaml
name: "example"
@@ -317,9 +333,9 @@ Now we need to configure some gon config files in our `build/darwin` directory:
```
- In this file you configure the entitlements you need for you app, e.g. camera permissions if your app uses the camera. Read more about entitlements [here](https://developer.apple.com/documentation/bundleresources/entitlements). Read more about entitlements [here](https://developer.apple.com/documentation/bundleresources/entitlements).
+ In this file you configure the entitlements you need for you app, e.g. camera permissions if your app uses the camera. Read more about entitlements [here](https://developer.apple.com/documentation/bundleresources/entitlements). Read more about entitlements [here](https://developer.apple.com/documentation/bundleresources/entitlements). Read more about entitlements [here](https://developer.apple.com/documentation/bundleresources/entitlements).
-Make sure you have updated your `Info.plist` file with the same bundle ID as you entered in `gon-sign.json`. Here's an example `Info.plist` file: Here's an example `Info.plist` file:
+Make sure you have updated your `Info.plist` file with the same bundle ID as you entered in `gon-sign.json`. Here's an example `Info.plist` file: Here's an example `Info.plist` file: Here's an example `Info.plist` file:
```plist
@@ -354,6 +370,12 @@ Now we're ready to add the signing step in our workflow after building the Wails
echo "Signing Package"
gon -log-level=info ./build/darwin/gon-sign.json
p12-password: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_PASSWORD }}
+- name: Sign our macOS binary
+ if: matrix.platform == 'macos-latest'
+ run: |
+ echo "Signing Package"
+ gon -log-level=info ./build/darwin/gon-sign.json
+ p12-password: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_PASSWORD }}
- name: Sign our macOS binary
if: matrix.platform == 'macos-latest'
run: |
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/templates.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/templates.mdx
index d8b147b9f..9ffb078d1 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/templates.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/templates.mdx
@@ -17,6 +17,7 @@ Wails 从预先创建的模板生成项目。 在 v1 中,这是一组难以维
```shell title=mytemplate/
.
.
+.
|-- NEXTSTEPS.md
|-- README.md
|-- app.tmpl.go
@@ -71,6 +72,11 @@ Updating package.json data...
Renaming package.json -> package.tmpl.json...
Updating package-lock.json data...
Renaming package-lock.json -> package-lock.tmpl.json...
+Migrating existing project files to frontend directory...
+Updating package.json data...
+Renaming package.json -> package.tmpl.json...
+Updating package-lock.json data...
+Renaming package-lock.json -> package-lock.tmpl.json...
```
- 现在可以按照`NEXTSTEPS.md`中指定的方式定制模板。
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/troubleshooting.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/troubleshooting.mdx
index 0921dc1b9..594fdd24b 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/troubleshooting.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/troubleshooting.mdx
@@ -90,11 +90,11 @@ Source: https://github.com/wailsapp/wails/issues/1233
## The generated Typescript doesn''t have the correct types
-Sometimes the generated Typescript doesn''t have the correct types. To mitigate this, it is possible to specify what types should be generated using the `ts_type` struct tag. For more details, please read [this](https://github.com/tkrajina/typescriptify-golang-structs#custom-types).
+Sometimes the generated Typescript doesn''t have the correct types. Sometimes the generated Typescript doesn''t have the correct types. To mitigate this, it is possible to specify what types should be generated using the `ts_type` struct tag. For more details, please read [this](https://github.com/tkrajina/typescriptify-golang-structs#custom-types). For more details, please read [this](https://github.com/tkrajina/typescriptify-golang-structs#custom-types).
## 检查`frontend/dist`中是否包含您的应用程序资源。
-If you navigate away from `index.html` to a new html file, the context will be lost. This can be fixed by adding the following imports to the `` section of any new page you navigate to:
+If you navigate away from `index.html` to a new html file, the context will be lost. If you navigate away from `index.html` to a new html file, the context will be lost. This can be fixed by adding the following imports to the `` section of any new page you navigate to:
```html
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/windows-installer.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/windows-installer.mdx
index 5382a0c19..2486f7619 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/windows-installer.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/windows-installer.mdx
@@ -28,10 +28,11 @@ NSIS 可通 homebrew 安装:`brew install nsis`。
## 生成安装程序
-创建新项目时,Wails 从`installer/info.json`中读取配置数据并使用项目的`wails.json`的 Info 部分,在`build/windows/installer`中生成 NSIS 配置文件: The config data is read from `installer/info.json` and that is configured to use the project's `wails.json` Info section:
+创建新项目时,Wails 从`installer/info.json`中读取配置数据并使用项目的`wails.json`的 Info 部分,在`build/windows/installer`中生成 NSIS 配置文件: 创建新项目时,Wails 从`installer/info.json`中读取配置数据并使用项目的`wails.json`的 Info 部分,在`build/windows/installer`中生成 NSIS 配置文件: The config data is read from `installer/info.json` and that is configured to use the project's `wails.json` Info section:
```json
// ...
+ // ...
// ...
"Info": {
"companyName": "My Company Name",
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/windows.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/windows.mdx
index 7a98d1a4c..dbe76ab8b 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/windows.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/windows.mdx
@@ -32,7 +32,7 @@
## Fixed version runtime
-Another way of dealing with webview2 dependency is shipping it yourself. You can download [fixed version runtime](https://developer.microsoft.com/ru-ru/microsoft-edge/webview2/#download-section) and bundle or download it with your application.
+Another way of dealing with webview2 dependency is shipping it yourself. Another way of dealing with webview2 dependency is shipping it yourself. You can download [fixed version runtime](https://developer.microsoft.com/ru-ru/microsoft-edge/webview2/#download-section) and bundle or download it with your application.
Also, you should specify path to fixed version of webview2 runtime in the `windows.Options` structure when launching wails.
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/howdoesitwork.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/howdoesitwork.mdx
index 255ee60ef..52fda1989 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/howdoesitwork.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/howdoesitwork.mdx
@@ -14,7 +14,7 @@ Wails 应用程序是一个带有一个 webkit 前端的标准的 Go 应用程
### 概述
-主应用程序由对`wails.Run()`的调用组成. 它接受描述应用程序窗口大小、窗口标题、要使用的资源等应用程序配置。 It accepts the application configuration which describes the size of the application window, the window title, what assets to use, etc. 基本应用程序可能如下所示:
+主应用程序由对`wails.Run()`的调用组成. 它接受描述应用程序窗口大小、窗口标题、要使用的资源等应用程序配置。 It accepts the application configuration which describes the size of the application window, the window title, what assets to use, etc. 基本应用程序可能如下所示: 基本应用程序可能如下所示:
```go title="main.go"
package main
@@ -102,7 +102,7 @@ var assets embed.FS
#### 方法绑定
-`Bind`选项是 Wails 应用程序中最重要的参数选项之一。 它指定向前端暴露哪些结构方法。 Think of structs like "controllers" in a traditional web application. 当应用程序启动时,它会检查 `Bind` 中列出的结构实例, 确定哪些方法是公开的(以大写字母开头),并将生成前端可以调用的那些方法的 Javascript 版本。
+`Bind`选项是 Wails 应用程序中最重要的参数选项之一。 它指定向前端暴露哪些结构方法。 Think of structs like "controllers" in a traditional web application. 当应用程序启动时,它会检查 `Bind` 中列出的结构实例, 确定哪些方法是公开的(以大写字母开头),并将生成前端可以调用的那些方法的 Javascript 版本。 当应用程序启动时,它会检查 `Bind` 中列出的结构实例, 确定哪些方法是公开的(以大写字母开头),并将生成前端可以调用的那些方法的 Javascript 版本。
:::info 注意
@@ -157,6 +157,7 @@ func (a *App) Greet(name string) string {
您可以绑定任意数量的结构体。 只需确保创建它的一个实例并将其传递给 `Bind`:
```go {8-10}
+ //...
//...
...
err := wails.Run(&options.App{
@@ -194,16 +195,17 @@ This makes it incredibly simple to call Go code from the frontend, using the sam
### Calling bound Go methods
-在`开发`模式下运行应用程序时,会生成一个 javascript 模块,该模块用 JSDoc 注释包装这些方法。 这确实有助于开发,尤其是因为大多数 IDE 将处理 JSDoc 以提供代码完成和类型提示。 该模块名为`go` 并在`wailsjsdir`标志指定的目录中生成。 The generated files mirror the package names in your application. 在上面的例子中,我们绑定 `app`,它有一个公开方法 `Greet`。 This will lead to the generation of the following files:
+在`开发`模式下运行应用程序时,会生成一个 javascript 模块,该模块用 JSDoc 注释包装这些方法。 这确实有助于开发,尤其是因为大多数 IDE 将处理 JSDoc 以提供代码完成和类型提示。 该模块名为`go` 并在`wailsjsdir`标志指定的目录中生成。 The generated files mirror the package names in your application. 在上面的例子中,我们绑定 `app`,它有一个公开方法 `Greet`。 在上面的例子中,我们绑定 `app`,它有一个公开方法 `Greet`。 This will lead to the generation of the following files:
```bash
window.go.main.App.Greet("Bill").then((result) => {
console.log("The greeting is: " + result);
})
```
-Here we can see that there is a `main` package that contains the Javascript bindings for the bound `App` struct, as well as the Typescript declaration file for those methods. To call `Greet` from our frontend, we simply import the method and call it like a regular Javascript function:
+Here we can see that there is a `main` package that contains the Javascript bindings for the bound `App` struct, as well as the Typescript declaration file for those methods. To call `Greet` from our frontend, we simply import the method and call it like a regular Javascript function: To call `Greet` from our frontend, we simply import the method and call it like a regular Javascript function:
```javascript
+ // ...
// ...
import {Greet} from '../wailsjs/go/main/App'
@@ -233,7 +235,7 @@ const go = {
export default go;
```
-这些方法返回一个 Promise。 成功的调用将导致 Go 调用的第一个返回值被传递给 `resolve` 处理程序。 一个不成功的调用是将一个 Go 方法的第二个错误类型返回值通过`reject`传递回调用者。 This is passed back via the `reject` handler. 在上面的例子中,Greet 只返回一个字符串,所以 `Javascript` 调用永远不会`reject` - 除非将无效数据传递给它。
+这些方法返回一个 Promise。 成功的调用将导致 Go 调用的第一个返回值被传递给 `resolve` 处理程序。 一个不成功的调用是将一个 Go 方法的第二个错误类型返回值通过`reject`传递回调用者。 This is passed back via the `reject` handler. This is passed back via the `reject` handler. 在上面的例子中,Greet 只返回一个字符串,所以 `Javascript` 调用永远不会`reject` - 除非将无效数据传递给它。
所有数据类型都在 Go 和 Javascript 之间正确转换。 包括结构体。 如果您从 Go 调用返回一个结构体,它将作为 `Javascript` Map 返回到您的前端。 注意:如果您想使用结构体,您必须为您的结构体字段定义`json` 标签!
@@ -335,7 +337,7 @@ function greet(name) {
}
```
-As we can see, the "main" namespace is imported from a new "models.ts" file. This file contains all the struct definitions used by our bound methods. In this example, this is a `Person` struct. If we look at `models.ts`, we can see how the models are defined:
+As we can see, the "main" namespace is imported from a new "models.ts" file. This file contains all the struct definitions used by our bound methods. In this example, this is a `Person` struct. If we look at `models.ts`, we can see how the models are defined: This file contains all the struct definitions used by our bound methods. In this example, this is a `Person` struct. If we look at `models.ts`, we can see how the models are defined:
```ts title="models.ts"
export namespace main {
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/introduction.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/introduction.mdx
index f21eed41b..34929b558 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/introduction.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/introduction.mdx
@@ -20,7 +20,7 @@ Wails 一点也不弱! 这是 [xbar](https://xbarapp.com) - 一个使用 Wails
## 原生元素
-Wails comes with a number of pre-configured templates that allow you to get your application up and running quickly. There are templates for the following frameworks: Svelte, React, Vue, Preact, Lit and Vanilla. There are both Javascript and Typescript versions for each template.
+Wails comes with a number of pre-configured templates that allow you to get your application up and running quickly. There are templates for the following frameworks: Svelte, React, Vue, Preact, Lit and Vanilla. There are both Javascript and Typescript versions for each template. There are templates for the following frameworks: Svelte, React, Vue, Preact, Lit and Vanilla. There are both Javascript and Typescript versions for each template.
## Go 和 Javascript 互操作
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/cli.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/cli.mdx
index bad336a15..9602a8a62 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/cli.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/cli.mdx
@@ -49,26 +49,26 @@ Wails CLI 有许多用于管理项目的命令。 所有命令都以此方式运
`wails build`用于将您的项目编译为生产可用的二进制文件。
-| 标志 | 描述 | 默认 |
-|:-------------------- |:----------------------------------------------------------------------------------------------------------- |:--------------------------- |
-| -platform | 为指定的[平台](../reference/cli#平台)(逗号分割)构建,例如:`windows/arm64`。 `windows/arm64`. 注意,如果没有指定架构,则使用`runtime.GOARCH`。 | runtime.GOOS/runtime.GOARCH |
-| -clean | 清理`build/bin`目录 | |
-| -compiler "编译器" | 使用不同的 go 编译器来构建,例如 go1.15beta1 | go |
-| -ldflags "标志" | 传递给编译器的额外 ldflags | |
-| -nopackage | 不打包应用程序 | |
-| -o filename | 输出文件名 | |
-| -s | 跳过前端构建 | 否 |
-| -f | 强制构建应用 | 否 |
-| -tags "额外标签" | 传递给编译器构建标签(引号和空格分隔) | |
-| -upx | 使用“upx”压缩最终二进制文件 | |
-| -upxflags | 传递给 upx 的标志 | |
-| -v int | 详细级别 (0 - silent, 1 - default, 2 - verbose) | 1 |
-| -webview2 | WebView2 安装程序策略:download,embed,browser,error. | download |
-| -u | 更新项目的 `go.mod` 以使用与 CLI 相同版本的 Wails | |
-| -debug | 在应用程序中保留调试信息 Allows the use of the devtools in the application window | 否 |
-| -trimpath | Remove all file system paths from the resulting executable. | 否 |
-| -race | Build with Go's race detector | 否 |
-| -platform "platform" | Keep the console window for Windows builds | 否 |
+| 标志 | 描述 | 默认 |
+|:-------------------- |:---------------------------------------------------------------------------------------------------------------------------- |:--------------------------- |
+| -platform | 为指定的[平台](../reference/cli#平台)(逗号分割)构建,例如:`windows/arm64`。 `windows/arm64`. `windows/arm64`. 注意,如果没有指定架构,则使用`runtime.GOARCH`。 | runtime.GOOS/runtime.GOARCH |
+| -clean | 清理`build/bin`目录 | |
+| -compiler "编译器" | 使用不同的 go 编译器来构建,例如 go1.15beta1 | go |
+| -ldflags "标志" | 传递给编译器的额外 ldflags | |
+| -nopackage | 不打包应用程序 | |
+| -o filename | 输出文件名 | |
+| -s | 跳过前端构建 | 否 |
+| -f | 强制构建应用 | 否 |
+| -tags "额外标签" | 传递给编译器构建标签(引号和空格分隔) | |
+| -upx | 使用“upx”压缩最终二进制文件 | |
+| -upxflags | 传递给 upx 的标志 | |
+| -v int | 详细级别 (0 - silent, 1 - default, 2 - verbose) | 1 |
+| -webview2 | WebView2 安装程序策略:download,embed,browser,error. | download |
+| -u | 更新项目的 `go.mod` 以使用与 CLI 相同版本的 Wails | |
+| -debug | 在应用程序中保留调试信息 在应用程序中保留调试信息 Allows the use of the devtools in the application window | 否 |
+| -trimpath | Remove all file system paths from the resulting executable. | 否 |
+| -race | Build with Go's race detector | 否 |
+| -platform "platform" | Keep the console window for Windows builds | 否 |
有关`webview2`标志的详细描述,请参阅[Windows 系统](../guides/windows)指南。
@@ -144,6 +144,32 @@ Diagnosis
---------
Your system is ready for Wails development!
+Wails CLI v2.0.0-beta
+
+Scanning system - Please wait (this may take a long time)...Done.
+
+System
+------
+OS: Windows 10 Pro
+Version: 2009 (Build: 19043)
+ID: 21H1
+Go Version: go1.17
+Platform: windows
+Architecture: amd64
+
+Dependency Package Name Status Version
+---------- ------------ ------ -------
+WebView2 N/A Installed 93.0.961.52
+npm N/A Installed 6.14.15
+*upx N/A Installed upx 3.96
+*docker N/A Installed 20.10.6
+
+* - Optional Dependency
+
+Diagnosis
+---------
+Your system is ready for Wails development!
+
```
## 开发
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/menus.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/menus.mdx
index 3b5fe2179..1044f34c9 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/menus.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/menus.mdx
@@ -4,7 +4,7 @@ sidebar_position: 4
# 应用菜单
-It is possible to add an application menu to Wails projects. 可以通过定义 [菜单](#菜单) 结构并设置 [`Menu`](../reference/options#菜单) 选项或者通过调用运行时方法 [设置应用程序菜单](../reference/runtime/menu#设置应用程序菜单) 来将应用程序菜单添加到 Wails 项目。
+It is possible to add an application menu to Wails projects. 可以通过定义 [菜单](#菜单) 结构并设置 [`Menu`](../reference/options#菜单) 选项或者通过调用运行时方法 [设置应用程序菜单](../reference/runtime/menu#设置应用程序菜单) 来将应用程序菜单添加到 Wails 项目。 可以通过定义 [菜单](#菜单) 结构并设置 [`Menu`](../reference/options#菜单) 选项或者通过调用运行时方法 [设置应用程序菜单](../reference/runtime/menu#设置应用程序菜单) 来将应用程序菜单添加到 Wails 项目。
也可以通过更新菜单结构并调用[更新应用程序菜单](../reference/runtime/menu#更新应用程序菜单)来动态更新菜单 。
@@ -38,6 +38,16 @@ It is also possible to dynamically update the menu, by updating the menu struct
The example above uses helper methods, however it's possible to build the menu structs manually.
+type Menu struct {
+ Items []*MenuItem
+}
+````
+
+It is also possible to dynamically update the menu, by updating the menu struct and calling
+[MenuUpdateApplicationMenu](../reference/runtime/menu.mdx#menuupdateapplicationmenu).
+
+The example above uses helper methods, however it's possible to build the menu structs manually.
+
type Menu struct {
Items []*MenuItem
}
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/options.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/options.mdx
index 891165d80..e2fcc2703 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/options.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/options.mdx
@@ -191,7 +191,7 @@ func main() {
类型:int (0xRRGGBBAA) 示例:0xFF000088 - 透明度为 50% 的红色
-This value is the default background colour of the window. Default: white
+This value is the default background colour of the window. Default: white Default: white
### 窗口固定在最顶层
@@ -235,9 +235,9 @@ This value is the default background colour of the window. Default: white
| Response Body | ✅ | ✅ | ✅ |
| Response Body Streaming | ❌ | ❌ | ✅ |
-NOTE: Linux is currently very limited due to targeting a WebKit2GTK Version < 2.36.0. In the future some features will be supported by the introduction of WebKit2GTK 2.36.0+ support.
+NOTE: Linux is currently very limited due to targeting a WebKit2GTK Version < 2.36.0. In the future some features will be supported by the introduction of WebKit2GTK 2.36.0+ support. In the future some features will be supported by the introduction of WebKit2GTK 2.36.0+ support.
-NOTE: When used in combination with a Frontend DevServer there might be limitations, eg. Vite serves the index.html on every path, that does not contain a file extension.
+NOTE: When used in combination with a Frontend DevServer there might be limitations, eg. Vite serves the index.html on every path, that does not contain a file extension. Vite serves the index.html on every path, that does not contain a file extension.
### 日志
@@ -277,7 +277,7 @@ NOTE: When used in combination with a Frontend DevServer there might be limitati
Default: `Error`
-The default log level for production builds. 有关日志记录的更多详细信息,请参阅[日志参考](../reference/runtime/log)。
+The default log level for production builds. 有关日志记录的更多详细信息,请参阅[日志参考](../reference/runtime/log)。 有关日志记录的更多详细信息,请参阅[日志参考](../reference/runtime/log)。
### 应用退出回调
@@ -309,7 +309,7 @@ The default log level for production builds. 有关日志记录的更多详细
类型:\*windows.Options
-如果设置了此回调,它将在通过单击窗口关闭按钮或调用`runtime.Quit`即将退出应用程序时被调用. 返回 `true` 将导致应用程序继续,`false` 将继续正常关闭。 Returning true will cause the application to continue, false will continue shutdown as normal. 这有助于与用户确认他们希望退出程序。
+如果设置了此回调,它将在通过单击窗口关闭按钮或调用`runtime.Quit`即将退出应用程序时被调用. 返回 `true` 将导致应用程序继续,`false` 将继续正常关闭。 Returning true will cause the application to continue, false will continue shutdown as normal. 这有助于与用户确认他们希望退出程序。 这有助于与用户确认他们希望退出程序。
名称:Mac
```go title=windowsapp.go
@@ -420,7 +420,7 @@ Type: \*mac.Options
类型:string
-This defines the path to a directory with WebView2 executable files and libraries. If empty, webview2 installed in the system will be used.
+This defines the path to a directory with WebView2 executable files and libraries. If empty, webview2 installed in the system will be used. If empty, webview2 installed in the system will be used.
Important information about distribution of fixed version runtime:
- [How to get and extract runtime](https://docs.microsoft.com/en-us/microsoft-edge/webview2/concepts/distribution#details-about-the-fixed-version-runtime-distribution-mode)
@@ -437,11 +437,11 @@ TitleBar 结构提供了配置标题栏外观的能力。
名称:Appearance
-| 值 | 描述 |
-| ------------- | -------------------------------------------------------------------------------------------------------------------------------- |
-| SystemDefault | _默认_. 主题将基于系统默认值。 The theme will be based on the system default. 如果用户更改了他们的主题,应用程序将更新以使用新设置 |
-| Dark | 该应用程序将只使用深色主题 |
-| Light | 从样式掩码中移除 [NSWindowStyleMaskTitled](https://developer.apple.com/documentation/appkit/nswindowstylemask/nswindowstylemasktitled/)。 |
+| 值 | 描述 |
+| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
+| SystemDefault | _默认_. 主题将基于系统默认值。 The theme will be based on the system default. The theme will be based on the system default. 如果用户更改了他们的主题,应用程序将更新以使用新设置 |
+| Dark | 该应用程序将只使用深色主题 |
+| Light | 从样式掩码中移除 [NSWindowStyleMaskTitled](https://developer.apple.com/documentation/appkit/nswindowstylemask/nswindowstylemasktitled/)。 |
### 外观
@@ -456,7 +456,7 @@ Appearance 用于根据 Apple 的 [NSAppearance](https://developer.apple.com/doc
#### 外观
-CustomTheme 结构使用 `int32` 指定颜色值. 这些是非标准 Windows 格式: `0x00BBGGAA`。 These are in the standard(!) Windows format of: `0x00BBGGAA`. 提供了一个辅助函数来将 RGB 转换为这种格式:`windows.RGB(r,g,b uint8)`。
+CustomTheme 结构使用 `int32` 指定颜色值. 这些是非标准 Windows 格式: `0x00BBGGAA`。 These are in the standard(!) Windows format of: `0x00BBGGAA`. These are in the standard(!) Windows format of: `0x00BBGGAA`. 提供了一个辅助函数来将 RGB 转换为这种格式:`windows.RGB(r,g,b uint8)`。
名称:WindowIsTranslucent
@@ -511,7 +511,7 @@ type ThemeSettings struct {
可以使用 TitleBar 选项自定义应用程序的标题栏:
-ResizeDebounceMS is the amount of time to debounce redraws of webview2 when resizing the window. The default value (0) will perform redraws as fast as it can.
+ResizeDebounceMS is the amount of time to debounce redraws of webview2 when resizing the window. The default value (0) will perform redraws as fast as it can. The default value (0) will perform redraws as fast as it can.
### 关于
@@ -588,14 +588,14 @@ type TitleBar struct {
}
```
-| 设置 | 描述 |
-| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
-| TitlebarAppearsTransparent | 使标题栏透明。 This has the effect of hiding the titlebar and the content fill the window. [Apple Docs](https://developer.apple.com/documentation/appkit/nswindow/1419167-titlebarappearstransparent?language=objc) |
-| HideTitle | 隐藏窗口的标题。 [Apple Docs](https://developer.apple.com/documentation/appkit/nswindowtitlevisibility?language=objc) |
-| HideTitleBar | Removes [NSWindowStyleMaskTitled](https://developer.apple.com/documentation/appkit/nswindowstylemask/nswindowstylemasktitled/) from the style mask |
-| FullSizeContent | 使 webview 填满整个窗口。 [Apple Docs](https://developer.apple.com/documentation/appkit/nswindowstylemask/nswindowstylemaskfullsizecontentview) |
-| UseToolbar | 向窗口添加默认工具栏。 [Apple Docs](https://developer.apple.com/documentation/appkit/nstoolbar?language=objc) |
-| HideToolbarSeparator | 删除工具栏下方的线条。 [Apple Docs](https://developer.apple.com/documentation/appkit/nstoolbar/1516954-showsbaselineseparator?language=objc) |
+| 设置 | 描述 |
+| -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| TitlebarAppearsTransparent | 使标题栏透明。 This has the effect of hiding the titlebar and the content fill the window. This has the effect of hiding the titlebar and the content fill the window. [Apple Docs](https://developer.apple.com/documentation/appkit/nswindow/1419167-titlebarappearstransparent?language=objc) |
+| HideTitle | 隐藏窗口的标题。 [Apple Docs](https://developer.apple.com/documentation/appkit/nswindowtitlevisibility?language=objc) |
+| HideTitleBar | Removes [NSWindowStyleMaskTitled](https://developer.apple.com/documentation/appkit/nswindowstylemask/nswindowstylemasktitled/) from the style mask |
+| FullSizeContent | 使 webview 填满整个窗口。 [Apple Docs](https://developer.apple.com/documentation/appkit/nswindowstylemask/nswindowstylemaskfullsizecontentview) |
+| UseToolbar | 向窗口添加默认工具栏。 [Apple Docs](https://developer.apple.com/documentation/appkit/nstoolbar?language=objc) |
+| HideToolbarSeparator | 删除工具栏下方的线条。 [Apple Docs](https://developer.apple.com/documentation/appkit/nstoolbar/1516954-showsbaselineseparator?language=objc) |
Preconfigured titlebar settings are available:
@@ -669,11 +669,19 @@ func main() {
},
},
})
+ Mac: &mac.Options{
+ About: &mac.AboutInfo{
+ Title: "My Application",
+ Message: "© 2021 Me",
+ Icon: icon,
+ },
+ },
+ })
```
The "About" menu item will appear in the app menu:
-

>
+
@@ -681,7 +689,7 @@ The "About" menu item will appear in the app menu:
When clicked, that will open an about message box:
-

>
+
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/project-config.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/project-config.mdx
index 22f1ac671..5b0be41c9 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/project-config.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/project-config.mdx
@@ -13,7 +13,7 @@ sidebar_position: 5
"reloaddirs": "[触发重新加载的附加目录(逗号分隔),这仅用于一些重要资源配置]",
"frontend:install": "[安装 node 依赖的命令,在 frontend 目录下运行 - 通常是 `npm install`]",
"frontend:build": "[构建资源的命令,在 frontend 目录下运行 - 通常是 `npm run build`]",
- "frontend:dev": "[此命令已被 frontend:dev:build 替代。 If frontend:dev:build is not specified will falls back to this command. 如果没有指定 frontend:dev:build 将回退到该命令,如果此命令也没有指定将回退到 frontend:build]",
+ "frontend:dev": "[此命令已被 frontend:dev:build 替代。 If frontend:dev:build is not specified will falls back to this command. If frontend:dev:build is not specified will falls back to this command. 如果没有指定 frontend:dev:build 将回退到该命令,如果此命令也没有指定将回退到 frontend:build]",
"frontend:dev:build": "[此命令等效于开发模式中的 frontend:build,如果没有指定则回退到 frontend:dev]",
"frontend:dev:install": "[此命令等效于开发模式中的 frontend:install,如果没有指定则只有 frontend:install]",
"frontend:dev:watcher": "[此命令在 `wails dev` 上的单独进程中运行。 If not specified falls back to frontend:dev]",
@@ -33,6 +33,10 @@ sidebar_position: 5
"GOOS/*": "[The command that will be executed before a build of the specified GOOS: ${platform} is replaced with the "GOOS/GOARCH". The "GOOS/*" hook is executed before the "*/*" hook.]",
"*/*": "[The command that will be executed before every build: ${platform} is replaced with the "GOOS/GOARCH".]"
"postBuildHooks": {
+ "GOOS/GOARCH": "[在构建指定的 GOOS/GOARCH 后将执行的命令:${platform} 替换为'GOOS/GOARCH',${bin} 替换为编译后的二进制文件的路径。 The "GOOS/GOARCH" hook is executed before the "GOOS/*" and "*/*" hook.]",
+ "GOOS/*": "[The command that will be executed before a build of the specified GOOS: ${platform} is replaced with the "GOOS/GOARCH". The "GOOS/*" hook is executed before the "*/*" hook.]",
+ "*/*": "[The command that will be executed before every build: ${platform} is replaced with the "GOOS/GOARCH".]"
+ "postBuildHooks": {
"GOOS/GOARCH": "[在构建指定的 GOOS/GOARCH 后将执行的命令:${platform} 替换为'GOOS/GOARCH',${bin} 替换为编译后的二进制文件的路径。 'GOOS/GOARCH'钩子在'GOOS/*'和'*/*'钩子之前执行。 ]",
"GOOS/*": "[在构建指定的 GOOS 后将执行的命令:${platform} 替换为'GOOS/GOARCH',${bin} 替换为编译后的二进制文件的路径。 'GOOS/*'钩子在'*/*'钩子之前执行。 ]",
"*/*": "[每次构建后将执行的命令:${platform} 替换为'GOOS/GOARCH',${bin} 替换为编译后的二进制文件的路径。
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/runtime/dialog.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/runtime/dialog.mdx
index 03bf0414e..e3bf5f760 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/runtime/dialog.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/runtime/dialog.mdx
@@ -154,8 +154,9 @@ selection, err := runtime.MessageDialog(b.ctx, runtime.MessageDialogOptions{
```
第一个按钮显示为默认值:
-

+
+
如果我们指定`DefaultButton`为“two”:
@@ -169,7 +170,7 @@ selection, err := runtime.MessageDialog(b.ctx, runtime.MessageDialogOptions{
```
第二个按钮显示为默认值。 当 `return` 被按下时,则返回数值“two”。
-

+
@@ -186,7 +187,7 @@ selection, err := runtime.MessageDialog(b.ctx, runtime.MessageDialogOptions{
```
带有“three”的按钮显示在对话框的底部。 当`escape`被按下时,则返回值“three”:
-

+
@@ -219,7 +220,7 @@ type FileFilter struct {
Windows 允许您在对话框中使用多个文件过滤器。 每个 FileFilter 将在对话框中显示为一个单独的条目:
-

+
@@ -231,7 +232,7 @@ Windows 允许您在对话框中使用多个文件过滤器。 每个 FileFilter
Linux 允许您在对话框中使用多个文件过滤器。 每个 FileFilter 将在对话框中显示为一个单独的条目:
-

+
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/runtime/intro.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/runtime/intro.mdx
index 617ec7316..24333928e 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/runtime/intro.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/runtime/intro.mdx
@@ -6,7 +6,7 @@ sidebar_position: 1
运行时是一个为应用程序提供实用方法的库。 有 Go 和 Javascript 运行时,目的是在可能的情况下尝试使它们保持一致。
-Go 运行时可通过导入`github.com/wailsapp/wails/v2/pkg/runtime`. 此包中的所有方法都将 context 作为第一个参数。 All methods in this package take a context as the first parameter. This context should be obtained from the [OnStartup](../options.mdx#onstartup) or [OnDomReady](../options.mdx#ondomready) hooks.
+Go 运行时可通过导入`github.com/wailsapp/wails/v2/pkg/runtime`. 此包中的所有方法都将 context 作为第一个参数。 All methods in this package take a context as the first parameter. All methods in this package take a context as the first parameter. This context should be obtained from the [OnStartup](../options.mdx#onstartup) or [OnDomReady](../options.mdx#ondomready) hooks.
:::info 注意
@@ -22,7 +22,7 @@ Go 方法签名: `Quit(ctx context.Context)`
退出应用程序。
-:::info Note On Mac, this will hide the application in the same way as the `Hide` menu item in standard Mac applications. This is different to hiding the window, but the application still being in the foreground. For Windows and Linux, this is currently the same as `WindowHide`. :::
+:::info Note On Mac, this will hide the application in the same way as the `Hide` menu item in standard Mac applications. This is different to hiding the window, but the application still being in the foreground. For Windows and Linux, this is currently the same as `WindowHide`. ::: This is different to hiding the window, but the application still being in the foreground. For Windows and Linux, this is currently the same as `WindowHide`. :::
### 环境
@@ -30,7 +30,7 @@ Go 方法签名: `Quit(ctx context.Context)`
Shows the application.
-:::info Note On Mac, this will bring the application back into the foreground. For Windows and Linux, this is currently the same as `WindowShow`. :::
+:::info Note On Mac, this will bring the application back into the foreground. For Windows and Linux, this is currently the same as `WindowShow`. ::: For Windows and Linux, this is currently the same as `WindowShow`. :::
### Quit
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/runtime/menu.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/runtime/menu.mdx
index 098f9c997..d4e9f90b0 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/runtime/menu.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/runtime/menu.mdx
@@ -10,7 +10,7 @@ sidebar_position: 6
:::info Javascript
Menu is currently unsupported in the JS runtime.
-:::
+::: :::
### 设置应用程序菜单
JS 运行时当前不支持菜单。
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/tutorials/helloworld.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/tutorials/helloworld.mdx
index ee3910a01..f5553c182 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/tutorials/helloworld.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/tutorials/helloworld.mdx
@@ -4,7 +4,7 @@ sidebar_position: 10
# 你好世界
-The aim of this tutorial is to get you up and running with the most basic application using Wails. You will be able to: You will be able to:
+The aim of this tutorial is to get you up and running with the most basic application using Wails. You will be able to: You will be able to: You will be able to:
- Create a new Wails application
- Build the application
@@ -13,11 +13,14 @@ The aim of this tutorial is to get you up and running with the most basic applic
:::note
This tutorial uses Windows as the target platform. Output will vary slightly
depending on your operating system.
+::: :::note
+This tutorial uses Windows as the target platform. Output will vary slightly
+depending on your operating system.
::: Output will vary slightly
depending on your operating system.
-:::
+::: :::
-## Create a new Wails application
+## 创建一个新Wails应用
To create a new Wails application using the default vanilla JS template, you need to run the following command:
@@ -41,7 +44,7 @@ Template Support: https://wails.io
Initialised project 'helloworld' in 232ms.
```
-This will create a new directory called `helloworld` in the current directory. In this directory, you will find a number of files: In this directory, you will find a number of files:
+This will create a new directory called `helloworld` in the current directory. In this directory, you will find a number of files: In this directory, you will find a number of files: In this directory, you will find a number of files:
```
build/ - Contains the build files + compiled application
@@ -53,7 +56,7 @@ go.mod - The go module file
go.sum - The go module checksum file
```
-## Build the application
+## 构建应用
To build the application, change to the new `helloworld` project directory and run the following command:
@@ -88,12 +91,16 @@ Built 'C:\Users\leaan\tutorial\helloworld\build\bin\helloworld.exe' in 10.616s.
- Compiling frontend: Done.
- Generating bundle assets: Done.
- Compiling application: Done.
+Built 'C:\Users\leaan\tutorial\helloworld\build\bin\helloworld.exe' in 10.616s.
+ - Compiling frontend: Done.
+ - Generating bundle assets: Done.
+ - Compiling application: Done.
Built 'C:\Users\leaan\tutorial\helloworld\build\bin\helloworld.exe' in 10.616s.
```
This has compiled the application and saved it in the `build/bin` directory.
-## Run the application
+## 运行应用
If we view the `build/bin` directory in Windows Explorer, we should see our project binary:
@@ -113,6 +120,6 @@ You should see the application working as expected:

>
+ style={{"box-shadow": "rgb(255 255>>255 / 20%) 0px 1px 2px 0px, rgb(104 104 104) 0px 1px 5px 0px"}}/>
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-pages/changelog.md b/website/i18n/zh-Hans/docusaurus-plugin-content-pages/changelog.md
index 2b5802e06..12b1d5362 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-pages/changelog.md
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-pages/changelog.md
@@ -77,7 +77,7 @@
## Deprecated
-* The `Fullscreen` application option is deprecated. Please use [`WindowStartState`](https://wails.io/docs/reference/options#windowstartstate) instead.
+* The `Fullscreen` application option is deprecated. The `Fullscreen` application option is deprecated. Please use [`WindowStartState`](https://wails.io/docs/reference/options#windowstartstate) instead.
## New Contributors
* @MyNameIsAres made their first contribution in https://github.com/wailsapp/wails/pull/1636
@@ -98,7 +98,7 @@
* New screen dimensions runtime API by @skamensky in https://github.com/wailsapp/wails/pull/1519
* Auto discover vite devserver port by @leaanthony in https://github.com/wailsapp/wails/pull/1547
-* Add nixpkgs support to doctor command. by @ianmjones in https://github.com/wailsapp/wails/pull/1551
+* Add nixpkgs support to doctor command. by @ianmjones in https://github.com/wailsapp/wails/pull/1551 by @ianmjones in https://github.com/wailsapp/wails/pull/1551
* New pre-build hooks feature by @leaanthony in https://github.com/wailsapp/wails/pull/1578
* New production log level option by @leaanthony in https://github.com/wailsapp/wails/pull/1555
@@ -106,8 +106,8 @@
* Fix stack corruption in Windows when using ICoreWebView2HttpHeadersCollectionIterator by @stffabi in https://github.com/wailsapp/wails/pull/1589
* Move WindowGet* to main thread by @leaanthony in https://github.com/wailsapp/wails/pull/1464
-* Allow -appargs flag to pass flags to binary. by @ianmjones in https://github.com/wailsapp/wails/pull/1534
-* Fix checking for installed apt package in none English session. by @ianmjones in https://github.com/wailsapp/wails/pull/1548
+* Allow -appargs flag to pass flags to binary. by @ianmjones in https://github.com/wailsapp/wails/pull/1534 by @ianmjones in https://github.com/wailsapp/wails/pull/1534
+* Fix checking for installed apt package in none English session. by @ianmjones in https://github.com/wailsapp/wails/pull/1548 by @ianmjones in https://github.com/wailsapp/wails/pull/1548
* Fix OnBeforeClose code for Mac by @leaanthony in https://github.com/wailsapp/wails/pull/1558
* Support Maps in TS conversion by @leaanthony in https://github.com/wailsapp/wails/pull/1435
* Check for line length when scanning for local devserver url by @leaanthony in https://github.com/wailsapp/wails/pull/1566
@@ -234,14 +234,14 @@
### Breaking Changes
-- When data was sent to the `EventsOn` callback, it was being sent as a slice of values, instead of optional parameters to the method. `EventsOn` now works as expected, but you will need to update your code if you currently use this. [More information](https://github.com/wailsapp/wails/issues/1324)
-- The broken `bindings.js` and `bindings.d.ts` files have been replaced by a new JS/TS code generation system. More details [here](https://wails.io/docs/howdoesitwork#calling-bound-go-methods)
+- When data was sent to the `EventsOn` callback, it was being sent as a slice of values, instead of optional parameters to the method. `EventsOn` now works as expected, but you will need to update your code if you currently use this. [More information](https://github.com/wailsapp/wails/issues/1324) `EventsOn` now works as expected, but you will need to update your code if you currently use this. [More information](https://github.com/wailsapp/wails/issues/1324)
+- The broken `bindings.js` and `bindings.d.ts` files have been replaced by a new JS/TS code generation system. More details [here](https://wails.io/docs/howdoesitwork#calling-bound-go-methods) More details [here](https://wails.io/docs/howdoesitwork#calling-bound-go-methods)
### Added
-- **New Templates**: Svelte, React, Vue, Preact, Lit and Vanilla templates, both JS and TS versions. `wails init -l` for more info.
-- Default templates now powered by [Vite](https://vitejs.dev). This enables lightning fast reloads when you use `wails dev`!
-- Add support for external frontend development servers. See `frontend:dev:serverUrl` in the [project config](https://wails.io/docs/reference/project-config) - [@stffabi](https://github.com/stffabi)
+- **New Templates**: Svelte, React, Vue, Preact, Lit and Vanilla templates, both JS and TS versions. `wails init -l` for more info. `wails init -l` for more info.
+- Default templates now powered by [Vite](https://vitejs.dev). This enables lightning fast reloads when you use `wails dev`! This enables lightning fast reloads when you use `wails dev`!
+- Add support for external frontend development servers. Add support for external frontend development servers. See `frontend:dev:serverUrl` in the [project config](https://wails.io/docs/reference/project-config) - [@stffabi](https://github.com/stffabi)
- [Fully configurable dark mode](https://wails.io/docs/reference/options#theme) for Windows.
- Hugely improved [WailsJS generation](https://wails.io/docs/howdoesitwork#calling-bound-go-methods) (both Javascript and Typescript)
- Wails doctor now reports information about the wails installation - [@stffabi](https://github.com/stffabi)
@@ -288,13 +288,13 @@
- Ensure binary resources can be served by [@napalu](https://github.com/napalu) in #1240
- Only retry loading assets when loading from disk by [@leaanthony](https://github.com/leaanthony) in #1241
- [v2, windows] Fix maximised start state by [@stffabi](https://github.com/stffabi) in #1243
-- Ensure Linux IsFullScreen uses GDK_WINDOW_STATE_FULLSCREEN bitmask appropriately. by [@ianmjones](https://github.com/ianmjones) in #1245
+- Ensure Linux IsFullScreen uses GDK_WINDOW_STATE_FULLSCREEN bitmask appropriately. by [@ianmjones](https://github.com/ianmjones) in #1245 by [@ianmjones](https://github.com/ianmjones) in #1245
- Fix memory leak in ExecJS for Mac by [@leaanthony](https://github.com/leaanthony) in #1230
- Fix, or at least a workaround, for (#1232) by [@BillBuilt](https://github.com/BillBuilt) in #1247
- [v2] Use os.Args[0] for self starting wails by [@stffabi](https://github.com/stffabi) in #1258
- [v2, windows] Windows switch scheme: https -> http by @stefpap in #1255
- Ensure Focus is regained by Webview2 when tabbing by [@leaanthony](https://github.com/leaanthony) in #1257
-- Try to focus window when Show() is called. by [@leaanthony](https://github.com/leaanthony) in #1212
+- Try to focus window when Show() is called. by [@leaanthony](https://github.com/leaanthony) in #1212 by [@leaanthony](https://github.com/leaanthony) in #1212
- Check system for user installed Linux dependencies by [@leaanthony](https://github.com/leaanthony) in #1180
### Changed
diff --git a/website/src/components/frameworktabs.js b/website/src/components/frameworktabs.js
deleted file mode 100644
index 69abb1cf0..000000000
--- a/website/src/components/frameworktabs.js
+++ /dev/null
@@ -1,81 +0,0 @@
-import React from 'react';
-import Tabs from "@theme/Tabs";
-import TabItem from "@theme/TabItem";
-
-export default function TabsFrameworks() {
- return (
-//@formatter:off
-
-
- Generate a Svelte project using Javascript with:
-
- wails init -n myproject -t svelte
-
- If you would rather use Typescript:
-
- wails init -n myproject -t svelte-ts
-
-
- Generate a React project using Javascript with:
-
- wails init -n myproject -t react
-
- If you would rather use Typescript:
-
- wails init -n myproject -t react-ts
-
-
- Generate a Vue project using Javascript with:
-
- wails init -n myproject -t vue
-
- If you would rather use Typescript:
-
- wails init -n myproject -t vue-ts
-
-
- Generate a Preact project using Javascript with:
-
- wails init -n myproject -t preact
-
- If you would rather use Typescript:
-
- wails init -n myproject -t preact-ts
-
-
- Generate a Lit project using Javascript with:
-
- wails init -n myproject -t lit
-
- If you would rather use Typescript:
-
- wails init -n myproject -t lit-ts
-
-
- Generate a Vanilla project using Javascript with:
-
- wails init -n myproject -t vanilla
-
- If you would rather use Typescript:
-
- wails init -n myproject -t vanilla-ts
-
-
-//@formatter:on
- )
-}
-
-
-
-
-
diff --git a/website/src/components/tabinstall.js b/website/src/components/tabinstall.js
deleted file mode 100644
index a8b5c00fd..000000000
--- a/website/src/components/tabinstall.js
+++ /dev/null
@@ -1,43 +0,0 @@
-import React from 'react';
-import Tabs from "@theme/Tabs";
-import TabItem from "@theme/TabItem";
-
-export default function TabsInstaller() {
- return (
-//@formatter:off
-
-
- Wails requires that the xcode command line tools are installed. This can be done by running:
-
- xcode-select --install
-
-
- Wails requires that the WebView2{" "}
- runtime is installed. Some Windows installations will already have this installed. You can check using
- the{" "}
- wails doctor
command (see below).
-
-
- Linux required the standard gcc
build tools
- plus libgtk3
and libwebkit
.
- Rather than list a ton of commands for different distros, Wails can try to determine
- what the installation commands are for your specific distribution. Run wails doctor
after
- installation
- to be shown how to install the dependencies.
- If your distro/package manager is not supported, please consult the Add Linux Distro guide.
-
-
-
-
-//@formatter:off
- )
-}
diff --git a/website/versioned_docs/version-v2.0.0-beta.40/gettingstarted/firstproject.mdx b/website/versioned_docs/version-v2.0.0-beta.40/gettingstarted/firstproject.mdx
index 4d0674718..6c68dc51f 100644
--- a/website/versioned_docs/version-v2.0.0-beta.40/gettingstarted/firstproject.mdx
+++ b/website/versioned_docs/version-v2.0.0-beta.40/gettingstarted/firstproject.mdx
@@ -2,6 +2,9 @@
sidebar_position: 2
---
+import Tabs from "@theme/Tabs";
+import TabItem from "@theme/TabItem";
+
# Creating a Project
## Project Generation
@@ -10,8 +13,75 @@ Now that the CLI is installed, you can generate a new project by using the `wail
Pick your favourite framework:
-import TabsFrameworks from "../../../src/components/frameworktabs";
-
+
+
+
+
+
+ Generate a Svelte project using Javascript with:
+
+ wails init -n myproject -t svelte
+If you would rather use Typescript:
+
+ wails init -n myproject -t svelte-ts
+
+
+ Generate a React project using Javascript with:
+
+ wails init -n myproject -t react
+If you would rather use Typescript:
+
+ wails init -n myproject -t react-ts
+
+
+ Generate a Vue project using Javascript with:
+
+ wails init -n myproject -t vue
+
+If you would rather use Typescript:
+
+ wails init -n myproject -t vue-ts
+
+
+ Generate a Preact project using Javascript with:
+
+ wails init -n myproject -t preact
+
+If you would rather use Typescript:
+
+ wails init -n myproject -t preact-ts
+
+
+ Generate a Lit project using Javascript with:
+
+ wails init -n myproject -t lit
+
+If you would rather use Typescript:
+
+ wails init -n myproject -t lit-ts
+
+
+ Generate a Vanilla project using Javascript with:
+
+ wails init -n myproject -t vanilla
+
+If you would rather use Typescript:
+
+ wails init -n myproject -t vanilla-ts
+
+
+
+
diff --git a/website/versioned_docs/version-v2.0.0-beta.40/gettingstarted/installation.mdx b/website/versioned_docs/version-v2.0.0-beta.40/gettingstarted/installation.mdx
index b213ad606..708e9c4cf 100644
--- a/website/versioned_docs/version-v2.0.0-beta.40/gettingstarted/installation.mdx
+++ b/website/versioned_docs/version-v2.0.0-beta.40/gettingstarted/installation.mdx
@@ -2,6 +2,9 @@
sidebar_position: 1
---
+import Tabs from "@theme/Tabs";
+import TabItem from "@theme/TabItem";
+
# Installation
## Supported Platforms
@@ -37,8 +40,40 @@ Run `npm --version` to verify.
You will also need to install platform specific dependencies:
-import TabsInstaller from "../../../src/components/tabinstall";
-
+
+
+
+
+ Wails requires that the xcode command line tools are installed. This can be done by running:
+ xcode-select --install
+
+
+ Wails requires that the WebView2{" "}
+ runtime is installed. Some Windows installations will already have this installed. You can check using
+ the{" "}
+ wails doctor
command (see below).
+
+
+ Linux required the standard gcc
build tools
+ plus libgtk3
and libwebkit
.
+ Rather than list a ton of commands for different distros, Wails can try to determine
+ what the installation commands are for your specific distribution. Run wails doctor
after
+ installation
+ to be shown how to install the dependencies.
+ If your distro/package manager is not supported, please consult the {" "}
+ Add Linux Distro guide.
+
+
+
+
## Optional Dependencies
diff --git a/website/versioned_docs/version-v2.0.0-beta.43/gettingstarted/firstproject.mdx b/website/versioned_docs/version-v2.0.0-beta.43/gettingstarted/firstproject.mdx
index 4d0674718..6c68dc51f 100644
--- a/website/versioned_docs/version-v2.0.0-beta.43/gettingstarted/firstproject.mdx
+++ b/website/versioned_docs/version-v2.0.0-beta.43/gettingstarted/firstproject.mdx
@@ -2,6 +2,9 @@
sidebar_position: 2
---
+import Tabs from "@theme/Tabs";
+import TabItem from "@theme/TabItem";
+
# Creating a Project
## Project Generation
@@ -10,8 +13,75 @@ Now that the CLI is installed, you can generate a new project by using the `wail
Pick your favourite framework:
-import TabsFrameworks from "../../../src/components/frameworktabs";
-
+
+
+
+
+
+ Generate a Svelte project using Javascript with:
+
+ wails init -n myproject -t svelte
+If you would rather use Typescript:
+
+ wails init -n myproject -t svelte-ts
+
+
+ Generate a React project using Javascript with:
+
+ wails init -n myproject -t react
+If you would rather use Typescript:
+
+ wails init -n myproject -t react-ts
+
+
+ Generate a Vue project using Javascript with:
+
+ wails init -n myproject -t vue
+
+If you would rather use Typescript:
+
+ wails init -n myproject -t vue-ts
+
+
+ Generate a Preact project using Javascript with:
+
+ wails init -n myproject -t preact
+
+If you would rather use Typescript:
+
+ wails init -n myproject -t preact-ts
+
+
+ Generate a Lit project using Javascript with:
+
+ wails init -n myproject -t lit
+
+If you would rather use Typescript:
+
+ wails init -n myproject -t lit-ts
+
+
+ Generate a Vanilla project using Javascript with:
+
+ wails init -n myproject -t vanilla
+
+If you would rather use Typescript:
+
+ wails init -n myproject -t vanilla-ts
+
+
+
+
diff --git a/website/versioned_docs/version-v2.0.0-beta.43/gettingstarted/installation.mdx b/website/versioned_docs/version-v2.0.0-beta.43/gettingstarted/installation.mdx
index b213ad606..708e9c4cf 100644
--- a/website/versioned_docs/version-v2.0.0-beta.43/gettingstarted/installation.mdx
+++ b/website/versioned_docs/version-v2.0.0-beta.43/gettingstarted/installation.mdx
@@ -2,6 +2,9 @@
sidebar_position: 1
---
+import Tabs from "@theme/Tabs";
+import TabItem from "@theme/TabItem";
+
# Installation
## Supported Platforms
@@ -37,8 +40,40 @@ Run `npm --version` to verify.
You will also need to install platform specific dependencies:
-import TabsInstaller from "../../../src/components/tabinstall";
-
+
+
+
+
+ Wails requires that the xcode command line tools are installed. This can be done by running:
+ xcode-select --install
+
+
+ Wails requires that the WebView2{" "}
+ runtime is installed. Some Windows installations will already have this installed. You can check using
+ the{" "}
+ wails doctor
command (see below).
+
+
+ Linux required the standard gcc
build tools
+ plus libgtk3
and libwebkit
.
+ Rather than list a ton of commands for different distros, Wails can try to determine
+ what the installation commands are for your specific distribution. Run wails doctor
after
+ installation
+ to be shown how to install the dependencies.
+ If your distro/package manager is not supported, please consult the {" "}
+ Add Linux Distro guide.
+
+
+
+
## Optional Dependencies