From 73caeb979307017bde891c69e522c6ecd1dd98f3 Mon Sep 17 00:00:00 2001 From: Misite Bao Date: Mon, 28 Nov 2022 17:13:22 +0800 Subject: [PATCH] docs: fix and sync documents (#2135) * docs: standardize JavaScript and TypeScript name writing * docs: sync translated documents * docs: fix broken link * docs: sync translated documents --- .../2021-09-27-v2-beta1-release-notes.mdx | 2 +- .../2021-11-08-v2-beta2-release-notes.mdx | 2 +- .../2022-02-22-v2-beta3-release-notes.mdx | 2 +- website/blog/2022-09-22-v2-release-notes.mdx | 2 +- website/docs/community/showcase/filehound.mdx | 2 +- website/docs/gettingstarted/development.mdx | 2 +- website/docs/gettingstarted/firstproject.mdx | 24 +- website/docs/guides/migrating.mdx | 2 +- website/docs/guides/troubleshooting.mdx | 4 +- website/docs/howdoesitwork.mdx | 42 ++-- website/docs/introduction.mdx | 18 +- website/docs/reference/cli.mdx | 2 +- website/docs/reference/runtime/dialog.mdx | 2 +- website/docs/reference/runtime/events.mdx | 2 +- website/docs/reference/runtime/intro.mdx | 6 +- website/docs/reference/runtime/log.mdx | 4 +- website/docs/reference/runtime/menu.mdx | 2 +- website/docs/reference/runtime/window.mdx | 2 +- website/i18n/fr/code.json | 68 ++--- .../2021-09-27-v2-beta1-release-notes.mdx | 44 ++-- .../2021-11-08-v2-beta2-release-notes.mdx | 2 +- .../2022-02-22-v2-beta3-release-notes.mdx | 2 +- .../2022-09-22-v2-release-notes.mdx | 6 +- .../current/community/links.mdx | 18 +- .../community/showcase/encrypteasy.mdx | 4 +- .../current/community/showcase/filehound.mdx | 10 +- .../community/showcase/minecraftupdater.mdx | 2 +- .../community/showcase/modalfilemanager.mdx | 4 +- .../community/showcase/mollywallet.mdx | 2 +- .../current/community/showcase/october.mdx | 6 +- .../current/community/showcase/optimus.mdx | 2 +- .../current/community/showcase/portfall.mdx | 2 +- .../community/showcase/restic-browser.mdx | 2 +- .../current/community/showcase/riftshare.mdx | 18 +- .../current/community/showcase/scriptbar.mdx | 2 +- .../current/community/showcase/surge.mdx | 2 +- .../current/community/showcase/wally.mdx | 2 +- .../current/community/showcase/wombat.mdx | 2 +- .../current/community/showcase/ytd.mdx | 2 +- .../current/community/templates.mdx | 48 ++-- .../current/gettingstarted/development.mdx | 2 +- .../current/gettingstarted/firstproject.mdx | 24 +- .../current/guides/migrating.mdx | 2 +- .../current/guides/troubleshooting.mdx | 4 +- .../current/guides/windows.mdx | 4 +- .../current/howdoesitwork.mdx | 64 ++--- .../current/introduction.mdx | 66 ++--- .../current/reference/cli.mdx | 2 +- .../current/reference/project-config.mdx | 44 ++-- .../current/reference/runtime/dialog.mdx | 2 +- .../current/reference/runtime/events.mdx | 2 +- .../current/reference/runtime/intro.mdx | 24 +- .../current/reference/runtime/log.mdx | 52 ++-- .../current/reference/runtime/menu.mdx | 10 +- .../current/reference/runtime/window.mdx | 84 +++---- .../version-v2.0.0-rc.1.json | 12 +- .../version-v2.0.0.json | 12 +- .../version-v2.1.0.json | 12 +- .../version-v2.2.0.json | 12 +- .../changelog.mdx | 27 +- .../community-guide.mdx | 1 + .../fr/docusaurus-theme-classic/navbar.json | 4 +- website/i18n/ja/code.json | 144 +++++------ .../2021-09-27-v2-beta1-release-notes.mdx | 2 +- .../2021-11-08-v2-beta2-release-notes.mdx | 2 +- .../2022-02-22-v2-beta3-release-notes.mdx | 2 +- .../2022-09-22-v2-release-notes.mdx | 2 +- .../options.json | 2 +- .../current.json | 2 +- .../current/community/links.mdx | 14 +- .../current/community/showcase/filehound.mdx | 2 +- .../current/gettingstarted/development.mdx | 4 +- .../current/gettingstarted/firstproject.mdx | 24 +- .../current/gettingstarted/installation.mdx | 4 +- .../current/guides/frameless.mdx | 16 +- .../current/guides/frontend.mdx | 2 +- .../current/guides/ides.mdx | 18 +- .../current/guides/linux-distro-support.mdx | 4 +- .../current/guides/migrating.mdx | 2 +- .../current/guides/obfuscated.mdx | 2 +- .../current/guides/signing.mdx | 35 ++- .../current/guides/templates.mdx | 2 +- .../current/guides/troubleshooting.mdx | 4 +- .../current/howdoesitwork.mdx | 42 ++-- .../current/introduction.mdx | 26 +- .../current/reference/cli.mdx | 232 +++++++++--------- .../current/reference/menus.mdx | 4 +- .../current/reference/options.mdx | 188 +++++++------- .../current/reference/project-config.mdx | 30 +-- .../current/reference/runtime/dialog.mdx | 4 +- .../current/reference/runtime/events.mdx | 4 +- .../current/reference/runtime/intro.mdx | 12 +- .../current/reference/runtime/log.mdx | 6 +- .../current/reference/runtime/menu.mdx | 4 +- .../current/reference/runtime/window.mdx | 2 +- .../version-v2.0.0-rc.1.json | 14 +- .../version-v2.0.0.json | 14 +- .../version-v2.1.0.json | 14 +- .../version-v2.2.0.json | 14 +- .../changelog.mdx | 13 +- .../docusaurus-plugin-content-pages/coc.mdx | 2 +- .../community-guide.mdx | 5 +- .../ja/docusaurus-theme-classic/footer.json | 8 +- .../ja/docusaurus-theme-classic/navbar.json | 2 +- website/i18n/ko/code.json | 2 +- .../2021-09-27-v2-beta1-release-notes.mdx | 2 +- .../2021-11-08-v2-beta2-release-notes.mdx | 2 +- .../2022-02-22-v2-beta3-release-notes.mdx | 2 +- .../2022-09-22-v2-release-notes.mdx | 2 +- .../community/showcase/encrypteasy.mdx | 4 +- .../current/community/showcase/filehound.mdx | 8 +- .../community/showcase/minecraftupdater.mdx | 2 +- .../current/gettingstarted/development.mdx | 2 +- .../current/gettingstarted/firstproject.mdx | 24 +- .../current/gettingstarted/installation.mdx | 4 +- .../current/guides/migrating.mdx | 2 +- .../current/guides/troubleshooting.mdx | 4 +- .../current/howdoesitwork.mdx | 30 +-- .../current/introduction.mdx | 12 +- .../current/reference/cli.mdx | 2 +- .../current/reference/runtime/dialog.mdx | 2 +- .../current/reference/runtime/events.mdx | 2 +- .../current/reference/runtime/intro.mdx | 18 +- .../current/reference/runtime/log.mdx | 52 ++-- .../current/reference/runtime/menu.mdx | 2 +- .../current/reference/runtime/window.mdx | 82 +++---- .../current/tutorials/dogsapi.mdx | 42 ++-- .../current/tutorials/helloworld.mdx | 38 +-- .../version-v2.0.0-rc.1.json | 12 +- .../version-v2.0.0.json | 12 +- .../version-v2.1.0.json | 12 +- .../version-v2.2.0.json | 12 +- .../changelog.mdx | 11 +- .../community-guide.mdx | 1 + website/i18n/pt/code.json | 76 +++--- .../2021-09-27-v2-beta1-release-notes.mdx | 4 +- .../2021-11-08-v2-beta2-release-notes.mdx | 4 +- .../2022-02-22-v2-beta3-release-notes.mdx | 4 +- .../2022-09-22-v2-release-notes.mdx | 2 +- .../current/community/showcase/filehound.mdx | 2 +- .../current/gettingstarted/development.mdx | 2 +- .../current/gettingstarted/firstproject.mdx | 24 +- .../current/guides/local-development.mdx | 2 +- .../current/guides/migrating.mdx | 4 +- .../current/guides/troubleshooting.mdx | 4 +- .../current/howdoesitwork.mdx | 38 +-- .../current/introduction.mdx | 12 +- .../current/reference/cli.mdx | 8 +- .../current/reference/options.mdx | 10 +- .../current/reference/runtime/browser.mdx | 2 +- .../current/reference/runtime/dialog.mdx | 2 +- .../current/reference/runtime/events.mdx | 4 +- .../current/reference/runtime/intro.mdx | 8 +- .../current/reference/runtime/log.mdx | 6 +- .../current/reference/runtime/menu.mdx | 2 +- .../current/reference/runtime/window.mdx | 2 +- .../version-v2.0.0-rc.1.json | 14 +- .../version-v2.0.0.json | 14 +- .../version-v2.1.0.json | 14 +- .../version-v2.2.0.json | 14 +- .../changelog.mdx | 11 +- .../community-guide.mdx | 1 + .../pt/docusaurus-theme-classic/footer.json | 6 +- .../pt/docusaurus-theme-classic/navbar.json | 2 +- website/i18n/ru/code.json | 6 +- .../2021-09-27-v2-beta1-release-notes.mdx | 2 +- .../2021-11-08-v2-beta2-release-notes.mdx | 2 +- .../2022-02-22-v2-beta3-release-notes.mdx | 2 +- .../2022-09-22-v2-release-notes.mdx | 2 +- .../current/community/showcase/filehound.mdx | 2 +- .../current/gettingstarted/development.mdx | 2 +- .../current/gettingstarted/firstproject.mdx | 24 +- .../current/guides/local-development.mdx | 2 +- .../current/guides/migrating.mdx | 4 +- .../current/guides/obfuscated.mdx | 2 +- .../current/guides/templates.mdx | 2 +- .../current/guides/troubleshooting.mdx | 4 +- .../current/howdoesitwork.mdx | 34 +-- .../current/introduction.mdx | 12 +- .../current/reference/cli.mdx | 8 +- .../current/reference/options.mdx | 2 +- .../current/reference/runtime/dialog.mdx | 2 +- .../current/reference/runtime/events.mdx | 2 +- .../current/reference/runtime/intro.mdx | 6 +- .../current/reference/runtime/log.mdx | 4 +- .../current/reference/runtime/menu.mdx | 2 +- .../current/reference/runtime/window.mdx | 2 +- .../version-v2.0.0-rc.1.json | 14 +- .../version-v2.0.0.json | 14 +- .../version-v2.1.0.json | 14 +- .../version-v2.2.0.json | 14 +- .../changelog.mdx | 11 +- .../community-guide.mdx | 1 + .../ru/docusaurus-theme-classic/footer.json | 6 +- .../ru/docusaurus-theme-classic/navbar.json | 2 +- website/i18n/zh-Hans/code.json | 2 +- .../2021-09-27-v2-beta1-release-notes.mdx | 6 +- .../2021-11-08-v2-beta2-release-notes.mdx | 10 +- .../2022-02-22-v2-beta3-release-notes.mdx | 2 +- .../2022-09-22-v2-release-notes.mdx | 2 +- .../current/community/showcase/filehound.mdx | 2 +- .../current/gettingstarted/development.mdx | 2 +- .../current/gettingstarted/firstproject.mdx | 24 +- .../current/guides/migrating.mdx | 2 +- .../current/guides/troubleshooting.mdx | 4 +- .../current/howdoesitwork.mdx | 28 +-- .../current/introduction.mdx | 12 +- .../current/reference/cli.mdx | 2 +- .../current/reference/runtime/dialog.mdx | 2 +- .../current/reference/runtime/events.mdx | 2 +- .../current/reference/runtime/intro.mdx | 4 +- .../current/reference/runtime/log.mdx | 6 +- .../current/reference/runtime/menu.mdx | 2 +- .../current/reference/runtime/window.mdx | 2 +- .../changelog.mdx | 11 +- .../community-guide.mdx | 3 +- website/src/pages/changelog.mdx | 12 +- 217 files changed, 1425 insertions(+), 1390 deletions(-) diff --git a/website/blog/2021-09-27-v2-beta1-release-notes.mdx b/website/blog/2021-09-27-v2-beta1-release-notes.mdx index 989ac2c2c..62466176f 100644 --- a/website/blog/2021-09-27-v2-beta1-release-notes.mdx +++ b/website/blog/2021-09-27-v2-beta1-release-notes.mdx @@ -150,7 +150,7 @@ connects to it. All connected web browsers will respond to system events like ho In Go, we are used to dealing with structs in our applications. It's often useful to send structs to our frontend and use them as state in our application. In v1, this was a very manual process and a bit of a burden on the -developer. I'm happy to announce that in v2, any application run in dev mode will automatically generate Typescript +developer. I'm happy to announce that in v2, any application run in dev mode will automatically generate TypeScript models for all structs that are input or output parameters to bound methods. This enables seamless interchange of data models between the two worlds. diff --git a/website/blog/2021-11-08-v2-beta2-release-notes.mdx b/website/blog/2021-11-08-v2-beta2-release-notes.mdx index 9883ce006..2f8751c9c 100644 --- a/website/blog/2021-11-08-v2-beta2-release-notes.mdx +++ b/website/blog/2021-11-08-v2-beta2-release-notes.mdx @@ -89,7 +89,7 @@ connects to it. All connected web browsers will respond to system events like ho In Go, we are used to dealing with structs in our applications. It's often useful to send structs to our frontend and use them as state in our application. In v1, this was a very manual process and a bit of a burden on the -developer. I'm happy to announce that in v2, any application run in dev mode will automatically generate Typescript +developer. I'm happy to announce that in v2, any application run in dev mode will automatically generate TypeScript models for all structs that are input or output parameters to bound methods. This enables seamless interchange of data models between the two worlds. diff --git a/website/blog/2022-02-22-v2-beta3-release-notes.mdx b/website/blog/2022-02-22-v2-beta3-release-notes.mdx index 71d7efd5a..1471ec1d1 100644 --- a/website/blog/2022-02-22-v2-beta3-release-notes.mdx +++ b/website/blog/2022-02-22-v2-beta3-release-notes.mdx @@ -73,7 +73,7 @@ connects to it. All connected web browsers will respond to system events like ho In Go, we are used to dealing with structs in our applications. It's often useful to send structs to our frontend and use them as state in our application. In v1, this was a very manual process and a bit of a burden on the -developer. I'm happy to announce that in v2, any application run in dev mode will automatically generate Typescript +developer. I'm happy to announce that in v2, any application run in dev mode will automatically generate TypeScript models for all structs that are input or output parameters to bound methods. This enables seamless interchange of data models between the two worlds. diff --git a/website/blog/2022-09-22-v2-release-notes.mdx b/website/blog/2022-09-22-v2-release-notes.mdx index 7d9637a40..bcf972450 100644 --- a/website/blog/2022-09-22-v2-release-notes.mdx +++ b/website/blog/2022-09-22-v2-release-notes.mdx @@ -43,7 +43,7 @@ as it covers all the major changes in more detail. In summary: - A rich [runtime library](/docs/reference/runtime/intro) providing utility methods for window manipulation, eventing, dialogs, menus and logging. - Support for [obfuscating](/docs/guides/obfuscated) your application using [garble](https://github.com/burrowers/garble). - Support for compressing your application using [UPX](https://upx.github.io/). -- Automatic Typescript generation of Go structs. More info [here](/docs/howdoesitwork#calling-bound-go-methods). +- Automatic TypeScript generation of Go structs. More info [here](/docs/howdoesitwork#calling-bound-go-methods). - No extra libraries or DLLs are required to be shipped with your application. For any platform. - No requirement to bundle frontend assets. Just develop your application like any other web application. diff --git a/website/docs/community/showcase/filehound.mdx b/website/docs/community/showcase/filehound.mdx index 2d0961f21..8c541f482 100644 --- a/website/docs/community/showcase/filehound.mdx +++ b/website/docs/community/showcase/filehound.mdx @@ -20,5 +20,5 @@ go-linq 3.2 Frontend with: Vue 2.6.11 Vuex 3.4.0 -Typescript +TypeScript Tailwind 1.9.6 diff --git a/website/docs/gettingstarted/development.mdx b/website/docs/gettingstarted/development.mdx index a0075ef69..034be31d6 100644 --- a/website/docs/gettingstarted/development.mdx +++ b/website/docs/gettingstarted/development.mdx @@ -7,7 +7,7 @@ sidebar_position: 5 You can run your application in development mode by running `wails dev` from your project directory. This will do the following things: - Build your application and run it -- Bind your Go code to the frontend so it can be called from Javascript +- Bind your Go code to the frontend so it can be called from JavaScript - Using the power of [Vite](https://vitejs.dev/), will watch for modifications in your Go files and rebuild/re-run on change - Sets up a [webserver](http://localhost:34115) that will serve your application over a browser. This allows you to use your favourite browser extensions. You can even call your Go code from the console diff --git a/website/docs/gettingstarted/firstproject.mdx b/website/docs/gettingstarted/firstproject.mdx index 6fc5c8039..e8880660d 100644 --- a/website/docs/gettingstarted/firstproject.mdx +++ b/website/docs/gettingstarted/firstproject.mdx @@ -26,61 +26,61 @@ import TabItem from "@theme/TabItem"; ]} > - Generate a Svelte project using Javascript with:

+ Generate a Svelte project using JavaScript with:

wails init -n myproject -t svelte -If you would rather use Typescript:
+If you would rather use TypeScript:
wails init -n myproject -t svelte-ts
- Generate a React project using Javascript with:

+ Generate a React project using JavaScript with:

wails init -n myproject -t react -If you would rather use Typescript:
+If you would rather use TypeScript:
wails init -n myproject -t react-ts
- Generate a Vue project using Javascript with:

+ Generate a Vue project using JavaScript with:

wails init -n myproject -t vue -If you would rather use Typescript:
+If you would rather use TypeScript:
wails init -n myproject -t vue-ts
- Generate a Preact project using Javascript with:

+ Generate a Preact project using JavaScript with:

wails init -n myproject -t preact -If you would rather use Typescript:
+If you would rather use TypeScript:
wails init -n myproject -t preact-ts
- Generate a Lit project using Javascript with:

+ Generate a Lit project using JavaScript with:

wails init -n myproject -t lit -If you would rather use Typescript:
+If you would rather use TypeScript:
wails init -n myproject -t lit-ts
- Generate a Vanilla project using Javascript with:

+ Generate a Vanilla project using JavaScript with:

wails init -n myproject -t vanilla -If you would rather use Typescript:
+If you would rather use TypeScript:
wails init -n myproject -t vanilla-ts diff --git a/website/docs/guides/migrating.mdx b/website/docs/guides/migrating.mdx index 86549707d..45c9cf7a0 100644 --- a/website/docs/guides/migrating.mdx +++ b/website/docs/guides/migrating.mdx @@ -126,7 +126,7 @@ The _biggest_ change in v2 is how assets are handled. In v1, assets were passed via 2 application options: -- `JS` - The application's Javascript +- `JS` - The application's JavaScript - `CSS` - The application's CSS This meant that the responsibility of generating a single JS and CSS file was on the diff --git a/website/docs/guides/troubleshooting.mdx b/website/docs/guides/troubleshooting.mdx index 7441c0657..f668b0ec6 100644 --- a/website/docs/guides/troubleshooting.mdx +++ b/website/docs/guides/troubleshooting.mdx @@ -112,9 +112,9 @@ go env -w GOPROXY=https://goproxy.cn,direct Source: https://github.com/wailsapp/wails/issues/1233 -## The generated Typescript doesn't have the correct types +## The generated TypeScript doesn't have the correct types -Sometimes the generated Typescript doesn't have the correct types. To mitigate this, +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). diff --git a/website/docs/howdoesitwork.mdx b/website/docs/howdoesitwork.mdx index fb23b3dfc..2db56daa5 100644 --- a/website/docs/howdoesitwork.mdx +++ b/website/docs/howdoesitwork.mdx @@ -6,9 +6,9 @@ sidebar_position: 20 A Wails application is a standard Go application, with a webkit frontend. The Go part of the application consists of the application code and a runtime library that provides a number of useful operations, like controlling the application -window. The frontend is a webkit window that will display the frontend assets. Also available to the frontend is a Javascript +window. The frontend is a webkit window that will display the frontend assets. Also available to the frontend is a JavaScript version of the runtime library. Finally, it is possible to bind Go methods to the frontend, and these will appear as -Javascript methods that can be called, just as if they were local Javascript methods. +JavaScript methods that can be called, just as if they were local JavaScript methods. ```mdx-code-block
@@ -121,7 +121,7 @@ Just before the frontend is about to load `index.html`, a callback is made to th A standard Go context is passed to this method. This context is required when calling the runtime so a standard pattern is to save a reference to in this method. Just before the application shuts down, the [OnShutdown](reference/options.mdx#onshutdown) callback is called in the same way, again with the context. There is also an [OnDomReady](reference/options.mdx#ondomready) callback for when the frontend -has completed loading all assets in `index.html` and is equivalent of the [`body onload`](https://www.w3schools.com/jsref/event_onload.asp) event in Javascript. +has completed loading all assets in `index.html` and is equivalent of the [`body onload`](https://www.w3schools.com/jsref/event_onload.asp) event in JavaScript. It is also possible to hook into the window close (or application quit) event by setting the option [OnBeforeClose](reference/options.mdx#onbeforeclose). @@ -130,7 +130,7 @@ option [OnBeforeClose](reference/options.mdx#onbeforeclose). The `Bind` option is one of the most important options in a Wails application. It specifies which struct methods to expose to the frontend. Think of structs like "controllers" in a traditional web application. When the application starts, it examines the struct instances listed in the `Bind` field in the options, determines which methods are -public (starts with an uppercase letter) and will generate Javascript versions of those methods that can be called +public (starts with an uppercase letter) and will generate JavaScript versions of those methods that can be called by the frontend code. :::info Note @@ -208,9 +208,9 @@ You may bind as many structs as you like. Just make sure you create an instance When you run `wails dev` (or `wails generate module`), a frontend module will be generated containing the following: -- Javascript bindings for all bound methods -- Typescript declarations for all bound methods -- Typescript definitions for all Go structs used as inputs or outputs by the bound methods +- JavaScript bindings for all bound methods +- TypeScript declarations for all bound methods +- TypeScript definitions for all Go structs used as inputs or outputs by the bound methods This makes it incredibly simple to call Go code from the frontend, using the same strongly typed datastructures. @@ -231,7 +231,7 @@ the frontend and your Go code are: ### Calling bound Go methods -When you run your application with `wails dev`, it will automatically generate Javascript bindings for your structs in a +When you run your application with `wails dev`, it will automatically generate JavaScript bindings for your structs in a directory called `wailsjs/go` (You can also do this by running `wails generate module`). The generated files mirror the package names in your application. In the example above, we bind `app`, which has one public method `Greet`. This will lead to the generation of the following files: @@ -244,9 +244,9 @@ wailsjs └─App.js ``` -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: ```javascript // ... @@ -259,7 +259,7 @@ function doGreeting(name) { } ``` -The Typescript declaration file gives you the correct types for the bound methods: +The TypeScript declaration file gives you the correct types for the bound methods: ```ts export function Greet(arg1: string): Promise; @@ -268,29 +268,29 @@ export function Greet(arg1: string): Promise; The generated methods return a Promise. A successful call will result in the first return value from the Go call to be passed to the `resolve` handler. An unsuccessful call is when a Go method that has an error type as it's second return value, passes an error instance back to the caller. This is passed back via the `reject` handler. -In the example above, `Greet` only returns a `string` so the Javascript call will never reject - unless invalid data +In the example above, `Greet` only returns a `string` so the JavaScript call will never reject - unless invalid data is passed to it. -All data types are correctly translated between Go and Javascript. Even structs. If you return a struct from a Go call, -it will be returned to your frontend as a Javascript class. +All data types are correctly translated between Go and JavaScript. Even structs. If you return a struct from a Go call, +it will be returned to your frontend as a JavaScript class. :::info Note -Struct fields *must* have a valid `json` tag to be included in the generated Typescript. +Struct fields *must* have a valid `json` tag to be included in the generated TypeScript. Anonymous nested structs are not supported at this time. ::: -It is possible to send structs back to Go. Any Javascript map/class passed as an argument that +It is possible to send structs back to Go. Any JavaScript map/class passed as an argument that is expecting a struct, will be converted to that struct type. To make this process a lot easier, in `dev` mode, a TypeScript module is generated, defining all the struct types used in bound methods. Using this module, it's possible -to construct and send native Javascript objects to the Go code. +to construct and send native JavaScript objects to the Go code. There is also support for Go methods that use structs in their signature. All Go structs -specified by a bound method (either as parameters or return types) will have Typescript versions auto +specified by a bound method (either as parameters or return types) will have TypeScript versions auto generated as part of the Go code wrapper module. Using these, it's possible to share the same data -model between Go and Javascript. +model between Go and JavaScript. Example: We update our `Greet` method to accept a `Person` instead of a string: @@ -408,7 +408,7 @@ section of the [Application Development Guide](guides/application-development.md ### Calling runtime methods -The Javascript runtime is located at `window.runtime` and contains many methods to do various +The JavaScript runtime is located at `window.runtime` and contains many methods to do various tasks such as emit an event or perform logging operations: ```js title="mycode.js" diff --git a/website/docs/introduction.mdx b/website/docs/introduction.mdx index 5fc62f170..1bfa099e8 100644 --- a/website/docs/introduction.mdx +++ b/website/docs/introduction.mdx @@ -14,8 +14,8 @@ and power of Go, combined with a rich, modern frontend. - Native Menus, Dialogs, Theming and Translucency - Windows, macOS and linux support - Built in templates for Svelte, React, Preact, Vue, Lit and Vanilla JS -- Easily call Go methods from Javascript -- Automatic Go struct to Typescript model generation +- Easily call Go methods from JavaScript +- Automatic Go struct to TypeScript model generation - No CGO or external DLLs required on Windows - Live development mode using the power of [Vite](https://vitejs.dev/) - Powerful CLI to easily Create, Build and Package applications @@ -40,8 +40,8 @@ you'd expect from a modern native app. ### Quick Start Templates 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. ### Native Elements @@ -51,15 +51,15 @@ good-looking, feature rich desktop applications. **It does not embed a browser**, so it is resource efficient. Instead, it uses the native rendering engine for the platform. On Windows, this is the new Microsoft Webview2 library, built on Chromium. -### Go & Javascript Interoperability +### Go & JavaScript Interoperability -Wails automatically makes your Go methods available to Javascript, so you can call them by name from your frontend! -It even generates Typescript models for the structs used by your Go methods, so you can pass the same data structures -between Go and Javascript. +Wails automatically makes your Go methods available to JavaScript, so you can call them by name from your frontend! +It even generates TypeScript models for the structs used by your Go methods, so you can pass the same data structures +between Go and JavaScript. ### Runtime Library -Wails provides a runtime library, for both Go and Javascript, that handles a lot of the things modern applications need, +Wails provides a runtime library, for both Go and JavaScript, that handles a lot of the things modern applications need, like Eventing, Logging, Dialogs, etc. ### Live Development Experience diff --git a/website/docs/reference/cli.mdx b/website/docs/reference/cli.mdx index 1180558ef..0d1656aa3 100644 --- a/website/docs/reference/cli.mdx +++ b/website/docs/reference/cli.mdx @@ -161,7 +161,7 @@ Your system is ready for Wails development! - A webserver is started on `http://localhost:34115` which serves your application (not just frontend) over http. This allows you to use your favourite browser development extensions - All application assets are loaded from disk. If they are changed, the application will automatically reload (not rebuild). All connected browsers will also reload - A JS module is generated that provides the following: - - Javascript wrappers of your Go methods with autogenerated JSDoc, providing code hinting + - JavaScript wrappers of your Go methods with autogenerated JSDoc, providing code hinting - TypeScript versions of your Go structs, that can be constructed and passed to your go methods - A second JS module is generated that provides a wrapper + TS declaration for the runtime - On macOS, it will bundle the application into a `.app` file and run it. It will use a `build/darwin/Info.dev.plist` for development. diff --git a/website/docs/reference/runtime/dialog.mdx b/website/docs/reference/runtime/dialog.mdx index a15b9ac4b..aede10924 100644 --- a/website/docs/reference/runtime/dialog.mdx +++ b/website/docs/reference/runtime/dialog.mdx @@ -6,7 +6,7 @@ sidebar_position: 5 This part of the runtime provides access to native dialogs, such as File Selectors and Message boxes. -:::info Javascript +:::info JavaScript Dialog is currently unsupported in the JS runtime. diff --git a/website/docs/reference/runtime/events.mdx b/website/docs/reference/runtime/events.mdx index e8082b1a1..354a68f4c 100644 --- a/website/docs/reference/runtime/events.mdx +++ b/website/docs/reference/runtime/events.mdx @@ -4,7 +4,7 @@ sidebar_position: 2 # Events -The Wails runtime provides a unified events system, where events can be emitted or received by either Go or Javascript. +The Wails runtime provides a unified events system, where events can be emitted or received by either Go or JavaScript. Optionally, data may be passed with the events. Listeners will receive the data in the local data types. ### EventsOn diff --git a/website/docs/reference/runtime/intro.mdx b/website/docs/reference/runtime/intro.mdx index 1f69f662f..13a50edfb 100644 --- a/website/docs/reference/runtime/intro.mdx +++ b/website/docs/reference/runtime/intro.mdx @@ -4,7 +4,7 @@ sidebar_position: 1 # Introduction -The runtime is a library that provides utility methods for your application. There is both a Go and Javascript runtime +The runtime is a library that provides utility methods for your application. There is both a Go and JavaScript runtime and the aim is to try and keep them at parity where possible. It has utility methods for: @@ -29,8 +29,8 @@ you wish to call runtime methods at startup, use [OnDomReady](../options.mdx#ond ::: -The Javascript library is available to the frontend via the `window.runtime` map. There is a runtime package generated when using `dev` -mode that provides Typescript declarations for the runtime. This should be located in the `wailsjs` directory in your +The JavaScript library is available to the frontend via the `window.runtime` map. There is a runtime package generated when using `dev` +mode that provides TypeScript declarations for the runtime. This should be located in the `wailsjs` directory in your frontend directory. ### Hide diff --git a/website/docs/reference/runtime/log.mdx b/website/docs/reference/runtime/log.mdx index d38ee9526..4f6b6b68b 100644 --- a/website/docs/reference/runtime/log.mdx +++ b/website/docs/reference/runtime/log.mdx @@ -4,7 +4,7 @@ sidebar_position: 3 # Log -The Wails runtime provides a logging mechanism that may be called from Go or Javascript. Like most +The Wails runtime provides a logging mechanism that may be called from Go or JavaScript. Like most loggers, there are a number of log levels: - Trace @@ -110,7 +110,7 @@ Go: `LogFatalf(ctx context.Context, format string, args ...interface{})`
### LogSetLogLevel -Sets the log level. In Javascript, the number relates to the following log levels: +Sets the log level. In JavaScript, the number relates to the following log levels: | Value | Log Level | | ----- | --------- | diff --git a/website/docs/reference/runtime/menu.mdx b/website/docs/reference/runtime/menu.mdx index da4b74b69..8a0c79e37 100644 --- a/website/docs/reference/runtime/menu.mdx +++ b/website/docs/reference/runtime/menu.mdx @@ -6,7 +6,7 @@ sidebar_position: 6 These methods are related to the application menu. -:::info Javascript +:::info JavaScript Menu is currently unsupported in the JS runtime. diff --git a/website/docs/reference/runtime/window.mdx b/website/docs/reference/runtime/window.mdx index eec2a991b..3719be554 100644 --- a/website/docs/reference/runtime/window.mdx +++ b/website/docs/reference/runtime/window.mdx @@ -233,7 +233,7 @@ Any value that is not 0 will be considered 255. Go: `WindowSetBackgroundColour(ctx context.Context, R, G, B, A uint8)`
JS: `WindowSetBackgroundColour(R, G, B, A)` -## Typescript Object Definitions +## TypeScript Object Definitions ### Position diff --git a/website/i18n/fr/code.json b/website/i18n/fr/code.json index fc78772ac..494637df2 100644 --- a/website/i18n/fr/code.json +++ b/website/i18n/fr/code.json @@ -1,30 +1,30 @@ { "homepage.Features.Title1": { - "message": "homepage.Features.Title1" + "message": "Riche en fonctionnalités" }, "homepage.Features.Description1": { - "message": "homepage.Features.Description1" + "message": "Construisez des applications multiplateformes complètes en utilisant des éléments natifs du UI tels que les menus et les boîtes de dialogue." }, "homepage.Features.Title2": { - "message": "homepage.Features.Title2" + "message": "Familier" }, "homepage.Features.Description2": { - "message": "homepage.Features.Description2" + "message": "Utilisez les technologies que vous connaissez déjà pour construire des applications étonnantes." }, "homepage.Features.Title3": { - "message": "homepage.Features.Title3" + "message": "Fast" }, "homepage.Features.Description3": { - "message": "homepage.Features.Description3" + "message": "Générez, construisez et empaquetez rapidement vos projets en utilisant le CLI Wails." }, "homepage.Tagline": { - "message": "homepage.Tagline" + "message": "Créez de belles applications multi-plateformes en utilisant Go" }, "homepage.ButtonText": { - "message": "homepage.ButtonText" + "message": "Premiers Pas" }, "homepage.LearnMoreButtonText": { - "message": "homepage.LearnMoreButtonText" + "message": "En savoir plus" }, "theme.ErrorPageContent.title": { "message": "Cette page a planté.", @@ -35,7 +35,7 @@ "description": "The label of the button to try again when the page crashed" }, "theme.NotFound.title": { - "message": "Page introuvable", + "message": "Page non trouvée", "description": "The title of the 404 page" }, "theme.NotFound.p1": { @@ -43,7 +43,7 @@ "description": "The first paragraph of the 404 page" }, "theme.NotFound.p2": { - "message": "Veuillez contacter le propriétaire du site qui vous a lié à l'URL d'origine et leur faire savoir que leur lien est cassé.", + "message": "Veuillez contacter le propriétaire du site qui vous a dirigé vers cette URL et lui faire savoir que son lien est rompu.", "description": "The 2nd paragraph of the 404 page" }, "theme.AnnouncementBar.closeButtonAriaLabel": { @@ -59,7 +59,7 @@ "description": "The page & hero description of the blog archive page" }, "theme.BackToTopButton.buttonAriaLabel": { - "message": "Retour au début de la page", + "message": "Retour en haut de la page", "description": "The ARIA label for the back to top button" }, "theme.blog.paginator.navAriaLabel": { @@ -71,7 +71,7 @@ "description": "The label used to navigate to the newer blog posts page (previous page)" }, "theme.blog.paginator.olderEntries": { - "message": "Anciennes entrées", + "message": "Anciennes Entrées", "description": "The label used to navigate to the older blog posts page (next page)" }, "theme.blog.post.readingTime.plurals": { @@ -79,11 +79,11 @@ "description": "Pluralized label for \"{readingTime} min read\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)" }, "theme.blog.post.readMoreLabel": { - "message": "En savoir plus sur {title}", + "message": "Lire la suite de {title}", "description": "The ARIA label for the link to full blog posts from excerpts" }, "theme.blog.post.readMore": { - "message": "Lire plus", + "message": "Lire la suite", "description": "The label used in blog post item excerpts to link to full blog posts" }, "theme.blog.post.paginator.navAriaLabel": { @@ -115,7 +115,7 @@ "description": "The label of the link targeting the tag list page" }, "theme.CodeBlock.copyButtonAriaLabel": { - "message": "Copier le code", + "message": "Copier le code dans le presse-papiers", "description": "The ARIA label for copy code blocks button" }, "theme.CodeBlock.copied": { @@ -127,7 +127,7 @@ "description": "The copy button label on code blocks" }, "theme.colorToggle.ariaLabel": { - "message": "Basculer entre le mode sombre et clair (actuellement {mode})", + "message": "Passer du mode sombre au mode clair (actuellement {mode})", "description": "The ARIA label for the navbar color mode toggle" }, "theme.colorToggle.ariaLabel.mode.dark": { @@ -143,7 +143,7 @@ "description": "The default description for a category card in the generated index about how many items this category includes" }, "theme.docs.sidebar.expandButtonTitle": { - "message": "Déplier le menu latéral", + "message": "Étendre la barre latérale", "description": "The ARIA label and title attribute for expand button of doc sidebar" }, "theme.docs.sidebar.expandButtonAriaLabel": { @@ -163,7 +163,7 @@ "description": "The label used to navigate to the next doc" }, "theme.docs.sidebar.collapseButtonTitle": { - "message": "Réduire le menu latéral", + "message": "Réduire la barre latérale", "description": "The title attribute for collapse button of doc sidebar" }, "theme.docs.sidebar.collapseButtonAriaLabel": { @@ -230,11 +230,11 @@ "description": "The label for the navbar versions dropdown on mobile view" }, "theme.common.skipToMainContent": { - "message": "Aller au contenu principal", + "message": "Passer au contenu principal", "description": "The skip to content label used for accessibility, allowing to rapidly navigate to main content with keyboard tab/enter navigation" }, "theme.tags.tagsListLabel": { - "message": "Tags :", + "message": "Tags :", "description": "The label alongside a tag list" }, "theme.TOCCollapsible.toggleButtonLabel": { @@ -249,15 +249,15 @@ "message": "Voir les {count} résultats" }, "theme.SearchBar.label": { - "message": "Chercher", + "message": "Recherche", "description": "The ARIA label and placeholder for search button" }, "theme.SearchPage.documentsFound.plurals": { - "message": "Un document trouvé|{count} documents trouvés", + "message": "Un document trouvé |{count} documents trouvés", "description": "Pluralized label for \"{count} documents found\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)" }, "theme.SearchPage.existingResultsTitle": { - "message": "Résultats de recherche pour « {query} »", + "message": "Résultats de la recherche pour \"{query}\"", "description": "The search page title for non-empty query" }, "theme.SearchPage.emptyResultsTitle": { @@ -265,7 +265,7 @@ "description": "The search page title for empty query" }, "theme.SearchPage.inputPlaceholder": { - "message": "Tapez votre recherche ici", + "message": "Saisissez votre recherche ici", "description": "The placeholder for search page input" }, "theme.SearchPage.inputLabel": { @@ -281,15 +281,15 @@ "description": "The paragraph for empty search result" }, "theme.SearchPage.fetchingNewResults": { - "message": "Chargement de nouveaux résultats...", + "message": "Récupération des nouveaux résultats...", "description": "The paragraph for fetching new search results" }, "theme.tags.tagsPageTitle": { - "message": "Tags", + "message": "Tags ", "description": "The title of the tag list page" }, "theme.docs.breadcrumbs.home": { - "message": "Page d'accueil", + "message": "Page d’accueil", "description": "The ARIA label for the home page in the breadcrumbs" }, "theme.docs.breadcrumbs.navAriaLabel": { @@ -301,7 +301,7 @@ "description": "The title attribute for toggle word wrapping button of code block lines" }, "theme.admonition.note": { - "message": "remarque", + "message": "note", "description": "The default label used for the Note admonition (:::note)" }, "theme.admonition.tip": { @@ -329,7 +329,7 @@ "description": "The label and ARIA label for search box cancel button" }, "theme.SearchModal.startScreen.recentSearchesTitle": { - "message": "Récemment", + "message": "Récents", "description": "The title for recent searches" }, "theme.SearchModal.startScreen.noRecentSearchesText": { @@ -337,7 +337,7 @@ "description": "The text when no recent searches" }, "theme.SearchModal.startScreen.saveRecentSearchButtonTitle": { - "message": "Sauvegarder cette recherche", + "message": "Enregistrer cette recherche", "description": "The label for save recent search button" }, "theme.SearchModal.startScreen.removeRecentSearchButtonTitle": { @@ -357,7 +357,7 @@ "description": "The title for error screen of search modal" }, "theme.SearchModal.errorScreen.helpText": { - "message": "Vous pouvez vérifier votre connexion réseau.", + "message": "Vous devriez vérifier votre connexion réseau.", "description": "The help text for error screen of search modal" }, "theme.SearchModal.footer.selectText": { @@ -365,7 +365,7 @@ "description": "The explanatory text of the action for the enter key" }, "theme.SearchModal.footer.selectKeyAriaLabel": { - "message": "Touche Entrée", + "message": "La touche Entrée", "description": "The ARIA label for the Enter key button that makes the selection" }, "theme.SearchModal.footer.navigateText": { @@ -389,7 +389,7 @@ "description": "The ARIA label for the Escape key button that close the modal" }, "theme.SearchModal.footer.searchByText": { - "message": "Recherche via", + "message": "Rechercher par", "description": "The text explain that the search is making by Algolia" }, "theme.SearchModal.noResultsScreen.noResultsText": { diff --git a/website/i18n/fr/docusaurus-plugin-content-blog/2021-09-27-v2-beta1-release-notes.mdx b/website/i18n/fr/docusaurus-plugin-content-blog/2021-09-27-v2-beta1-release-notes.mdx index d500b2b38..1158647a5 100644 --- a/website/i18n/fr/docusaurus-plugin-content-blog/2021-09-27-v2-beta1-release-notes.mdx +++ b/website/i18n/fr/docusaurus-plugin-content-blog/2021-09-27-v2-beta1-release-notes.mdx @@ -23,15 +23,15 @@ Quand j'ai annoncé Wails pour la première fois sur Reddit, il y a deux ans dep Il était clair que des gens étaient excités au fait de pouvoir ajouter des frontends web à leurs projets en Go, et presque immédiatement ça a poussé le projet bien plus loin que la preuve de concept que j'avais créé. A ce moment, Wails utilisait le projet [webview](https://github.com/webview/webview) pour gérer le frontend, et la seule option pour Windows était le moteur de rendu IE11. Beaucoup de bugs ont été ouverts à cause de cette limitation : support faible du JavaScript/CSS et accès à aucun outil de développement pour le déboguer. C'était une expérience de développement frustrante, mais il n'y avait pas grand-chose qui pouvait être fait pour le rectifier. -Durant un long moment, je croyais fermement que Microsoft allait devoir faire quelque chose pour améliorer la situation de leur navigateur. Le monde avançait, le développement frontend était en plein boom, mais IE n'était pas à la hauteur. When Microsoft announced the move to using Chromium as the basis for their new browser direction, I knew it was only a matter of time until Wails could use it, and move the Windows developer experience to the next level. +Durant un long moment, je croyais fermement que Microsoft allait devoir faire quelque chose pour améliorer la situation de leur navigateur. Le monde avançait, le développement frontend était en plein boom, mais IE n'était pas à la hauteur. Lorsque Microsoft a annoncé le passage à l'utilisation de Chromium comme nouvelle base pour leur navigateur, je savais que ce n'était qu'une question de de temps avant que Wails ne puisse l'utiliser, et que l'expérience du développeur Windows ne passe au niveau supérieur. -Today, I am pleased to announce: **Wails v2 Beta for Windows**! There's a huge amount to unpack in this release, so grab a drink, take a seat and we'll begin... +Aujourd'hui, j'ai le plaisir d'annoncer : **Wails v2 Beta pour Windows**! Il y a énormément de stock dans cette version, donc attrape une boisson, prend un siège et nous allons commencer... -### No CGO Dependency! +### Pas de dépendance CGO ! -No, I'm not joking: _No_ _CGO_ _dependency_ 🤯! The thing about Windows is that, unlike MacOS and Linux, it doesn't come with a default compiler. In addition, CGO requires a mingw compiler and there's a ton of different installation options. Removing the CGO requirement has massively simplified setup, as well as making debugging an awful lot easier. Whilst I have put a fair bit of effort in getting this working, the majority of the credit should go to [John Chadwick](https://github.com/jchv) for not only starting a couple of projects to make this possible, but also being open to someone taking those projects and building on them. Credit also to [Tad Vizbaras](https://github.com/tadvi) whose [winc](https://github.com/tadvi/winc) project started me down this path. +Non, je ne plaisante pas : _Pas_ _de_ _dépendance_ _CGO_ 🤯! La chose à propos de Windows est que, contrairement à MacOS et Linux, il n'est pas livré avec un compilateur par défaut. De plus, CGO a besoin d'un compilateur mingw et il y a une tonne d'options d'installation différentes. La suppression de CGO comme prérequis a simplifié considérablement la configuration et facilite grandement le débogage. Pendant que j'ai fait un effort raisonnable pour que cela fonctionne, la majorité du crédit devrait aller à [John Chadwick](https://github.com/jchv) pour non seulement démarrer quelques projets pour rendre ceci possible, mais aussi être ouvert à quelqu'un qui prend ces projets et qui en crée d'autres à partir des siens. Crédit également à [Tad Vizbaras](https://github.com/tadvi) dont le projet [winc](https://github.com/tadvi/winc) m'a lancé dans cette direction. -### WebView2 Chromium Renderer +### Moteur de rendu WebView2 Chromium ```mdx-code-block
@@ -44,15 +44,15 @@ No, I'm not joking: _No_ _CGO_ _dependency_ 🤯! The thing about Windows is tha
``` -Finally, Windows developers get a first class rendering engine for their applications! Gone are the days of contorting your frontend code to work on Windows. On top of that, you get a first-class developer tools experience! +Enfin, les développeurs de Windows obtiennent un moteur de rendu de première classe pour leurs applications ! Les jours à tordre votre code frontend pour le faire fonctionner sur Windows sont terminés. En plus de cela, vous obtenez une expérience avec des outils de développement de première classe ! -The WebView2 component does, however, have a requirement to have the `WebView2Loader.dll` sitting alongside the binary. This makes distribution just that little bit more painful than we gophers are used to. All solutions and libraries (that I know of) that use WebView2 have this dependency. +Le composant WebView2 a toutefois besoin d'avoir le `WebView2Loader.dll` de présent avec le binaire. Cela rend la distribution juste un peu plus douloureuse que ce à quoi nous sommes habitués. Toutes les solutions et bibliothèques (que je connais) qui utilisent WebView2 ont cette dépendance. -However, I'm really excited to announce that Wails applications _have no such requirement_! Thanks to the wizardry of [John Chadwick](https://github.com/jchv), we are able to bundle this dll inside the binary and get Windows to load it as if it were present on disk. +Cependant, je suis vraiment heureuse d'annoncer que les applications Wails _n'ont pas de telles exigences_! Merci à la sorcellerie de [John Chadwick](https://github.com/jchv), grâce à qui nous sommes en mesure de regrouper cette dll à l'intérieur du binaire et d'obtenir que Windows la charge comme si elle était présente sur le disque. -Gophers rejoice! The single binary dream lives on! +Les Gophers se réjouissent! Le rêve d'un binaire unique vit ! -### New Features +### Nouvelles fonctionnalités ```mdx-code-block
@@ -94,7 +94,7 @@ Yes, it works just like a webserver, except it isn't. You just pass a single `embed.FS` that contains all your assets into your application configuration. They don't even need to be in the top directory - Wails will just work it out for you. -### New Development Experience +### Nouvelle expérience de développement ```mdx-code-block
@@ -116,7 +116,7 @@ It also provides the additional features: In addition to this, a webserver will start on port 34115. This will serve your application to any browser that connects to it. All connected web browsers will respond to system events like hot reload on asset change. -In Go, we are used to dealing with structs in our applications. It's often useful to send structs to our frontend and use them as state in our application. In v1, this was a very manual process and a bit of a burden on the developer. I'm happy to announce that in v2, any application run in dev mode will automatically generate Typescript models for all structs that are input or output parameters to bound methods. This enables seamless interchange of data models between the two worlds. +In Go, we are used to dealing with structs in our applications. It's often useful to send structs to our frontend and use them as state in our application. In v1, this was a very manual process and a bit of a burden on the developer. I'm happy to announce that in v2, any application run in dev mode will automatically generate TypeScript models for all structs that are input or output parameters to bound methods. This enables seamless interchange of data models between the two worlds. In addition to this, another JS module is dynamically generated wrapping all your bound methods. This provides JSDoc for your methods, providing code completion and hinting in your IDE. It's really cool when you get data models auto-imported when hitting tab in an auto-generated module wrapping your Go code! @@ -137,25 +137,25 @@ Getting an application up and running quickly was always a key goal for the Wail With v2, I wanted to empower the community by giving you the ability to create and host templates yourselves, rather than rely on the Wails project. So now you can create projects using community supported templates! I hope this will inspire developers to create a vibrant ecosystem of project templates. I'm really quite excited about what our developer community can create! -### In Conclusion +### En conclusion Wails v2 represents a new foundation for the project. The aim of this release is to get feedback on the new approach, and to iron out any bugs before a full release. Your input would be most welcome. Please direct any feedback to the [v2 Beta](https://github.com/wailsapp/wails/discussions/828) discussion board. There were many twists and turns, pivots and u-turns to get to this point. This was due partly to early technical decisions that needed changing, and partly because some core problems we had spent time building workarounds for were fixed upstream: Go’s embed feature is a good example. Fortunately, everything came together at the right time, and today we have the very best solution that we can have. I believe the wait has been worth it - this would not have been possible even 2 months ago. -I also need to give a huge thank you :pray: to the following people because without them, this release just wouldn't exist: +J'ai également besoin de remercier énormément les personnes suivantes :pray: parce que sans elles, cette version n'existerait tout simplement pas: -- [Misite Bao](https://github.com/misitebao) - An absolute workhorse on the Chinese translations and an incredible bug finder. -- [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 we have today possible. -- [Tad Vizbaras](https://github.com/tadvi) - Experimenting with his [winc](https://github.com/tadvi/winc) project was the first step down the path to a pure Go Wails. -- [Mat Ryer](https://github.com/matryer) - His support, encouragement and feedback has really helped drive the project forward. +- [Misite Bao](https://github.com/misitebao) - Un bourreau de travail absolu sur les traductions chinoises et un chercheur de bugs incroyable. +- [John Chadwick](https://github.com/jchv) - Pour son travail incroyable sur [go-webview2](https://github.com/jchv/go-webview2) et [go-winloader](https://github.com/jchv/go-winloader) qui a permis aujourd'hui d'avoir une version Windows. +- [Tad Vizbaras](https://github.com/tadvi) - Expérimenter avec son projet [winc](https://github.com/tadvi/winc) a été le premier pas vers un pur Wails en Go. +- [Mat Ryer](https://github.com/matryer) - Son soutien, ses encouragements et ses commentaires ont vraiment contribué à faire avancer le projet. -And finally, I'd like to give a special thank you to all the [project sponsors](/credits#sponsors), including [JetBrains](https://www.jetbrains.com?from=Wails), whose support drive the project in many ways behind the scenes. +Enfin, je voudrais remercier tout particulièrement tous les [sponsors du projet](/credits#sponsors), y compris [JetBrains](https://www.jetbrains.com?from=Wails), dont le soutien anime le projet de plusieurs manières en coulisses. -I look forward to seeing what people build with Wails in this next exciting phase of the project! +J'ai hâte de voir ce que les gens construisent avec Wails dans cette prochaine phase excitante du projet! Lea. -PS: MacOS and Linux users need not feel left out - porting to this new foundation is actively under way and most of the hard work has already been done. Hang in there! +PS: Les utilisateurs de MacOS et de Linux n'ont pas besoin de se sentir laissés de côté. Le portage vers ces OS est en cours et la majeure partie du travail a déjà été faite. Tenez bon ! -PPS: If you or your company find Wails useful, please consider [sponsoring the project](https://github.com/sponsors/leaanthony). Thanks! +PPS : Si vous ou votre entreprise trouvez Wails utile, veuillez envisager [de parrainer le projet](https://github.com/sponsors/leaanthony). Merci ! diff --git a/website/i18n/fr/docusaurus-plugin-content-blog/2021-11-08-v2-beta2-release-notes.mdx b/website/i18n/fr/docusaurus-plugin-content-blog/2021-11-08-v2-beta2-release-notes.mdx index 76ae8c80a..86d44616f 100644 --- a/website/i18n/fr/docusaurus-plugin-content-blog/2021-11-08-v2-beta2-release-notes.mdx +++ b/website/i18n/fr/docusaurus-plugin-content-blog/2021-11-08-v2-beta2-release-notes.mdx @@ -74,7 +74,7 @@ It also provides the additional features: In addition to this, a webserver will start on port 34115. This will serve your application to any browser that connects to it. All connected web browsers will respond to system events like hot reload on asset change. -In Go, we are used to dealing with structs in our applications. It's often useful to send structs to our frontend and use them as state in our application. In v1, this was a very manual process and a bit of a burden on the developer. I'm happy to announce that in v2, any application run in dev mode will automatically generate Typescript models for all structs that are input or output parameters to bound methods. This enables seamless interchange of data models between the two worlds. +In Go, we are used to dealing with structs in our applications. It's often useful to send structs to our frontend and use them as state in our application. In v1, this was a very manual process and a bit of a burden on the developer. I'm happy to announce that in v2, any application run in dev mode will automatically generate TypeScript models for all structs that are input or output parameters to bound methods. This enables seamless interchange of data models between the two worlds. In addition to this, another JS module is dynamically generated wrapping all your bound methods. This provides JSDoc for your methods, providing code completion and hinting in your IDE. It's really cool when you get data models auto-imported when hitting tab in an auto-generated module wrapping your Go code! diff --git a/website/i18n/fr/docusaurus-plugin-content-blog/2022-02-22-v2-beta3-release-notes.mdx b/website/i18n/fr/docusaurus-plugin-content-blog/2022-02-22-v2-beta3-release-notes.mdx index eb7f2a46a..b405953cf 100644 --- a/website/i18n/fr/docusaurus-plugin-content-blog/2022-02-22-v2-beta3-release-notes.mdx +++ b/website/i18n/fr/docusaurus-plugin-content-blog/2022-02-22-v2-beta3-release-notes.mdx @@ -61,7 +61,7 @@ It also provides the additional features: In addition to this, a webserver will start on port 34115. This will serve your application to any browser that connects to it. All connected web browsers will respond to system events like hot reload on asset change. -In Go, we are used to dealing with structs in our applications. It's often useful to send structs to our frontend and use them as state in our application. In v1, this was a very manual process and a bit of a burden on the developer. I'm happy to announce that in v2, any application run in dev mode will automatically generate Typescript models for all structs that are input or output parameters to bound methods. This enables seamless interchange of data models between the two worlds. +In Go, we are used to dealing with structs in our applications. It's often useful to send structs to our frontend and use them as state in our application. In v1, this was a very manual process and a bit of a burden on the developer. I'm happy to announce that in v2, any application run in dev mode will automatically generate TypeScript models for all structs that are input or output parameters to bound methods. This enables seamless interchange of data models between the two worlds. In addition to this, another JS module is dynamically generated wrapping all your bound methods. This provides JSDoc for your methods, providing code completion and hinting in your IDE. It's really cool when you get data models auto-imported when hitting tab in an auto-generated module wrapping your Go code! diff --git a/website/i18n/fr/docusaurus-plugin-content-blog/2022-09-22-v2-release-notes.mdx b/website/i18n/fr/docusaurus-plugin-content-blog/2022-09-22-v2-release-notes.mdx index 8f61ab2b8..0e85b7cdc 100644 --- a/website/i18n/fr/docusaurus-plugin-content-blog/2022-09-22-v2-release-notes.mdx +++ b/website/i18n/fr/docusaurus-plugin-content-blog/2022-09-22-v2-release-notes.mdx @@ -45,7 +45,7 @@ The v2 release is a huge leap forward for the project, addressing many of the pa - A rich [runtime library](/docs/reference/runtime/intro) providing utility methods for window manipulation, eventing, dialogs, menus and logging. - Support for [obfuscating](/docs/guides/obfuscated) your application using [garble](https://github.com/burrowers/garble). - Support for compressing your application using [UPX](https://upx.github.io/). -- Automatic Typescript generation of Go structs. More info [here](/docs/howdoesitwork#calling-bound-go-methods). +- Automatic TypeScript generation of Go structs. More info [here](/docs/howdoesitwork#calling-bound-go-methods). - No extra libraries or DLLs are required to be shipped with your application. For any platform. - No requirement to bundle frontend assets. Just develop your application like any other web application. @@ -91,8 +91,8 @@ I'm really proud of what we've been able to achieve with the V2 release. It's am This release was achieved through the hard work of many contributors. Whilst it is free to download and use, it has not come about through zero cost. Make no mistakes, this project has come at considerable cost. It has not only been my time and the time of each and every contributor, but also the cost of absence from friends and families of each of those people too. That's why I'm extremely grateful for every second that has been dedicated to making this project happen. The more contributors we have, the more this effort can be spread out and the more we can achieve together. I'd like to encourage you all to pick one thing that you can contribute, whether it is confirming someone's bug, suggesting a fix, making a documentation change or helping out someone who needs it. All of these small things have such a huge impact! It would be so awesome if you too were part of the story in getting to v3. -Enjoy! +Profitez bien! ‐ Lea -PS: If you or your company find Wails useful, please consider [sponsoring the project](https://github.com/sponsors/leaanthony). Thanks! +PS : Si vous ou votre entreprise trouvez Wails utile, veuillez envisager [de parrainer le projet](https://github.com/sponsors/leaanthony). Merci ! diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/current/community/links.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/current/community/links.mdx index 3f9ebf2fc..df7ba5dd4 100644 --- a/website/i18n/fr/docusaurus-plugin-content-docs/current/community/links.mdx +++ b/website/i18n/fr/docusaurus-plugin-content-docs/current/community/links.mdx @@ -2,25 +2,25 @@ sidebar_position: 2 --- -# Links +# Liens -This page serves as a list for community related links. Please submit a PR (click `Edit this page` at the bottom) to submit links. +Cette page sert de liste pour les liens liés à la communauté. Veuillez soumettre une PR (cliquez sur `Modifier cette page` en bas) pour soumettre des liens. ## Awesome Wails -The [definitive list](https://github.com/wailsapp/awesome-wails) of links related to Wails. +La [liste définitive](https://github.com/wailsapp/awesome-wails) de liens relatifs à Wails. -## Support Channels +## Canaux de support - [Gophers Slack Channel](https://gophers.slack.com/messages/CJ4P9F7MZ/) - [Gophers Slack Channel Invite](https://invite.slack.golangbridge.org/) - [Github Issues](https://github.com/wailsapp/wails/issues) -- [v2 Beta Discussion Board](https://github.com/wailsapp/wails/discussions/828) +- [canal de discussion sur la bêta v2](https://github.com/wailsapp/wails/discussions/828) -## Social Media +## Réseaux sociaux - [Twitter](https://twitter.com/wailsapp) -- [Wails Chinese Community QQ Group](https://qm.qq.com/cgi-bin/qm/qr?k=PmIURne5hFGNd7QWzW5qd6FV-INEjNJv&jump_from=webapi) - Group number: 1067173054 +- [Groupe QQ pour la communauté chinoise de Wails](https://qm.qq.com/cgi-bin/qm/qr?k=PmIURne5hFGNd7QWzW5qd6FV-INEjNJv&jump_from=webapi) - Numéro de groupe : 1067173054 -## Other Tutorials and Articles -- [Building of Bulletin Board](https://blog.customct.com/building-bulletin-board) +## Autres tutoriels et articles +- [Construction d'un Panneau d'Affichage](https://blog.customct.com/building-bulletin-board) diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/current/community/showcase/encrypteasy.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/current/community/showcase/encrypteasy.mdx index 7504950ea..7f4bd7a63 100644 --- a/website/i18n/fr/docusaurus-plugin-content-docs/current/community/showcase/encrypteasy.mdx +++ b/website/i18n/fr/docusaurus-plugin-content-docs/current/community/showcase/encrypteasy.mdx @@ -7,6 +7,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.** +**[EncryptEasy](https://www.encrypteasy.app) est un outil de chiffrement PGP simple et facile à utiliser, qui gère toutes vos clés et celles de vos contacts. Le chiffrement devrait être simple. Développé avec 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. +Chiffrer les messages à l'aide de PGP est la norme de l'industrie. Tout le monde a une clé privée et publique. Votre clé privée, eh bien, doit être privée afin que vous seul puissiez lire les messages. Votre clé publique est distribuée à toute personne qui veut vous envoyer des messages secrets, chiffrés. Gérer les clés, chiffrer les messages et déchiffrer les messages devrait être une expérience agréable. EncryptEasy a pour but de vous simplifier la tâche. diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/current/community/showcase/filehound.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/current/community/showcase/filehound.mdx index 134365aaf..df03191ff 100644 --- a/website/i18n/fr/docusaurus-plugin-content-docs/current/community/showcase/filehound.mdx +++ b/website/i18n/fr/docusaurus-plugin-content-docs/current/community/showcase/filehound.mdx @@ -1,4 +1,4 @@ -# FileHound Export Utility +# Utilitaire d'exportation FileHound ```mdx-code-block

@@ -7,10 +7,10 @@

``` -[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. +[L'utilitaire d'exportation FileHound](https://www.filehound.co.uk/) est une plate-forme de gestion de documents cloud conçue pour la conservation sécurisée de fichiers, l'automatisation des processus métier et les capacités de SmartCapture. -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. +L'utilitaire d'exportation FileHound permet aux administrateurs FileHound d'exécuter des tâches sécurisées d'extraction de documents et de données à des fins alternatives de sauvegarde et de récupération. Cette application téléchargera tous les documents et/ou métadonnées enregistrés dans FileHound en fonction des filtres que vous avez choisis. Les métadonnées seront exportées dans les formats JSON et XML. -Backend built with: Go 1.15 Wails 1.11.0 go-sqlite3 1.14.6 go-linq 3.2 +Backend construit avec: Go 1.15 Wails 1.11.0 go-sqlite3 1.14.6 go-linq 3.2 -Frontend with: Vue 2.6.11 Vuex 3.4.0 Typescript Tailwind 1.9.6 +Frontend with: Vue 2.6.11 Vuex 3.4.0 TypeScript Tailwind 1.9.6 diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/current/community/showcase/minecraftupdater.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/current/community/showcase/minecraftupdater.mdx index 2f6c7c72b..5966e75fa 100644 --- a/website/i18n/fr/docusaurus-plugin-content-docs/current/community/showcase/minecraftupdater.mdx +++ b/website/i18n/fr/docusaurus-plugin-content-docs/current/community/showcase/minecraftupdater.mdx @@ -11,4 +11,4 @@

``` -[Minecraft Updater](https://github.com/Gurkengewuerz/MinecraftModUpdater) is a utility tool to update and synchronize Minecraft mods for your userbase. It’s built using Wails2 and React with [antd](https://ant.design/) as frontend framework. +[Minecraft Updater](https://github.com/Gurkengewuerz/MinecraftModUpdater) est un outil utilitaire pour mettre à jour et synchroniser les mods Minecraft pour votre base d'utilisateurs. Il a été conçu en utilisant Wails2 et React avec [antd](https://ant.design/) comme framework frontend. diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/current/community/showcase/modalfilemanager.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/current/community/showcase/modalfilemanager.mdx index f8e2bcd66..c93effc42 100644 --- a/website/i18n/fr/docusaurus-plugin-content-docs/current/community/showcase/modalfilemanager.mdx +++ b/website/i18n/fr/docusaurus-plugin-content-docs/current/community/showcase/modalfilemanager.mdx @@ -9,6 +9,6 @@

``` -[Modal File Manager](https://github.com/raguay/ModalFileManager) is a dual pane file manager using web technologies. My original design was based on NW.js and can be found [here](https://github.com/raguay/ModalFileManager-NWjs). This version uses the same Svelte based frontend code (but it has be greatly modified since the departure from NW.js), but the backend is a [Wails 2](https://wails.io/) implementation. By using this implementation, I no longer use command line `rm`, `cp`, etc. commands. It is fully coded using Go and runs much faster than the previous versions. +[Modal File Manager](https://github.com/raguay/ModalFileManager) est un gestionnaire de fichiers à double volet utilisant des technologies web. Mon design original était basé sur NW.js et peut être trouvé [ici](https://github.com/raguay/ModalFileManager-NWjs). Cette version utilise le même code frontend basé sur Svelte (mais il a été grandement modifié depuis le départ de NW.js), mais le backend est une implémentation de [Wails 2](https://wails.io/). En utilisant cette implémentation, je n'utilise plus de commandes en ligne de commande `rm`, `cp`, etc. Il est entièrement codé en utilisant Go et fonctionne beaucoup plus rapidement que les versions précédentes. -This file manager is designed around the same principle as Vim: a state controlled keyboard actions. The number of states isn't fixed, but very programmable. Therefore, an infinite number of keyboard configurations can be created and used. This is the main difference from other file managers. +Ce gestionnaire de fichiers est conçu autour du même principe que Vim: l'état est contrôlé par des actions via le clavier. Le nombre d'états n'est pas fixe, mais très programmable. Par conséquent, un nombre infini de configurations de clavier qui peuvent être créées et utilisées. C'est la principale différence par rapport aux autres gestionnaires de fichiers. diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/current/community/showcase/mollywallet.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/current/community/showcase/mollywallet.mdx index 5d846d06d..70a6cd1f4 100644 --- a/website/i18n/fr/docusaurus-plugin-content-docs/current/community/showcase/mollywallet.mdx +++ b/website/i18n/fr/docusaurus-plugin-content-docs/current/community/showcase/mollywallet.mdx @@ -7,4 +7,4 @@

``` -[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. +[Molly Wallet](https://github.com/grvlle/constellation_wallet/) le portefeuille officiel $DAG du Constellation Network. Cela permettra aux utilisateurs d'interagir avec le réseau Hypergraph de différentes manières, sans se limiter à la production de transactions en $DAG. diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/current/community/showcase/october.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/current/community/showcase/october.mdx index 66d634dc5..5a9789d87 100644 --- a/website/i18n/fr/docusaurus-plugin-content-docs/current/community/showcase/october.mdx +++ b/website/i18n/fr/docusaurus-plugin-content-docs/current/community/showcase/october.mdx @@ -7,8 +7,8 @@

``` -[October](https://october.utf9k.net) is a small Wails application that makes it really easy to extract highlights from [Kobo eReaders](https://en.wikipedia.org/wiki/Kobo_eReader) and then forward them to [Readwise](https://readwise.io). +[Octobre](https://october.utf9k.net) est une petite application Wails qui rend vraiment facile d'extraire les surlignements de [Kobo eReaders](https://en.wikipedia.org/wiki/Kobo_eReader) puis de les transférer vers [Readwise](https://readwise.io). -It has a relatively small scope with all platform versions weighing in under 10MB, and that's without enabling [UPX compression](https://upx.github.io/)! +Il a une taille relativement petite avec toutes les versions de la plate-forme pesant en moins de 10 Mo, et c'est sans activer la [compression UPX](https://upx.github.io/)! -In contrast, the author's previous attempts with Electron quickly bloated to several hundred megabytes. +En revanche, les précédentes tentatives de l'auteur avec Electron ont rapidement gonflé à plusieurs centaines de mégaoctets. diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/current/community/showcase/optimus.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/current/community/showcase/optimus.mdx index 4f87479d6..41744234d 100644 --- a/website/i18n/fr/docusaurus-plugin-content-docs/current/community/showcase/optimus.mdx +++ b/website/i18n/fr/docusaurus-plugin-content-docs/current/community/showcase/optimus.mdx @@ -7,4 +7,4 @@

``` -[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) est une application d'optimisation d'image de bureau. Il supporte la conversion et la compression entre les formats d’images WebP, JPEG et PNG. diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/current/community/showcase/portfall.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/current/community/showcase/portfall.mdx index 03e740f4c..acdc682be 100644 --- a/website/i18n/fr/docusaurus-plugin-content-docs/current/community/showcase/portfall.mdx +++ b/website/i18n/fr/docusaurus-plugin-content-docs/current/community/showcase/portfall.mdx @@ -7,4 +7,4 @@

``` -[Portfall](https://github.com/rekon-oss/portfall) - A desktop k8s port-forwarding portal for easy access to all your cluster UIs +[Portfall](https://github.com/rekon-oss/portfall) - Un portail de redirection de port k8 pour un accès facile à toutes les interfaces de votre instance diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/current/community/showcase/restic-browser.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/current/community/showcase/restic-browser.mdx index 3646384ec..b65971668 100644 --- a/website/i18n/fr/docusaurus-plugin-content-docs/current/community/showcase/restic-browser.mdx +++ b/website/i18n/fr/docusaurus-plugin-content-docs/current/community/showcase/restic-browser.mdx @@ -9,4 +9,4 @@

``` -[Restic-Browser](https://github.com/emuell/restic-browser) - A simple, cross-platform [restic](https://github.com/restic/restic) backup GUI for browsing and restoring restic repositories. +[Restic-Browser](https://github.com/emuell/restic-browser) - Une interface de sauvegarde simple et multiplateforme [restic](https://github.com/restic/restic) pour la navigation et la restauration de dépôts restic. diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/current/community/showcase/riftshare.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/current/community/showcase/riftshare.mdx index 9928b4785..8425fca87 100644 --- a/website/i18n/fr/docusaurus-plugin-content-docs/current/community/showcase/riftshare.mdx +++ b/website/i18n/fr/docusaurus-plugin-content-docs/current/community/showcase/riftshare.mdx @@ -7,15 +7,15 @@

``` -Easy, Secure, and Free file sharing for everyone. Learn more at [Riftshare.app](https://riftshare.app) +Partage de fichiers facile, sécurisé et gratuit pour tout le monde. Apprenez-en plus sur [Riftshare.app](https://riftshare.app) ## Features -- Easy secure file sharing between computers both in the local network and through the internet -- Supports sending files or directories securely through the [magic wormhole protocol](https://magic-wormhole.readthedocs.io/en/latest/) -- Compatible with all other apps using magic wormhole (magic-wormhole or wormhole-william CLI, wormhole-gui, etc.) -- Automatic zipping of multiple selected files to send at once -- Full animations, progress bar, and cancellation support for sending and receiving -- Native OS File Selection -- Open files in one click once received -- Auto Update - don't worry about having the latest release! +- Partage facile et sécurisé de fichiers entre ordinateurs à la fois sur le réseau local et via Internet +- Supporte l'envoi de fichiers ou de répertoires de manière sécurisée par le protocole [magic wormhole](https://magic-wormhole.readthedocs.io/en/latest/) +- Compatible avec toutes les autres applications utilisant magic wormhole (magic-wormhole or wormhole-william CLI, wormhole-gui, etc.) +- Compression automatique de plusieurs fichiers sélectionnés à envoyer en même temps +- Animations complètes, barre de progression et support d'annulation pour l'envoi et la réception +- Sélection de fichier natif au système d'exploitation +- Ouvrir les fichiers en un seul clic une fois reçus +- Mise à jour automatique - ne vous inquiétez pas d'avoir la dernière version! diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/current/community/showcase/scriptbar.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/current/community/showcase/scriptbar.mdx index 2ccb2acb4..e57180a7b 100644 --- a/website/i18n/fr/docusaurus-plugin-content-docs/current/community/showcase/scriptbar.mdx +++ b/website/i18n/fr/docusaurus-plugin-content-docs/current/community/showcase/scriptbar.mdx @@ -7,4 +7,4 @@

``` -[ScriptBar](https://GitHub.com/raguay/ScriptBarApp) is a program to show the output of the embedded [Node-Red](https://nodered.org) server in the [EmailIt](https://GitHub.com/raguay/EmailIt) application. It also displays the output of scripts on your system. ScriptBar doesn't put them in the menubar, but has them all in a convient window for easy viewing. You can have multiple tabs to have many different things show. You can also keep the links to your most visited web sites. +[Barre de scripts](https://GitHub.com/raguay/ScriptBarApp) est un programme pour afficher la sortie du serveur [Node-Red](https://nodered.org) intégré dans l'application [EmailIt](https://GitHub.com/raguay/EmailIt). Il affiche également la sortie des scripts sur votre système. ScriptBar ne les met pas dans la barre de menus, mais les a tous dans une fenêtre convenable pour une visualisation facile. Vous pouvez avoir plusieurs onglets pour voir plusieurs choses différentes. Vous pouvez également conserver les liens vers vos sites Web les plus visités. diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/current/community/showcase/surge.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/current/community/showcase/surge.mdx index c3b3fb4c0..b59174843 100644 --- a/website/i18n/fr/docusaurus-plugin-content-docs/current/community/showcase/surge.mdx +++ b/website/i18n/fr/docusaurus-plugin-content-docs/current/community/showcase/surge.mdx @@ -7,4 +7,4 @@

``` -[Surge](https://getsurge.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](https://getsurge.io/) est une application de partage de fichiers p2p conçue pour utiliser les technologies blockchain afin d'activer les transferts de fichiers 100 % anonymes. Surge est chiffré de bout en bout, décentralisé et open source. diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/current/community/showcase/wally.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/current/community/showcase/wally.mdx index 7408aa585..ba2a7fccc 100644 --- a/website/i18n/fr/docusaurus-plugin-content-docs/current/community/showcase/wally.mdx +++ b/website/i18n/fr/docusaurus-plugin-content-docs/current/community/showcase/wally.mdx @@ -7,4 +7,4 @@

``` -[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. +[Wally](https://ergodox-ez.com/pages/wally) est le flasheur officiel du firmware pour les claviers [Ergodox](https://ergodox-ez.com/). C'est un excellent exemple de ce que vous pouvez réaliser avec Wails : la capacité de combiner la puissance de Go et les riches outils graphiques du monde du développement web. diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/current/community/showcase/wombat.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/current/community/showcase/wombat.mdx index f100c55e2..c431f6919 100644 --- a/website/i18n/fr/docusaurus-plugin-content-docs/current/community/showcase/wombat.mdx +++ b/website/i18n/fr/docusaurus-plugin-content-docs/current/community/showcase/wombat.mdx @@ -7,4 +7,4 @@

``` -[Wombat](https://github.com/rogchap/wombat) is a cross platform gRPC client. +[Wombat](https://github.com/rogchap/wombat) est un client gRPC multi-plateforme. diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/current/community/showcase/ytd.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/current/community/showcase/ytd.mdx index 5db428f72..4f5bd993c 100644 --- a/website/i18n/fr/docusaurus-plugin-content-docs/current/community/showcase/ytd.mdx +++ b/website/i18n/fr/docusaurus-plugin-content-docs/current/community/showcase/ytd.mdx @@ -7,4 +7,4 @@

``` -[Ytd](https://github.com/marcio199226/ytd/tree/v2-wails) is an app for downloading tracks from youtube, creating offline playlists and share them with your friends, your friends will be able to playback your playlists or download them for offline listening, has an built-in player. +[Ytd](https://github.com/marcio199226/ytd/tree/v2-wails) est une application pour télécharger des pistes depuis youtube, créer des listes de lecture hors ligne et les partager avec vos amis, vos amis seront en mesure de lire vos playlists ou de les télécharger pour l'écoute hors ligne, a un lecteur intégré. diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/current/community/templates.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/current/community/templates.mdx index 7f27ab70c..5dca9fc06 100644 --- a/website/i18n/fr/docusaurus-plugin-content-docs/current/community/templates.mdx +++ b/website/i18n/fr/docusaurus-plugin-content-docs/current/community/templates.mdx @@ -2,55 +2,55 @@ sidebar_position: 1 --- -# Templates +# Modèles -This page serves as a list for community supported templates. Please submit a PR (click `Edit this page` at the bottom) to include your templates. To build your own template, please see the [Templates](../guides/templates.mdx) guide. +Cette page sert de liste pour les modèles supportés par la communauté. Veuillez soumettre une PR (cliquez sur `Modifier cette page` en bas) pour inclure vos modèles. Pour construire votre propre modèle, veuillez consulter le guide [Modèles](../guides/templates.mdx). -To use these templates, run `wails init -n "Your Project Name" -t [the link below[@version]]` +Pour utiliser ces modèles, exécutez `wails init -n "Votre nom de projet" -t [le lien ci-dessous[@version]]` -If there is no version suffix, the main branch code template is used by default. If there is a version suffix, the code template corresponding to the tag of this version is used. +S'il n'y a pas de suffixe de version, la branche principale du modèle de code sera alors utilisé par défaut. S'il y a un suffixe de version, le modèle de code correspondant au tag de cette version sera utilisé. -Example: `wails init -n "Your Project Name" -t https://github.com/misitebao/wails-template-vue` +Exemple : `wails init -n "Votre nom de projet" -t https://github.com/misitebao/wails-template-vue` :::warning Attention -**The Wails project does not maintain, is not responsible nor liable for 3rd party templates!** +**Le projet Wails n'entretient pas, et n'est pas responsable des modèles de tierces parties!** -If you are unsure about a template, inspect `package.json` and `wails.json` for what scripts are run and what packages are installed. +Si vous n'êtes pas sûr d'un modèle, inspectez `package.json` et `wails.json` pour savoir quels scripts sont exécutés et quels paquets sont installés. ::: ## Vue -- [wails-template-vue](https://github.com/misitebao/wails-template-vue) - Wails template based on Vue ecology (Integrated TypeScript, Dark theme, Internationalization, Single page routing, TailwindCSS) -- [wails-vite-vue-ts](https://github.com/codydbentley/wails-vite-vue-ts) - Vue 3 TypeScript with Vite (and instructions to add features) -- [wails-vite-vue-the-works](https://github.com/codydbentley/wails-vite-vue-the-works) - Vue 3 TypeScript with Vite, Vuex, Vue Router, Sass, and ESLint + Prettier -- [wails-template-quasar-js](https://github.com/sgosiaco/wails-template-quasar-js) - A template using JavaScript + Quasar V2 (Vue 3, Vite, Sass, Pinia, ESLint, Prettier) -- [wails-template-quasar-ts](https://github.com/sgosiaco/wails-template-quasar-ts) - A template using TypeScript + Quasar V2 (Vue 3, Vite, Sass, Pinia, ESLint, Prettier, Composition API with <script setup>) +- [wails-template-vue](https://github.com/misitebao/wails-template-vue) - Modèle de Wails basé sur Vue (TypeScript intégré, thème sombre, internationalisation, routage de page unique, TailwindCSS) +- [wails-vite-vue-ts](https://github.com/codydbentley/wails-vite-vue-ts) - Vue 3 TypeScript avec Vite (et instructions pour ajouter des fonctionnalités) +- [wails-vite-vue-the-works](https://github.com/codydbentley/wails-vite-vue-the-works) - Vue 3 TypeScript avec Vite, Vuex, Vue Router, Sass, et ESLint + Prettier +- [wails-template-quasar-js](https://github.com/sgosiaco/wails-template-quasar-js) - Un modèle utilisant JavaScript + Quasar V2 (Vue 3, Vite, Sass, Pinia, ESLint, Prettier) +- [wails-template-quasar-ts](https://github.com/sgosiaco/wails-template-quasar-ts) - Un modèle utilisant TypeScript + Quasar V2 (Vue 3, Vite, Sass, Pinia, ESLint, Prettier, Composition API avec <script setup>) ## Angular -- [wails-angular-template](https://github.com/TAINCER/wails-angular-template) - Angular with TypeScript, Sass, Hot-Reload, Code-Splitting and i18n +- [wails-angular-template](https://github.com/TAINCER/wails-angular-template) - Angular avec TypeScript, Sass, rechargement à chaud, découpage dynamique de code et i18n ## React -- [wails-react-template](https://github.com/AlienRecall/wails-react-template) - A template using reactjs -- [wails-react-template](https://github.com/flin7/wails-react-template) - A minimal template for React that supports live development -- [wails-template-nextjs](https://github.com/LGiki/wails-template-nextjs) - A template using Next.js and TypeScript -- [wails-vite-react-ts-tailwind-template](https://github.com/hotafrika/wails-vite-react-ts-tailwind-template) - A template for React + TypeScript + Vite + TailwindCSS +- [wails-react-template](https://github.com/AlienRecall/wails-react-template) - Un modèle utilisant reactjs +- [wails-react-template](https://github.com/flin7/wails-react-template) - Un modèle minimal pour React qui supporte le développement en direct +- [wails-template-nextjs](https://github.com/LGiki/wails-template-nextjs) - Un modèle utilisant Next.js et TypeScript +- [wails-vite-react-ts-tailwind-template](https://github.com/hotafrika/wails-vite-react-ts-tailwind-template) - Un modèle pour React + TypeScript + Vite + TailwindCSS ## Svelte -- [wails-svelte-template](https://github.com/raitonoberu/wails-svelte-template) - A template using Svelte -- [wails-vite-svelte-template](https://github.com/BillBuilt/wails-vite-svelte-template) - A template using Svelte and Vite -- [wails-vite-svelte-tailwind-template](https://github.com/BillBuilt/wails-vite-svelte-tailwind-template) - A template using Svelte and Vite with TailwindCSS v3 -- [wails-sveltekit-template](https://github.com/h8gi/wails-sveltekit-template) - A template using SvelteKit +- [wails-svelte-template](https://github.com/raitonoberu/wails-svelte-template) - Un modèle utilisant Svelte +- [wails-vite-svelte-template](https://github.com/BillBuilt/wails-vite-svelte-template) - Un modèle utilisant Svelte et Vite +- [wails-vite-svelte-tailwind-template](https://github.com/BillBuilt/wails-vite-svelte-tailwind-template) - Un modèle utilisant Svelte et Vite avec TailwindCSS v3 +- [wails-sveltekit-template](https://github.com/h8gi/wails-sveltekit-template) - Un modèle utilisant SvelteKit ## Elm -- [wails-elm-template](https://github.com/benjamin-thomas/wails-elm-template) - Develop your GUI app with functional programming and a **snappy** hot-reload setup :tada: :rocket: -- [wails-template-elm-tailwind](https://github.com/rnice01/wails-template-elm-tailwind) - Combine the powers :muscle: of Elm + Tailwind CSS + Wails! Hot reloading supported. +- [wails-elm-template](https://github.com/benjamin-thomas/wails-elm-template) - Développez votre application GUI avec de la programmation fonctionnelle et une configuration de développement en direct :tada: :rocket: +- [wails-template-elm-tailwind](https://github.com/rnice01/wails-template-elm-tailwind) - Combine les puissances :muscle: d'Elm + Tailwind CSS + Wails ! Rechargement automatique pris en charge. ## Pure JavaScript (Vanilla) -- [wails-pure-js-template](https://github.com/KiddoV/wails-pure-js-template) - A template with nothing but just basic JavaScript, HTML, and CSS +- [wails-pure-js-template](https://github.com/KiddoV/wails-pure-js-template) - Un modèle avec rien que du JavaScript, du HTML et du CSS de base diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/current/gettingstarted/development.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/current/gettingstarted/development.mdx index a0075ef69..034be31d6 100644 --- a/website/i18n/fr/docusaurus-plugin-content-docs/current/gettingstarted/development.mdx +++ b/website/i18n/fr/docusaurus-plugin-content-docs/current/gettingstarted/development.mdx @@ -7,7 +7,7 @@ sidebar_position: 5 You can run your application in development mode by running `wails dev` from your project directory. This will do the following things: - Build your application and run it -- Bind your Go code to the frontend so it can be called from Javascript +- Bind your Go code to the frontend so it can be called from JavaScript - Using the power of [Vite](https://vitejs.dev/), will watch for modifications in your Go files and rebuild/re-run on change - Sets up a [webserver](http://localhost:34115) that will serve your application over a browser. This allows you to use your favourite browser extensions. You can even call your Go code from the console diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/current/gettingstarted/firstproject.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/current/gettingstarted/firstproject.mdx index 3428906ef..62ee97c84 100644 --- a/website/i18n/fr/docusaurus-plugin-content-docs/current/gettingstarted/firstproject.mdx +++ b/website/i18n/fr/docusaurus-plugin-content-docs/current/gettingstarted/firstproject.mdx @@ -26,61 +26,61 @@ import TabItem from "@theme/TabItem"; ]} > - Generate a Svelte project using Javascript with:

+ Generate a Svelte project using JavaScript with:

wails init -n myproject -t svelte -If you would rather use Typescript:
+If you would rather use TypeScript:
wails init -n myproject -t svelte-ts
- Generate a React project using Javascript with:

+ Generate a React project using JavaScript with:

wails init -n myproject -t react -If you would rather use Typescript:
+If you would rather use TypeScript:
wails init -n myproject -t react-ts
- Generate a Vue project using Javascript with:

+ Generate a Vue project using JavaScript with:

wails init -n myproject -t vue -If you would rather use Typescript:
+If you would rather use TypeScript:
wails init -n myproject -t vue-ts
- Generate a Preact project using Javascript with:

+ Generate a Preact project using JavaScript with:

wails init -n myproject -t preact -If you would rather use Typescript:
+If you would rather use TypeScript:
wails init -n myproject -t preact-ts
- Generate a Lit project using Javascript with:

+ Generate a Lit project using JavaScript with:

wails init -n myproject -t lit -If you would rather use Typescript:
+If you would rather use TypeScript:
wails init -n myproject -t lit-ts
- Generate a Vanilla project using Javascript with:

+ Generate a Vanilla project using JavaScript with:

wails init -n myproject -t vanilla -If you would rather use Typescript:
+If you would rather use TypeScript:
wails init -n myproject -t vanilla-ts diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/current/guides/migrating.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/current/guides/migrating.mdx index 9915e2305..7123cbe6b 100644 --- a/website/i18n/fr/docusaurus-plugin-content-docs/current/guides/migrating.mdx +++ b/website/i18n/fr/docusaurus-plugin-content-docs/current/guides/migrating.mdx @@ -118,7 +118,7 @@ The _biggest_ change in v2 is how assets are handled. In v1, assets were passed via 2 application options: -- `JS` - The application's Javascript +- `JS` - The application's JavaScript - `CSS` - The application's CSS This meant that the responsibility of generating a single JS and CSS file was on the developer. This essentially required the use of complicated packers such as webpack. diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/current/guides/troubleshooting.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/current/guides/troubleshooting.mdx index 7e7081faf..2accc4e5f 100644 --- a/website/i18n/fr/docusaurus-plugin-content-docs/current/guides/troubleshooting.mdx +++ b/website/i18n/fr/docusaurus-plugin-content-docs/current/guides/troubleshooting.mdx @@ -105,9 +105,9 @@ go env -w GOPROXY=https://goproxy.cn,direct Source: https://github.com/wailsapp/wails/issues/1233 -## The generated Typescript doesn't have the correct types +## 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. 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). ## When I navigate away from `index.html`, I am unable to call methods on the frontend diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/current/guides/windows.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/current/guides/windows.mdx index 821808c0b..6b24979d7 100644 --- a/website/i18n/fr/docusaurus-plugin-content-docs/current/guides/windows.mdx +++ b/website/i18n/fr/docusaurus-plugin-content-docs/current/guides/windows.mdx @@ -10,7 +10,7 @@ By using the `-webview2` flag when building, you can decide what your applicatio 1. Download 2. Embed -3. Browser +3. Navigateur 4. Error ### Download @@ -21,7 +21,7 @@ This option will prompt the user that no suitable runtime has been found and the This option embeds the official bootstrapper within the application. If no suitable runtime has been found, the application will offer to run the bootstrapper. This adds ~150k to the binary size. -### Browser +### Navigateur This option will prompt the user that no suitable runtime has been found and then offer to open a browser to the official WebView2 page where the bootstrapper can be downloaded and installed. The application will then exit, leaving the installation up to the user. diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/current/howdoesitwork.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/current/howdoesitwork.mdx index e186de894..8759da56e 100644 --- a/website/i18n/fr/docusaurus-plugin-content-docs/current/howdoesitwork.mdx +++ b/website/i18n/fr/docusaurus-plugin-content-docs/current/howdoesitwork.mdx @@ -2,9 +2,9 @@ sidebar_position: 20 --- -# How does it work? +# Comment ça marche ? -A Wails application is a standard Go application, with a webkit frontend. The Go part of the application consists of the application code and a runtime library that provides a number of useful operations, like controlling the application window. The frontend is a webkit window that will display the frontend assets. Also available to the frontend is a Javascript version of the runtime library. Finally, it is possible to bind Go methods to the frontend, and these will appear as Javascript methods that can be called, just as if they were local Javascript methods. +Une application Wails est une application Go standard, avec une interface graphique webkit. La partie Go de l'application se compose du code de l'application et d'une bibliothèque d'exécution qui fournit un certain nombre d'opérations utiles, comme le contrôle de la fenêtre de l'application. Le frontend est une fenêtre webkit qui affichera les ressources graphiques. Also available to the frontend is a JavaScript version of the runtime library. Finally, it is possible to bind Go methods to the frontend, and these will appear as JavaScript methods that can be called, just as if they were local JavaScript methods. ```mdx-code-block
@@ -12,11 +12,11 @@ A Wails application is a standard Go application, with a webkit frontend. The Go
``` -## The Main Application +## L'Application Principale -### Overview +### Vue d’ensemble -The main application consists of a single call to `wails.Run()`. It accepts the application configuration which describes the size of the application window, the window title, what assets to use, etc. A basic application might look like this: +L'application principale consiste en un seul appel à `wails.Run()`. Il accepte la configuration de l'application qui décrit la taille de la fenêtre d'application, le titre de la fenêtre, qu'elles sont les ressources à utiliser, etc. Une application de base pourrait ressembler à ceci : ```go title="main.go" package main @@ -71,20 +71,20 @@ func (b *App) Greet(name string) string { } ``` -### Options rundown +### Description des options -This example has the following options set: +Cet exemple a les options suivantes : -- `Title` - The text that should appear in the window's title bar -- `Width` & `Height` - The dimensions of the window -- `Assets` - The application's frontend assets -- `OnStartup` - A callback for when the window is created and is about to start loading the frontend assets -- `OnShutdown` - A callback for when the application is about to quit -- `Bind` - A slice of struct instances that we wish to expose to the frontend +- `Title` - Le texte qui devrait apparaître dans la barre de titre de la fenêtre +- `Width` & `Height` - Les dimensions de la fenêtre +- `Assets` - Les ressources du frontend de l'application +- `OnStartup` - Nom de la fonction à appeler quand la fenêtre est créée et est sur le point de commencer à charger les ressources du frontend +- `OnShutdown` - Nom de la fonction à appeler quand la fenêtre est sur le point d'être fermée +- `Bind` - La liste des structures Go à exposer au frontend -A full list of application options can be found in the [Options Reference](reference/options). +Une liste complète des options d'application peut être trouvée dans la [Référence d'options](reference/options). -#### Assets +#### Ressources The `Assets` option is mandatory as you can't have a Wails application without frontend assets. Those assets can be any files you would expect to find in a web application - html, js, css, svg, png, etc. **There is no requirement to generate asset bundles** - plain files will do. When the application starts, it will attempt to load `index.html` from your assets and the frontend will essentially work as a browser from that point on. It is worth noting that there is no requirement on where in the `embed.FS` the files live. It is likely that the embed path uses a nested directory relative to your main application code, such as `frontend/dist`: @@ -103,11 +103,11 @@ More details can be found in the [Application Development Guide](guides/applicat #### Application Lifecycle Callbacks -Just before the frontend is about to load `index.html`, a callback is made to the function provided in [OnStartup](reference/options.mdx#onstartup). A standard Go context is passed to this method. This context is required when calling the runtime so a standard pattern is to save a reference to in this method. Just before the application shuts down, the [OnShutdown](reference/options.mdx#onshutdown) callback is called in the same way, again with the context. There is also an [OnDomReady](reference/options.mdx#ondomready) callback for when the frontend has completed loading all assets in `index.html` and is equivalent of the [`body onload`](https://www.w3schools.com/jsref/event_onload.asp) event in Javascript. It is also possible to hook into the window close (or application quit) event by setting the option [OnBeforeClose](reference/options.mdx#onbeforeclose). +Just before the frontend is about to load `index.html`, a callback is made to the function provided in [OnStartup](reference/options.mdx#onstartup). A standard Go context is passed to this method. This context is required when calling the runtime so a standard pattern is to save a reference to in this method. Just before the application shuts down, the [OnShutdown](reference/options.mdx#onshutdown) callback is called in the same way, again with the context. There is also an [OnDomReady](reference/options.mdx#ondomready) callback for when the frontend has completed loading all assets in `index.html` and is equivalent of the [`body onload`](https://www.w3schools.com/jsref/event_onload.asp) event in JavaScript. It is also possible to hook into the window close (or application quit) event by setting the option [OnBeforeClose](reference/options.mdx#onbeforeclose). #### Method Binding -The `Bind` option is one of the most important options in a Wails application. It specifies which struct methods to expose to the frontend. Think of structs like "controllers" in a traditional web application. When the application starts, it examines the struct instances listed in the `Bind` field in the options, determines which methods are public (starts with an uppercase letter) and will generate Javascript versions of those methods that can be called by the frontend code. +The `Bind` option is one of the most important options in a Wails application. It specifies which struct methods to expose to the frontend. Think of structs like "controllers" in a traditional web application. When the application starts, it examines the struct instances listed in the `Bind` field in the options, determines which methods are public (starts with an uppercase letter) and will generate JavaScript versions of those methods that can be called by the frontend code. :::info Note @@ -184,15 +184,15 @@ You may bind as many structs as you like. Just make sure you create an instance When you run `wails dev` (or `wails generate module`), a frontend module will be generated containing the following: -- Javascript bindings for all bound methods -- Typescript declarations for all bound methods -- Typescript definitions for all Go structs used as inputs or outputs by the bound methods +- JavaScript bindings for all bound methods +- TypeScript declarations for all bound methods +- TypeScript definitions for all Go structs used as inputs or outputs by the bound methods This makes it incredibly simple to call Go code from the frontend, using the same strongly typed datastructures. -## The Frontend +## Le frontend -### Overview +### Vue d’ensemble The frontend is a collection of files rendered by webkit. It's like a browser and webserver in one. There is virtually[^1] no limit to which frameworks or libraries you can use. The main points of interaction between the frontend and your Go code are: @@ -201,7 +201,7 @@ The frontend is a collection of files rendered by webkit. It's like a browser an ### Calling bound Go methods -When you run your application with `wails dev`, it will automatically generate Javascript bindings for your structs in a directory called `wailsjs/go` (You can also do this by running `wails generate module`). The generated files mirror the package names in your application. In the example above, we bind `app`, which has one public method `Greet`. This will lead to the generation of the following files: +When you run your application with `wails dev`, it will automatically generate JavaScript bindings for your structs in a directory called `wailsjs/go` (You can also do this by running `wails generate module`). The generated files mirror the package names in your application. In the example above, we bind `app`, which has one public method `Greet`. This will lead to the generation of the following files: ```bash wailsjs @@ -211,7 +211,7 @@ wailsjs └─App.js ``` -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: ```javascript // ... @@ -224,27 +224,27 @@ function doGreeting(name) { } ``` -The Typescript declaration file gives you the correct types for the bound methods: +The TypeScript declaration file gives you the correct types for the bound methods: ```ts export function Greet(arg1: string): Promise; ``` -The generated methods return a Promise. A successful call will result in the first return value from the Go call to be passed to the `resolve` handler. An unsuccessful call is when a Go method that has an error type as it's second return value, passes an error instance back to the caller. This is passed back via the `reject` handler. In the example above, `Greet` only returns a `string` so the Javascript call will never reject - unless invalid data is passed to it. +The generated methods return a Promise. A successful call will result in the first return value from the Go call to be passed to the `resolve` handler. An unsuccessful call is when a Go method that has an error type as it's second return value, passes an error instance back to the caller. This is passed back via the `reject` handler. In the example above, `Greet` only returns a `string` so the JavaScript call will never reject - unless invalid data is passed to it. -All data types are correctly translated between Go and Javascript. Even structs. If you return a struct from a Go call, it will be returned to your frontend as a Javascript class. +All data types are correctly translated between Go and JavaScript. Even structs. If you return a struct from a Go call, it will be returned to your frontend as a JavaScript class. :::info Note -Struct fields *must* have a valid `json` tag to be included in the generated Typescript. +Struct fields *must* have a valid `json` tag to be included in the generated TypeScript. Anonymous nested structs are not supported at this time. ::: -It is possible to send structs back to Go. Any Javascript map/class passed as an argument that is expecting a struct, will be converted to that struct type. To make this process a lot easier, in `dev` mode, a TypeScript module is generated, defining all the struct types used in bound methods. Using this module, it's possible to construct and send native Javascript objects to the Go code. +It is possible to send structs back to Go. Any JavaScript map/class passed as an argument that is expecting a struct, will be converted to that struct type. To make this process a lot easier, in `dev` mode, a TypeScript module is generated, defining all the struct types used in bound methods. Using this module, it's possible to construct and send native JavaScript objects to the Go code. -There is also support for Go methods that use structs in their signature. All Go structs specified by a bound method (either as parameters or return types) will have Typescript versions auto generated as part of the Go code wrapper module. Using these, it's possible to share the same data model between Go and Javascript. +There is also support for Go methods that use structs in their signature. All Go structs specified by a bound method (either as parameters or return types) will have TypeScript versions auto generated as part of the Go code wrapper module. Using these, it's possible to share the same data model between Go and JavaScript. Example: We update our `Greet` method to accept a `Person` instead of a string: @@ -356,9 +356,9 @@ The combination of generated bindings and TypeScript models makes for a powerful More information on Binding can be found in the [Binding Methods](guides/application-development.mdx#binding-methods) section of the [Application Development Guide](guides/application-development.mdx). -### Calling runtime methods +### Appeler les méthodes runtime -The Javascript runtime is located at `window.runtime` and contains many methods to do various tasks such as emit an event or perform logging operations: +The JavaScript runtime is located at `window.runtime` and contains many methods to do various tasks such as emit an event or perform logging operations: ```js title="mycode.js" window.runtime.EventsEmit("my-event", 1); diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/current/introduction.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/current/introduction.mdx index 265f035b3..637993e2b 100644 --- a/website/i18n/fr/docusaurus-plugin-content-docs/current/introduction.mdx +++ b/website/i18n/fr/docusaurus-plugin-content-docs/current/introduction.mdx @@ -6,22 +6,22 @@ sidebar_position: 1 Wails est un projet qui vous permet d'écrire des applications de bureau en utilisant les technologies Go et web. -Consider it a lightweight and fast Electron alternative for Go. You can easily build applications with the flexibility and power of Go, combined with a rich, modern frontend. +Considérez cela comme une alternative légère et rapide d'Electron pour Go. Vous pouvez facilement construire des applications avec la flexibilité et la puissance de Go, combinée à un frontend riche et moderne. -### Features +### Fonctionnalités -- Native Menus, Dialogs, Theming and Translucency -- Windows, macOS and linux support -- Built in templates for Svelte, React, Preact, Vue, Lit and Vanilla JS -- Easily call Go methods from Javascript -- Automatic Go struct to Typescript model generation -- No CGO or external DLLs required on Windows -- Live development mode using the power of [Vite](https://vitejs.dev/) -- Powerful CLI to easily Create, Build and Package applications -- A rich [runtime library](/docs/reference/runtime/intro) -- Applications built with Wails are Apple & Microsoft Store compliant +- Menus natifs, Boîtes de dialogues, Thèmes et Translucidité +- Prise en charge de Windows, macOS et Linux +- Modèles intégrés pour Svelte, React, Preact, Vue, Lit et Vanilla JS +- Easily call Go methods from JavaScript +- Génération automatique du modèle TypeScript à partir de struct Go +- Aucun CGO ou DLL externe requis sous Windows +- Mode développement en direct en utilisant la puissance de [Vite](https://vitejs.dev/) +- CLI puissant pour créer, construire et empaqueter facilement des applications +- Une riche bibliothèque [runtime](/docs/reference/runtime/intro) +- Les applications construites avec Wails sont conformes aux Stores Apple & Microsoft -This is [varly](https://varly.app) - a desktop application for MacOS & Windows written using Wails. Not only does it look great, it uses native menus and translucency - everything you'd expect from a modern native app. +Ceci est [varly](https://varly.app) - une application de bureau pour MacOS & Windows écrite à l'aide de Wails. Non seulement elle est belle, elle utilise les menus natifs et la translucidité - tout ce que vous pouvez attendre d'une application native moderne. ```mdx-code-block

@@ -34,42 +34,42 @@ This is [varly](https://varly.app) - a desktop application for MacOS & Windows w

``` -### Quick Start Templates +### Modèles de créations rapides -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 est livré avec un certain nombre de modèles préconfigurés qui vous permettent de faire fonctionner votre application rapidement. Il y a des modèles pour les frameworks suivants : Svelte, React, Vue, Preact, Lit et Vanilla. Il existe à la fois des versions JavaScript et TypeScript pour chaque modèle. -### Native Elements +### Éléments natifs -Wails uses a purpose built library for handling native elements such as Window, Menus, Dialogs, etc, so you can build good-looking, feature rich desktop applications. +Wails utilise une bibliothèque conçue pour gérer les éléments natifs tels que les fenêtres, menus, boîtes de dialogues, etc, pour que vous puissiez construire des applications de bureau riches en fonctionnalités. -**It does not embed a browser**, so it is resource efficient. Instead, it uses the native rendering engine for the platform. On Windows, this is the new Microsoft Webview2 library, built on Chromium. +**Il n'embarque pas de navigateur**, il est donc efficace sur les ressources. Au lieu de cela, il utilise le moteur de rendu natif de la plate-forme. Sous Windows, c'est la nouvelle bibliothèque Microsoft Webview2, construite sur Chromium. -### Go & Javascript Interoperability +### Go & JavaScript Interoperability -Wails automatically makes your Go methods available to Javascript, so you can call them by name from your frontend! It even generates Typescript models for the structs used by your Go methods, so you can pass the same data structures between Go and Javascript. +Wails automatically makes your Go methods available to JavaScript, so you can call them by name from your frontend! It even generates TypeScript models for the structs used by your Go methods, so you can pass the same data structures between Go and JavaScript. -### Runtime Library +### Librairie d'exécution -Wails provides a runtime library, for both Go and Javascript, that handles a lot of the things modern applications need, like Eventing, Logging, Dialogs, etc. +Wails provides a runtime library, for both Go and JavaScript, that handles a lot of the things modern applications need, like Eventing, Logging, Dialogs, etc. -### Live Development Experience +### Expérience de développement en direct -#### Automatic Rebuilds +#### Reconstructions automatiques -When you run your application in "dev" mode, Wails will build your application as a native desktop application, but will read your assets from disk. It will detect any changes to your Go code and automatically rebuild and relaunch your application. +Lorsque vous exécutez votre application en mode "dev", Wails construira votre application en tant qu'application de bureau native, mais lira vos ressources depuis le disque. Il détectera toutes les modifications apportées à votre code Go, puis reconstruira et relancera automatiquement votre application . -#### Automatic Reloads +#### Rechargement automatique -When changes to your application assets are detected, your running application will "reload", reflecting your changes almost immediately. +Lorsque des changements sont détectés dans les ressources de votre application, votre application en cours d'exécution sera "rechargée", reflétant presque immédiatement vos modifications . -#### Develop your application in a Browser +#### Développez votre application dans un navigateur -If you prefer to debug and develop in a browser then Wails has you covered. The running application also has a webserver that will run your application in any browser that connects to it. It will even refresh when your assets change on disk. +Si vous préférez déboguer et vous développer dans un navigateur, Wails vous couvre. L'application en cours d'exécution a également un serveur web qui exécutera votre application depuis n'importe quel navigateur qui s'y connecte. Il sera aussi actualisé lorsque vos fichiers seront modifiés. -### Production-ready Native Binaries +### Binaires natifs prêts à la production -When you're ready to do the final build of your application, the CLI will compile it down to a single executable, with all the assets bundled into it. On Windows and MacOS, it is possible to create a native package for distribution. The assets used in packaging (icon, info.plist, manifest file, etc) are part of your project and may be customised, giving you total control over how your applications are built. +Lorsque vous êtes prêt à faire une version finale de votre application, le CLI le compilera en un seul exécutable, avec tous les actifs qui y sont intégrés. Sous Windows et MacOS, il est possible de créer un paquet natif pour la distribution. Les ressources utilisées dans la compilation de l'application (icône, info. list, fichier manifest, etc) font partie de votre projet et peuvent être personnalisés, ce qui vous donne le contrôle total sur la façon dont vos applications sont construites. -### Tooling +### Outils -The Wails CLI provides a hassle-free way to generate, build and bundle your applications. It will do the heavy lifting of creating icons, compiling your application with optimal settings and delivering a distributable, production ready binary. Choose from a number of starter templates to get up and running quickly! +Le CLI Wails fournit un moyen sans tracas de générer, de construire et de regrouper vos applications. Il s'occupera de la lourde tâche de créer des icônes, de compiler votre application avec des paramètres optimaux et de fournir un binaire distribuable et prêt à la production. Choisissez parmi un certain nombre de modèles de démarrage pour démarrer rapidement ! diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/current/reference/cli.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/current/reference/cli.mdx index 36f6c9717..92888242f 100644 --- a/website/i18n/fr/docusaurus-plugin-content-docs/current/reference/cli.mdx +++ b/website/i18n/fr/docusaurus-plugin-content-docs/current/reference/cli.mdx @@ -157,7 +157,7 @@ Your system is ready for Wails development! - A webserver is started on `http://localhost:34115` which serves your application (not just frontend) over http. This allows you to use your favourite browser development extensions - All application assets are loaded from disk. If they are changed, the application will automatically reload (not rebuild). All connected browsers will also reload - A JS module is generated that provides the following: - - Javascript wrappers of your Go methods with autogenerated JSDoc, providing code hinting + - JavaScript wrappers of your Go methods with autogenerated JSDoc, providing code hinting - TypeScript versions of your Go structs, that can be constructed and passed to your go methods - A second JS module is generated that provides a wrapper + TS declaration for the runtime - On macOS, it will bundle the application into a `.app` file and run it. It will use a `build/darwin/Info.dev.plist` for development. diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/current/reference/project-config.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/current/reference/project-config.mdx index f573a4ad4..83029de5b 100644 --- a/website/i18n/fr/docusaurus-plugin-content-docs/current/reference/project-config.mdx +++ b/website/i18n/fr/docusaurus-plugin-content-docs/current/reference/project-config.mdx @@ -2,33 +2,33 @@ sidebar_position: 5 --- -# Project Config +# Configuration du projet -The project config resides in the `wails.json` file in the project directory. The structure of the config is: +La configuration du projet se trouve dans le fichier `wails.json` du répertoire du projet. La structure de la configuration est : ```json { - "name": "[The project name]", - "assetdir": "[Relative path to the directory containing the compiled assets, this is normally inferred and could be left empty]", - "reloaddirs": "[Additional directories to trigger reloads (comma separated), this is only used for some advanced asset configurations]", - "build:dir": "[The directory where the build files reside. Defaults to 'build']", - "frontend:dir": "[Relative path to the frontend directory. Defaults to 'frontend']", - "frontend:install": "[The command to install node dependencies, run in the frontend directory - often `npm install`]", - "frontend:build": "[The command to build the assets, run in the frontend directory - often `npm run build`]", - "frontend:dev": "[This command has been replaced by frontend:dev:build. If frontend:dev:build is not specified will falls back to this command. \nIf this command is also not specified will falls back to frontend:build]", - "frontend:dev:build": "[This command is the dev equivalent of frontend:build. If not specified falls back to frontend:dev]", - "frontend:dev:install": "[This command is the dev equivalent of frontend:install. If not specified falls back to frontend:install]", - "frontend:dev:watcher": "[This command is run in a separate process on `wails dev`. Useful for 3rd party watchers or starting 3d party dev servers]", - "frontend:dev:serverUrl": "[URL to a 3rd party dev server to be used to serve assets, EG Vite. \nIf this is set to 'auto' then the devServerUrl will be inferred from the Vite output]", - "wailsjsdir": "[Relative path to the directory that the auto-generated JS modules will be created]", - "version": "[Project config version]", - "outputfilename": "[The name of the binary]", - "debounceMS": 100, // The default time the dev server waits to reload when it detects a change in assets - "devServer": "[Address to bind the wails dev sever to. Default: localhost:34115]", - "appargs": "[Arguments passed to the application in shell style when in dev mode]", - "runNonNativeBuildHooks": false, // Defines if build hooks should be run though they are defined for an OS other than the host OS. + "name": "[Le nom du projet]", + "assetdir": "[Chemin relatif vers le répertoire contenant les ressources compilées, ceci est normalement déduit et pourrait être laissé vide]", + "reloaddirs": "[Répertoires supplémentaires pour déclencher des recharges automatiques (séparés par des virgules), ceci n'est utilisé que pour certaines configurations d'actifs avancées]", + "build:dir": "[Le répertoire où se trouvent les fichiers de compilation. Par défaut, 'build']", + "frontend:dir": "[Chemin relatif vers le répertoire du frontend. Par défaut, 'frontend']', + "frontend:install": "[La commande pour installer les dépendances de node, exécuté dans le répertoire du frontend - souvent `npm install`]", + "frontend:build": "[La commande pour construire l'application, exécuté dans le répertoire frontend - souvent `npm run build`]", + "frontend:dev": "[Cette commande a été remplacée par frontend:dev:build. Si frontend:dev:build n'est pas spécifié, cela retombera dans cette commande. \nSi cette commande n'est pas non plus spécifiée va revenir sur frontend:build]", + "frontend:dev:build": "[Cette commande est l'équivalent en dev de frontend:build. Si non spécifié, revient à frontend:dev]", + "frontend:dev:install": "[Cette commande est l'équivalent en dev de frontend:install. Si non spécifié, revient à frontend:install]", + "frontend:dev:watcher": "[Cette commande est exécutée dans un processus séparé sur `wails dev`. Utile pour les observateurs tiers ou les serveurs de développement de parties tierces]", + "frontend:dev:serverUrl": "[URL vers un serveur de développement tiers pour exposer l'application, EG Vite. \nSi cette valeur est définie à 'auto', alors le devServerUrl sera déduit de la sortie Vite]", + "wailsjsdir": "[Chemin relatif au répertoire qui vont contenir les modules JS automatiquement créés]", + "version": "[Version de configuration du projet]", + "outputfilename": "[Le nom du binaire]", + "debounceMS": 100, // Nombre de millisecondes durant lesquelles le serveur de dev attend de se recharger quand il détecte un changement dans les ressourcces + "devServer": "[Adresse pour se connecter au serveur de dev de wails. Par défaut: localhost:34115]", + "appargs": "[Arguments passés à l'application en mode shell lors du mode dev]", + "runNonNativeBuildHooks": false, // Définit si les évènements de compilation doivent être exécutés même s'ils sont définis pour un système d'exploitation autre que le système d'exploitation hôte. "preBuildHooks": { - "GOOS/GOARCH": "[The command that will be executed before a build of the specified GOOS/GOARCH: ${platform} is replaced with the "GOOS/GOARCH". The "GOOS/GOARCH" hook is executed before the "GOOS/*" and "*/*" hook.]", + "GOOS/GOARCH": "[La commande qui sera exécutée avant une compilation du GOOS/GOARCH: ${platform} est remplacée par le "GOOS/GOARCH". 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".]" }, diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/current/reference/runtime/dialog.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/current/reference/runtime/dialog.mdx index eebb16542..a7c1227c3 100644 --- a/website/i18n/fr/docusaurus-plugin-content-docs/current/reference/runtime/dialog.mdx +++ b/website/i18n/fr/docusaurus-plugin-content-docs/current/reference/runtime/dialog.mdx @@ -6,7 +6,7 @@ sidebar_position: 5 This part of the runtime provides access to native dialogs, such as File Selectors and Message boxes. -:::info Javascript +:::info JavaScript Dialog is currently unsupported in the JS runtime. diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/current/reference/runtime/events.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/current/reference/runtime/events.mdx index 373a65d76..4b021cc05 100644 --- a/website/i18n/fr/docusaurus-plugin-content-docs/current/reference/runtime/events.mdx +++ b/website/i18n/fr/docusaurus-plugin-content-docs/current/reference/runtime/events.mdx @@ -4,7 +4,7 @@ sidebar_position: 2 # Events -The Wails runtime provides a unified events system, where events can be emitted or received by either Go or Javascript. Optionally, data may be passed with the events. Listeners will receive the data in the local data types. +The Wails runtime provides a unified events system, where events can be emitted or received by either Go or JavaScript. Optionally, data may be passed with the events. Listeners will receive the data in the local data types. ### EventsOn diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/current/reference/runtime/intro.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/current/reference/runtime/intro.mdx index 7bb1ed83f..cebfa060f 100644 --- a/website/i18n/fr/docusaurus-plugin-content-docs/current/reference/runtime/intro.mdx +++ b/website/i18n/fr/docusaurus-plugin-content-docs/current/reference/runtime/intro.mdx @@ -4,14 +4,14 @@ sidebar_position: 1 # Introduction -The runtime is a library that provides utility methods for your application. There is both a Go and Javascript runtime and the aim is to try and keep them at parity where possible. +The runtime is a library that provides utility methods for your application. There is both a Go and JavaScript runtime and the aim is to try and keep them at parity where possible. It has utility methods for: - [Window](window.mdx) - [Menu](menu.mdx) -- [Dialog](dialog.mdx) -- [Events](events.mdx) +- [Boîte de dialogue](dialog.mdx) +- [Événements](events.mdx) - [Browser](browser.mdx) - [Log](log.mdx) @@ -23,13 +23,13 @@ Whilst the context will be provided to the [OnStartup](../options.mdx#onstartup) ::: -The Javascript library is available to the frontend via the `window.runtime` map. There is a runtime package generated when using `dev` mode that provides Typescript declarations for the runtime. This should be located in the `wailsjs` directory in your frontend directory. +The JavaScript library is available to the frontend via the `window.runtime` map. There is a runtime package generated when using `dev` mode that provides TypeScript declarations for the runtime. This should be located in the `wailsjs` directory in your frontend directory. -### Hide +### Cacher Go: `Hide(ctx context.Context)`
JS: `Hide()` -Hides the application. +Cache l'application. :::info Note @@ -37,9 +37,9 @@ On Mac, this will hide the application in the same way as the `Hide` menu item i ::: -### Show +### Afficher -Shows the application. +Affiche l'application. :::info Note @@ -49,15 +49,15 @@ On Mac, this will bring the application back into the foreground. For Windows an Go: `Show(ctx context.Context)`
JS: `Show()` -### Quit +### Quitter -Quits the application. +Quitte l'application. Go: `Quit(ctx context.Context)`
JS: `Quit()` -### Environment +### Environnement -Returns details of the current environment. +Renvoie les détails de l'environnement actuel. Go: `Environment(ctx context.Context) EnvironmentInfo`
JS: `Environment(): Promise` diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/current/reference/runtime/log.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/current/reference/runtime/log.mdx index e5e6ea7ac..83cb32e95 100644 --- a/website/i18n/fr/docusaurus-plugin-content-docs/current/reference/runtime/log.mdx +++ b/website/i18n/fr/docusaurus-plugin-content-docs/current/reference/runtime/log.mdx @@ -4,7 +4,7 @@ sidebar_position: 3 # Log -The Wails runtime provides a logging mechanism that may be called from Go or Javascript. Like most loggers, there are a number of log levels: +The Wails runtime provides a logging mechanism that may be called from Go or JavaScript. Comme la plupart des loggers, il y a un certain nombre de niveaux de log : - Trace - Debug @@ -13,109 +13,109 @@ The Wails runtime provides a logging mechanism that may be called from Go or Jav - Error - Fatal -The logger will output any log message at the current, or higher, log level. Example: The `Debug` log level will output all messages except `Trace` messages. +Le logger affichera tous les messages de log au niveau actuel ou supérieur. Exemple : Le niveau `Debug` affichera tous les messages sauf ceux du niveau `Trace`. ### LogPrint -Logs the given message as a raw message. +Ajoute le message donné dans les logs en tant que message brut. Go: `LogPrint(ctx context.Context, message string)`
JS: `LogPrint(message: string)` ### LogPrintf -Logs the given message as a raw message. +Ajoute le message donné dans les logs en tant que message brut. Go: `LogPrintf(ctx context.Context, format string, args ...interface{})`
### LogTrace -Logs the given message at the `Trace` log level. +Ajoute le message donné dans les logs avec le niveau de log `Trace`. Go: `LogTrace(ctx context.Context, message string)`
JS: `LogTrace(message: string)` ### LogTracef -Logs the given message at the `Trace` log level. +Ajoute le message donné dans les logs avec le niveau de log `Trace`. Go: `LogTracef(ctx context.Context, format string, args ...interface{})`
### LogDebug -Logs the given message at the `Debug` log level. +Ajoute le message donné dans les logs avec le niveau de log `Debug`. Go: `LogDebug(ctx context.Context, message string)`
JS: `LogDebug(message: string)` ### LogDebugf -Logs the given message at the `Debug` log level. +Ajoute le message donné dans les logs avec le niveau de log `Debug`. Go: `LogDebugf(ctx context.Context, format string, args ...interface{})`
### LogInfo -Logs the given message at the `Info` log level. +Ajoute le message donné dans les logs avec le niveau de log `Info`. Go: `LogInfo(ctx context.Context, message string)`
JS: `LogInfo(message: string)` ### LogInfof -Logs the given message at the `Info` log level. +Ajoute le message donné dans les logs avec le niveau de log `Info`. Go: `LogInfof(ctx context.Context, format string, args ...interface{})`
### LogWarning -Logs the given message at the `Warning` log level. +Ajoute le message donné dans les logs avec le niveau de log `Warning`. Go: `LogWarning(ctx context.Context, message string)`
JS: `LogWarning(message: string)` ### LogWarningf -Logs the given message at the `Warning` log level. +Ajoute le message donné dans les logs avec le niveau de log `Warning`. Go: `LogWarningf(ctx context.Context, format string, args ...interface{})`
### LogError -Logs the given message at the `Error` log level. +Ajoute le message donné dans les logs avec le niveau de log `Error`. Go: `LogError(ctx context.Context, message string)`
JS: `LogError(message: string)` ### LogErrorf -Logs the given message at the `Error` log level. +Ajoute le message donné dans les logs avec le niveau de log `Error`. Go: `LogErrorf(ctx context.Context, format string, args ...interface{})`
### LogFatal -Logs the given message at the `Fatal` log level. +Ajoute le message donné dans les logs avec le niveau de log `Fatal`. Go: `LogFatal(ctx context.Context, message string)`
JS: `LogFatal(message: string)` ### LogFatalf -Logs the given message at the `Fatal` log level. +Ajoute le message donné dans les logs avec le niveau de log `Fatal`. Go: `LogFatalf(ctx context.Context, format string, args ...interface{})`
### LogSetLogLevel -Sets the log level. In Javascript, the number relates to the following log levels: +Définit le niveau des logs. In JavaScript, the number relates to the following log levels: -| Value | Log Level | -| ----- | --------- | -| 1 | Trace | -| 2 | Debug | -| 3 | Info | -| 4 | Warning | -| 5 | Error | +| Valeur | Niveau de log | +| ------ | ------------- | +| 1 | Trace | +| 2 | Debug | +| 3 | Info | +| 4 | Warning | +| 5 | Error | Go: `LogSetLogLevel(ctx context.Context, level logger.LogLevel)`
JS: `LogSetLogLevel(level: number)` -## Using a Custom Logger +## Utiliser un Logger Personnalisé -A custom logger may be used by providing it using the [Logger](../options.mdx#logger) application option. The only requirement is that the logger implements the `logger.Logger` interface defined in `github.com/wailsapp/wails/v2/pkg/logger`: +Un logger personnalisé peut être utilisé en le définissant dans l'option de l'application [Logger](../options.mdx#logger) . La seule condition est que le logger implémente l'interface `logger.Logger` définie dans `github.com/wailsapp/wails/v2/pkg/logger`: ```go title="logger.go" type Logger interface { diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/current/reference/runtime/menu.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/current/reference/runtime/menu.mdx index da4b74b69..cd78d31aa 100644 --- a/website/i18n/fr/docusaurus-plugin-content-docs/current/reference/runtime/menu.mdx +++ b/website/i18n/fr/docusaurus-plugin-content-docs/current/reference/runtime/menu.mdx @@ -4,22 +4,22 @@ sidebar_position: 6 # Menu -These methods are related to the application menu. +Ces méthodes sont liées au menu de l'application. -:::info Javascript +:::info JavaScript -Menu is currently unsupported in the JS runtime. +Le menu n'est actuellement pas pris en charge lors de l'exécution de JS. ::: ### MenuSetApplicationMenu -Sets the application menu to the given [menu](../menus.mdx). +Définit le menu de l'application dans le [menu](../menus.mdx) donné. Go: `MenuSetApplicationMenu(ctx context.Context, menu *menu.Menu)` ### MenuUpdateApplicationMenu -Updates the application menu, picking up any changes to the menu passed to `MenuSetApplicationMenu`. +Met à jour le menu de l'application, avec toutes les autres modifications déjà appliquées via `MenuSetApplicationMenu`. Go: `MenuUpdateApplicationMenu(ctx context.Context)` diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/current/reference/runtime/window.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/current/reference/runtime/window.mdx index 9eeee1372..5b1bac134 100644 --- a/website/i18n/fr/docusaurus-plugin-content-docs/current/reference/runtime/window.mdx +++ b/website/i18n/fr/docusaurus-plugin-content-docs/current/reference/runtime/window.mdx @@ -2,205 +2,205 @@ sidebar_position: 4 --- -# Window +# Fenêtre -These methods give control of the application window. +Ces méthodes donnent le contrôle de la fenêtre de l'application. ### WindowSetTitle -Sets the text in the window title bar. +Définit le texte dans la barre de titre de la fenêtre. Go: `WindowSetTitle(ctx context.Context, title string)`
JS: `WindowSetTitle(title: string)` ### WindowFullscreen -Makes the window full screen. +Mets la fenêtre en plein écran. Go: `WindowFullscreen(ctx context.Context)`
JS: `WindowFullscreen()` ### WindowUnfullscreen -Restores the previous window dimensions and position prior to full screen. +Restaure les dimensions et la position de la fenêtre avant le plein écran. Go: `WindowUnfullscreen(ctx context.Context)`
JS: `WindowUnfullscreen()` ### WindowIsFullscreen -Returns true if the window is full screen. +Renvoie vrai si la fenêtre est en plein écran. Go: `WindowIsFullscreen(ctx context.Context) bool`
JS: `WindowIsFullscreen() bool` ### WindowCenter -Centers the window on the monitor the window is currently on. +Centre la fenêtre sur le moniteur sur laquelle la fenêtre est actuellement ouverte. Go: `WindowCenter(ctx context.Context)`
JS: `WindowCenter()` ### WindowExecJS -Executes arbitrary JS code in the window. +Exécute du code JS dans la fenêtre. -This method runs the code in the browser asynchronously and returns immediately. If the script causes any errors, they will only be available in the browser console. +Cette méthode exécute le code dans le navigateur de manière asynchrone et retourne immédiatement le résultat. Si le script cause des erreurs, elles ne seront disponibles que dans la console du navigateur. Go: `WindowExecJS(ctx context.Context, js string)` ### WindowReload -Performs a "reload" (Reloads current page). +Effectue un "rechargement" (Recharge la page courante). Go: `WindowReload(ctx context.Context)`
JS: `WindowReload()` ### WindowReloadApp -Reloads the application frontend. +Recharge le frontend de l'application. Go: `WindowReloadApp(ctx context.Context)`
JS: `WindowReloadApp()` ### WindowSetSystemDefaultTheme -Windows only. +Windows seulement. Go: `WindowSetSystemDefaultTheme(ctx context.Context)`
JS: `WindowSetSystemDefaultTheme()` -Sets window theme to system default (dark/light). +Définit le thème de fenêtre à la valeur par défaut du système (sombre/clair). ### WindowSetLightTheme -Windows only. +Windows seulement. Go: `WindowSetLightTheme(ctx context.Context)`
JS: `WindowSetLightTheme()` -Sets window theme to light. +Définit le thème clair à la fenêtre. ### WindowSetDarkTheme -Windows only. +Windows seulement. Go: `WindowSetDarkTheme(ctx context.Context)`
JS: `WindowSetDarkTheme()` -Sets window theme to dark. +Définit le thème sombre à la fenêtre. ### WindowShow -Shows the window, if it is currently hidden. +Affiche la fenêtre, si elle est actuellement masquée. Go: `WindowShow(ctx context.Context)`
JS: `WindowShow()` ### WindowHide -Hides the window, if it is currently visible. +Masque la fenêtre, si elle est actuellement visible. Go: `WindowHide(ctx context.Context)`
JS: `WindowHide()` ### WindowIsNormal -Returns true if the window not minimised, maximised or fullscreen. +Renvoie vrai si la fenêtre n'est pas minimisée, maximisée ou plein écran. Go: `WindowIsNormal(ctx context.Context) bool`
JS: `WindowIsNormal() bool` ### WindowSetSize -Sets the width and height of the window. +Définit la largeur et la hauteur de la fenêtre. Go: `WindowSetSize(ctx context.Context, width int, height int)`
JS: `WindowSetSize(size: Size)` ### WindowGetSize -Gets the width and height of the window. +Retourne la largeur et la hauteur de la fenêtre. Go: `WindowGetSize(ctx context.Context) (width int, height int)`
JS: `WindowGetSize() : Size` ### WindowSetMinSize -Sets the minimum window size. Will resize the window if the window is currently smaller than the given dimensions. +Définit la taille minimale de la fenêtre. Redimensionnera la fenêtre si la fenêtre est actuellement plus petite que les dimensions données. -Setting a size of `0,0` will disable this constraint. +Définir une taille de `0,0` désactivera cette contrainte. Go: `WindowSetMinSize(ctx context.Context, width int, height int)`
JS: `WindowSetMinSize(size: Size)` ### WindowSetMaxSize -Sets the maximum window size. Will resize the window if the window is currently larger than the given dimensions. +Définit la taille maximale de la fenêtre. Redimensionnera la fenêtre si la fenêtre est actuellement plus grande que les dimensions données. -Setting a size of `0,0` will disable this constraint. +Définir une taille de `0,0` désactivera cette contrainte. Go: `WindowSetMaxSize(ctx context.Context, width int, height int)`
JS: `WindowSetMaxSize(size: Size)` ### WindowSetAlwaysOnTop -Sets the window AlwaysOnTop or not on top. +Paramètre pour faire en sorte que la fenêtre soit toujours au dessus des autres ou non. Go: `WindowSetAlwaysOnTop(ctx context.Context, b bool)`
JS: `WindowSetAlwaysOnTop(b: Boolen)` ### WindowSetPosition -Sets the window position relative to the monitor the window is currently on. +Définit la position de la fenêtre par rapport au moniteur sur lequel la fenêtre est activée. Go: `WindowSetPosition(ctx context.Context, x int, y int)`
JS: `WindowSetPosition(position: Position)` ### WindowGetPosition -Gets the window position relative to the monitor the window is currently on. +Récupère la position de la fenêtre relative au moniteur sur lequel la fenêtre est activée. Go: `WindowGetPosition(ctx context.Context) (x int, y int)`
JS: `WindowGetPosition() : Position` -### WindowMaximise +### WindowMaximiseWindowMaximise -Maximises the window to fill the screen. +Maximise la fenêtre pour remplir l'écran. Go: `WindowMaximise(ctx context.Context)`
JS: `WindowMaximise()` ### WindowUnmaximise -Restores the window to the dimensions and position prior to maximising. +Restaure la fenêtre aux dimensions et à la position avant qu'elle soit maximisée. Go: `WindowUnmaximise(ctx context.Context)`
JS: `WindowUnmaximise()` ### WindowIsMaximised -Returns true if the window is maximised. +Renvoie vrai si la fenêtre est maximisée. Go: `WindowIsMaximised(ctx context.Context) bool`
JS: `WindowIsMaximised() bool` ### WindowToggleMaximise -Toggles between Maximised and UnMaximised. +Option permettant de basculer entre la maximisation de la fenêtre et sa non maximisation. Go: `WindowToggleMaximise(ctx context.Context)`
JS: `WindowToggleMaximise()` ### WindowMinimise -Minimises the window. +Minimise la fenêtre. Go: `WindowMinimise(ctx context.Context)`
JS: `WindowMinimise()` ### WindowUnminimise -Restores the window to the dimensions and position prior to minimising. +Restaure la fenêtre aux dimensions et à la position avant qu'elle soit minimisée. Go: `WindowUnminimise(ctx context.Context)`
JS: `WindowUnminimise()` ### WindowIsMinimised -Returns true if the window is minimised. +Renvoie vrai si la fenêtre est minimisée. Go: `WindowIsMinimised(ctx context.Context) bool`
JS: `WindowIsMinimised() bool` ### WindowSetBackgroundColour -Sets the background colour of the window to the given RGBA colour definition. This colour will show through for all transparent pixels. +Définit la couleur de fond de la fenêtre avec la couleur RGBA donnée. Cette couleur sera visible au travers de tous les pixels transparents. -Valid values for R, G, B and A are 0-255. +Les valeurs valides pour R, G, B et A sont entre 0 et 255 inclus. :::info Windows -On Windows, only alpha values of 0 or 255 are supported. Any value that is not 0 will be considered 255. +Sous Windows, seules les valeurs 0 et 255 sont prises en charge pour A. Toute valeur qui n'est pas 0 sera considérée comme 255. ::: Go: `WindowSetBackgroundColour(ctx context.Context, R, G, B, A uint8)`
JS: `WindowSetBackgroundColour(R, G, B, A)` -## Typescript Object Definitions +## TypeScript Object Definitions ### Position @@ -211,7 +211,7 @@ interface Position { } ``` -### Size +### Size (taille) ```ts interface Size { diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.0.0-rc.1.json b/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.0.0-rc.1.json index 9adb2448d..92385254a 100644 --- a/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.0.0-rc.1.json +++ b/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.0.0-rc.1.json @@ -4,11 +4,11 @@ "description": "The label for version v2.0.0-rc.1" }, "sidebar.docs.category.Getting Started": { - "message": "Pour démarrer", + "message": "Getting Started", "description": "The label for category Getting Started in sidebar docs" }, "sidebar.docs.category.Reference": { - "message": "Références", + "message": "Reference", "description": "The label for category Reference in sidebar docs" }, "sidebar.docs.category.Runtime": { @@ -16,11 +16,11 @@ "description": "The label for category Runtime in sidebar docs" }, "sidebar.docs.category.Community": { - "message": "Communauté", + "message": "Community", "description": "The label for category Community in sidebar docs" }, "sidebar.docs.category.Showcase": { - "message": "Galerie", + "message": "Showcase", "description": "The label for category Showcase in sidebar docs" }, "sidebar.docs.category.Guides": { @@ -28,11 +28,11 @@ "description": "The label for category Guides in sidebar docs" }, "sidebar.docs.category.Tutorials": { - "message": "Tutoriels", + "message": "Tutorials", "description": "The label for category Tutorials in sidebar docs" }, "sidebar.docs.link.Contributing": { - "message": "Contribuer", + "message": "Contributing", "description": "The label for link Contributing in sidebar docs, linking to /community-guide#ways-of-contributing" } } diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.0.0.json b/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.0.0.json index 8d0676b84..88fd52fbb 100644 --- a/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.0.0.json +++ b/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.0.0.json @@ -4,11 +4,11 @@ "description": "The label for version v2.0.0" }, "sidebar.docs.category.Getting Started": { - "message": "Pour démarrer", + "message": "Getting Started", "description": "The label for category Getting Started in sidebar docs" }, "sidebar.docs.category.Reference": { - "message": "Références", + "message": "Reference", "description": "The label for category Reference in sidebar docs" }, "sidebar.docs.category.Runtime": { @@ -16,11 +16,11 @@ "description": "The label for category Runtime in sidebar docs" }, "sidebar.docs.category.Community": { - "message": "Communauté", + "message": "Community", "description": "The label for category Community in sidebar docs" }, "sidebar.docs.category.Showcase": { - "message": "Galerie", + "message": "Showcase", "description": "The label for category Showcase in sidebar docs" }, "sidebar.docs.category.Guides": { @@ -28,11 +28,11 @@ "description": "The label for category Guides in sidebar docs" }, "sidebar.docs.category.Tutorials": { - "message": "Tutoriels", + "message": "Tutorials", "description": "The label for category Tutorials in sidebar docs" }, "sidebar.docs.link.Contributing": { - "message": "Contribuer", + "message": "Contributing", "description": "The label for link Contributing in sidebar docs, linking to /community-guide#ways-of-contributing" } } diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.1.0.json b/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.1.0.json index 024d57fd7..4cf37cb5a 100644 --- a/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.1.0.json +++ b/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.1.0.json @@ -4,11 +4,11 @@ "description": "The label for version v2.1.0" }, "sidebar.docs.category.Getting Started": { - "message": "Pour démarrer", + "message": "Getting Started", "description": "The label for category Getting Started in sidebar docs" }, "sidebar.docs.category.Reference": { - "message": "Références", + "message": "Reference", "description": "The label for category Reference in sidebar docs" }, "sidebar.docs.category.Runtime": { @@ -16,11 +16,11 @@ "description": "The label for category Runtime in sidebar docs" }, "sidebar.docs.category.Community": { - "message": "Communauté", + "message": "Community", "description": "The label for category Community in sidebar docs" }, "sidebar.docs.category.Showcase": { - "message": "Galerie", + "message": "Showcase", "description": "The label for category Showcase in sidebar docs" }, "sidebar.docs.category.Guides": { @@ -28,11 +28,11 @@ "description": "The label for category Guides in sidebar docs" }, "sidebar.docs.category.Tutorials": { - "message": "Tutoriels", + "message": "Tutorials", "description": "The label for category Tutorials in sidebar docs" }, "sidebar.docs.link.Contributing": { - "message": "Contribuer", + "message": "Contributing", "description": "The label for link Contributing in sidebar docs, linking to /community-guide#ways-of-contributing" } } diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.2.0.json b/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.2.0.json index f887fc2e2..e22e7a727 100644 --- a/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.2.0.json +++ b/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.2.0.json @@ -4,11 +4,11 @@ "description": "The label for version v2.2.0" }, "sidebar.docs.category.Getting Started": { - "message": "Pour démarrer", + "message": "Getting Started", "description": "The label for category Getting Started in sidebar docs" }, "sidebar.docs.category.Reference": { - "message": "Références", + "message": "Reference", "description": "The label for category Reference in sidebar docs" }, "sidebar.docs.category.Runtime": { @@ -16,11 +16,11 @@ "description": "The label for category Runtime in sidebar docs" }, "sidebar.docs.category.Community": { - "message": "Communauté", + "message": "Community", "description": "The label for category Community in sidebar docs" }, "sidebar.docs.category.Showcase": { - "message": "Galerie", + "message": "Showcase", "description": "The label for category Showcase in sidebar docs" }, "sidebar.docs.category.Guides": { @@ -28,11 +28,11 @@ "description": "The label for category Guides in sidebar docs" }, "sidebar.docs.category.Tutorials": { - "message": "Tutoriels", + "message": "Tutorials", "description": "The label for category Tutorials in sidebar docs" }, "sidebar.docs.link.Contributing": { - "message": "Contribuer", + "message": "Contributing", "description": "The label for link Contributing in sidebar docs, linking to /community-guide#ways-of-contributing" } } diff --git a/website/i18n/fr/docusaurus-plugin-content-pages/changelog.mdx b/website/i18n/fr/docusaurus-plugin-content-pages/changelog.mdx index e0bc7abf4..83f5d3095 100644 --- a/website/i18n/fr/docusaurus-plugin-content-pages/changelog.mdx +++ b/website/i18n/fr/docusaurus-plugin-content-pages/changelog.mdx @@ -17,10 +17,13 @@ Le format est basé sur [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Ajout de l'option `OpenInspectorOnStartup` au débogage pour permettre d'ouvrir le WebInspector au démarrage de l'application en mode débogage . Ajouté par @stffabi : [PR](https://github.com/wailsapp/wails/pull/2080) - Sur MacOS, `wails doctor` affiche à présent la version de Xcode installée. Ajouté par @stffabi : [PR](https://github.com/wailsapp/wails/pull/2089) - L'[AssetServer](/docs/reference/options#assetserver) supporte à présent les range-requests si l' [Assets](/docs/reference/options/#assets-1) `fs.FS` importe `io.ReadSeeker`. Ajouté par @stffabi : [PR](https://github.com/wailsapp/wails/pull/2091) +- Ajouter une nouvelle propriété `bindings` dans le fichier de configuration `wails.json`. Plus d'informations sur la nouvelle propriété peuvent être trouvées dans le [schéma](/schemas/config.v2.json) mis à jour. Les propriétés `prefix` et `suffix` vous permettent de contrôler le nom d'entité TypeScript généré dans le fichier `model.ts`. Ajouté par @OlegGulevskyy dans [PR](https://github.com/wailsapp/wails/pull/2101) +- La méthode `WindowSetAlwaysOnTop` est maintenant exposée dans l'exécutable JS. Fixé par @gotid dans la [PR](https://github.com/wailsapp/wails/pull/2128) ### Corrections - Le booléen activant la fonctionnalité `noreload` n'était pas utilisable dans le mode développement de wails. Corrigé par @stffabi dans cette [PR](https://github.com/wailsapp/wails/pull/2081) -- Le dossier `build/bin` se dupliquait lui-même lors de chaque chargement en mode `développement de wails`. Corrigé par @OlegGulevskyy dans cette [PR](https://github.com/wailsapp/wails/pull/2103) +- `le dossier build/bin` se dupliquait sur chaque rechargement en mode `wails dev`. Corrigé par @OlegGulevskyy dans cette [PR](https://github.com/wailsapp/wails/pull/2103) +- Empêcher une fine ligne blanche au bas d'une fenêtre sans cadre sous Windows. Correction par @stffabi dans cette [PR](https://github.com/wailsapp/wails/pull/2111) ## v2.2.0 - 2022-11-09 @@ -34,12 +37,12 @@ Le format est basé sur [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Si `go.mod` n'est pas trouvé dans le même répertoire que `wails.json`, le cli va chercher les répertoires parents pour le trouver. Corrigé par @leaanthony dans cette [PR](https://github.com/wailsapp/wails/pull/2009) - La sortie de couleur dans le CLI peut maintenant être désactivée en utilisant l'option `--nocolor`. Ceci est utile pour les pipelines CI/CD. Merci à @scottopell pour cette [PR](https://github.com/wailsapp/wails/pull/1947) - Une définition de schéma JSON pour le fichier `wails.json` a été ajoutée. Les IDEs devraient maintenant fournir le code complet lors de l'édition de `wails.json`. Merci à @binyamin pour cette [PR](https://github.com/wailsapp/wails/pull/1864) -- Les méthodes `EventsOn*` retournent maintenant une fonction qui peut être appelée pour désenregistrer l'auditeur. Thanks to @joshbuddy for the [PR](https://github.com/wailsapp/wails/pull/1969) +- Les méthodes `EventsOn*` retournent maintenant une fonction qui peut être appelée pour désenregistrer l'auditeur. Merci à @joshbuddy pour la [PR](https://github.com/wailsapp/wails/pull/1969) ### Corrections - Webview2 on Windows returns a potential whitespace when defining the style like this style="--wails-draggable: drag". Fixed by @stffabi in https://github.com/wailsapp/wails/pull/1989 -- Bound structs that had `struct{}` field types would cause the Typescript generation to fail. Thanks to @ParkourLiu for the [PR](https://github.com/wailsapp/wails/pull/1999) +- Bound structs that had `struct{}` field types would cause the TypeScript generation to fail. Thanks to @ParkourLiu for the [PR](https://github.com/wailsapp/wails/pull/1999) - When maximising a frameless window on Windows with multiple monitors, the window could sometimes become blank. Merci à @stffabi pour cette [correction](https://github.com/wailsapp/wails/pull/2043) ### Changements @@ -67,12 +70,12 @@ Le format est basé sur [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ### Ajouts -- [Support for defaulting to No button in Windows dialogs](https://wails.io/docs/reference/runtime/dialog/#windows) - @leaanthony in https://github.com/wailsapp/wails/pull/1875 -- Add missing resize for frameless window on Linux - @Lyimmi in https://github.com/wailsapp/wails/pull/1918 -- [Add window transparency for linux](https://wails.io/docs/reference/options#windowistranslucent-2) - @Lyimmi in https://github.com/wailsapp/wails/pull/1926 -- [Add WindowExecJS method](https://wails.io/docs/reference/runtime/window#windowexecjs) - @leaanthony in https://github.com/wailsapp/wails/pull/1927 -- [Add support for `Info.dev.plist` on macOS](https://wails.io/docs//reference/cli#dev) - @leaanthony in https://github.com/wailsapp/wails/pull/1960 -- [Add ZoomFactor get/set and add the respective windows only options](https://wails.io/docs/reference/options#zoomfactor) - @pierrejoye in https://github.com/wailsapp/wails/pull/1463 +- [Prise en charge du bouton Non par défaut dans les boîtes de dialogue Windows](https://wails.io/docs/reference/runtime/dialog/#windows) - @leaanthony dans https://github.com/wailsapp/wails/pull/1875 +- Ajout de la possibilité de redimensionner la fenêtre sans cadre sur Linux - @Lyimmi dans https://github.com/wailsapp/wails/pull/1918 +- [Ajout de la transparence de la fenêtre pour linux](https://wails.io/docs/reference/options#windowistranslucent-2) - @Lyimmi dans https://github.com/wailsapp/wails/pull/1926 +- [Ajout de la méthode WindowExecJS](https://wails.io/docs/reference/runtime/window#windowexecjs) - @leaanthony dans https://github.com/wailsapp/wails/pull/1927 +- [Ajout de support pour `Info.dev.plist` sur macOS](https://wails.io/docs//reference/cli#dev) - @leaanthony dans https://github.com/wailsapp/wails/pull/1960 +- [Ajout de ZoomFactor get/set et ajout des options Windows respectives](https://wails.io/docs/reference/options#zoomfactor) - @pierrejoye sur https://github.com/wailsapp/wails/pull/1463 ### Corrections @@ -84,7 +87,7 @@ Le format est basé sur [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Remove the `.git` directory in the template - @misitebao in https://github.com/wailsapp/wails/pull/1929 - Fix wails dev - @JulioDRF in https://github.com/wailsapp/wails/pull/1931 - Fix for considering new `go` files in dev filesystem watcher - @scottopell in https://github.com/wailsapp/wails/pull/1946 -- Prevent type parsing to interfere with Typescript package name - @ValentinTrinque in https://github.com/wailsapp/wails/pull/1942 +- Prevent type parsing to interfere with TypeScript package name - @ValentinTrinque in https://github.com/wailsapp/wails/pull/1942 - [dev] Do not try to infer assetdir from fs.FS when a frontend dev server is in use - @stffabi in https://github.com/wailsapp/wails/pull/1972 - Fix init command not listed in wails help message - @lyon-lee-dev in https://github.com/wailsapp/wails/pull/1976 @@ -479,7 +482,7 @@ Experimental: &options.Experimental{ - 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) - [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) +- 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) - Added docs for [code-signing](https://wails.io/docs/guides/signing) and [NSIS installer](https://wails.io/docs/guides/windows-installer) - [@gardc](https://github.com/gardc) - Add support for `-trimpath` [build flag](https://wails.io/docs/reference/cli#build) @@ -489,7 +492,7 @@ Experimental: &options.Experimental{ - Improved mimetype detection for BOM marker and comments - [@napalu](https://github.com/napalu) - Remove duplicate mimetype entries - [@napalu](https://github.com/napalu) -- Remove duplicate Typescript imports in generated definition files - [@adalessa](https://github.com/adalessa) +- Remove duplicate TypeScript imports in generated definition files - [@adalessa](https://github.com/adalessa) - Add missing method declaration - [@adalessa](https://github.com/adalessa) - Fix Linux sigabrt on start - [@napalu](https://github.com/napalu) - Double Click event now works on elements with `data-wails-drag` attribute - [@jicg](https://github.com/jicg) diff --git a/website/i18n/fr/docusaurus-plugin-content-pages/community-guide.mdx b/website/i18n/fr/docusaurus-plugin-content-pages/community-guide.mdx index 558c59d04..847968f95 100644 --- a/website/i18n/fr/docusaurus-plugin-content-pages/community-guide.mdx +++ b/website/i18n/fr/docusaurus-plugin-content-pages/community-guide.mdx @@ -70,6 +70,7 @@ Le processus de correction des bugs est le suivant : - La portée du problème, y compris les plateformes affectées - Les étapes pour reproduire le soucis. Parfois, des bugs sont ouverts mais ne sont pas liés à Wails. C'est au rapporteur du bug de prouver que le souci provient de Wails avec un [exemple minimum pouvant être reproduit](https://stackoverflow.com/help/minimal-reproducible-example) - Le résultat de `wails doctor` +- A test that can reproduce the bug - Si le ticket n'inclut pas ces informations, n'hésitez pas à demander les informations à la personne qui a ouvert le ticket. - Commenter sur le ticket indiquant que vous souhaitez développer un correctif - Clonez le dépôt et créez une branche au format `bugfix/_` diff --git a/website/i18n/fr/docusaurus-theme-classic/navbar.json b/website/i18n/fr/docusaurus-theme-classic/navbar.json index 27099fc17..0660da58d 100644 --- a/website/i18n/fr/docusaurus-theme-classic/navbar.json +++ b/website/i18n/fr/docusaurus-theme-classic/navbar.json @@ -4,7 +4,7 @@ "description": "Navbar item with label Sponsor" }, "item.label.Docs": { - "message": "Documents", + "message": "Docs", "description": "Navbar item with label Docs" }, "item.label.Blog": { @@ -20,7 +20,7 @@ "description": "Navbar item with label About" }, "item.label.FAQ": { - "message": "Foire aux questions", + "message": "FAQ", "description": "Navbar item with label FAQ" }, "item.label.Changelog": { diff --git a/website/i18n/ja/code.json b/website/i18n/ja/code.json index c50f94dbb..a1166aba5 100644 --- a/website/i18n/ja/code.json +++ b/website/i18n/ja/code.json @@ -1,57 +1,57 @@ { "homepage.Features.Title1": { - "message": "豊富な機能" + "message": "Feature Rich" }, "homepage.Features.Description1": { "message": "メニューやダイアログといったネイティブUI要素を使用して、クロスプラットフォームアプリを構築しましょう。" }, "homepage.Features.Title2": { - "message": "使い慣れた技術" + "message": "Familiar" }, "homepage.Features.Description2": { - "message": "すでにあなたが知っている技術で、素晴らしいアプリを構築できます。" + "message": "Use the technologies you already know to build amazing applications." }, "homepage.Features.Title3": { - "message": "速い" + "message": "Fast" }, "homepage.Features.Description3": { - "message": "Wails CLIを使用して、プロジェクトをすばやく生成、ビルド、およびパッケージ化できます。" + "message": "Quickly generate, build and package your projects using the Wails CLI." }, "homepage.Tagline": { - "message": "Goで美しいクロスプラットフォームアプリを開発" + "message": "Build beautiful cross-platform applications using Go" }, "homepage.ButtonText": { - "message": "はじめよう" + "message": "Get Started" }, "homepage.LearnMoreButtonText": { - "message": "詳しく" + "message": "Learn More" }, "theme.ErrorPageContent.title": { - "message": "ページがクラッシュしました。", + "message": "This page crashed.", "description": "The title of the fallback page when the page crashed" }, "theme.ErrorPageContent.tryAgain": { - "message": "再試行", + "message": "Try again", "description": "The label of the button to try again when the page crashed" }, "theme.NotFound.title": { - "message": "ページが見つかりません", + "message": "Page Not Found", "description": "The title of the 404 page" }, "theme.NotFound.p1": { - "message": "リクエストされたページは見つかりませんでした。", + "message": "We could not find what you were looking for.", "description": "The first paragraph of the 404 page" }, "theme.NotFound.p2": { - "message": "リンク元のページの所有者に連絡し、このリンクが無効であることをお知らせください。", + "message": "Please contact the owner of the site that linked you to the original URL and let them know their link is broken.", "description": "The 2nd paragraph of the 404 page" }, "theme.AnnouncementBar.closeButtonAriaLabel": { - "message": "閉じる", + "message": "Close", "description": "The ARIA label for close button of announcement bar" }, "theme.blog.archive.title": { - "message": "アーカイブ", + "message": "Archive", "description": "The page & hero title of the blog archive page" }, "theme.blog.archive.description": { @@ -59,91 +59,91 @@ "description": "The page & hero description of the blog archive page" }, "theme.BackToTopButton.buttonAriaLabel": { - "message": "ページ上部へ戻る", + "message": "Scroll back to top", "description": "The ARIA label for the back to top button" }, "theme.blog.paginator.navAriaLabel": { - "message": "ブログ投稿一覧ページナビゲーション", + "message": "Blog list page navigation", "description": "The ARIA label for the blog pagination" }, "theme.blog.paginator.newerEntries": { - "message": "より新しい投稿", + "message": "Newer Entries", "description": "The label used to navigate to the newer blog posts page (previous page)" }, "theme.blog.paginator.olderEntries": { - "message": "より古い投稿", + "message": "Older Entries", "description": "The label used to navigate to the older blog posts page (next page)" }, "theme.blog.post.readingTime.plurals": { - "message": "1分で読めます|{readingTime}分で読めます", + "message": "One min read|{readingTime} min read", "description": "Pluralized label for \"{readingTime} min read\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)" }, "theme.blog.post.readMoreLabel": { - "message": "\"{title}\"の投稿をすべて読む", + "message": "Read more about {title}", "description": "The ARIA label for the link to full blog posts from excerpts" }, "theme.blog.post.readMore": { - "message": "すべて読む", + "message": "Read More", "description": "The label used in blog post item excerpts to link to full blog posts" }, "theme.blog.post.paginator.navAriaLabel": { - "message": "ブログ投稿ページナビゲーション", + "message": "Blog post page navigation", "description": "The ARIA label for the blog posts pagination" }, "theme.blog.post.paginator.newerPost": { - "message": "次の新しい投稿", + "message": "Newer Post", "description": "The blog post button label to navigate to the newer/previous post" }, "theme.blog.post.paginator.olderPost": { - "message": "次の古い投稿", + "message": "Older Post", "description": "The blog post button label to navigate to the older/next post" }, "theme.blog.sidebar.navAriaLabel": { - "message": "最近のブログ投稿のナビゲーション", + "message": "Blog recent posts navigation", "description": "The ARIA label for recent posts in the blog sidebar" }, "theme.blog.post.plurals": { - "message": "1件の投稿|{count}件の投稿", + "message": "One post|{count} posts", "description": "Pluralized label for \"{count} posts\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)" }, "theme.blog.tagTitle": { - "message": "\"{tagName}\"タグがついた{nPosts}件の投稿", + "message": "{nPosts} tagged with \"{tagName}\"", "description": "The title of the page for a blog tag" }, "theme.tags.tagsPageLink": { - "message": "すべてのタグを見る", + "message": "View All Tags", "description": "The label of the link targeting the tag list page" }, "theme.CodeBlock.copyButtonAriaLabel": { - "message": "コードをクリップボードにコピー", + "message": "Copy code to clipboard", "description": "The ARIA label for copy code blocks button" }, "theme.CodeBlock.copied": { - "message": "コピーしました", + "message": "Copied", "description": "The copied button label on code blocks" }, "theme.CodeBlock.copy": { - "message": "コピー", + "message": "Copy", "description": "The copy button label on code blocks" }, "theme.colorToggle.ariaLabel": { - "message": "ダークモード/ライトモードの切替 (現在は{mode}です)", + "message": "Switch between dark and light mode (currently {mode})", "description": "The ARIA label for the navbar color mode toggle" }, "theme.colorToggle.ariaLabel.mode.dark": { - "message": "ダークモード", + "message": "dark mode", "description": "The name for the dark color mode" }, "theme.colorToggle.ariaLabel.mode.light": { - "message": "ライトモード", + "message": "light mode", "description": "The name for the light color mode" }, "theme.docs.DocCard.categoryDescription": { - "message": "{count}件", + "message": "{count} items", "description": "The default description for a category card in the generated index about how many items this category includes" }, "theme.docs.sidebar.expandButtonTitle": { - "message": "サイドバーを展開", + "message": "Expand sidebar", "description": "The ARIA label and title attribute for expand button of doc sidebar" }, "theme.docs.sidebar.expandButtonAriaLabel": { @@ -151,19 +151,19 @@ "description": "The ARIA label and title attribute for expand button of doc sidebar" }, "theme.docs.paginator.navAriaLabel": { - "message": "ドキュメントページナビゲーション", + "message": "Docs pages navigation", "description": "The ARIA label for the docs pagination" }, "theme.docs.paginator.previous": { - "message": "前へ", + "message": "Previous", "description": "The label used to navigate to the previous doc" }, "theme.docs.paginator.next": { - "message": "次へ", + "message": "Next", "description": "The label used to navigate to the next doc" }, "theme.docs.sidebar.collapseButtonTitle": { - "message": "サイドバーを折りたたむ", + "message": "Collapse sidebar", "description": "The title attribute for collapse button of doc sidebar" }, "theme.docs.sidebar.collapseButtonAriaLabel": { @@ -171,74 +171,74 @@ "description": "The title attribute for collapse button of doc sidebar" }, "theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": { - "message": "'{label}'カテゴリサイドバーの折りたたみを切替える", + "message": "Toggle the collapsible sidebar category '{label}'", "description": "The ARIA label to toggle the collapsible sidebar category" }, "theme.docs.tagDocListPageTitle.nDocsTagged": { - "message": "1件のドキュメントがタグ付けされています|{count}件のドキュメントがタグ付けされています", + "message": "One doc tagged|{count} docs tagged", "description": "Pluralized label for \"{count} docs tagged\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)" }, "theme.docs.tagDocListPageTitle": { - "message": "\"{tagName}\"タグがついた{nDocsTagged}件のドキュメント", + "message": "{nDocsTagged} with \"{tagName}\"", "description": "The title of the page for a docs tag" }, "theme.docs.versionBadge.label": { - "message": "バージョン: {versionLabel}" + "message": "Version: {versionLabel}" }, "theme.docs.versions.unreleasedVersionLabel": { - "message": "これは、{siteTitle} {versionLabel}のまだ未公開なドキュメントです。", + "message": "This is unreleased documentation for {siteTitle} {versionLabel} version.", "description": "The label used to tell the user that he's browsing an unreleased doc version" }, "theme.docs.versions.unmaintainedVersionLabel": { - "message": "これは、{siteTitle} {versionLabel}のドキュメントで、長期間更新されていません。", + "message": "This is documentation for {siteTitle} {versionLabel}, which is no longer actively maintained.", "description": "The label used to tell the user that he's browsing an unmaintained doc version" }, "theme.docs.versions.latestVersionSuggestionLabel": { - "message": "最新のドキュメントは、{latestVersionLink} ({versionLabel}) をご覧ください。", + "message": "For up-to-date documentation, see the {latestVersionLink} ({versionLabel}).", "description": "The label used to tell the user to check the latest version" }, "theme.docs.versions.latestVersionLinkLabel": { - "message": "最新バージョン", + "message": "latest version", "description": "The label used for the latest version suggestion link label" }, "theme.common.editThisPage": { - "message": "このページを編集", + "message": "Edit this page", "description": "The link label to edit the current page" }, "theme.common.headingLinkTitle": { - "message": "見出しへの直リンク", + "message": "Direct link to heading", "description": "Title for link to heading" }, "theme.lastUpdated.atDate": { - "message": "{date}", + "message": " on {date}", "description": "The words used to describe on which date a page has been last updated" }, "theme.lastUpdated.byUser": { - "message": "{user}", + "message": " by {user}", "description": "The words used to describe by who the page has been last updated" }, "theme.lastUpdated.lastUpdatedAtBy": { - "message": "{byUser}が{atDate}に最終更新", + "message": "Last updated{atDate}{byUser}", "description": "The sentence used to display when a page has been last updated, and by who" }, "theme.navbar.mobileSidebarSecondaryMenu.backButtonLabel": { - "message": "← メインメニューに戻る", + "message": "← Back to main menu", "description": "The label of the back button to return to main menu, inside the mobile navbar sidebar secondary menu (notably used to display the docs sidebar)" }, "theme.navbar.mobileVersionsDropdown.label": { - "message": "バージョン一覧", + "message": "Versions", "description": "The label for the navbar versions dropdown on mobile view" }, "theme.common.skipToMainContent": { - "message": "メインコンテンツにスキップ", + "message": "Skip to main content", "description": "The skip to content label used for accessibility, allowing to rapidly navigate to main content with keyboard tab/enter navigation" }, "theme.tags.tagsListLabel": { - "message": "タグ:", + "message": "Tags:", "description": "The label alongside a tag list" }, "theme.TOCCollapsible.toggleButtonLabel": { - "message": "このページ", + "message": "On this page", "description": "The label used by the button on the collapsible TOC component" }, "theme.navbar.mobileLanguageDropdown.label": { @@ -246,26 +246,26 @@ "description": "The label for the mobile language switcher dropdown" }, "theme.SearchBar.seeAll": { - "message": "{count}件の結果をすべて見る" + "message": "See all {count} results" }, "theme.SearchBar.label": { - "message": "検索", + "message": "Search", "description": "The ARIA label and placeholder for search button" }, "theme.SearchPage.documentsFound.plurals": { - "message": "1件のドキュメントが見つかりました|{count}件のドキュメントが見つかりました", + "message": "One document found|{count} documents found", "description": "Pluralized label for \"{count} documents found\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)" }, "theme.SearchPage.existingResultsTitle": { - "message": "\"{query}\"の検索結果", + "message": "Search results for \"{query}\"", "description": "The search page title for non-empty query" }, "theme.SearchPage.emptyResultsTitle": { - "message": "ドキュメントの検索", + "message": "Search the documentation", "description": "The search page title for empty query" }, "theme.SearchPage.inputPlaceholder": { - "message": "検索したい単語を入力", + "message": "Type your search here", "description": "The placeholder for search page input" }, "theme.SearchPage.inputLabel": { @@ -273,31 +273,31 @@ "description": "The ARIA label for search page input" }, "theme.SearchPage.algoliaLabel": { - "message": "Algoliaによる検索", + "message": "Search by Algolia", "description": "The ARIA label for Algolia mention" }, "theme.SearchPage.noResultsText": { - "message": "見つかりませんでした", + "message": "No results were found", "description": "The paragraph for empty search result" }, "theme.SearchPage.fetchingNewResults": { - "message": "新しい結果を取得中...", + "message": "Fetching new results...", "description": "The paragraph for fetching new search results" }, "theme.tags.tagsPageTitle": { - "message": "タグ", + "message": "Tags", "description": "The title of the tag list page" }, "theme.docs.breadcrumbs.home": { - "message": "ホームページ", + "message": "Home page", "description": "The ARIA label for the home page in the breadcrumbs" }, "theme.docs.breadcrumbs.navAriaLabel": { - "message": "パンくずリスト", + "message": "Breadcrumbs", "description": "The ARIA label for the breadcrumbs" }, "theme.CodeBlock.wordWrapToggle": { - "message": "Toggle word wrap 文字列の折り返しの切替", + "message": "Toggle word wrap", "description": "The title attribute for toggle word wrapping button of code block lines" }, "theme.admonition.note": { diff --git a/website/i18n/ja/docusaurus-plugin-content-blog/2021-09-27-v2-beta1-release-notes.mdx b/website/i18n/ja/docusaurus-plugin-content-blog/2021-09-27-v2-beta1-release-notes.mdx index 28201766d..d01b542b1 100644 --- a/website/i18n/ja/docusaurus-plugin-content-blog/2021-09-27-v2-beta1-release-notes.mdx +++ b/website/i18n/ja/docusaurus-plugin-content-blog/2021-09-27-v2-beta1-release-notes.mdx @@ -116,7 +116,7 @@ It also provides the additional features: In addition to this, a webserver will start on port 34115. This will serve your application to any browser that connects to it. All connected web browsers will respond to system events like hot reload on asset change. -In Go, we are used to dealing with structs in our applications. It's often useful to send structs to our frontend and use them as state in our application. In v1, this was a very manual process and a bit of a burden on the developer. I'm happy to announce that in v2, any application run in dev mode will automatically generate Typescript models for all structs that are input or output parameters to bound methods. This enables seamless interchange of data models between the two worlds. +In Go, we are used to dealing with structs in our applications. It's often useful to send structs to our frontend and use them as state in our application. In v1, this was a very manual process and a bit of a burden on the developer. I'm happy to announce that in v2, any application run in dev mode will automatically generate TypeScript models for all structs that are input or output parameters to bound methods. This enables seamless interchange of data models between the two worlds. In addition to this, another JS module is dynamically generated wrapping all your bound methods. This provides JSDoc for your methods, providing code completion and hinting in your IDE. It's really cool when you get data models auto-imported when hitting tab in an auto-generated module wrapping your Go code! diff --git a/website/i18n/ja/docusaurus-plugin-content-blog/2021-11-08-v2-beta2-release-notes.mdx b/website/i18n/ja/docusaurus-plugin-content-blog/2021-11-08-v2-beta2-release-notes.mdx index 76ae8c80a..86d44616f 100644 --- a/website/i18n/ja/docusaurus-plugin-content-blog/2021-11-08-v2-beta2-release-notes.mdx +++ b/website/i18n/ja/docusaurus-plugin-content-blog/2021-11-08-v2-beta2-release-notes.mdx @@ -74,7 +74,7 @@ It also provides the additional features: In addition to this, a webserver will start on port 34115. This will serve your application to any browser that connects to it. All connected web browsers will respond to system events like hot reload on asset change. -In Go, we are used to dealing with structs in our applications. It's often useful to send structs to our frontend and use them as state in our application. In v1, this was a very manual process and a bit of a burden on the developer. I'm happy to announce that in v2, any application run in dev mode will automatically generate Typescript models for all structs that are input or output parameters to bound methods. This enables seamless interchange of data models between the two worlds. +In Go, we are used to dealing with structs in our applications. It's often useful to send structs to our frontend and use them as state in our application. In v1, this was a very manual process and a bit of a burden on the developer. I'm happy to announce that in v2, any application run in dev mode will automatically generate TypeScript models for all structs that are input or output parameters to bound methods. This enables seamless interchange of data models between the two worlds. In addition to this, another JS module is dynamically generated wrapping all your bound methods. This provides JSDoc for your methods, providing code completion and hinting in your IDE. It's really cool when you get data models auto-imported when hitting tab in an auto-generated module wrapping your Go code! diff --git a/website/i18n/ja/docusaurus-plugin-content-blog/2022-02-22-v2-beta3-release-notes.mdx b/website/i18n/ja/docusaurus-plugin-content-blog/2022-02-22-v2-beta3-release-notes.mdx index eb7f2a46a..b405953cf 100644 --- a/website/i18n/ja/docusaurus-plugin-content-blog/2022-02-22-v2-beta3-release-notes.mdx +++ b/website/i18n/ja/docusaurus-plugin-content-blog/2022-02-22-v2-beta3-release-notes.mdx @@ -61,7 +61,7 @@ It also provides the additional features: In addition to this, a webserver will start on port 34115. This will serve your application to any browser that connects to it. All connected web browsers will respond to system events like hot reload on asset change. -In Go, we are used to dealing with structs in our applications. It's often useful to send structs to our frontend and use them as state in our application. In v1, this was a very manual process and a bit of a burden on the developer. I'm happy to announce that in v2, any application run in dev mode will automatically generate Typescript models for all structs that are input or output parameters to bound methods. This enables seamless interchange of data models between the two worlds. +In Go, we are used to dealing with structs in our applications. It's often useful to send structs to our frontend and use them as state in our application. In v1, this was a very manual process and a bit of a burden on the developer. I'm happy to announce that in v2, any application run in dev mode will automatically generate TypeScript models for all structs that are input or output parameters to bound methods. This enables seamless interchange of data models between the two worlds. In addition to this, another JS module is dynamically generated wrapping all your bound methods. This provides JSDoc for your methods, providing code completion and hinting in your IDE. It's really cool when you get data models auto-imported when hitting tab in an auto-generated module wrapping your Go code! diff --git a/website/i18n/ja/docusaurus-plugin-content-blog/2022-09-22-v2-release-notes.mdx b/website/i18n/ja/docusaurus-plugin-content-blog/2022-09-22-v2-release-notes.mdx index e9d570afa..c321f5042 100644 --- a/website/i18n/ja/docusaurus-plugin-content-blog/2022-09-22-v2-release-notes.mdx +++ b/website/i18n/ja/docusaurus-plugin-content-blog/2022-09-22-v2-release-notes.mdx @@ -45,7 +45,7 @@ The v2 release is a huge leap forward for the project, addressing many of the pa - A rich [runtime library](/docs/reference/runtime/intro) providing utility methods for window manipulation, eventing, dialogs, menus and logging. - Support for [obfuscating](/docs/guides/obfuscated) your application using [garble](https://github.com/burrowers/garble). - Support for compressing your application using [UPX](https://upx.github.io/). -- Automatic Typescript generation of Go structs. More info [here](/docs/howdoesitwork#calling-bound-go-methods). +- Automatic TypeScript generation of Go structs. More info [here](/docs/howdoesitwork#calling-bound-go-methods). - No extra libraries or DLLs are required to be shipped with your application. For any platform. - No requirement to bundle frontend assets. Just develop your application like any other web application. diff --git a/website/i18n/ja/docusaurus-plugin-content-blog/options.json b/website/i18n/ja/docusaurus-plugin-content-blog/options.json index 7abfbdd67..e694b4c2c 100644 --- a/website/i18n/ja/docusaurus-plugin-content-blog/options.json +++ b/website/i18n/ja/docusaurus-plugin-content-blog/options.json @@ -8,7 +8,7 @@ "description": "The description for the blog used in SEO" }, "sidebar.title": { - "message": "最近の投稿", + "message": "Recent posts", "description": "The label for the left sidebar" } } diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/current.json b/website/i18n/ja/docusaurus-plugin-content-docs/current.json index b5600edee..4d38c25fb 100644 --- a/website/i18n/ja/docusaurus-plugin-content-docs/current.json +++ b/website/i18n/ja/docusaurus-plugin-content-docs/current.json @@ -1,6 +1,6 @@ { "version.label": { - "message": "次のバージョン 🚧", + "message": "Next Version 🚧", "description": "The label for version current" }, "sidebar.docs.category.Getting Started": { diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/current/community/links.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/current/community/links.mdx index 3397da7c1..c9a5192df 100644 --- a/website/i18n/ja/docusaurus-plugin-content-docs/current/community/links.mdx +++ b/website/i18n/ja/docusaurus-plugin-content-docs/current/community/links.mdx @@ -2,25 +2,25 @@ sidebar_position: 2 --- -# Links +# リンク -This page serves as a list for community related links. Please submit a PR (click `Edit this page` at the bottom) to submit links. +このページは、コミュニティ関連のリンクの一覧です。 リンクを追加したい場合は、プルリクエストを送信(ページ下部の`このページを編集`をクリック) してください。 ## Awesome Wails -The [definitive list](https://github.com/wailsapp/awesome-wails) of links related to Wails. +Wailsに関する[最高のリンク一覧](https://github.com/wailsapp/awesome-wails)です。 -## Support Channels +## サポートチャネル - [Gophers Slack Channel](https://gophers.slack.com/messages/CJ4P9F7MZ/) - [Gophers Slack Channel Invite](https://invite.slack.golangbridge.org/) - [Github Issues](https://github.com/wailsapp/wails/issues) -- [v2 Beta Discussion Board](https://github.com/wailsapp/wails/discussions/828) +- [v2ベータディスカッションボード](https://github.com/wailsapp/wails/discussions/828) -## Social Media +## ソーシャルメディア - [Twitter](https://twitter.com/wailsapp) -- [Wails Chinese Community QQ Group](https://qm.qq.com/cgi-bin/qm/qr?k=PmIURne5hFGNd7QWzW5qd6FV-INEjNJv&jump_from=webapi) - Group number: 1067173054 +- [Wails中国語コミュニティQQグループ](https://qm.qq.com/cgi-bin/qm/qr?k=PmIURne5hFGNd7QWzW5qd6FV-INEjNJv&jump_from=webapi) - グループナンバー: 1067173054 ## その他のチュートリアルや記事 - [掲示板を作ってみる](https://blog.customct.com/building-bulletin-board) diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/current/community/showcase/filehound.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/current/community/showcase/filehound.mdx index 134365aaf..bc569c3fe 100644 --- a/website/i18n/ja/docusaurus-plugin-content-docs/current/community/showcase/filehound.mdx +++ b/website/i18n/ja/docusaurus-plugin-content-docs/current/community/showcase/filehound.mdx @@ -13,4 +13,4 @@ The FileHound Export Utility allows FileHound Administrators the ability to run Backend built with: Go 1.15 Wails 1.11.0 go-sqlite3 1.14.6 go-linq 3.2 -Frontend with: Vue 2.6.11 Vuex 3.4.0 Typescript Tailwind 1.9.6 +Frontend with: Vue 2.6.11 Vuex 3.4.0 TypeScript Tailwind 1.9.6 diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/current/gettingstarted/development.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/current/gettingstarted/development.mdx index b26c3c546..5fbc7ab19 100644 --- a/website/i18n/ja/docusaurus-plugin-content-docs/current/gettingstarted/development.mdx +++ b/website/i18n/ja/docusaurus-plugin-content-docs/current/gettingstarted/development.mdx @@ -7,8 +7,8 @@ sidebar_position: 5 プロジェクトディレクトリのルート上で`wails dev`コマンドを実行すると、アプリを開発モードで起動することができます。 コマンドを実行すると下記の処理が実行されます: - アプリをビルドしたのち、起動する -- Goのコードをフロントエンドにバインドし、Javascriptから呼び出せるようにする -- Using the power of [Vite](https://vitejs.dev/), will watch for modifications in your Go files and rebuild/re-run on change +- Goのコードをフロントエンドにバインドして、JavaScriptから呼び出せるようにする +- [Vite](https://vitejs.dev/)の機能を使用して、Goファイルの変更を監視し、変更された際には自動的にリビルド/再起動する - ブラウザからアプリを操作できるようにする[Webサーバ](http://localhost:34115)を立ち上げる。 これにより、任意のブラウザ拡張機能を利用できる。 JavascriptのコンソールからGoのコードを呼び出すこともできる アプリ開発を始めるときは、プロジェクトディレクトリ上で`wails dev`コマンドを実行しましょう。 詳しくは、[こちら](../reference/cli.mdx#dev)をご覧ください。 diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/current/gettingstarted/firstproject.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/current/gettingstarted/firstproject.mdx index 8ce6453d7..2b31589d2 100644 --- a/website/i18n/ja/docusaurus-plugin-content-docs/current/gettingstarted/firstproject.mdx +++ b/website/i18n/ja/docusaurus-plugin-content-docs/current/gettingstarted/firstproject.mdx @@ -26,61 +26,61 @@ import TabItem from "@theme/TabItem"; ]} > - Generate a Svelte project using Javascript with:

+ Generate a Svelte project using JavaScript with:

wails init -n myproject -t svelte -If you would rather use Typescript:
+If you would rather use TypeScript:
wails init -n myproject -t svelte-ts
- Generate a React project using Javascript with:

+ Generate a React project using JavaScript with:

wails init -n myproject -t react -If you would rather use Typescript:
+If you would rather use TypeScript:
wails init -n myproject -t react-ts
- Generate a Vue project using Javascript with:

+ Generate a Vue project using JavaScript with:

wails init -n myproject -t vue -If you would rather use Typescript:
+If you would rather use TypeScript:
wails init -n myproject -t vue-ts
- Generate a Preact project using Javascript with:

+ Generate a Preact project using JavaScript with:

wails init -n myproject -t preact -If you would rather use Typescript:
+If you would rather use TypeScript:
wails init -n myproject -t preact-ts
- Generate a Lit project using Javascript with:

+ Generate a Lit project using JavaScript with:

wails init -n myproject -t lit -If you would rather use Typescript:
+If you would rather use TypeScript:
wails init -n myproject -t lit-ts
- Generate a Vanilla project using Javascript with:

+ Generate a Vanilla project using JavaScript with:

wails init -n myproject -t vanilla -If you would rather use Typescript:
+If you would rather use TypeScript:
wails init -n myproject -t vanilla-ts diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/current/gettingstarted/installation.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/current/gettingstarted/installation.mdx index 5a698f1a7..060d6c46c 100644 --- a/website/i18n/ja/docusaurus-plugin-content-docs/current/gettingstarted/installation.mdx +++ b/website/i18n/ja/docusaurus-plugin-content-docs/current/gettingstarted/installation.mdx @@ -84,6 +84,6 @@ go version `wails doctor`を実行すると、必要な依存関係が正しくインストールされているかを確認することができます。 正しくインストールされていない場合は、その内容をあなたにお知らせして、どうすれば解決できるかを教えてくれます。 -## `wails`コマンドが見つからないのですが? +## The `wails` command appears to be missing? -`wails`コマンドが見つからないとシステムに怒られた場合は、Goが、公式のGoインストール手順に従って導入されているかを確認してください。 コマンドが見つからないほとんどの理由は、あなたのホームディレクトリ配下にある`go/bin`ディレクトリのパスが、`PATH`環境変数に含まれていないからです。 また、インストールによって行われた環境変更を反映させるために、もともと開いていたコマンドプロンプト(ターミナル)がある場合はそれらをいったん閉じて、再度開きなおしてください。 +If your system is reporting that the `wails` command is missing, make sure you have followed the Go installation guide correctly. Normally, it means that the `go/bin` directory in your User's home directory is not in the `PATH` environment variable. You will also normally need to close and reopen any open command prompts so that changes to the environment made by the installer are reflected at the command prompt. diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/current/guides/frameless.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/current/guides/frameless.mdx index 3845736f4..b6218d81e 100644 --- a/website/i18n/ja/docusaurus-plugin-content-docs/current/guides/frameless.mdx +++ b/website/i18n/ja/docusaurus-plugin-content-docs/current/guides/frameless.mdx @@ -1,8 +1,8 @@ -# Frameless Applications +# フレームレスアプリケーション -Wails supports application that have no frames. This can be achieved by using the [frameless](../reference/options.mdx#frameless) field in [Application Options](../reference/options.mdx#application-options). +Wailsでは、フレームのないアプリケーションの作成をサポートしています。 [アプリケーションオプション](../reference/options.mdx#application-options)の[frameless](../reference/options.mdx#frameless)フィールドで設定することが可能です。 -Wails offers a simple solution for dragging the window: Any HTML element that has the CSS style `--wails-draggable:drag` will act as a "drag handle". This property applies to all child elements. If you need to indicate that a nested element should not drag, then use the attribute '--wails-draggable:no-drag' on that element. +Wailsでは、フレームレスウィンドウをドラッグできるようにするための簡単な仕組みを提供しています。`--wails-draggable:drag`というCSSスタイルをもつ任意のHTML要素は、"ドラッグハンドル"として機能します。 このプロパティは、すべての子要素にも継承されます。 ネストされている子要素で、ドラッグを明示的に無効化したい場合は、当該子要素で'--wails-draggable:no-drag'を指定します。 ```html @@ -23,7 +23,7 @@ Wails offers a simple solution for dragging the window: Any HTML element that ha ``` -For some projects, using a CSS variable may not be possible due to dynamic styling. In this case, you can use the `CSSDragProperty` and `CSSDragValue` application options to define a property and value that will be used to indicate draggable regions: +一部のプロジェクトでは、動的なスタイリングが原因で、これらのCSSプロパティが使用できない場合があるでしょう。 そのような場合、アプリケーションオプションの`CSSDragProperty`および`CSSDragValue`を使用して、ドラッグ可能な領域を示すプロパティ名と値を独自に定義することができます。 ```go title=main.go package main @@ -40,10 +40,10 @@ import ( var assets embed.FS func main() { - // Create an instance of the app structure + // アプリケーション構造体のインスタンスを作成 app := NewApp() - // Create application with options + // オプション付きでアプリケーションを作成 err := wails.Run(&options.App{ Title: "alwaysontop", Width: 1024, @@ -80,8 +80,8 @@ func main() { ``` -:::info Fullscreen +:::info フルスクリーン -If you allow your application to go fullscreen, this drag functionality will be disabled. +アプリケーションをフルスクリーン状態にすると、このドラッグ機能は無効になります。 ::: diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/current/guides/frontend.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/current/guides/frontend.mdx index 10a8b3e3e..ac087ee45 100644 --- a/website/i18n/ja/docusaurus-plugin-content-docs/current/guides/frontend.mdx +++ b/website/i18n/ja/docusaurus-plugin-content-docs/current/guides/frontend.mdx @@ -38,7 +38,7 @@ To provide more flexibility to developers, there is a meta tag that may be used The options are as follows: -| 値 | Description | +| Value | Description | | ------------------- | ------------------------------------------------ | | noautoinjectruntime | Disable the autoinjection of `/wails/runtime.js` | | noautoinjectipc | Disable the autoinjection of `/wails/ipc.js` | diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/current/guides/ides.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/current/guides/ides.mdx index f74282283..daf0c4802 100644 --- a/website/i18n/ja/docusaurus-plugin-content-docs/current/guides/ides.mdx +++ b/website/i18n/ja/docusaurus-plugin-content-docs/current/guides/ides.mdx @@ -1,8 +1,8 @@ -# IDEs +# 統合開発環境 -Wails aims to provide a great development experience. To that aim, we now support generating IDE specific configuration to provide smoother project setup. +Wailsでは、優れた開発体験の提供を目指しています。 その一環として、統合開発環境特有の構成設定の生成をサポートしており、より快適にプロジェクトをセットアップできるようになっています。 -Currently, we support [Visual Studio Code](https://code.visualstudio.com/) but aim to support other IDEs such as Goland. +現在は[Visual Studio Code](https://code.visualstudio.com/)をサポートしていますが、今後、Golandなど他の統合開発環境もサポートしていく予定です。 ## Visual Studio Code @@ -15,9 +15,9 @@ Currently, we support [Visual Studio Code](https://code.visualstudio.com/) but a

``` -When generating a project using the `-ide vscode` flags, IDE files will be created alongside the other project files. These files are placed into the `.vscode` directory and provide the correct configuration for debugging your application. +プロジェクト生成時のコマンドに`-ide vscode`フラグを付与すると、統合開発環境用の構成ファイルが、他のプロジェクトファイルと共に作成されます。 これらのファイルは`.vscode`ディレクトリ内に配置され、アプリケーションをデバッグするための正しい構成設定が記述されています。 -The 2 files generated are `tasks.json` and `launch.json`. Below are the files generated for the default vanilla project: +生成されるのは`tasks.json`ファイルおよび`launch.json`ファイルの2つです。 デフォルトのバニラプロジェクトの場合、次のような内容となります: ```json title="tasks.json" { @@ -62,9 +62,9 @@ The 2 files generated are `tasks.json` and `launch.json`. Below are the files ge } ``` -### Configuring the install and build steps +### インストールおよびビルドステップの構成 -The `tasks.json` file is simple for the default project as there is no `npm install` or `npm run build` step needed. For projects that have a frontend build step, such as the svelte template, we would need to edit `tasks.json` to add the install and build steps: +デフォルトのプロジェクトでは、`npm install`や`npm run build`などのステップが必要ないため、`tasks.json`ファイルの内容なシンプルなものになっています。 Svelteテンプレートのように、フロントエンドのビルドステップが必要なプロジェクトの場合、`tasks.json`を編集して、インストールおよびビルドのステップを追加する必要があります。 ```json title="tasks.json" { @@ -120,8 +120,8 @@ The `tasks.json` file is simple for the default project as there is no `npm inst } ``` -:::info Future Enhancement +今後の機能強化予定 -In the future, we hope to generate a `tasks.json` that includes the install and build steps automatically. +将来的に、インストールおよびビルドステップを含んだ`tasks.json`を自動生成できるように計画しています。 ::: diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/current/guides/linux-distro-support.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/current/guides/linux-distro-support.mdx index 8b25c1575..b2e4bd18a 100644 --- a/website/i18n/ja/docusaurus-plugin-content-docs/current/guides/linux-distro-support.mdx +++ b/website/i18n/ja/docusaurus-plugin-content-docs/current/guides/linux-distro-support.mdx @@ -96,8 +96,8 @@ type PackageManager interface { Take a look at the other package managers code to get an idea how this works. -:::info Remember +:::info リマインド -If you add support for a new package manager, don't forget to also update this page! +新しいパッケージマネージャを追加した場合は、このページも忘れずに更新してください。 ::: diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/current/guides/migrating.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/current/guides/migrating.mdx index 9915e2305..7123cbe6b 100644 --- a/website/i18n/ja/docusaurus-plugin-content-docs/current/guides/migrating.mdx +++ b/website/i18n/ja/docusaurus-plugin-content-docs/current/guides/migrating.mdx @@ -118,7 +118,7 @@ The _biggest_ change in v2 is how assets are handled. In v1, assets were passed via 2 application options: -- `JS` - The application's Javascript +- `JS` - The application's JavaScript - `CSS` - The application's CSS This meant that the responsibility of generating a single JS and CSS file was on the developer. This essentially required the use of complicated packers such as webpack. diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/current/guides/obfuscated.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/current/guides/obfuscated.mdx index b3a15b4ca..21f7875e3 100644 --- a/website/i18n/ja/docusaurus-plugin-content-docs/current/guides/obfuscated.mdx +++ b/website/i18n/ja/docusaurus-plugin-content-docs/current/guides/obfuscated.mdx @@ -26,7 +26,7 @@ To ensure that your application will work in obfuscated mode, you must use the g ::: -## 例 +## Example Importing the "Greet" method from the bindings like this: diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/current/guides/signing.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/current/guides/signing.mdx index 177c465a5..4c7cf45ba 100644 --- a/website/i18n/ja/docusaurus-plugin-content-docs/current/guides/signing.mdx +++ b/website/i18n/ja/docusaurus-plugin-content-docs/current/guides/signing.mdx @@ -353,22 +353,33 @@ jobs: # 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. - - name: Get Wails - run: go install github.com/wailsapp/wails/v2/cmd/wails@latest - - name: Build Wails app - run: | - wails build - - name: MacOS download gon for code signing and app notarization + p12-password: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_PASSWORD }} + - name: Sign our macOS binary if: matrix.platform == 'macos-latest' run: | - brew install mitchellh/gon/gon - - name: Import Code-Signing Certificates for macOS + echo "Signing Package" + gon -log-level=info ./build/darwin/gon-sign.json + - name: Sign Windows binaries + if: matrix.platform == 'windows-latest' + run: | + echo "Creating certificate file" + New-Item -ItemType directory -Path certificate + 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\Monitor.exe + - name: upload artifacts macOS if: matrix.platform == 'macos-latest' - uses: Apple-Actions/import-codesign-certs@v1 + uses: actions/upload-artifact@v2 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. + name: wails-binaries-macos + path: build/bin/* + - name: upload artifacts windows + if: matrix.platform == 'windows-latest' + uses: actions/upload-artifact@v2 + with: + name: wails-binaries-windows + path: build/bin/* ``` # End notes diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/current/guides/templates.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/current/guides/templates.mdx index e8833fd8d..790e3107f 100644 --- a/website/i18n/ja/docusaurus-plugin-content-docs/current/guides/templates.mdx +++ b/website/i18n/ja/docusaurus-plugin-content-docs/current/guides/templates.mdx @@ -1,4 +1,4 @@ -# テンプレート +# Templates Wails generates projects from pre-created templates. In v1, this was a difficult to maintain set of projects that were subject to going out of date. In v2, to empower the community, a couple of new features have been added for templates: diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/current/guides/troubleshooting.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/current/guides/troubleshooting.mdx index 250e84e94..3dac05f5f 100644 --- a/website/i18n/ja/docusaurus-plugin-content-docs/current/guides/troubleshooting.mdx +++ b/website/i18n/ja/docusaurus-plugin-content-docs/current/guides/troubleshooting.mdx @@ -105,9 +105,9 @@ go env -w GOPROXY=https://goproxy.cn,direct Source: https://github.com/wailsapp/wails/issues/1233 -## The generated Typescript doesn't have the correct types +## 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. 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). ## When I navigate away from `index.html`, I am unable to call methods on the frontend diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/current/howdoesitwork.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/current/howdoesitwork.mdx index 266f4bcf9..670b72d5d 100644 --- a/website/i18n/ja/docusaurus-plugin-content-docs/current/howdoesitwork.mdx +++ b/website/i18n/ja/docusaurus-plugin-content-docs/current/howdoesitwork.mdx @@ -4,7 +4,7 @@ sidebar_position: 20 # どうやって動いているの? -Wailsは、webkitフロントエンドを備えた、何の変哲もないGoアプリです。 アプリ全体のうちGoの部分は、アプリのコードと、ウィンドウ制御などの便利な機能を提供するランタイムライブラリで構成されています。 フロントエンドはwebkitウィンドウであり、フロンドエンドアセットをウィンドウ上に表示します。 フロントエンドからも、Javascriptでランタイムライブラリを呼び出すことができます。 そして最終的に、Goのメソッドはフロントエンドにバインドされ、ローカルのJavascriptメソッドであるかのように、フロントエンドから呼び出すことができます。 +Wailsは、webkitフロントエンドを備えた、何の変哲もないGoアプリです。 アプリ全体のうちGoの部分は、アプリのコードと、ウィンドウ制御などの便利な機能を提供するランタイムライブラリで構成されています。 フロントエンドはwebkitウィンドウであり、フロンドエンドアセットをウィンドウ上に表示します。 Also available to the frontend is a JavaScript version of the runtime library. Finally, it is possible to bind Go methods to the frontend, and these will appear as JavaScript methods that can be called, just as if they were local JavaScript methods. ```mdx-code-block
@@ -14,7 +14,7 @@ Wailsは、webkitフロントエンドを備えた、何の変哲もないGoア ## アプリのメインコード -### Overview +### 概要 アプリは、`wails.Run()`メソッドを1回呼び出すことで、構成することができます。 このメソッドで、アプリのウィンドウサイズやウィンドウタイトル、使用アセットなどを指定することができます。 基本的なアプリを作るコードは次のとおりです: @@ -84,7 +84,7 @@ func (b *App) Greet(name string) string { 設定可能なすべてのオプションについては、[オプションのリファレンス](reference/options)をご覧ください。 -#### Assets +#### アセット Wailsでフロントエンドアセット無しのアプリを作成することはできないため、`Assets`オプションは必須オプションです。 アセットには、一般的なWebアプリケーションでよく見かけるような、html、js、css、svg、pngなどのファイルを含めることができます。**アセットバンドルを生成する必要は一切なく**、そのままのファイルを使用できます。 アプリが起動すると、アセット内の`index.html`が読み込まれます。この時点で、フロントエンドはブラウザとして動作するようになります。 `embed.FS`を使ってアセットファイルが格納されたディレクトリを指定しますが、ディレクトリの場所はどこでも構いません。 embedで指定するパスは、`frontend/dist`のように、アプリのメインコードから相対的に見たディレクトリパスになります: @@ -103,13 +103,13 @@ var assets embed.FS #### アプリのライフサイクル -フロントエンドが`index.html`を読み込もうとする直前に、[OnStartup](reference/options.mdx#onstartup)で指定されたメソッドがコールバックされます。 A standard Go context is passed to this method. このメソッドに引数で渡されるContextは、今後、Wailsのラインタイムを呼び出すときに必要になるため、通常は、このContextへの参照を保持しておいてください。 同様に、アプリがシャットダウンされる直前には、[OnShutdown](reference/options.mdx#onshutdown)で指定されたコールバックが呼び出され、Contextも渡されます。 `index.html`に含まれるすべてのアセットが読み込み終わったときに呼び出される[OnDomReady](reference/options.mdx#ondomready)コールバックもあります。これは、Javascriptの[`body onload`](https://www.w3schools.com/jsref/event_onload.asp)イベントと同等のものです。 また、[OnBeforeClose](reference/options.mdx#onbeforeclose)を指定すると、ウィンドウを閉じる(またはアプリを終了する)イベントにフックさせることもできます。 +フロントエンドが`index.html`を読み込もうとする直前に、[OnStartup](reference/options.mdx#onstartup)で指定されたメソッドがコールバックされます。 A standard Go context is passed to this method. このメソッドに引数で渡されるContextは、今後、Wailsのラインタイムを呼び出すときに必要になるため、通常は、このContextへの参照を保持しておいてください。 同様に、アプリがシャットダウンされる直前には、[OnShutdown](reference/options.mdx#onshutdown)で指定されたコールバックが呼び出され、Contextも渡されます。 There is also an [OnDomReady](reference/options.mdx#ondomready) callback for when the frontend has completed loading all assets in `index.html` and is equivalent of the [`body onload`](https://www.w3schools.com/jsref/event_onload.asp) event in JavaScript. また、[OnBeforeClose](reference/options.mdx#onbeforeclose)を指定すると、ウィンドウを閉じる(またはアプリを終了する)イベントにフックさせることもできます。 #### メソッドのバインド -`Bind`オプションは、Wailsアプリで最も重要なオプションの1つです。 このオプションでは、フロントエンドに公開する、構造体のメソッドを指定することができます。 構造体は、従来のWebアプリにおける"コントローラ"の立ち位置であるとお考えください。 アプリが起動すると、`Bind`オプションで指定されている構造体を対象に、その中にあるパブリックメソッド(大文字で始まるメソッド名)を探します。そして、フロントエンドのコードからそれらのメソッドを呼び出せるJavascriptが生成されます。 +`Bind`オプションは、Wailsアプリで最も重要なオプションの1つです。 このオプションでは、フロントエンドに公開する、構造体のメソッドを指定することができます。 構造体は、従来のWebアプリにおける"コントローラ"の立ち位置であるとお考えください。 When the application starts, it examines the struct instances listed in the `Bind` field in the options, determines which methods are public (starts with an uppercase letter) and will generate JavaScript versions of those methods that can be called by the frontend code. -:::info 備考 +:::info Note Wailsで構造体を正しくバインドするためには、構造体の*インスタンス*をオプションで指定してください。 @@ -184,15 +184,15 @@ func (a *App) Greet(name string) string { `wails dev`コマンド(または、`wails generate module`コマンド)を実行すると、以下のものを含むフロントエンドモジュールが生成されます: -- バインドされたすべてのメソッドのJavascript -- バインドされたすべてのメソッドのTypescript宣言 -- バインドされたメソッドの引数または返り値で使用されているGoの構造体のTypescript宣言 +- JavaScript bindings for all bound methods +- TypeScript declarations for all bound methods +- TypeScript definitions for all Go structs used as inputs or outputs by the bound methods これにより、強力な型付けがなされたデータ構造を使用して、フロントエンドから簡単にGoのコードを呼び出すことができます。 ## フロントエンド -### Overview +### 概要 フロントエンドは、webkitによってレンダリングされるファイル群です。 ブラウザとWebサーバが一体となったような動きをします。 使用できるフレームワークやライブラリの制限はほぼありません[^1]。 フロントエンドとGoコードとの相互のやり取りについて、主なポイントは次のとおりです: @@ -201,7 +201,7 @@ func (a *App) Greet(name string) string { ### バインドされたGoメソッドの呼び出し -`wails dev`コマンドでアプリを起動すると、Go構造体のJavascriptバインディングが`wailsjs/go`ディレクトリに自動的に生成されます(`wails generate module`コマンドでも生成可能)。 生成されたファイルには、アプリ内のGoパッケージ名が反映されています。 先の例では、`Greet`というパブリックメソッドを持つ`app`をバインドしていました。 この場合、次のようなファイルが生成されることになります: +When you run your application with `wails dev`, it will automatically generate JavaScript bindings for your structs in a directory called `wailsjs/go` (You can also do this by running `wails generate module`). 生成されたファイルには、アプリ内のGoパッケージ名が反映されています。 先の例では、`Greet`というパブリックメソッドを持つ`app`をバインドしていました。 この場合、次のようなファイルが生成されることになります: ```bash wailsjs @@ -211,7 +211,7 @@ wailsjs └─App.js ``` -ご覧のとおり、`main`パッケージ内の`App`構造体Javascriptバインディングが、それらのメソッドのTypescript型定義と並んで生成されていることが分かります。 フロントエンドから`Greet`メソッドを呼び出すには、単純にメソッドをインポートし、通常のJavascript関数と同じように呼び出してください: +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: ```javascript // ... @@ -224,27 +224,27 @@ import {Greet} from '../wailsjs/go/main/App' } ``` -Typescript型定義ファイルは、バインドされたメソッドの正しい型を提供します: +The TypeScript declaration file gives you the correct types for the bound methods: ```ts export function Greet(arg1: string): Promise; ``` -生成されたメソッドはPromiseを返すようになっています。 呼び出しが成功すると、Goからの1番目の返り値が`resolve`ハンドラに渡されます。 呼び出しに失敗したとみなされるのは、Goメソッドの2番目の返り値がerror型で、それがerrorインスタンスを返したときです。 これは、`reject`ハンドラを介して返されます。 先の例では、`Greet`メソッドは`string`型の返り値のみであるため、無効なデータが渡されない限り、Javascript側でrejectハンドラが呼ばれることはありません。 +生成されたメソッドはPromiseを返すようになっています。 呼び出しが成功すると、Goからの1番目の返り値が`resolve`ハンドラに渡されます。 呼び出しに失敗したとみなされるのは、Goメソッドの2番目の返り値がerror型で、それがerrorインスタンスを返したときです。 これは、`reject`ハンドラを介して返されます。 In the example above, `Greet` only returns a `string` so the JavaScript call will never reject - unless invalid data is passed to it. -すべてのデータ型は、GoとJavascriptの間で正しく解釈されます。 もちろん構造体も正しく解釈されます。 Goから構造体が返された場合、フロントエンドにはJavascriptのクラスとして返されます。 +All data types are correctly translated between Go and JavaScript. もちろん構造体も正しく解釈されます。 If you return a struct from a Go call, it will be returned to your frontend as a JavaScript class. -:::info 備考 +:::info Note -Struct fields *must* have a valid `json` tag to be included in the generated Typescript. +Struct fields *must* have a valid `json` tag to be included in the generated TypeScript. -Anonymous nested structs are not supported at this time. +ネストされた匿名構造体(無名構造体) は、現時点ではサポートされていません。 ::: -Goに対して引数として構造体を渡すこともできます。 構造体として取り扱ってほしいJavascriptのマップやクラスを渡すと、構造体に変換されます。 あなたが簡単にこれらのことを把握できるように、`dev`モードでは、バウンドされたGoメソッドで使用されている全構造体の型が定義された、Typescriptモジュールが生成されます。 このモジュールを使用すると、Javascriptネイティブなオブジェクトを構築し、Goコードへ送信することができます。 +Goに対して引数として構造体を渡すこともできます。 Any JavaScript map/class passed as an argument that is expecting a struct, will be converted to that struct type. あなたが簡単にこれらのことを把握できるように、`dev`モードでは、バウンドされたGoメソッドで使用されている全構造体の型が定義された、Typescriptモジュールが生成されます。 Using this module, it's possible to construct and send native JavaScript objects to the Go code. -There is also support for Go methods that use structs in their signature. バインドされたメソッドで、引数または返り値として指定されているすべてのGo構造体は、Goのコードラッパーモジュールの一部として生成されたTypescript定義を持っています。 これらを使用することで、GoとJavascriptの間で、同じデータモデルを共有できます。 +また、シグネチャに構造体を使用するGoメソッドもサポートされています。 All Go structs specified by a bound method (either as parameters or return types) will have TypeScript versions auto generated as part of the Go code wrapper module. Using these, it's possible to share the same data model between Go and JavaScript. 例: `Greet`メソッドを更新して、文字列型の代わりに`Person`型を引数で受け付けてみる: @@ -358,7 +358,7 @@ function generate() { ### ランタイムメソッドの呼び出し -Javascriptランタイムは`window.runtime`に存在し、イベント発行やロギングなど、さまざまなタスクを実行するためのメソッドが含まれています: +The JavaScript runtime is located at `window.runtime` and contains many methods to do various tasks such as emit an event or perform logging operations: ```js title="mycode.js" window.runtime.EventsEmit("my-event", 1); diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/current/introduction.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/current/introduction.mdx index 6ef967609..7f10a321f 100644 --- a/website/i18n/ja/docusaurus-plugin-content-docs/current/introduction.mdx +++ b/website/i18n/ja/docusaurus-plugin-content-docs/current/introduction.mdx @@ -8,16 +8,16 @@ Wailsは、Go言語とWeb技術を使用して、デスクトップアプリの "Goの力によって、Electronが軽量かつ高速になったようなもの"、と考えるとよいでしょう。 Goの柔軟性とパワーに、リッチでモダンなフロントエンドを組み合わせたアプリを、簡単に構築することができます。 -### Features +### 特徴 -- Native Menus, Dialogs, Theming and Translucency -- Windows, macOS and linux support -- Built in templates for Svelte, React, Preact, Vue, Lit and Vanilla JS -- Easily call Go methods from Javascript -- Automatic Go struct to Typescript model generation -- No CGO or external DLLs required on Windows +- ネイティブなメニュー、ダイアログ、テーマ、透過処理を使用可能です +- Windows、macOS、Linuxをサポートしています +- Svelte、React、Preact、Vue、Lit、バニラJS向けにビルトインテンプレートを用意しています +- Easily call Go methods from JavaScript +- Automatic Go struct to TypeScript model generation +- WindowsにおいてCGOや外部DLLは必要ありません - [Vite](https://vitejs.dev/)の力を利用したライブ開発が可能です -- Powerful CLI to easily Create, Build and Package applications +- アプリケーションを簡単に作成、ビルド、パッケージングするための強力なCLIを備えています - 豊富な[ランタイムライブラリ](/docs/reference/runtime/intro)を用意しています - Wailsで構築されたアプリケーションは、Apple StoreおよびMicrosoft Storeに準拠しています @@ -36,7 +36,7 @@ Wailsは、Go言語とWeb技術を使用して、デスクトップアプリの ### クイックスタートテンプレート -Wailsには、アプリの開発をすばやく始められるように、多数のテンプレートが用意されています。 Svelte、React、Vue、Preact、LitおよびVanilla用で、それぞれのテンプレートがあります。 各テンプレートには、Javascript版とTypescript版が用意されています。 +Wailsには、アプリの開発をすばやく始められるように、多数のテンプレートが用意されています。 Svelte、React、Vue、Preact、LitおよびVanilla用で、それぞれのテンプレートがあります。 There are both JavaScript and TypeScript versions for each template. ### ネイティブ要素 @@ -44,13 +44,13 @@ Wailsは、ウィンドウ、メニュー、ダイアログなどのネイティ **ブラウザを埋め込まないため**、無駄なリソースを割きません。 ブラウザを埋め込まない代わりに、OSプラットフォームのネイティブなレンダリングエンジンを使用します。 例えばWindowsの場合、Chromium上でビルトされているMicrosoft Webview2ライブラリを使用します。 -### GoとJavascriptのやり取り +### Go & JavaScript Interoperability -Wailsは自動的に、GoのメソッドをJavascriptから利用できるようにするので、フロントエンドからGoのメソッド名を呼び出すことができます。 It even generates Typescript models for the structs used by your Go methods, so you can pass the same data structures between Go and Javascript. +Wails automatically makes your Go methods available to JavaScript, so you can call them by name from your frontend! It even generates TypeScript models for the structs used by your Go methods, so you can pass the same data structures between Go and JavaScript. ### ランタイムライブラリ -WailsはGoとJavascriptの両方にランタイムライブラリを提供し、イベント、ロギング、ダイアログなど、モダンなアプリに必要な多くの機能を使うことができます。 +Wails provides a runtime library, for both Go and JavaScript, that handles a lot of the things modern applications need, like Eventing, Logging, Dialogs, etc. ### ライブ開発 @@ -64,7 +64,7 @@ WailsはGoとJavascriptの両方にランタイムライブラリを提供し、 #### ブラウザを使った開発 -If you prefer to debug and develop in a browser then Wails has you covered. ブラウザでのデバッグや開発も、Wailsにお任せください。 起動中のアプリはWebサーバを兼ねており、お好きなブラウザから接続してアプリを操作することができます。 プログラムアセットが書き換わった時はすぐに更新されます。 +ブラウザでのデバッグや開発も、Wailsにお任せください。 起動中のアプリはWebサーバを兼ねており、お好きなブラウザから接続してアプリを操作することができます。 プログラムアセットが書き換わった時はすぐに更新されます。 ### 本番用のネイティブバイナリ diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/current/reference/cli.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/current/reference/cli.mdx index 527aa641e..61a992b05 100644 --- a/website/i18n/ja/docusaurus-plugin-content-docs/current/reference/cli.mdx +++ b/website/i18n/ja/docusaurus-plugin-content-docs/current/reference/cli.mdx @@ -4,77 +4,77 @@ sidebar_position: 2 # CLI -The Wails CLI has a number of commands that are used for managing your projects. All commands are run in the following way: +WailsのCLIには、プロジェクトの管理に使用できるコマンドが多数あります。 すべてのコマンドは次の文法で実行できます: -`wails ` +`wails <コマンド> <フラグ>` ## init -`wails init` is used for generating projects. +`wails init`はプロジェクトの生成に使用します。 -| Flag | Description | Default | -|:------------------ |:----------------------------------------------------------------------------------------------------------------------- |:-------------------:| -| -n "project name" | Name of the project. **Mandatory**. | | -| -d "project dir" | Project directory to create | Name of the project | -| -g | Initialise git repository | | -| -l | List available project templates | | -| -q | Suppress output to console | | -| -t "template name" | The project template to use. This can be the name of a default template or a URL to a remote template hosted on github. | vanilla | -| -ide | Generate IDE project files | | -| -f | Force build application | false | +| フラグ | Description | デフォルト | +|:----------------- |:----------------------------------------------------------------------------- |:-------:| +| -n "プロジェクト名" | プロジェクトの名前。 **必須項目**。 | | +| -d "プロジェクトディレクトリ" | 作成するプロジェクトディレクトリ | プロジェクト名 | +| -g | gitリポジトリを初期化する | | +| -l | 利用可能なプロジェクトテンプレート一覧を表示 | | +| -q | コンソールへの出力を抑止 | | +| -t "テンプレート名" | 使用するプロジェクトテンプレート。 ここで指定する値は、デフォルトテンプレート名、または、GitHubでホストされているリモートテンプレートのURLです。 | vanilla | +| -ide | IDEプロジェクトファイルを生成 | | +| -f | アプリケーションを強制的にビルド | false | 例: `wails init -n test -d mytestproject -g -ide vscode -q` -This will generate a a project called "test" in the "mytestproject" directory, initialise git, generate vscode project files and do so silently. +この例では、サイレントモードで、"mytestproject"ディレクトリに"test"という名前のプロジェクトが生成されるとともに、gitの初期化、vscodeプロジェクトファイルの生成が行われます。 -More information on using IDEs with Wails can be found [here](../guides/ides.mdx). +WailsでIDEを使用する場合の詳細については、[こちら](../guides/ides.mdx)をご覧ください。 -### Remote Templates +### リモートテンプレート -Remote templates (hosted on GitHub) are supported and can be installed by using the template's project URL. +WailsではGitHubでホストされているリモートテンプレートをサポートしており、テンプレートのプロジェクトURLを使用してインストールできます。 例: `wails init -n test -t https://github.com/leaanthony/testtemplate[@v1.0.0]` -A list of community maintained templates can be found [here](../community/templates.mdx) +コミュニティがメンテナンスしているテンプレートの一覧は[こちら](../community/templates.mdx)をご覧ください。 -:::warning 注意 +:::warning Attention -**Wailsプロジェクトでは、サードパーティ製テンプレートのメンテナンスは行っておらず、責任も負いません!** +**The Wails project does not maintain, is not responsible nor liable for 3rd party templates!** -テンプレートについてよく分からない場合は、`package.json`および`wails.json`を確認し、どのようなスクリプトが実行されるのかや、どのようなパッケージがインストールされるのかを調べてください。 +If you are unsure about a template, inspect `package.json` and `wails.json` for what scripts are run and what packages are installed. ::: ## build -`wails build` is used for compiling your project to a production-ready binary. +`wails build`は、プロジェクトを本番配布用のバイナリにコンパイルするときに使用します。 -| Flag | Description | Default | -|:-------------------- |:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |:--------------------------------------------------------------------------------------------------------------------------------------------------- | -| -platform | Build for the given (comma delimited) [platforms](../reference/cli.mdx#platforms) eg. `windows/arm64`. Note, if you do not give the architecture, `runtime.GOARCH` is used. | platform = `GOOS` environment variable if given else `runtime.GOOS`.
arch = `GOARCH` envrionment variable if given else `runtime.GOARCH`. | -| -clean | Cleans the `build/bin` directory | | -| -compiler "compiler" | Use a different go compiler to build, eg go1.15beta1 | go | -| -ldflags "flags" | Additional ldflags to pass to the compiler | | -| -nopackage | Do not package application | | -| -o filename | Output filename | | -| -s | Skip building the frontend | false | -| -f | Force build application | false | -| -tags "extra tags" | Goコンパイラに渡すビルドタグ。 値は引用符で囲んでください。 また、スペースまたはカンマで区切ってください(両方は使用しないでください)。 | | -| -upx | Compress final binary using "upx" | | -| -upxflags | Flags to pass to upx | | -| -v int | Verbosity level (0 - silent, 1 - default, 2 - verbose) | 1 | -| -webview2 | WebView2 installer strategy: download,embed,browser,error | download | -| -u | Updates your project's `go.mod` to use the same version of Wails as the CLI | | -| -debug | Retains debug information in the application. Allows the use of the devtools in the application window | false | -| -trimpath | Remove all file system paths from the resulting executable. | false | -| -race | Build with Go's race detector | false | -| -windowsconsole | Keep the console window for Windows builds | | -| -obfuscate | [garble](https://github.com/burrowers/garble)を使用してアプリケーションを難読化する | false | -| -garbleargs | garbleへ渡す引数 | `-literals -tiny -seed=random` | +| フラグ | Description | デフォルト | +|:-------------------- |:-------------------------------------------------------------------------------------------------------------------------------- |:--------------------------------------------------------------------------------------------------------------------------------------------------- | +| -platform | 指定された[プラットフォーム](../reference/cli.mdx#platforms)(カンマ区切り) 向けにビルドする。例: `windows/arm64`。 アーキテクチャを指定しない場合は、`runtime.GOARCH`の値が使用されます。 | platform = `GOOS` environment variable if given else `runtime.GOOS`.
arch = `GOARCH` envrionment variable if given else `runtime.GOARCH`. | +| -clean | `build/bin`ディレクトリをクリーンする | | +| -compiler "compiler" | 違うGoコンパイラを使用する。例: go1.15beta1 | go | +| -ldflags "flags" | コンパイラに渡す追加のldflags | | +| -nopackage | アプリケーションをパッケージ化しない | | +| -o filename | 出力ファイル名 | | +| -s | フロントエンドのビルドをスキップ | false | +| -f | アプリケーションを強制的にビルド | false | +| -tags "extra tags" | Goコンパイラに渡すビルドタグ。 値は引用符で囲んでください。 また、スペースまたはカンマで区切ってください(両方は使用しないでください)。 | | +| -upx | "upx"を使用して最終的にバイナリを圧縮する | | +| -upxflags | upxに渡すフラグ | | +| -v int | 詳細度レベル (0 - サイレント, 1 - デフォルト, 2 - 詳細) | 1 | +| -webview2 | WebView2インストーラーのストラテジ: download,embed,browser,error | download | +| -u | プロジェクトの`go.mod`を更新し、CLIと同じバージョンのWailsを使用する | | +| -debug | アプリケーションのデバッグ情報を保持する。 これにより、アプリケーションウィンドウで開発者ツールを使用することを許可できます。 | false | +| -trimpath | 実行可能ファイルから、すべてのファイルシステムパスを削除する | false | +| -race | Goのrace detectorを使用してビルドする | false | +| -windowsconsole | Windiws向けビルドでコンソールウィンドウを維持する | | +| -obfuscate | [garble](https://github.com/burrowers/garble)を使用してアプリケーションを難読化する | false | +| -garbleargs | garbleへ渡す引数 | `-literals -tiny -seed=random` | -For a detailed description of the `webview2` flag, please refer to the [Windows](../guides/windows.mdx) Guide. +`webview2`フラグの詳細については、[Windows](../guides/windows.mdx)ガイドをご覧ください。 -If you prefer to build using standard Go tooling, please consult the [Manual Builds](../guides/manual-builds.mdx) guide. +標準のGoツールを使用してビルドしたい場合は、[手動ビルド](../guides/manual-builds.mdx)ガイドをご覧ください。 Example: @@ -84,38 +84,38 @@ Example: Macでは、アプリケーションは`Info.dev.plist`ではなく`Info.plist`でバンドルされます。 ::: -:::info UPX on Apple Silicon +:::info AppleシリコンでのUPX -There are [issues](https://github.com/upx/upx/issues/446) with using UPX with Apple Silicon. +AppleシリコンにおけるUPXの使用には[既知の問題](https://github.com/upx/upx/issues/446)が確認されています。 ::: -:::info UPX on Windows +:::info WindowsでのUPX -Some Antivirus vendors false positively mark `upx` compressed binaries as virus, see [issue](https://github.com/upx/upx/issues/437). +いくつかのアンチウイルスソフトでは、`upx`で圧縮されたバイナリをウイルスとして検知することが確認されています。詳しくは、[upxのIssue](https://github.com/upx/upx/issues/437)をご覧ください。 ::: -### Platforms +### プラットフォーム -Supported platforms are: +サポートされているプラットフォームは次のとおりです: -| Platform | Description | -|:---------------- |:--------------------------------------------- | -| darwin | MacOS + architecture of build machine | -| darwin/amd64 | MacOS 10.13+ AMD64 | -| darwin/arm64 | MacOS 11.0+ ARM64 | -| darwin/universal | MacOS AMD64+ARM64 universal application | -| windows | Windows 10/11 + architecture of build machine | -| windows/amd64 | Windows 10/11 AMD64 | -| windows/arm64 | Windows 10/11 ARM64 | -| linux | Linux + architecture of build machine | -| linux/amd64 | Linux AMD64 | -| linux/arm64 | Linux ARM64 | +| プラットフォーム | Description | +|:---------------- |:-------------------------------- | +| darwin | MacOS + ビルドマシンのアーキテクチャ | +| darwin/amd64 | MacOS 10.13+ AMD64 | +| darwin/arm64 | MacOS 11.0+ ARM64 | +| darwin/universal | MacOS AMD64+ARM64 ユニバーサルアプリケーション | +| windows | Windows 10/11 + ビルドマシンのアーキテクチャ | +| windows/amd64 | Windows 10/11 AMD64 | +| windows/arm64 | Windows 10/11 ARM64 | +| linux | Linux + ビルドマシンのアーキテクチャ | +| linux/amd64 | Linux AMD64 | +| linux/arm64 | Linux ARM64 | ## doctor -`wails doctor` will run diagnostics to ensure that your system is ready for development. +`wails doctor`は、あなたのコンピュータで開発の準備が整っているかを診断します。 Example: @@ -149,81 +149,81 @@ Your system is ready for Wails development! ## dev -`wails dev` is used to run your application in a "live development" mode. This means: +`wails dev`は、アプリケーションを"ライブ開発"モードで実行させたいときに使用します。 このコマンドにより、次のことが行われます: -- The application's `go.mod` will be updated to use the same version of Wails as the CLI -- The application is compiled and run automatically -- A watcher is started and will trigger a rebuild of your dev app if it detects changes to your go files -- A webserver is started on `http://localhost:34115` which serves your application (not just frontend) over http. This allows you to use your favourite browser development extensions -- All application assets are loaded from disk. If they are changed, the application will automatically reload (not rebuild). All connected browsers will also reload -- A JS module is generated that provides the following: - - Javascript wrappers of your Go methods with autogenerated JSDoc, providing code hinting - - TypeScript versions of your Go structs, that can be constructed and passed to your go methods -- A second JS module is generated that provides a wrapper + TS declaration for the runtime +- アプリケーションの`go.mod`が、CLIと同じバージョンのWailsを使用するように更新されます +- アプリケーションがコンパイルされた後、自動的に実行されます +- ウォッチャーが起動し、Goファイルの変更を検出した際には、アプリがリビルドされます +- `http://localhost:34115`でWebサーバが起動し、HTTP経由でアプリケーション(フロントエンドだけではありません)が提供されます。 これにより、任意のブラウザ拡張機能を使用することができます +- すべてのアプリケーションアセットはディスクから読み込まれます。 アセットが変更された場合、アプリケーションは自動的に、リビルドではなくリロードされます。 接続されているすべてのブラウザもリロードされます +- 以下を提供するJSモジュールが生成されます: + - JavaScript wrappers of your Go methods with autogenerated JSDoc, providing code hinting + - インスタンス生成したりGoメソッドに渡すことのできる、Go構造体のTypeScriptバージョン +- ランタイム用のラッパーおよびTypeScript型定義を含むJSモジュールも生成されます - MacOSでは、アプリケーションを`.app`ファイルにバンドルして実行されます。 開発向けに、`build/darwin/Info.dev.plist`が使用されます。 -| Flag | Description | Default | -|:---------------------------- |:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |:--------------------- | -| -assetdir "./path/to/assets" | Serve assets from the given directory instead of using the provided asset FS | Value in `wails.json` | -| -browser | Opens a browser to `http://localhost:34115` on startup | | -| -compiler "compiler" | Use a different go compiler to build, eg go1.15beta1 | go | -| -e | Extensions to trigger rebuilds (comma separated) | go | -| -reloaddirs | Additional directories to trigger reloads (comma separated) | Value in `wails.json` | -| -ldflags "flags" | Additional ldflags to pass to the compiler | | -| -tags "extra tags" | Build tags to pass to compiler (quoted and space separated) | | -| -loglevel "loglevel" | Loglevel to use - Trace, Debug, Info, Warning, Error | デバッグ | -| -noreload | Disable automatic reload when assets change | | -| -nocolour | CLIのカラー出力を無効にする | false | -| -nogen | Disable generate module | | -| -v | Verbosity level (0 - silent, 1 - standard, 2 - verbose) | 1 | -| -wailsjsdir | The directory to generate the generated Wails JS modules | Value in `wails.json` | -| -debounce | The time to wait for reload after an asset change is detected | 100 (milliseconds) | -| -devserver "host:port" | The address to bind the wails dev server to | "localhost:34115" | -| -frontenddevserverurl "url" | Use 3rd party dev server url to serve assets, EG Vite | "" | -| -appargs "args" | Arguments passed to the application in shell style | | -| -save | Saves the given `assetdir`, `reloaddirs`, `wailsjsdir`, `debounce`, `devserver` and `frontenddevserverurl` flags in `wails.json` to become the defaults for subsequent invocations. | | -| -race | Build with Go's race detector | false | -| -s | Skip building the frontend | false | +| フラグ | Description | デフォルト | +|:---------------------------- |:----------------------------------------------------------------------------------------------------------------------------- |:--------------------- | +| -assetdir "./path/to/assets" | 通常のアセットFSを使用する代わりに、指定されたディレクトリからアセットを提供する | `wails.json`で指定されている値 | +| -browser | 起動時にブラウザで`http://localhost:34115`を開く | | +| -compiler "compiler" | 違うGoコンパイラを使用する。例: go1.15beta1 | go | +| -e | リビルドをトリガーする拡張子 (カンマ区切り) | go | +| -reloaddirs | リロードをトリガーする追加ディレクトリ (カンマ区切り) | `wails.json`で指定されている値 | +| -ldflags "flags" | コンパイラに渡す追加のldflags | | +| -tags "extra tags" | コンパイラへ渡すビルドタグ (引用符およびスペース区切り) | | +| -loglevel "loglevel" | 使用するログレベル - Trace, Debug, Info, Warning, Error | Debug | +| -noreload | アセットが変更されたときの自動リロードを無効にする | | +| -nocolour | CLIのカラー出力を無効にする | false | +| -nogen | モジュールの生成を無効にする | | +| -v | 詳細度レベル (0 - サイレント, 1 - デフォルト, 2 - 詳細) | 1 | +| -wailsjsdir | 生成されたWailsのJSモジュールを格納するディレクトリ | `wails.json`で指定されている値 | +| -debounce | アセットの変更が検出されたあと、リロードするまでの時間 | 100 (ミリ秒) | +| -devserver "host:port" | Wails開発サーバをバインドするアドレス | "localhost:34115" | +| -frontenddevserverurl "url" | アセットを提供するサードパーティ製の開発サーバ(例: Vite) を使用する | "" | +| -appargs "args" | シェル形式でアプリケーションに渡される引数 | | +| -save | 指定された`assetdir`、`reloaddirs`、`wailsjsdir`、`debounce`、`devserver`、`frontenddevserverurl`フラグの値を、`wails.json`へ保存し、次回以降のデフォルト値にする | | +| -race | Goのrace detectorを使用してビルドする | false | +| -s | フロントエンドのビルドをスキップ | false | Example: `wails dev -assetdir ./frontend/dist -wailsjsdir ./frontend/src -browser` -This command will do the following: +この例では次のことが行われます: -- Build the application and run it (more details [here](../guides/manual-builds.mdx) -- Generate the Wails JS modules in `./frontend/src` -- Watch for updates to files in `./frontend/dist` and reload on any change -- Open a browser and connect to the application +- アプリケーションをビルドして実行する (詳しくは[こちら](../guides/manual-builds.mdx)をご覧ください) +- WailsのJSモジュールを`./frontend/src`ディレクトリ内に生成する +- `./frontend/dist`ディレクトリ内のファイルの更新を監視し、変更されたときにリロードする +- ブラウザを開き、アプリケーションへ接続する -There is more information on using this feature with existing framework scripts [here](../guides/application-development.mdx#live-reloading). +既存のフレームワークスクリプトで本機能を使用する方法について詳しくは[こちら](../guides/application-development.mdx#live-reloading)をご覧ください。 ## generate ### template -Wails uses templates for project generation. The `wails generate template` command helps scaffold a template so that it may be used for generating projects. +Wailsは、プロジェクトの生成に必ずテンプレートを使用します。 `wails generate template`コマンドは、プロジェクト生成時に使用できるテンプレートの作成を支援します。 -| Flag | Description | -|:---------------- |:------------------------------------------- | -| -name | The template name (Mandatory) | -| -frontend "path" | Path to frontend project to use in template | +| フラグ | Description | +|:---------------- |:---------------------------- | +| -name | テンプレート名 (必須項目) | +| -frontend "path" | テンプレートで使用するフロントエンドプロジェクトへのパス | -For more details on creating templates, consult the [Templates guide](../guides/templates.mdx). +テンプレートの作成について詳しくは、[テンプレートガイド](../guides/templates.mdx)をご覧ください。 ### module -The `wails generate module` command allows you to manually generate the `wailsjs` directory for your application. +`wails generate module`コマンドを使用すると、アプリケーションの`wailsjs`ディレクトリを手動で生成できます。 ## update -`wails update` will update the version of the Wails CLI. +`wails update`コマンドを実行すると、Wails CLIのバージョンをアップデートできます。 -| Flag | Description | -|:------------------ |:------------------------------------- | -| -pre | Update to latest pre-release version | -| -version "version" | Install a specific version of the CLI | +| フラグ | Description | +|:------------------ |:----------------------- | +| -pre | 最新のプレリリースバージョンにアップデートする | +| -version "version" | 特定のバージョンのCLIをインストールする | ## version -`wails version` will simply output the current CLI version. +`wails version`は、現在のCLIバージョンを出力するだけのコマンドです。 diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/current/reference/menus.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/current/reference/menus.mdx index 8322f9731..9f77f9871 100644 --- a/website/i18n/ja/docusaurus-plugin-content-docs/current/reference/menus.mdx +++ b/website/i18n/ja/docusaurus-plugin-content-docs/current/reference/menus.mdx @@ -76,7 +76,7 @@ type MenuItem struct { } ``` -| Field | Type | Notes | +| フィールド | Type | Notes | | ----------- | ------------------------------------ | ------------------------------------------------------------- | | Label | string | The menu text | | Accelerator | [\*keys.Accelerator](#accelerator) | Key binding for this menu item | @@ -221,7 +221,7 @@ Roles are currently supported on Mac only. A menu item may have a role, which is essentially a pre-defined menu item. We currently support the following roles: -| ロール | Description | +| ロール | 説明 | | ------------ | ------------------------------------------------------------------------ | | AppMenuRole | The standard Mac application menu. Can be created using `menu.AppMenu()` | | EditMenuRole | The standard Mac edit menu. Can be created using `menu.EditMenu()` | diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/current/reference/options.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/current/reference/options.mdx index 81fd1950a..d5e6909c9 100644 --- a/website/i18n/ja/docusaurus-plugin-content-docs/current/reference/options.mdx +++ b/website/i18n/ja/docusaurus-plugin-content-docs/current/reference/options.mdx @@ -4,9 +4,9 @@ sidebar_position: 3 # オプション -## Application Options +## アプリケーションオプション -The `Options.App` struct contains the application configuration. It is passed to the `wails.Run()` method: +`Options.App`構造体には、アプリケーションの構成設定が含まれています。 これを`wails.Run()`メソッドに渡してください: ```go title="Example" import ( @@ -115,25 +115,25 @@ func main() { ### Title -The text shown in the window's title bar. +ウィンドウのタイトルバーに表示されるテキストです。 名前: Title
データ型: `string` ### Width -The initial width of the window. +ウィンドウの初期幅です。 名前: Width
データ型: `int`
デフォルト値: 1024 ### Height -The initial height of the window. +ウィンドウの初期の高さです。 名前: Height
データ型: `int`
デフォルト値: 768 ### DisableResize -By default, the main window is resizable. Setting this to `true` will keep it a fixed size. +デフォルトでは、メインウィンドウのサイズは自在に変更することができます。 この設定を`true`にすると、サイズが固定されます。 名前: DisableResize
データ型: `bool` @@ -143,7 +143,7 @@ By default, the main window is resizable. Setting this to `true` will keep it a ### WindowStartState -Defines how the window should present itself at startup. +起動時にウィンドウをどのように表示させるかを定義します。 | 値 | Win | Mac | Lin | | ---------- | --- | --- | --- | @@ -155,43 +155,43 @@ Defines how the window should present itself at startup. ### Frameless -When set to `true`, the window will have no borders or title bar. Also see [Frameless Windows](../guides/frameless.mdx). +この設定を`true`にすると、ウィンドウに境界線やタイトルバーが表示されなくなります。 詳しくは[フレームレスウィンドウ](../guides/frameless.mdx)をご覧ください。 名前: Frameless
データ型: `bool` ### MinWidth -This sets the minimum width for the window. If the value given in `Width` is less than this value, the window will be set to `MinWidth` by default. +ウィンドウの最小幅を設定します。 `Width`の値がこの値より小さい場合、ウィンドウ幅はデフォルトで`MinWidth`の値となります。 名前: MinWidth
データ型: `int` ### MinHeight -This sets the minimum height for the window. If the value given in `Height` is less than this value, the window will be set to `MinHeight` by default. +ウィンドウの最小の高さを設定します。 `Height`の値がこの値より小さい場合、ウィンドウの高さはデフォルトで`MinHeight`の値となります。 名前: MinHeight
データ型: `int` ### MaxWidth -This sets the maximum width for the window. If the value given in `Width` is more than this value, the window will be set to `MaxWidth` by default. +ウィンドウの最大幅を設定します。 `Width`の値がこの値より大きい場合、ウィンドウ幅はデフォルトで`MaxWidth`の値となります。 名前: MaxWidth
データ型: `int` ### MaxHeight -This sets the maximum height for the window. If the value given in `Height` is more than this value, the window will be set to `MaxHeight` by default. +ウィンドウの最大の高さを設定します。 `Height`の値がこの値より大きい場合、ウィンドウの高さはデフォルトで`MaxHeight`の値となります。 名前: MaxHeight
データ型: `int` ### StartHidden -When set to `true`, the application will be hidden until [WindowShow](../reference/runtime/window.mdx#windowshow) is called. +`true`に設定すると、アプリケーションは[WindowShow](../reference/runtime/window.mdx#windowshow)が呼び出されるまで非表示となります。 名前: StartHidden
データ型: `bool` ### HideWindowOnClose -By default, closing the window will close the application. この設定を`true`にすると、ウィンドウを閉じる操作をした際に、 +デフォルトでは、ウィンドウを閉じるとアプリケーションが終了します。 この設定を`true`にすると、ウィンドウを閉じる操作をした際に、 ウィンドウが非表示の状態になります。 @@ -199,13 +199,13 @@ By default, closing the window will close the application. この設定を`true` ### BackgroundColour -This value is the default background colour of the window. 例: options.NewRGBA(255,0,0,128) - 50%透過された赤色 +ウィンドウのデフォルトの背景色です。 例: options.NewRGBA(255,0,0,128) - 50%透過された赤色 名前: BackgroundColour
データ型: `*options.RGBA`
デフォルト値: white ### AlwaysOnTop -Indicates that the window should stay above other windows when losing focus. +ウィンドウへのフォーカスが無くなっても、他ウィンドウより手前側にウィンドウを表示させるかを設定します。 名前: AlwaysOnTop
データ型: `bool` @@ -239,7 +239,7 @@ AssetServerの固有オプションを定義します。 静的なアセット | Response Body Streaming | ❌ | ❌ | ✅ | | WebSockets | ❌ | ❌ | ❌ | -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. +注意: 現在、LinuxはWebKit2GTKバージョン2.36.0未満をターゲットにしているため、使用できる機能が非常に限られています。 将来的に、WebKit2GTK 2.36.0以降の導入を予定しており、それによりいくつかの機能が新たにサポートされる予定です。 名前: AssetServer
データ型: `*assetserver.Options` @@ -262,7 +262,7 @@ nilがセットされている場合、GETリクエストに常に[Handler](#han - GETリクエスト: `http.StatusNotFound` - その他のリクエスト: `http.StatusMethodNotAllowed` -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は、拡張子を含まないパスに対して、常にindex.htmlを返します。 名前: AssetsHandler
データ型: `http.Handler` @@ -276,7 +276,7 @@ Middlewareが定義されていない場合、デフォルトのAssetServerの ### Menu -The menu to be used by the application. More details about Menus in the [Menu Reference](../reference/runtime/menu.mdx). +アプリケーションで使用されるメニューです。 メニューについて詳しくは、[メニューのリファレンス](../reference/runtime/menu.mdx)をご覧ください。 :::note @@ -288,45 +288,45 @@ Macでは、メニューが指定されていない場合、デフォルトメ ### Logger -The logger to be used by the application. More details about logging in the [Log Reference](../reference/runtime/log.mdx). +アプリケーションで使用するロガーです。 ロギングについて詳しくは、[ログのリファレンス](../reference/runtime/log.mdx)をご覧ください。 名前: Logger
データ型: `logger.Logger`
デフォルト値: 標準出力へのロガー ### LogLevel -The default log level. More details about logging in the [Log Reference](../reference/runtime/log.mdx). +デフォルトのログレベルです。 ロギングについて詳しくは、[ログのリファレンス](../reference/runtime/log.mdx)をご覧ください。 名前: LogLevel
データ型: `logger.LogLevel`
デフォルト値: 開発モードの場合は`Info`、本番モードの場合は`Error` ### LogLevelProduction -The default log level for production builds. More details about logging in the [Log Reference](../reference/runtime/log.mdx). +本番ビルド時のデフォルトのログレベルです。 ロギングについて詳しくは、[ログのリファレンス](../reference/runtime/log.mdx)をご覧ください。 名前: LogLevelProduction
データ型: `logger.LogLevel`
デフォルト値: `Error` ### OnStartup -This callback is called after the frontend has been created, but before `index.html` has been loaded. It is given the application context. +フロントエンド作成後、`index.html`が読み込まれる前に呼び出されるコールバックです。 アプリケーションのcontextが渡されます。 名前: OnStartup
データ型: `func(ctx context.Context)` ### OnDomReady -This callback is called after the frontend has loaded `index.html` and its resources. It is given the application context. +フロントエンドが`index.html`とそのリソースを読み込んだ後に呼び出されるコールバックです。 アプリケーションのcontextが渡されます。 名前: OnDomReady
データ型: `func(ctx context.Context)` ### OnShutdown -This callback is called after the frontend has been destroyed, just before the application terminates. It is given the application context. +フロントエンドが破棄され、アプリケーションが終了する直前に呼び出されるコールバックです。 アプリケーションのcontextが渡されます。 名前: OnShutdown
データ型: `func(ctx context.Context)` ### OnBeforeClose -If this callback is set, it will be called when the application is about to quit, either by clicking the window close button or calling `runtime.Quit`. Returning true will cause the application to continue, false will continue shutdown as normal. This is good for confirming with the user that they wish to exit the program. +ウィンドウの閉じるボタンをクリックするか、`runtime.Quit`が呼ばれて、アプリケーションが終了されそうになっているときに呼び出されるコールバックです。 trueを返すとアプリケーションはそのまま維持され、falseを返すと通常どおりシャットダウンされます。 ユーザに対してプログラムの終了を確認したいときは、このコールバックを使うのが良いでしょう。 -Example: +例: ```go title=windowsapp.go func (b *App) beforeClose(ctx context.Context) (prevent bool) { @@ -371,7 +371,7 @@ WebView2の拡大率を定義します。 これは、Edgeのユーザによる ### Bind -A slice of struct instances defining methods that need to be bound to the frontend. +フロントエンドにバインドする必要があるメソッドが定義された、構造体インスタンスのスライスです。 名前: Bind
データ型: `[]interface{}` @@ -383,13 +383,13 @@ A slice of struct instances defining methods that need to be bound to the fronte #### WebviewIsTransparent -Setting this to `true` will make the webview background transparent when an alpha value of `0` is used. This means that if you use `rgba(0,0,0,0)` for `background-color` in your CSS, the host window will show through. Often combined with [WindowIsTranslucent](#WindowIsTranslucent) to make frosty-looking applications. +この値を`true`に設定すると、アルファ値が`0`の際に、WebViewの背景が透明になります。 つまり、CSSで`background-color`に`rgba(0,0,0,0)`を設定すると、ホストウィンドウが透けて見えるようになります。 多くの場合、[WindowIsTranslucent](#WindowIsTranslucent)と組み合わて、霜のように見えるアプリケーションを作成する際に使用します。 名前: WebviewIsTransparent
データ型: `bool` #### WindowIsTranslucent -Setting this to `true` will make the window background translucent. 多くの場合、[WebviewIsTransparent](#WebviewIsTransparent)と組み合わせて使用されます。 +この値を`true`に設定すると、ウィンドウの背景が半透明になります。 多くの場合、[WebviewIsTransparent](#WebviewIsTransparent)と組み合わせて使用されます。 ビルド22621より前のWindows 11の場合、半透明を実現させるために[BlurBehind](https://learn.microsoft.com/ja-jp/windows/win32/dwm/blur-ovw)メソッドを使用するため、処理が遅くなる可能性があります。 ビルド22621以降のWindows 11では、より高速な、新しい半透明タイプが有効になります。 デフォルトで使用される半透明タイプは、Windowsにより決定されます。 このタイプを設定するには、[BackdropType](#BackdropType)オプションを使用してください。 @@ -409,7 +409,7 @@ Setting this to `true` will make the window background translucent. 多くの場 値は次のいずれかを指定してください: -| 値 | Description | +| 値 | 説明 | | ------- | ----------------------------------------------------------------------------------- | | Auto | Windowsに背景を決定させる | | None | 半透明にしない | @@ -419,45 +419,45 @@ Setting this to `true` will make the window background translucent. 多くの場 #### DisableWindowIcon -Setting this to `true` will remove the icon in the top left corner of the title bar. +この設定を`true`にすると、タイトルバーの左上隅のアイコンが消去されます。 名前: DisableWindowIcon
データ型: `bool` #### DisableFramelessWindowDecorations -Setting this to `true` will remove the window decorations in [Frameless](#Frameless) mode. This means there will be no 'Aero Shadow' and no 'Rounded Corners' shown for the window. Please note that 'Rounded Corners' are only supported on Windows 11. +この設定を`true`にすると、[フレームレス](#Frameless)モードでのウィンドウデコレーションが消去されます。 つまり、'Aero Shadow'および'Rounded Corners'がウィンドウに適用されなくなります。 なお、'Rounded Corners'はWindows 11でのみサポートされていますのでご注意ください。 名前: DisableFramelessWindowDecorations
データ型: `bool` #### WebviewUserDataPath -This defines the path where the WebView2 stores the user data. If empty `%APPDATA%\[BinaryName.exe]` will be used. +WebView2が、ユーザデータを格納するパスを設定します。 空の場合は、`%APPDATA%\[BinaryName.exe]`が使用されます。 名前: WebviewUserDataPath
データ型: `string` #### WebviewBrowserPath -This defines the path to a directory with WebView2 executable files and libraries. If empty, webview2 installed in the system will be used. +WebView2の実行ファイルおよびライブラリが存在するディレクトリへのパスを設定します。 空の場合、システムにインストールされているWebView2が使用されます。 -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) -- [Known issues for fixed version](https://docs.microsoft.com/en-us/microsoft-edge/webview2/concepts/distribution#known-issues-for-fixed-version) -- [The path of fixed version of the WebView2 Runtime should not contain \Edge\Application\.](https://docs.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/webview2-idl?view=webview2-1.0.1245.22#createcorewebview2environmentwithoptions) +- [ランタイムの取得および展開方法](https://docs.microsoft.com/en-us/microsoft-edge/webview2/concepts/distribution#details-about-the-fixed-version-runtime-distribution-mode) +- [固定バージョンに関する既知の問題](https://docs.microsoft.com/en-us/microsoft-edge/webview2/concepts/distribution#known-issues-for-fixed-version) +- [WenView2ランタイムの固定バージョンのパスに、\Edge\Application\ を含めてはいけません](https://docs.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/webview2-idl?view=webview2-1.0.1245.22#createcorewebview2environmentwithoptions) 名前: WebviewBrowserPath
データ型: `string` #### Theme -Minimum Windows Version: Windows 10 2004/20H1 +サポートされるWindowsの最小バージョン: Windows 10 2004/20H1 -This defines the theme that the application should use: +アプリケーションが使用するテーマを設定します: -| 値 | Description | -| ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | -| SystemDefault | _デフォルト値_です。 The theme will be based on the system default. If the user changes their theme, the application will update to use the new setting | -| Dark | The application will use a dark theme exclusively | -| Light | The application will use a light theme exclusively | +| 値 | 説明 | +| ------------- | ---------------------------------------------------------------------------------------- | +| SystemDefault | _デフォルト値_です。 テーマは、システムのデフォルト設定に基づきます。 ユーザがシステムのテーマ設定を変更した場合、アプリケーションは新しい設定を使用するように更新されます。 | +| Dark | アプリケーションはダークテーマのみを使用します。 | +| Light | アプリケーションはライトテーマのみを使用します。 | 名前: Theme
データ型: `windows.Theme` @@ -469,15 +469,15 @@ This defines the theme that the application should use: ::: -Allows you to specify custom colours for TitleBar, TitleText and Border for both light and dark mode, as well as when the window is active or inactive. +ウィンドウがアクティブまたは非アクティブのときに、ライトモード・ダークモードのそれぞれにおいて、タイトルバー、タイトルテキスト、ボーダーのカスタムカラーを設定できます。 名前: CustomTheme
データ型: `windows.CustomTheme` ##### CustomTheme 型 -The CustomTheme struct uses `int32` to specify the colour values. These are in the standard(!) Windows format of: `0x00BBGGAA`. A helper function is provided to do RGB conversions into this format: `windows.RGB(r,g,b uint8)`. +CustomTheme構造体は、`int32`型で色の値を指定します。 これは`0x00BBGGAA`で表されるWindowsの標準フォーマットで指定します。 RGBの値をこのフォーマットに変換するために、`windows.RGB(r,g,b uint8)`のようなヘルパー関数が用意されています。 -NOTE: Any value not provided will default to black. +注意: 指定されていない値はデフォルトで黒色になります。 ```go type ThemeSettings struct { @@ -496,7 +496,7 @@ type ThemeSettings struct { } ``` -Example: +例: ```go CustomTheme: &windows.ThemeSettings{ @@ -519,15 +519,15 @@ Example: #### Messages -A struct of strings used by the webview2 installer if a valid webview2 runtime is not found. +利用可能なWebView2ランタイムが見つからなかったときに表示する、WebView2インストーラに関するメッセージ文字列を設定します。 名前: Messages
データ型: `*windows.Messages` -Customise this for any language you choose to support. +プロジェクトがサポートする言語にあわせて、この設定をカスタマイズしてください。 #### ResizeDebounceMS -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は、ウィンドウサイズが変更されたときに、WebView2の再描画を実行するまでの時間です。 デフォルト値(0) は、できるだけ早く再描画を実行します。 名前: ResizeDebounceMS
データ型: `uint16` @@ -551,13 +551,13 @@ Windowsがローパワーモード(サスペンド/休止状態) から復帰し #### TitleBar -The TitleBar struct provides the ability to configure the look and feel of the title bar. +TitleBar構造体は、タイトルバーのルック・アンド・フィールを設定する機能を提供します。 名前: TitleBar
データ型: [`*mac.TitleBar`](#titlebar-struct) -##### Titlebar struct +##### Titlebar 構造体 -The titlebar of the application can be customised by using the TitleBar options: +アプリケーションのタイトルバーは、TitleBarオプションを使用することでカスタマイズできます: ```go type TitleBar struct { @@ -570,24 +570,24 @@ type TitleBar struct { } ``` -| Name | Description | -| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| TitlebarAppearsTransparent | Makes the titlebar transparent. 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 | Hides the title of the window. [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 | Makes the webview fill the entire window. [Apple Docs](https://developer.apple.com/documentation/appkit/nswindowstylemask/nswindowstylemaskfullsizecontentview) | -| UseToolbar | Adds a default toolbar to the window. [Apple Docs](https://developer.apple.com/documentation/appkit/nstoolbar?language=objc) | -| HideToolbarSeparator | Removes the line beneath the toolbar. [Apple Docs](https://developer.apple.com/documentation/appkit/nstoolbar/1516954-showsbaselineseparator?language=objc) | +| 名前 | 説明 | +| -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| TitlebarAppearsTransparent | タイトルバーを透明にします。 これにより、タイトルバーが非表示になり、コンテンツがウィンドウ全体に表示されます。 [Appleドキュメント](https://developer.apple.com/documentation/appkit/nswindow/1419167-titlebarappearstransparent?language=objc) | +| HideTitle | ウィンドウタイトルを非表示にします。 [Appleドキュメント](https://developer.apple.com/documentation/appkit/nswindowtitlevisibility?language=objc) | +| HideTitleBar | スタイルマスクから[NSWindowStyleMaskTitled](https://developer.apple.com/documentation/appkit/nswindowstylemask/nswindowstylemasktitled/)を消去します。 | +| FullSizeContent | WebViewをウィンドウ全体に表示します。 [Appleドキュメント](https://developer.apple.com/documentation/appkit/nswindowstylemask/nswindowstylemaskfullsizecontentview) | +| UseToolbar | ウィンドウにデフォルトツールバーを追加します。 [Appleドキュメント](https://developer.apple.com/documentation/appkit/nstoolbar?language=objc) | +| HideToolbarSeparator | ツールバーの下側の線を消去します。 [Appleドキュメント](https://developer.apple.com/documentation/appkit/nstoolbar/1516954-showsbaselineseparator?language=objc) | -Preconfigured titlebar settings are available: +事前設定されたタイトルバー構成を利用することも可能です: -| Setting | 例 | +| 設定 | 例 | | --------------------------- | ---------------------------------------------- | | `mac.TitleBarDefault()` | ![](/img/reference/titlebar-default.webp) | | `mac.TitleBarHidden()` | ![](/img/reference/titlebar-hidden.webp) | | `mac.TitleBarHiddenInset()` | ![](/img/reference/titlebar-hidden-inset.webp) | -Example: +例: ```go Mac: &mac.Options{ @@ -595,30 +595,30 @@ Mac: &mac.Options{ } ``` -Click [here](https://github.com/lukakerr/NSWindowStyles) for some inspiration on customising the titlebar. +タイトルバーのカスタマイズに関してインスピレーションを得たい場合は[こちら](https://github.com/lukakerr/NSWindowStyles)をご覧ください。 #### Appearance -Appearance is used to set the style of your app in accordance with Apple's [NSAppearance](https://developer.apple.com/documentation/appkit/nsappearancename?language=objc) names. +Appearanceは、Appleの[NSAppearance](https://developer.apple.com/documentation/appkit/nsappearancename?language=objc)Nameに従って、アプリケーションのスタイルを設定するために使用します。 名前: Appearance
データ型: [`mac.AppearanceType`](#appearance-type) ##### Appearance 型 -You can specify the application's [appearance](https://developer.apple.com/documentation/appkit/nsappearance?language=objc). +アプリケーションの[外観](https://developer.apple.com/documentation/appkit/nsappearance?language=objc)を指定します。 -| 値 | Description | -| ----------------------------------------------------- | --------------------------------------------------------------- | -| DefaultAppearance | DefaultAppearance uses the default system value | -| NSAppearanceNameAqua | The standard light system appearance | -| NSAppearanceNameDarkAqua | The standard dark system appearance | -| NSAppearanceNameVibrantLight | The light vibrant appearance | -| NSAppearanceNameAccessibilityHighContrastAqua | A high-contrast version of the standard light system appearance | -| NSAppearanceNameAccessibilityHighContrastDarkAqua | A high-contrast version of the standard dark system appearance | -| NSAppearanceNameAccessibilityHighContrastVibrantLight | A high-contrast version of the light vibrant appearance | -| NSAppearanceNameAccessibilityHighContrastVibrantDark | A high-contrast version of the dark vibrant appearance | +| 値 | 説明 | +| ----------------------------------------------------- | ------------------------------------- | +| DefaultAppearance | DefaultAppearanceは、システムのデフォルト値を使用します。 | +| NSAppearanceNameAqua | システムの標準的なライト外観 | +| NSAppearanceNameDarkAqua | システムの標準的なダーク外観 | +| NSAppearanceNameVibrantLight | より鮮やかなライト外観 | +| NSAppearanceNameAccessibilityHighContrastAqua | システムの標準的なライト外観のハイコントラスト版 | +| NSAppearanceNameAccessibilityHighContrastDarkAqua | システムの標準的なダーク外観のハイコントラスト版 | +| NSAppearanceNameAccessibilityHighContrastVibrantLight | より鮮やかなライト外観のハイコントラスト版 | +| NSAppearanceNameAccessibilityHighContrastVibrantDark | より鮮やかなダーク外観のハイコントラスト版 | -Example: +例: ```go Mac: &mac.Options{ @@ -628,23 +628,23 @@ Mac: &mac.Options{ #### WebviewIsTransparent -Setting this to `true` will make the webview background transparent when an alpha value of `0` is used. This means that if you use `rgba(0,0,0,0)` for `background-color` in your CSS, the host window will show through. Often combined with [WindowIsTranslucent](#WindowIsTranslucent) to make frosty-looking applications. +この値を`true`に設定すると、アルファ値が`0`の際に、WebViewの背景が透明になります。 つまり、CSSで`background-color`に`rgba(0,0,0,0)`を設定すると、ホストウィンドウが透けて見えるようになります。 多くの場合、[WindowIsTranslucent](#WindowIsTranslucent)と組み合わて、霜のように見えるアプリケーションを作成する際に使用します。 名前: WebviewIsTransparent
データ型: `bool` #### WindowIsTranslucent -Setting this to `true` will make the window background translucent. Often combined with [WebviewIsTransparent](#WebviewIsTransparent) to make frosty-looking applications. +この値を`true`に設定すると、ウィンドウの背景が半透明になります。 多くの場合、[WebviewIsTransparent](#WebviewIsTransparent)と組み合わて、霜のように見えるアプリケーションを作成する際に使用します。 名前: WindowIsTranslucent
データ型: `bool` #### About -This configuration lets you set the title, message and icon for the "About" menu item in the app menu created by the "AppMenu" role. +"AppMenu"ロールで作成されたアプリケーションメニューの中にある"About"メニュー項目において、タイトル、メッセージ、アイコンを設定できます。 名前: About
データ型: [`*mac.AboutInfo`](#about-struct) -##### About struct +##### About 構造体 ```go @@ -655,7 +655,7 @@ type AboutInfo struct { } ``` -If these settings are provided, an "About" menu item will appear in the app menu (when using the `AppMenu` role). Given this configuration: +これらの設定が定義されている場合、`AppMenu`ロールが使用されていれば、アプリケーションメニュー内に"About"メニューが表示されます。 例えば以下のように設定すると: ```go //go:embed build/appicon.png @@ -674,7 +674,7 @@ func main() { }) ``` -The "About" menu item will appear in the app menu: +アプリケーションメニューに"About"メニュー項目が表示されます: ```mdx-code-block
@@ -686,7 +686,7 @@ The "About" menu item will appear in the app menu:
``` -When clicked, that will open an about message box: +クリックすると、アプリケーション概要メッセージボックスが開かれます: ```mdx-code-block
@@ -707,23 +707,23 @@ When clicked, that will open an about message box: #### Icon -Sets up the icon representing the window. This icon is used when the window is minimized (also known as iconified). +ウィンドウを示すアイコンを設定します。 このアイコンは、ウィンドウが最小化されたときに使用されます(iconifiedと呼ばれます)。 名前: Icon
データ型: `[]byte` -Some window managers or desktop environments may also place it in the window frame, or display it in other contexts. On others, the icon is not used at all, so your mileage may vary. +一部のウィンドウマネージャやデスクトップ環境では、ウィンドウフレームに配置されたり、他のコンテキストで表示される場合もあります。 On others, the icon is not used at all, so your mileage may vary. -NOTE: Gnome on Wayland at least does not display this icon. To have a application icon there, a `.desktop` file has to be used. On KDE it should work. +注意: 少なくともWayland上のGnomeでは、このアイコンは表示されません。 アプリケーションアイコンを表示させるには、`.desktop`ファイルを使用する必要があります。 KDEの場合は正常に表示されるはずです。 -The icon should be provided in whatever size it was naturally drawn; that is, don’t scale the image before passing it. Scaling is postponed until the last minute, when the desired final size is known, to allow best quality. +アイコンは、何の加工もされていないサイズで用意してください。つまり、拡大/縮小された画像は使用しないでください。 Scaling is postponed until the last minute, when the desired final size is known, to allow best quality. #### WindowIsTranslucent -Setting this to `true` will make the window background translucent. ウィンドウマネージャによっては、この設定を無視したり、ブラックウィンドウになる場合があります。 +この値を`true`に設定すると、ウィンドウの背景が半透明になります。 ウィンドウマネージャによっては、この設定を無視したり、ブラックウィンドウになる場合があります。 名前: WindowIsTranslucent
データ型: `bool` -### デバッグ +### Debug デバッグビルド時に適用される[デバッグ固有のオプション](#Debug)を定義します。 diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/current/reference/project-config.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/current/reference/project-config.mdx index b1bb7a637..d4dfe5399 100644 --- a/website/i18n/ja/docusaurus-plugin-content-docs/current/reference/project-config.mdx +++ b/website/i18n/ja/docusaurus-plugin-content-docs/current/reference/project-config.mdx @@ -11,20 +11,20 @@ The project config resides in the `wails.json` file in the project directory. Th "name": "[プロジェクト名。]", "assetdir": "[コンパイルされたアセットディレクトリへの相対パス。通常は自動的に推測されるため、空で構いません。]", "reloaddirs": "[再読み込みのトリガーとなる追加のディレクトリ(カンマ区切り)。高度なアセット構成をとる場合にのみ使用します。]", - "build:dir": "[ビルドファイルが存在するディレクトリ。 Defaults to 'build']", - "frontend:dir": "[Relative path to the frontend directory. Defaults to 'frontend']", - "frontend:install": "[The command to install node dependencies, run in the frontend directory - often `npm install`]", - "frontend:build": "[The command to build the assets, run in the frontend directory - often `npm run build`]", - "frontend:dev": "[This command has been replaced by frontend:dev:build. If frontend:dev:build is not specified will falls back to this command. \nIf this command is also not specified will falls back to frontend:build]", - "frontend:dev:build": "[This command is the dev equivalent of frontend:build. If not specified falls back to frontend:dev]", + "build:dir": "[ビルドファイルが存在するディレクトリ。 デフォルトは'build'です。']", + "frontend:dir": "[フロントエンドディレクトリの相対パス。 デフォルトは'frontend'です。]", + "frontend:install": "[node依存関係をインストールするために、フロントエンドディレクトリで実行するコマンド。一般的には`npm install`です。]", + "frontend:build": "[アセットをビルドするために、フロントエンドディレクトリで実行するコマンド。一般的には`npm run build`です。]", + "frontend:dev": "[このコマンドはfrontend:dev:buildへ置換されました。 If frontend:dev:build is not specified will falls back to this command. このコマンドも指定されていない場合は、代わりにfrontend:buildが実行されます。]", + "frontend:dev:build": "[開発モードにおけるfrontend:buildと同様のコマンド。 If not specified falls back to frontend:dev]", "frontend:dev:install": "[This command is the dev equivalent of frontend:install. If not specified falls back to frontend:install]", "frontend:dev:watcher": "[This command is run in a separate process on `wails dev`. Useful for 3rd party watchers or starting 3d party dev servers]", - "frontend:dev:serverUrl": "[URL to a 3rd party dev server to be used to serve assets, EG Vite. \nIf this is set to 'auto' then the devServerUrl will be inferred from the Vite output]", - "wailsjsdir": "[Relative path to the directory that the auto-generated JS modules will be created]", - "version": "[Project config version]", - "outputfilename": "[The name of the binary]", - "debounceMS": 100, // The default time the dev server waits to reload when it detects a change in assets - "devServer": "[Address to bind the wails dev sever to. Default: localhost:34115]", + "frontend:dev:serverUrl": "[URL to a 3rd party dev server to be used to serve assets, EG Vite. 'auto'に設定すると、Viteの出力から自動的に開発サーバURLを推測します。]", + "wailsjsdir": "[自動生成されるJSモジュールを出力するディレクトリへの相対パス。]", + "version": "[プロジェクト構成のバージョン]", + "outputfilename": "[出力バイナリのファイル名]", + "debounceMS": 100, // アセットファイルに変更があった場合に、開発サーバが再読み込みを行うまでのデフォルトの待ち時間。 + "devServer": "[Wailsの開発サーバをバインドするアドレス。 Default: localhost:34115]", "appargs": "[Arguments passed to the application in shell style when in dev mode]", "runNonNativeBuildHooks": false, // Defines if build hooks should be run though they are defined for an OS other than the host OS. "preBuildHooks": { @@ -44,9 +44,9 @@ The project config resides in the `wails.json` file in the project directory. Th "copyright": "[The copyright of the product. Default: 'Copyright.........']", "comments": "[A short comment of the app. Default: 'Built using Wails (https://wails.app)']" }, - "nsisType": "['multiple': One installer per architecture. 'single': Single universal installer for all architectures being built. Default: 'multiple']", - "obfuscated": "[Whether the app should be obfuscated. Default: false]", - "garbleargs": "[The arguments to pass to the garble command when using the obfuscated flag]" + "nsisType": "['multiple': One installer per architecture. 'single': Single universal installer for all architectures being built. デフォルト値: 'multiple']", + "obfuscated": "[アプリ難読化を実行するかどうか。 デフォルト値: false]", + "garbleargs": "[obfuscatedフラグがtrueの際に、garbleコマンドへ渡す引数。]" } ``` diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/current/reference/runtime/dialog.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/current/reference/runtime/dialog.mdx index 35ff1f347..5025620d1 100644 --- a/website/i18n/ja/docusaurus-plugin-content-docs/current/reference/runtime/dialog.mdx +++ b/website/i18n/ja/docusaurus-plugin-content-docs/current/reference/runtime/dialog.mdx @@ -2,11 +2,11 @@ sidebar_position: 5 --- -# ダイアログ +# Dialog ランタイムでは、ファイルセレクターやメッセージボックスといったネイティブダイアログへのアクセスを提供しています。 -:::info Javascript +:::info JavaScript 現在、Javascriptランタイムではダイアログをサポートしていません。 diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/current/reference/runtime/events.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/current/reference/runtime/events.mdx index 67e35cf6e..30803b2ab 100644 --- a/website/i18n/ja/docusaurus-plugin-content-docs/current/reference/runtime/events.mdx +++ b/website/i18n/ja/docusaurus-plugin-content-docs/current/reference/runtime/events.mdx @@ -2,9 +2,9 @@ sidebar_position: 2 --- -# イベント +# Events -Wailsでは、GoまたはJavascriptによって発行および受信できる、一元化されたイベントシステムが用意されています。 必要に応じて、イベント発行時にデータを渡すことも可能です。 イベントリスナーは、そのデータをローカルデータ型で受け取ります。 +The Wails runtime provides a unified events system, where events can be emitted or received by either Go or JavaScript. 必要に応じて、イベント発行時にデータを渡すことも可能です。 イベントリスナーは、そのデータをローカルデータ型で受け取ります。 ### EventsOn diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/current/reference/runtime/intro.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/current/reference/runtime/intro.mdx index 2dc8d1b14..a429bc1e0 100644 --- a/website/i18n/ja/docusaurus-plugin-content-docs/current/reference/runtime/intro.mdx +++ b/website/i18n/ja/docusaurus-plugin-content-docs/current/reference/runtime/intro.mdx @@ -2,17 +2,17 @@ sidebar_position: 1 --- -# イントロダクション +# Introduction -ランタイムは、アプリケーションにユーティリティメソッドを提供するライブラリです。 GoとJavascriptの両方にランタイムがあり、どちらにもほぼ同じメソッドが提供されています。 +ランタイムは、アプリケーションにユーティリティメソッドを提供するライブラリです。 There is both a Go and JavaScript runtime and the aim is to try and keep them at parity where possible. ユーティリティメソッドには次のようなものがあります: -- [ウィンドウ](window.mdx) -- [Menu](menu.mdx) +- [Window](window.mdx) +- [メニュー](menu.mdx) - [ダイアログ](dialog.mdx) - [イベント](events.mdx) -- [Browser](browser.mdx) +- [ブラウザ](browser.mdx) - [ログ](log.mdx) Goのランタイムは、`github.com/wailsapp/wails/v2/pkg/runtime`をインポートすることで利用できます。 このパッケージのすべてのメソッドは、1番目の引数でContextを渡す必要があります。 このContextは、[OnStartup](../options.mdx#onstartup)フック、または[OnDomReady](../options.mdx#ondomready)フックからあらかじめ取得しておいてください。 @@ -23,7 +23,7 @@ Goのランタイムは、`github.com/wailsapp/wails/v2/pkg/runtime`をインポ ::: -Javascriptのランタイムは、`window.runtime`マップを介してフロントエンド上で利用できます。 `dev`モードでは、Typescript型定義を提供するランタイムパッケージが生成されます。 これらは、フロントエンドディレクトリの`wailsjs`ディレクトリに配置しておく必要があります。 +The JavaScript library is available to the frontend via the `window.runtime` map. There is a runtime package generated when using `dev` mode that provides TypeScript declarations for the runtime. これらは、フロントエンドディレクトリの`wailsjs`ディレクトリに配置しておく必要があります。 ### 非表示 diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/current/reference/runtime/log.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/current/reference/runtime/log.mdx index 057aa802a..838659794 100644 --- a/website/i18n/ja/docusaurus-plugin-content-docs/current/reference/runtime/log.mdx +++ b/website/i18n/ja/docusaurus-plugin-content-docs/current/reference/runtime/log.mdx @@ -2,9 +2,9 @@ sidebar_position: 3 --- -# ログ +# Log -Wailsでは、GoまたはJavascriptから呼び出すことのできるロギングメカニズムを用意しています。 一般的なロガーと同じように、ログにはいくつかのログレベルがあります: +The Wails runtime provides a logging mechanism that may be called from Go or JavaScript. 一般的なロガーと同じように、ログにはいくつかのログレベルがあります: - トレース - デバッグ @@ -101,7 +101,7 @@ Go: `LogFatalf(ctx context.Context, format string, args ...interface{})`
### LogSetLogLevel -出力ログレベルを設定します。 Javascriptでは、数値が次のログレベルに対応しています: +出力ログレベルを設定します。 In JavaScript, the number relates to the following log levels: | 値 | ログレベル | | - | ----- | diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/current/reference/runtime/menu.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/current/reference/runtime/menu.mdx index 14bad37f4..9d38fcd62 100644 --- a/website/i18n/ja/docusaurus-plugin-content-docs/current/reference/runtime/menu.mdx +++ b/website/i18n/ja/docusaurus-plugin-content-docs/current/reference/runtime/menu.mdx @@ -2,11 +2,11 @@ sidebar_position: 6 --- -# Menu +# メニュー これらは、アプリケーションメニューに関連したメソッドです。 -:::info Javascript +:::info JavaScript 現在、Javascriptランタイムではメニューをサポートしていません。 diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/current/reference/runtime/window.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/current/reference/runtime/window.mdx index 3a71d1932..b8c9a8ae5 100644 --- a/website/i18n/ja/docusaurus-plugin-content-docs/current/reference/runtime/window.mdx +++ b/website/i18n/ja/docusaurus-plugin-content-docs/current/reference/runtime/window.mdx @@ -200,7 +200,7 @@ Windowsの場合、0または255のアルファ値(A) のみがサポートさ Go: `WindowSetBackgroundColour(ctx context.Context, R, G, B, A uint8)`
JS: `WindowSetBackgroundColour(R, G, B, A)` -## Typescript型定義 +## TypeScript Object Definitions ### Position diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1.json b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1.json index 1114bafc9..808516c41 100644 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1.json +++ b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1.json @@ -4,11 +4,11 @@ "description": "The label for version v2.0.0-rc.1" }, "sidebar.docs.category.Getting Started": { - "message": "はじめよう", + "message": "Getting Started", "description": "The label for category Getting Started in sidebar docs" }, "sidebar.docs.category.Reference": { - "message": "リファレンス", + "message": "Reference", "description": "The label for category Reference in sidebar docs" }, "sidebar.docs.category.Runtime": { @@ -16,23 +16,23 @@ "description": "The label for category Runtime in sidebar docs" }, "sidebar.docs.category.Community": { - "message": "コミュニティ", + "message": "Community", "description": "The label for category Community in sidebar docs" }, "sidebar.docs.category.Showcase": { - "message": "事例紹介", + "message": "Showcase", "description": "The label for category Showcase in sidebar docs" }, "sidebar.docs.category.Guides": { - "message": "ガイド", + "message": "Guides", "description": "The label for category Guides in sidebar docs" }, "sidebar.docs.category.Tutorials": { - "message": "チュートリアル", + "message": "Tutorials", "description": "The label for category Tutorials in sidebar docs" }, "sidebar.docs.link.Contributing": { - "message": "コントリビューション", + "message": "Contributing", "description": "The label for link Contributing in sidebar docs, linking to /community-guide#ways-of-contributing" } } diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0.json b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0.json index 8e4f1d087..35a78ae58 100644 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0.json +++ b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0.json @@ -4,11 +4,11 @@ "description": "The label for version v2.0.0" }, "sidebar.docs.category.Getting Started": { - "message": "はじめよう", + "message": "Getting Started", "description": "The label for category Getting Started in sidebar docs" }, "sidebar.docs.category.Reference": { - "message": "リファレンス", + "message": "Reference", "description": "The label for category Reference in sidebar docs" }, "sidebar.docs.category.Runtime": { @@ -16,23 +16,23 @@ "description": "The label for category Runtime in sidebar docs" }, "sidebar.docs.category.Community": { - "message": "コミュニティ", + "message": "Community", "description": "The label for category Community in sidebar docs" }, "sidebar.docs.category.Showcase": { - "message": "事例紹介", + "message": "Showcase", "description": "The label for category Showcase in sidebar docs" }, "sidebar.docs.category.Guides": { - "message": "ガイド", + "message": "Guides", "description": "The label for category Guides in sidebar docs" }, "sidebar.docs.category.Tutorials": { - "message": "チュートリアル", + "message": "Tutorials", "description": "The label for category Tutorials in sidebar docs" }, "sidebar.docs.link.Contributing": { - "message": "コントリビューション", + "message": "Contributing", "description": "The label for link Contributing in sidebar docs, linking to /community-guide#ways-of-contributing" } } diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0.json b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0.json index bd54c8596..2c28d668d 100644 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0.json +++ b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0.json @@ -4,11 +4,11 @@ "description": "The label for version v2.1.0" }, "sidebar.docs.category.Getting Started": { - "message": "はじめよう", + "message": "Getting Started", "description": "The label for category Getting Started in sidebar docs" }, "sidebar.docs.category.Reference": { - "message": "リファレンス", + "message": "Reference", "description": "The label for category Reference in sidebar docs" }, "sidebar.docs.category.Runtime": { @@ -16,23 +16,23 @@ "description": "The label for category Runtime in sidebar docs" }, "sidebar.docs.category.Community": { - "message": "コミュニティ", + "message": "Community", "description": "The label for category Community in sidebar docs" }, "sidebar.docs.category.Showcase": { - "message": "事例紹介", + "message": "Showcase", "description": "The label for category Showcase in sidebar docs" }, "sidebar.docs.category.Guides": { - "message": "ガイド", + "message": "Guides", "description": "The label for category Guides in sidebar docs" }, "sidebar.docs.category.Tutorials": { - "message": "チュートリアル", + "message": "Tutorials", "description": "The label for category Tutorials in sidebar docs" }, "sidebar.docs.link.Contributing": { - "message": "コントリビューション", + "message": "Contributing", "description": "The label for link Contributing in sidebar docs, linking to /community-guide#ways-of-contributing" } } diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0.json b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0.json index b212c2324..1074035c4 100644 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0.json +++ b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0.json @@ -4,11 +4,11 @@ "description": "The label for version v2.2.0" }, "sidebar.docs.category.Getting Started": { - "message": "はじめよう", + "message": "Getting Started", "description": "The label for category Getting Started in sidebar docs" }, "sidebar.docs.category.Reference": { - "message": "リファレンス", + "message": "Reference", "description": "The label for category Reference in sidebar docs" }, "sidebar.docs.category.Runtime": { @@ -16,23 +16,23 @@ "description": "The label for category Runtime in sidebar docs" }, "sidebar.docs.category.Community": { - "message": "コミュニティ", + "message": "Community", "description": "The label for category Community in sidebar docs" }, "sidebar.docs.category.Showcase": { - "message": "事例紹介", + "message": "Showcase", "description": "The label for category Showcase in sidebar docs" }, "sidebar.docs.category.Guides": { - "message": "ガイド", + "message": "Guides", "description": "The label for category Guides in sidebar docs" }, "sidebar.docs.category.Tutorials": { - "message": "チュートリアル", + "message": "Tutorials", "description": "The label for category Tutorials in sidebar docs" }, "sidebar.docs.link.Contributing": { - "message": "コントリビューション", + "message": "Contributing", "description": "The label for link Contributing in sidebar docs, linking to /community-guide#ways-of-contributing" } } diff --git a/website/i18n/ja/docusaurus-plugin-content-pages/changelog.mdx b/website/i18n/ja/docusaurus-plugin-content-pages/changelog.mdx index 9abfdf965..99fce57b0 100644 --- a/website/i18n/ja/docusaurus-plugin-content-pages/changelog.mdx +++ b/website/i18n/ja/docusaurus-plugin-content-pages/changelog.mdx @@ -1,4 +1,4 @@ -# 変更履歴 +# Changelog All notable changes to this project will be documented in this file. @@ -17,10 +17,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - Added `OpenInspectorOnStartup` to debug options to allow opening the WebInspector during startup of the application in debug mode. Added by @stffabi in [PR](https://github.com/wailsapp/wails/pull/2080) - On macOS `wails doctor` now also shows the version of Xcode installed. Added by @stffabi in [PR](https://github.com/wailsapp/wails/pull/2089) - The [AssetServer](/docs/reference/options#assetserver) now supports handling range-requests if the [Assets](/docs/reference/options/#assets-1) `fs.FS` provides an `io.ReadSeeker`. Added by @stffabi in [PR](https://github.com/wailsapp/wails/pull/2091) +- Add new property for the `wails.json` config file - `bindings`. More information on the new property can be found in the updated [schema](/schemas/config.v2.json). Properties `prefix` and `suffix` allow you to control the generated TypeScript entity name in the `model.ts` file. Added by @OlegGulevskyy in [PR](https://github.com/wailsapp/wails/pull/2101) +- The `WindowSetAlwaysOnTop` method is now exposed in the JS runtime. Fixed by @gotid in [PR](https://github.com/wailsapp/wails/pull/2128) ### Fixed - The `noreload` flag in wails dev wasn't applied. Fixed by @stffabi in this [PR](https://github.com/wailsapp/wails/pull/2081) - `build/bin` folder was duplicating itself on each reload in `wails dev` mode. Fixed by @OlegGulevskyy in this [PR](https://github.com/wailsapp/wails/pull/2103) +- Prevent a thin white line at the bottom of a frameless window on Windows. Fixed by @stffabi in this [PR](https://github.com/wailsapp/wails/pull/2111) ## v2.2.0 - 2022-11-09 @@ -39,7 +42,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ### Fixed - Webview2 on Windows returns a potential whitespace when defining the style like this style="--wails-draggable: drag". Fixed by @stffabi in https://github.com/wailsapp/wails/pull/1989 -- Bound structs that had `struct{}` field types would cause the Typescript generation to fail. Thanks to @ParkourLiu for the [PR](https://github.com/wailsapp/wails/pull/1999) +- Bound structs that had `struct{}` field types would cause the TypeScript generation to fail. Thanks to @ParkourLiu for the [PR](https://github.com/wailsapp/wails/pull/1999) - When maximising a frameless window on Windows with multiple monitors, the window could sometimes become blank. Thanks to @stffabi for the [fix](https://github.com/wailsapp/wails/pull/2043) ### Changed @@ -84,7 +87,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - Remove the `.git` directory in the template - @misitebao in https://github.com/wailsapp/wails/pull/1929 - Fix wails dev - @JulioDRF in https://github.com/wailsapp/wails/pull/1931 - Fix for considering new `go` files in dev filesystem watcher - @scottopell in https://github.com/wailsapp/wails/pull/1946 -- Prevent type parsing to interfere with Typescript package name - @ValentinTrinque in https://github.com/wailsapp/wails/pull/1942 +- Prevent type parsing to interfere with TypeScript package name - @ValentinTrinque in https://github.com/wailsapp/wails/pull/1942 - [dev] Do not try to infer assetdir from fs.FS when a frontend dev server is in use - @stffabi in https://github.com/wailsapp/wails/pull/1972 - Fix init command not listed in wails help message - @lyon-lee-dev in https://github.com/wailsapp/wails/pull/1976 @@ -479,7 +482,7 @@ Experimental: &options.Experimental{ - 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) - [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) +- 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) - Added docs for [code-signing](https://wails.io/docs/guides/signing) and [NSIS installer](https://wails.io/docs/guides/windows-installer) - [@gardc](https://github.com/gardc) - Add support for `-trimpath` [build flag](https://wails.io/docs/reference/cli#build) @@ -489,7 +492,7 @@ Experimental: &options.Experimental{ - Improved mimetype detection for BOM marker and comments - [@napalu](https://github.com/napalu) - Remove duplicate mimetype entries - [@napalu](https://github.com/napalu) -- Remove duplicate Typescript imports in generated definition files - [@adalessa](https://github.com/adalessa) +- Remove duplicate TypeScript imports in generated definition files - [@adalessa](https://github.com/adalessa) - Add missing method declaration - [@adalessa](https://github.com/adalessa) - Fix Linux sigabrt on start - [@napalu](https://github.com/napalu) - Double Click event now works on elements with `data-wails-drag` attribute - [@jicg](https://github.com/jicg) diff --git a/website/i18n/ja/docusaurus-plugin-content-pages/coc.mdx b/website/i18n/ja/docusaurus-plugin-content-pages/coc.mdx index 15a37dfcf..22ffade50 100644 --- a/website/i18n/ja/docusaurus-plugin-content-pages/coc.mdx +++ b/website/i18n/ja/docusaurus-plugin-content-pages/coc.mdx @@ -50,7 +50,7 @@ **帰結**: コミュニティリーダーからの非公開の書面による警告。 違反の理由を明確にし、行動が不適切だった理由を説明します。 公の謝罪が要求される場合があります。 -### 2. 警告 +### 2. Warning **コミュニティへの影響**: 単一の出来事または一連の動作による違反。 diff --git a/website/i18n/ja/docusaurus-plugin-content-pages/community-guide.mdx b/website/i18n/ja/docusaurus-plugin-content-pages/community-guide.mdx index 22542197b..14bc204e7 100644 --- a/website/i18n/ja/docusaurus-plugin-content-pages/community-guide.mdx +++ b/website/i18n/ja/docusaurus-plugin-content-pages/community-guide.mdx @@ -1,4 +1,4 @@ -# コミュニティガイド +# Community Guide The number of Wails users is growing at an incredible rate, and if you're reading this, chances are you're ready to join. So... welcome! @@ -70,6 +70,7 @@ The process for fixing bugs are as follows: - The scope of the issue including platforms affected - 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](https://stackoverflow.com/help/minimal-reproducible-example) - The output of `wails doctor` +- A test that can reproduce the bug - 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/_` @@ -120,7 +121,7 @@ There isn't usually a reason to update released documentation so we don't genera 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. -#### 言語一覧 +#### Languages The default documents of the Wails project are English documents. We use the "crowdin" tool to translate documents in other languages and synchronize them to the website. You can [join our project](https://crowdin.com/project/wails) and submit your translations to make contributions. diff --git a/website/i18n/ja/docusaurus-theme-classic/footer.json b/website/i18n/ja/docusaurus-theme-classic/footer.json index 22c9a2f88..820b56807 100644 --- a/website/i18n/ja/docusaurus-theme-classic/footer.json +++ b/website/i18n/ja/docusaurus-theme-classic/footer.json @@ -1,6 +1,6 @@ { "link.title.Docs": { - "message": "ドキュメント", + "message": "Docs", "description": "The title of the footer links column with title=Docs in the footer" }, "link.title.Community": { @@ -8,7 +8,7 @@ "description": "The title of the footer links column with title=Community in the footer" }, "link.title.More": { - "message": "その他", + "message": "More", "description": "The title of the footer links column with title=More in the footer" }, "link.item.label.Introduction": { @@ -36,11 +36,11 @@ "description": "The label of footer link with label=Slack linking to https://gophers.slack.com/messages/CJ4P9F7MZ/" }, "link.item.label.Slack invite": { - "message": "Slackへの招待", + "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": "ブログ", + "message": "Blog", "description": "The label of footer link with label=Blog linking to /blog" }, "copyright": { diff --git a/website/i18n/ja/docusaurus-theme-classic/navbar.json b/website/i18n/ja/docusaurus-theme-classic/navbar.json index 6f738ece3..91c06b959 100644 --- a/website/i18n/ja/docusaurus-theme-classic/navbar.json +++ b/website/i18n/ja/docusaurus-theme-classic/navbar.json @@ -1,6 +1,6 @@ { "item.label.Sponsor": { - "message": "スポンサー ❤", + "message": "Sponsor ❤", "description": "Navbar item with label Sponsor" }, "item.label.Docs": { diff --git a/website/i18n/ko/code.json b/website/i18n/ko/code.json index 948286185..ab86b38ce 100644 --- a/website/i18n/ko/code.json +++ b/website/i18n/ko/code.json @@ -55,7 +55,7 @@ "description": "The page & hero title of the blog archive page" }, "theme.blog.archive.description": { - "message": "아카이브", + "message": "Archive", "description": "The page & hero description of the blog archive page" }, "theme.BackToTopButton.buttonAriaLabel": { diff --git a/website/i18n/ko/docusaurus-plugin-content-blog/2021-09-27-v2-beta1-release-notes.mdx b/website/i18n/ko/docusaurus-plugin-content-blog/2021-09-27-v2-beta1-release-notes.mdx index 28201766d..d01b542b1 100644 --- a/website/i18n/ko/docusaurus-plugin-content-blog/2021-09-27-v2-beta1-release-notes.mdx +++ b/website/i18n/ko/docusaurus-plugin-content-blog/2021-09-27-v2-beta1-release-notes.mdx @@ -116,7 +116,7 @@ It also provides the additional features: In addition to this, a webserver will start on port 34115. This will serve your application to any browser that connects to it. All connected web browsers will respond to system events like hot reload on asset change. -In Go, we are used to dealing with structs in our applications. It's often useful to send structs to our frontend and use them as state in our application. In v1, this was a very manual process and a bit of a burden on the developer. I'm happy to announce that in v2, any application run in dev mode will automatically generate Typescript models for all structs that are input or output parameters to bound methods. This enables seamless interchange of data models between the two worlds. +In Go, we are used to dealing with structs in our applications. It's often useful to send structs to our frontend and use them as state in our application. In v1, this was a very manual process and a bit of a burden on the developer. I'm happy to announce that in v2, any application run in dev mode will automatically generate TypeScript models for all structs that are input or output parameters to bound methods. This enables seamless interchange of data models between the two worlds. In addition to this, another JS module is dynamically generated wrapping all your bound methods. This provides JSDoc for your methods, providing code completion and hinting in your IDE. It's really cool when you get data models auto-imported when hitting tab in an auto-generated module wrapping your Go code! diff --git a/website/i18n/ko/docusaurus-plugin-content-blog/2021-11-08-v2-beta2-release-notes.mdx b/website/i18n/ko/docusaurus-plugin-content-blog/2021-11-08-v2-beta2-release-notes.mdx index 76ae8c80a..86d44616f 100644 --- a/website/i18n/ko/docusaurus-plugin-content-blog/2021-11-08-v2-beta2-release-notes.mdx +++ b/website/i18n/ko/docusaurus-plugin-content-blog/2021-11-08-v2-beta2-release-notes.mdx @@ -74,7 +74,7 @@ It also provides the additional features: In addition to this, a webserver will start on port 34115. This will serve your application to any browser that connects to it. All connected web browsers will respond to system events like hot reload on asset change. -In Go, we are used to dealing with structs in our applications. It's often useful to send structs to our frontend and use them as state in our application. In v1, this was a very manual process and a bit of a burden on the developer. I'm happy to announce that in v2, any application run in dev mode will automatically generate Typescript models for all structs that are input or output parameters to bound methods. This enables seamless interchange of data models between the two worlds. +In Go, we are used to dealing with structs in our applications. It's often useful to send structs to our frontend and use them as state in our application. In v1, this was a very manual process and a bit of a burden on the developer. I'm happy to announce that in v2, any application run in dev mode will automatically generate TypeScript models for all structs that are input or output parameters to bound methods. This enables seamless interchange of data models between the two worlds. In addition to this, another JS module is dynamically generated wrapping all your bound methods. This provides JSDoc for your methods, providing code completion and hinting in your IDE. It's really cool when you get data models auto-imported when hitting tab in an auto-generated module wrapping your Go code! diff --git a/website/i18n/ko/docusaurus-plugin-content-blog/2022-02-22-v2-beta3-release-notes.mdx b/website/i18n/ko/docusaurus-plugin-content-blog/2022-02-22-v2-beta3-release-notes.mdx index eb7f2a46a..b405953cf 100644 --- a/website/i18n/ko/docusaurus-plugin-content-blog/2022-02-22-v2-beta3-release-notes.mdx +++ b/website/i18n/ko/docusaurus-plugin-content-blog/2022-02-22-v2-beta3-release-notes.mdx @@ -61,7 +61,7 @@ It also provides the additional features: In addition to this, a webserver will start on port 34115. This will serve your application to any browser that connects to it. All connected web browsers will respond to system events like hot reload on asset change. -In Go, we are used to dealing with structs in our applications. It's often useful to send structs to our frontend and use them as state in our application. In v1, this was a very manual process and a bit of a burden on the developer. I'm happy to announce that in v2, any application run in dev mode will automatically generate Typescript models for all structs that are input or output parameters to bound methods. This enables seamless interchange of data models between the two worlds. +In Go, we are used to dealing with structs in our applications. It's often useful to send structs to our frontend and use them as state in our application. In v1, this was a very manual process and a bit of a burden on the developer. I'm happy to announce that in v2, any application run in dev mode will automatically generate TypeScript models for all structs that are input or output parameters to bound methods. This enables seamless interchange of data models between the two worlds. In addition to this, another JS module is dynamically generated wrapping all your bound methods. This provides JSDoc for your methods, providing code completion and hinting in your IDE. It's really cool when you get data models auto-imported when hitting tab in an auto-generated module wrapping your Go code! diff --git a/website/i18n/ko/docusaurus-plugin-content-blog/2022-09-22-v2-release-notes.mdx b/website/i18n/ko/docusaurus-plugin-content-blog/2022-09-22-v2-release-notes.mdx index e9d570afa..c321f5042 100644 --- a/website/i18n/ko/docusaurus-plugin-content-blog/2022-09-22-v2-release-notes.mdx +++ b/website/i18n/ko/docusaurus-plugin-content-blog/2022-09-22-v2-release-notes.mdx @@ -45,7 +45,7 @@ The v2 release is a huge leap forward for the project, addressing many of the pa - A rich [runtime library](/docs/reference/runtime/intro) providing utility methods for window manipulation, eventing, dialogs, menus and logging. - Support for [obfuscating](/docs/guides/obfuscated) your application using [garble](https://github.com/burrowers/garble). - Support for compressing your application using [UPX](https://upx.github.io/). -- Automatic Typescript generation of Go structs. More info [here](/docs/howdoesitwork#calling-bound-go-methods). +- Automatic TypeScript generation of Go structs. More info [here](/docs/howdoesitwork#calling-bound-go-methods). - No extra libraries or DLLs are required to be shipped with your application. For any platform. - No requirement to bundle frontend assets. Just develop your application like any other web application. diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/current/community/showcase/encrypteasy.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/current/community/showcase/encrypteasy.mdx index 7504950ea..4c8cac235 100644 --- a/website/i18n/ko/docusaurus-plugin-content-docs/current/community/showcase/encrypteasy.mdx +++ b/website/i18n/ko/docusaurus-plugin-content-docs/current/community/showcase/encrypteasy.mdx @@ -7,6 +7,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.** +**[EncryptEasy](https://www.encrypteasy.app)는 간단하고 사용하기 쉬운 PGP 암호화 도구로 모든 키들을 관리합니다. 암호화는 간단해야 합니다. 그리고 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. +PGP를 사용한 메시지 암호화는 업계 표준입니다. 모두 개인 키와 공개 키를 가지고 있습니다. 귀하의 개인 키는 귀하만 메시지를 읽을 수 있도록 비공개로 유지되어야 합니다. 귀하의 공개 키는 귀하에게 암호화된 비밀 메시지를 보내려는 모든 사람에게 배포됩니다. 키 관리, 메시지 암호화 및 메시지 해독은 매끄러운 경험이어야 합니다. EncryptEasy는 모든 것을 쉽게 만드는 것입니다. EncryptEasy는 모든 것을 쉽게 만듭니다. diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/current/community/showcase/filehound.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/current/community/showcase/filehound.mdx index 134365aaf..94b719975 100644 --- a/website/i18n/ko/docusaurus-plugin-content-docs/current/community/showcase/filehound.mdx +++ b/website/i18n/ko/docusaurus-plugin-content-docs/current/community/showcase/filehound.mdx @@ -7,10 +7,10 @@

``` -[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. +[FileHound Export Utility](https://www.filehound.co.uk/) FileHound는 안전한 파일 보존, 비즈니스 프로세스 자동화 및 SmartCapture 기능을 위해 만들어진 클라우드 문서 관리 플랫폼입니다. -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. +FileHound Export Utility를 사용하면 FileHound 관리자가 대체 백업 및 복구 목적으로 보안 문서 및 데이터 추출 작업을 실행할 수 있습니다. 이 응용 프로그램은 선택한 필터를 기반으로 FileHound에 저장된 모든 문서 및/또는 메타 데이터를 다운로드합니다. 메타데이터는 JSON 및 XML 형식으로 내보낼 수 있습니다. -Backend built with: Go 1.15 Wails 1.11.0 go-sqlite3 1.14.6 go-linq 3.2 +백엔드의 구성은 다음과 같습니다: Go 1.15 Wails 1.11.0 go-sqlite3 1.14.6 go-linq 3.2 -Frontend with: Vue 2.6.11 Vuex 3.4.0 Typescript Tailwind 1.9.6 +Frontend with: Vue 2.6.11 Vuex 3.4.0 TypeScript Tailwind 1.9.6 diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/current/community/showcase/minecraftupdater.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/current/community/showcase/minecraftupdater.mdx index 2f6c7c72b..d31eac0d5 100644 --- a/website/i18n/ko/docusaurus-plugin-content-docs/current/community/showcase/minecraftupdater.mdx +++ b/website/i18n/ko/docusaurus-plugin-content-docs/current/community/showcase/minecraftupdater.mdx @@ -11,4 +11,4 @@

``` -[Minecraft Updater](https://github.com/Gurkengewuerz/MinecraftModUpdater) is a utility tool to update and synchronize Minecraft mods for your userbase. It’s built using Wails2 and React with [antd](https://ant.design/) as frontend framework. +[Minecraft Updater](https://github.com/Gurkengewuerz/MinecraftModUpdater)는 사용자 기반의 Minecraft 모드를 업데이트하고 동기화하는 유틸리티 도구입니다. Wails2와 [antd](https://ant.design/)를 프런트엔드 프레임워크로 사용한 React를 사용하여 구축되었습니다. diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/current/gettingstarted/development.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/current/gettingstarted/development.mdx index 49dcb09e5..368a0b575 100644 --- a/website/i18n/ko/docusaurus-plugin-content-docs/current/gettingstarted/development.mdx +++ b/website/i18n/ko/docusaurus-plugin-content-docs/current/gettingstarted/development.mdx @@ -7,7 +7,7 @@ sidebar_position: 5 프로젝트 디렉토리에서 `wails dev` 명령을 실행하여 개발 모드에서 애플리케이션을 실행할 수 있습니다. 이렇게 하면 다음 작업이 수행됩니다. - 애플리케이션 빌드 및 실행 -- Javascript에서 호출할 수 있도록 Go 코드를 프론트엔드에 바인딩합니다. +- Bind your Go code to the frontend so it can be called from JavaScript - [Vite](https://vitejs.dev/)의 기능을 사용하여 Go 파일의 수정 사항을 감시하고 변경 시 다시 빌드/재실행 합니다. - 브라우저를 통해 애플리케이션을 제공할 [Webserver](http://localhost:34115) 를 설정합니다. 이렇게 하면 브라우저 확장을 사용할 수 있습니다. 콘솔에서 Go 코드를 호출할 수도 있습니다. diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/current/gettingstarted/firstproject.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/current/gettingstarted/firstproject.mdx index a3756d0b0..45f2aa8a5 100644 --- a/website/i18n/ko/docusaurus-plugin-content-docs/current/gettingstarted/firstproject.mdx +++ b/website/i18n/ko/docusaurus-plugin-content-docs/current/gettingstarted/firstproject.mdx @@ -26,61 +26,61 @@ import TabItem from "@theme/TabItem"; ]} > - 자바스크립트를 사용하여 Svelte 프로젝트를 생성합니다. with:

+ 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
- 자바스크립트를 사용하여 React 프로젝트를 생성합니다. with:

+ 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
- 자바스크립트를 사용하여 Vue 프로젝트를 생성합니다. with:

+ 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
- 자바스크립트를 사용하여 Preact 프로젝트를 생성합니다. with:

+ 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
- 자바스크립트를 사용하여 Lit 프로젝트를 생성합니다. with:

+ 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
- 자바스크립트를 사용하여 Vanilla 프로젝트를 생성합니다. with:

+ 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/i18n/ko/docusaurus-plugin-content-docs/current/gettingstarted/installation.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/current/gettingstarted/installation.mdx index 7909a16ec..d46f5ac80 100644 --- a/website/i18n/ko/docusaurus-plugin-content-docs/current/gettingstarted/installation.mdx +++ b/website/i18n/ko/docusaurus-plugin-content-docs/current/gettingstarted/installation.mdx @@ -84,6 +84,6 @@ go version `wails doctor`를 실행하면 의존성이 올바르게 설치되어 있는지 점검할 수 있습니다. 문제가 있는 의존성에 대해서는 문제 해결을 위한 도움을 줄 수 있습니다. -## `wails` 명령어를 찾을 수 없나요? +## The `wails` command appears to be missing? -시스템에서 `wails` 명령어를 찾을 수 없는 경우 Go 설치 지침을 잘 따라했는지 확인해보세요. 일반적으로, 사용자의 홈 디렉토리에 있는 `go/bin` 디렉토리가 `PATH` 환경 변수에 없음을 의미합니다. 또한, 설치 프로그램이 수행한 환경 변경 사항이 명령 프롬프트에 반영되도록 일반적으로 열려 있는 모든 명령 프롬프트를 닫았다가 다시 열어야합니다. +If your system is reporting that the `wails` command is missing, make sure you have followed the Go installation guide correctly. 일반적으로, 사용자의 홈 디렉토리에 있는 `go/bin` 디렉토리가 `PATH` 환경 변수에 없음을 의미합니다. 또한, 설치 프로그램이 수행한 환경 변경 사항이 명령 프롬프트에 반영되도록 일반적으로 열려 있는 모든 명령 프롬프트를 닫았다가 다시 열어야합니다. diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/current/guides/migrating.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/current/guides/migrating.mdx index 9915e2305..7123cbe6b 100644 --- a/website/i18n/ko/docusaurus-plugin-content-docs/current/guides/migrating.mdx +++ b/website/i18n/ko/docusaurus-plugin-content-docs/current/guides/migrating.mdx @@ -118,7 +118,7 @@ The _biggest_ change in v2 is how assets are handled. In v1, assets were passed via 2 application options: -- `JS` - The application's Javascript +- `JS` - The application's JavaScript - `CSS` - The application's CSS This meant that the responsibility of generating a single JS and CSS file was on the developer. This essentially required the use of complicated packers such as webpack. diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/current/guides/troubleshooting.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/current/guides/troubleshooting.mdx index 82e4c35fa..c1cd33b38 100644 --- a/website/i18n/ko/docusaurus-plugin-content-docs/current/guides/troubleshooting.mdx +++ b/website/i18n/ko/docusaurus-plugin-content-docs/current/guides/troubleshooting.mdx @@ -105,9 +105,9 @@ go env -w GOPROXY=https://goproxy.cn,direct Source: https://github.com/wailsapp/wails/issues/1233 -## The generated Typescript doesn't have the correct types +## 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. 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). ## When I navigate away from `index.html`, I am unable to call methods on the frontend diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/current/howdoesitwork.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/current/howdoesitwork.mdx index e186de894..163701520 100644 --- a/website/i18n/ko/docusaurus-plugin-content-docs/current/howdoesitwork.mdx +++ b/website/i18n/ko/docusaurus-plugin-content-docs/current/howdoesitwork.mdx @@ -4,7 +4,7 @@ sidebar_position: 20 # How does it work? -A Wails application is a standard Go application, with a webkit frontend. The Go part of the application consists of the application code and a runtime library that provides a number of useful operations, like controlling the application window. The frontend is a webkit window that will display the frontend assets. Also available to the frontend is a Javascript version of the runtime library. Finally, it is possible to bind Go methods to the frontend, and these will appear as Javascript methods that can be called, just as if they were local Javascript methods. +A Wails application is a standard Go application, with a webkit frontend. The Go part of the application consists of the application code and a runtime library that provides a number of useful operations, like controlling the application window. The frontend is a webkit window that will display the frontend assets. Also available to the frontend is a JavaScript version of the runtime library. Finally, it is possible to bind Go methods to the frontend, and these will appear as JavaScript methods that can be called, just as if they were local JavaScript methods. ```mdx-code-block
@@ -103,11 +103,11 @@ More details can be found in the [Application Development Guide](guides/applicat #### Application Lifecycle Callbacks -Just before the frontend is about to load `index.html`, a callback is made to the function provided in [OnStartup](reference/options.mdx#onstartup). A standard Go context is passed to this method. This context is required when calling the runtime so a standard pattern is to save a reference to in this method. Just before the application shuts down, the [OnShutdown](reference/options.mdx#onshutdown) callback is called in the same way, again with the context. There is also an [OnDomReady](reference/options.mdx#ondomready) callback for when the frontend has completed loading all assets in `index.html` and is equivalent of the [`body onload`](https://www.w3schools.com/jsref/event_onload.asp) event in Javascript. It is also possible to hook into the window close (or application quit) event by setting the option [OnBeforeClose](reference/options.mdx#onbeforeclose). +Just before the frontend is about to load `index.html`, a callback is made to the function provided in [OnStartup](reference/options.mdx#onstartup). A standard Go context is passed to this method. This context is required when calling the runtime so a standard pattern is to save a reference to in this method. Just before the application shuts down, the [OnShutdown](reference/options.mdx#onshutdown) callback is called in the same way, again with the context. There is also an [OnDomReady](reference/options.mdx#ondomready) callback for when the frontend has completed loading all assets in `index.html` and is equivalent of the [`body onload`](https://www.w3schools.com/jsref/event_onload.asp) event in JavaScript. It is also possible to hook into the window close (or application quit) event by setting the option [OnBeforeClose](reference/options.mdx#onbeforeclose). #### Method Binding -The `Bind` option is one of the most important options in a Wails application. It specifies which struct methods to expose to the frontend. Think of structs like "controllers" in a traditional web application. When the application starts, it examines the struct instances listed in the `Bind` field in the options, determines which methods are public (starts with an uppercase letter) and will generate Javascript versions of those methods that can be called by the frontend code. +The `Bind` option is one of the most important options in a Wails application. It specifies which struct methods to expose to the frontend. Think of structs like "controllers" in a traditional web application. When the application starts, it examines the struct instances listed in the `Bind` field in the options, determines which methods are public (starts with an uppercase letter) and will generate JavaScript versions of those methods that can be called by the frontend code. :::info Note @@ -184,9 +184,9 @@ You may bind as many structs as you like. Just make sure you create an instance When you run `wails dev` (or `wails generate module`), a frontend module will be generated containing the following: -- Javascript bindings for all bound methods -- Typescript declarations for all bound methods -- Typescript definitions for all Go structs used as inputs or outputs by the bound methods +- JavaScript bindings for all bound methods +- TypeScript declarations for all bound methods +- TypeScript definitions for all Go structs used as inputs or outputs by the bound methods This makes it incredibly simple to call Go code from the frontend, using the same strongly typed datastructures. @@ -201,7 +201,7 @@ The frontend is a collection of files rendered by webkit. It's like a browser an ### Calling bound Go methods -When you run your application with `wails dev`, it will automatically generate Javascript bindings for your structs in a directory called `wailsjs/go` (You can also do this by running `wails generate module`). The generated files mirror the package names in your application. In the example above, we bind `app`, which has one public method `Greet`. This will lead to the generation of the following files: +When you run your application with `wails dev`, it will automatically generate JavaScript bindings for your structs in a directory called `wailsjs/go` (You can also do this by running `wails generate module`). The generated files mirror the package names in your application. In the example above, we bind `app`, which has one public method `Greet`. This will lead to the generation of the following files: ```bash wailsjs @@ -211,7 +211,7 @@ wailsjs └─App.js ``` -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: ```javascript // ... @@ -224,27 +224,27 @@ function doGreeting(name) { } ``` -The Typescript declaration file gives you the correct types for the bound methods: +The TypeScript declaration file gives you the correct types for the bound methods: ```ts export function Greet(arg1: string): Promise; ``` -The generated methods return a Promise. A successful call will result in the first return value from the Go call to be passed to the `resolve` handler. An unsuccessful call is when a Go method that has an error type as it's second return value, passes an error instance back to the caller. This is passed back via the `reject` handler. In the example above, `Greet` only returns a `string` so the Javascript call will never reject - unless invalid data is passed to it. +The generated methods return a Promise. A successful call will result in the first return value from the Go call to be passed to the `resolve` handler. An unsuccessful call is when a Go method that has an error type as it's second return value, passes an error instance back to the caller. This is passed back via the `reject` handler. In the example above, `Greet` only returns a `string` so the JavaScript call will never reject - unless invalid data is passed to it. -All data types are correctly translated between Go and Javascript. Even structs. If you return a struct from a Go call, it will be returned to your frontend as a Javascript class. +All data types are correctly translated between Go and JavaScript. Even structs. If you return a struct from a Go call, it will be returned to your frontend as a JavaScript class. :::info Note -Struct fields *must* have a valid `json` tag to be included in the generated Typescript. +Struct fields *must* have a valid `json` tag to be included in the generated TypeScript. Anonymous nested structs are not supported at this time. ::: -It is possible to send structs back to Go. Any Javascript map/class passed as an argument that is expecting a struct, will be converted to that struct type. To make this process a lot easier, in `dev` mode, a TypeScript module is generated, defining all the struct types used in bound methods. Using this module, it's possible to construct and send native Javascript objects to the Go code. +It is possible to send structs back to Go. Any JavaScript map/class passed as an argument that is expecting a struct, will be converted to that struct type. To make this process a lot easier, in `dev` mode, a TypeScript module is generated, defining all the struct types used in bound methods. Using this module, it's possible to construct and send native JavaScript objects to the Go code. -There is also support for Go methods that use structs in their signature. All Go structs specified by a bound method (either as parameters or return types) will have Typescript versions auto generated as part of the Go code wrapper module. Using these, it's possible to share the same data model between Go and Javascript. +There is also support for Go methods that use structs in their signature. All Go structs specified by a bound method (either as parameters or return types) will have TypeScript versions auto generated as part of the Go code wrapper module. Using these, it's possible to share the same data model between Go and JavaScript. Example: We update our `Greet` method to accept a `Person` instead of a string: @@ -358,7 +358,7 @@ More information on Binding can be found in the [Binding Methods](guides/applica ### Calling runtime methods -The Javascript runtime is located at `window.runtime` and contains many methods to do various tasks such as emit an event or perform logging operations: +The JavaScript runtime is located at `window.runtime` and contains many methods to do various tasks such as emit an event or perform logging operations: ```js title="mycode.js" window.runtime.EventsEmit("my-event", 1); diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/current/introduction.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/current/introduction.mdx index a0f7e8456..222a0ae98 100644 --- a/website/i18n/ko/docusaurus-plugin-content-docs/current/introduction.mdx +++ b/website/i18n/ko/docusaurus-plugin-content-docs/current/introduction.mdx @@ -13,8 +13,8 @@ Consider it a lightweight and fast Electron alternative for Go. You can easily b - Native Menus, Dialogs, Theming and Translucency - Windows, macOS and linux support - Built in templates for Svelte, React, Preact, Vue, Lit and Vanilla JS -- Easily call Go methods from Javascript -- Automatic Go struct to Typescript model generation +- Easily call Go methods from JavaScript +- Automatic Go struct to TypeScript model generation - No CGO or external DLLs required on Windows - Live development mode using the power of [Vite](https://vitejs.dev/) - Powerful CLI to easily Create, Build and Package applications @@ -36,7 +36,7 @@ This is [varly](https://varly.app) - a desktop application for MacOS & Windows w ### Quick Start Templates -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. ### Native Elements @@ -44,13 +44,13 @@ Wails uses a purpose built library for handling native elements such as Window, **It does not embed a browser**, so it is resource efficient. Instead, it uses the native rendering engine for the platform. On Windows, this is the new Microsoft Webview2 library, built on Chromium. -### Go & Javascript Interoperability +### Go & JavaScript Interoperability -Wails automatically makes your Go methods available to Javascript, so you can call them by name from your frontend! It even generates Typescript models for the structs used by your Go methods, so you can pass the same data structures between Go and Javascript. +Wails automatically makes your Go methods available to JavaScript, so you can call them by name from your frontend! It even generates TypeScript models for the structs used by your Go methods, so you can pass the same data structures between Go and JavaScript. ### Runtime Library -Wails provides a runtime library, for both Go and Javascript, that handles a lot of the things modern applications need, like Eventing, Logging, Dialogs, etc. +Wails provides a runtime library, for both Go and JavaScript, that handles a lot of the things modern applications need, like Eventing, Logging, Dialogs, etc. ### Live Development Experience diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/current/reference/cli.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/current/reference/cli.mdx index 36f6c9717..92888242f 100644 --- a/website/i18n/ko/docusaurus-plugin-content-docs/current/reference/cli.mdx +++ b/website/i18n/ko/docusaurus-plugin-content-docs/current/reference/cli.mdx @@ -157,7 +157,7 @@ Your system is ready for Wails development! - A webserver is started on `http://localhost:34115` which serves your application (not just frontend) over http. This allows you to use your favourite browser development extensions - All application assets are loaded from disk. If they are changed, the application will automatically reload (not rebuild). All connected browsers will also reload - A JS module is generated that provides the following: - - Javascript wrappers of your Go methods with autogenerated JSDoc, providing code hinting + - JavaScript wrappers of your Go methods with autogenerated JSDoc, providing code hinting - TypeScript versions of your Go structs, that can be constructed and passed to your go methods - A second JS module is generated that provides a wrapper + TS declaration for the runtime - On macOS, it will bundle the application into a `.app` file and run it. It will use a `build/darwin/Info.dev.plist` for development. diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/current/reference/runtime/dialog.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/current/reference/runtime/dialog.mdx index cf7bf37b8..9b3e6cf14 100644 --- a/website/i18n/ko/docusaurus-plugin-content-docs/current/reference/runtime/dialog.mdx +++ b/website/i18n/ko/docusaurus-plugin-content-docs/current/reference/runtime/dialog.mdx @@ -6,7 +6,7 @@ sidebar_position: 5 This part of the runtime provides access to native dialogs, such as File Selectors and Message boxes. -:::info Javascript +:::info JavaScript Dialog is currently unsupported in the JS runtime. diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/current/reference/runtime/events.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/current/reference/runtime/events.mdx index 373a65d76..4b021cc05 100644 --- a/website/i18n/ko/docusaurus-plugin-content-docs/current/reference/runtime/events.mdx +++ b/website/i18n/ko/docusaurus-plugin-content-docs/current/reference/runtime/events.mdx @@ -4,7 +4,7 @@ sidebar_position: 2 # Events -The Wails runtime provides a unified events system, where events can be emitted or received by either Go or Javascript. Optionally, data may be passed with the events. Listeners will receive the data in the local data types. +The Wails runtime provides a unified events system, where events can be emitted or received by either Go or JavaScript. Optionally, data may be passed with the events. Listeners will receive the data in the local data types. ### EventsOn diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/current/reference/runtime/intro.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/current/reference/runtime/intro.mdx index b71759a01..55e9ed42e 100644 --- a/website/i18n/ko/docusaurus-plugin-content-docs/current/reference/runtime/intro.mdx +++ b/website/i18n/ko/docusaurus-plugin-content-docs/current/reference/runtime/intro.mdx @@ -4,9 +4,9 @@ sidebar_position: 1 # 소개 -The runtime is a library that provides utility methods for your application. There is both a Go and Javascript runtime and the aim is to try and keep them at parity where possible. +런타임은 애플리케이션에 유틸리티 메서드를 제공하는 라이브러리입니다. There is both a Go and JavaScript runtime and the aim is to try and keep them at parity where possible. -It has utility methods for: +다음에 대한 유틸리티 메서드가 있습니다: - [Window](window.mdx) - [Menu](menu.mdx) @@ -15,23 +15,23 @@ It has utility methods for: - [Browser](browser.mdx) - [Log](log.mdx) -The Go Runtime is available through importing `github.com/wailsapp/wails/v2/pkg/runtime`. 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` 가져오기를 통해 사용할 수 있습니다. 이 패키지의 모든 메소드는 컨텍스트를 첫 번째 매개변수로 사용합니다. 이 컨텍스트는 [OnStartup](../options.mdx#onstartup) 또는 [OnDomReady](../options.mdx#ondomready) 후크에서 가져와야 합니다. -:::info Note +:::참고 -Whilst the context will be provided to the [OnStartup](../options.mdx#onstartup) method, there's no guarantee the runtime will work in this method as the window is initialising in a different thread. If you wish to call runtime methods at startup, use [OnDomReady](../options.mdx#ondomready). +컨텍스트는 [OnStartup](../options.mdx#onstartup) 메서드를 사용할 경우 런타임이 이 메서드에서 다음과 같이 작동할 것이라는 보장은 없습니다. 창이 다른 스레드에서 초기화되고 있습니다. 시작 시 런타임 메서드를 호출하려면 [OnDomReady](../options.mdx#ondomready)를 사용하세요. ::: -The Javascript library is available to the frontend via the `window.runtime` map. There is a runtime package generated when using `dev` mode that provides Typescript declarations for the runtime. This should be located in the `wailsjs` directory in your frontend directory. +The JavaScript library is available to the frontend via the `window.runtime` map. There is a runtime package generated when using `dev` mode that provides TypeScript declarations for the runtime. 이것은 프론트엔드 디렉토리의 `wailsjs` 디렉토리에 있어야 합니다. ### Hide Go: `Hide(ctx context.Context)`
JS: `Hide()` -Hides the application. +애플리케이션을 숨깁니다. -:::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`. @@ -41,7 +41,7 @@ On Mac, this will hide the application in the same way as the `Hide` menu item i 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`. diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/current/reference/runtime/log.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/current/reference/runtime/log.mdx index e5e6ea7ac..2112e1c9e 100644 --- a/website/i18n/ko/docusaurus-plugin-content-docs/current/reference/runtime/log.mdx +++ b/website/i18n/ko/docusaurus-plugin-content-docs/current/reference/runtime/log.mdx @@ -4,7 +4,7 @@ sidebar_position: 3 # Log -The Wails runtime provides a logging mechanism that may be called from Go or Javascript. Like most loggers, there are a number of log levels: +The Wails runtime provides a logging mechanism that may be called from Go or JavaScript. 대부분처럼 loggers 에는 다양한 로그 수준이 있습니다: - Trace - Debug @@ -13,109 +13,109 @@ The Wails runtime provides a logging mechanism that may be called from Go or Jav - Error - Fatal -The logger will output any log message at the current, or higher, log level. Example: The `Debug` log level will output all messages except `Trace` messages. +Logger는 현재 이상의 로그 수준에서 모든 로그 메시지를 출력합니다. Example: `Debug` 로그 level은 `Trace` 메시지를 제외한 모든 메시지를 출력합니다. ### LogPrint -Logs the given message as a raw message. +주어진 메시지를 원본 메시지로 기록합니다. Go: `LogPrint(ctx context.Context, message string)`
JS: `LogPrint(message: string)` ### LogPrintf -Logs the given message as a raw message. +주어진 메시지를 원본 메시지로 기록합니다. Go: `LogPrintf(ctx context.Context, format string, args ...interface{})`
### LogTrace -Logs the given message at the `Trace` log level. +`Trace` 로그 수준에서 지정된 메시지를 기록합니다. Go: `LogTrace(ctx context.Context, message string)`
JS: `LogTrace(message: string)` ### LogTracef -Logs the given message at the `Trace` log level. +`Trace` 로그 수준에서 지정된 메시지를 기록합니다. Go: `LogTracef(ctx context.Context, format string, args ...interface{})`
### LogDebug -Logs the given message at the `Debug` log level. +`Debug` 로그 수준에서 지정된 메시지를 기록합니다. Go: `LogDebug(ctx context.Context, message string)`
JS: `LogDebug(message: string)` ### LogDebugf -Logs the given message at the `Debug` log level. +`Debug` 로그 수준에서 지정된 메시지를 기록합니다. Go: `LogDebugf(ctx context.Context, format string, args ...interface{})`
### LogInfo -Logs the given message at the `Info` log level. +`Info` 로그 수준에서 지정된 메시지를 기록합니다. Go: `LogInfo(ctx context.Context, message string)`
JS: `LogInfo(message: string)` ### LogInfof -Logs the given message at the `Info` log level. +`Info` 로그 수준에서 지정된 메시지를 기록합니다. Go: `LogInfof(ctx context.Context, format string, args ...interface{})`
### LogWarning -Logs the given message at the `Warning` log level. +`Warning` 로그 수준에서 지정된 메시지를 기록합니다. Go: `LogWarning(ctx context.Context, message string)`
JS: `LogWarning(message: string)` ### LogWarningf -Logs the given message at the `Warning` log level. +`Warning` 로그 수준에서 지정된 메시지를 기록합니다. Go: `LogWarningf(ctx context.Context, format string, args ...interface{})`
### LogError -Logs the given message at the `Error` log level. +`Error` 로그 수준에서 지정된 메시지를 기록합니다. Go: `LogError(ctx context.Context, message string)`
JS: `LogError(message: string)` ### LogErrorf -Logs the given message at the `Error` log level. +`Error` 로그 수준에서 지정된 메시지를 기록합니다. Go: `LogErrorf(ctx context.Context, format string, args ...interface{})`
### LogFatal -Logs the given message at the `Fatal` log level. +`Fatal` 로그 수준에서 지정된 메시지를 기록합니다. Go: `LogFatal(ctx context.Context, message string)`
JS: `LogFatal(message: string)` ### LogFatalf -Logs the given message at the `Fatal` log level. +`Fatal` 로그 수준에서 지정된 메시지를 기록합니다. Go: `LogFatalf(ctx context.Context, format string, args ...interface{})`
### LogSetLogLevel -Sets the log level. In Javascript, the number relates to the following log levels: +로그 레벨을 설정합니다. In JavaScript, the number relates to the following log levels: -| Value | Log Level | -| ----- | --------- | -| 1 | Trace | -| 2 | Debug | -| 3 | Info | -| 4 | Warning | -| 5 | Error | +| 값 | 로그 레벨 | +| - | ------- | +| 1 | Trace | +| 2 | Debug | +| 3 | Info | +| 4 | Warning | +| 5 | Error | Go: `LogSetLogLevel(ctx context.Context, level logger.LogLevel)`
JS: `LogSetLogLevel(level: number)` -## Using a Custom Logger +## 커스텀 Logger 사용하기 -A custom logger may be used by providing it using the [Logger](../options.mdx#logger) application option. The only requirement is that the logger implements the `logger.Logger` interface defined in `github.com/wailsapp/wails/v2/pkg/logger`: +사용자 커스텀 logger는 [Logger](../options.mdx#logger)를 사용하여 제공하여 사용할 수 있습니다. 응용 프로그램 옵션. 유일한 요구 사항은 logger가 `logger.Logger` 인터페이스를 구현한다는 것입니다. 이는 `github.com/wailsapp/wails/v2/pkg/logger`에 정의되어 있습니다: ```go title="logger.go" type Logger interface { diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/current/reference/runtime/menu.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/current/reference/runtime/menu.mdx index 85c6ab127..0eab71c01 100644 --- a/website/i18n/ko/docusaurus-plugin-content-docs/current/reference/runtime/menu.mdx +++ b/website/i18n/ko/docusaurus-plugin-content-docs/current/reference/runtime/menu.mdx @@ -6,7 +6,7 @@ sidebar_position: 6 애플리케이션 메뉴는 이 메소드들과 관련 있습니다. -:::info Javascript +:::info JavaScript 현재 메뉴는 JS runtime을 지원하지 않습니다. diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/current/reference/runtime/window.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/current/reference/runtime/window.mdx index 9eeee1372..07aa654f9 100644 --- a/website/i18n/ko/docusaurus-plugin-content-docs/current/reference/runtime/window.mdx +++ b/website/i18n/ko/docusaurus-plugin-content-docs/current/reference/runtime/window.mdx @@ -4,205 +4,205 @@ sidebar_position: 4 # Window -These methods give control of the application window. +이러한 메서드는 응용 프로그램 창을 제어합니다. ### WindowSetTitle -Sets the text in the window title bar. +창 제목 표시줄의 텍스트를 설정합니다. Go: `WindowSetTitle(ctx context.Context, title string)`
JS: `WindowSetTitle(title: string)` ### WindowFullscreen -Makes the window full screen. +창을 전체화면으로 만듭니다. Go: `WindowFullscreen(ctx context.Context)`
JS: `WindowFullscreen()` ### WindowUnfullscreen -Restores the previous window dimensions and position prior to full screen. +전체 화면 이전의 이전 창 크기와 위치를 복원합니다. Go: `WindowUnfullscreen(ctx context.Context)`
JS: `WindowUnfullscreen()` ### WindowIsFullscreen -Returns true if the window is full screen. +창이 전체 화면이면 true를 반환합니다. Go: `WindowIsFullscreen(ctx context.Context) bool`
JS: `WindowIsFullscreen() bool` ### WindowCenter -Centers the window on the monitor the window is currently on. +창이 현재 켜져 있는 모니터의 중앙에 창을 맞춥니다. Go: `WindowCenter(ctx context.Context)`
JS: `WindowCenter()` ### WindowExecJS -Executes arbitrary JS code in the window. +창에서 임의의 JS 코드를 실행합니다. -This method runs the code in the browser asynchronously and returns immediately. If the script causes any errors, they will only be available in the browser console. +이 메서드는 브라우저에서 코드를 비동기적으로 실행하고 즉시 반환합니다. 만약 스크립트에서 오류가 발생하면 브라우저 콘솔에서만 사용할 수 있습니다. Go: `WindowExecJS(ctx context.Context, js string)` ### WindowReload -Performs a "reload" (Reloads current page). +"새로고침"을 수행합니다(현재 페이지 새로고침). Go: `WindowReload(ctx context.Context)`
JS: `WindowReload()` ### WindowReloadApp -Reloads the application frontend. +프론트엔드 애플리케이션을 새로고침합니다. Go: `WindowReloadApp(ctx context.Context)`
JS: `WindowReloadApp()` ### WindowSetSystemDefaultTheme -Windows only. +윈도우 전용. Go: `WindowSetSystemDefaultTheme(ctx context.Context)`
JS: `WindowSetSystemDefaultTheme()` -Sets window theme to system default (dark/light). +창의 테마를 시스템 기본값으로 설정합니다(다크/라이트). ### WindowSetLightTheme -Windows only. +윈도우 전용. Go: `WindowSetLightTheme(ctx context.Context)`
JS: `WindowSetLightTheme()` -Sets window theme to light. +창 테마를 라이트 모드로 설정합니다. ### WindowSetDarkTheme -Windows only. +윈도우 전용. Go: `WindowSetDarkTheme(ctx context.Context)`
JS: `WindowSetDarkTheme()` -Sets window theme to dark. +윈도우 테마를 다크로 설정합니다. ### WindowShow -Shows the window, if it is currently hidden. +만약 현재 창의 상태가 숨기기로 되어 있다면, 창을 보여줍니다. Go: `WindowShow(ctx context.Context)`
JS: `WindowShow()` ### WindowHide -Hides the window, if it is currently visible. +현재 창이 표시되어 있는 경우 창을 숨깁니다. Go: `WindowHide(ctx context.Context)`
JS: `WindowHide()` ### WindowIsNormal -Returns true if the window not minimised, maximised or fullscreen. +창이 최소화, 최대화 또는 전체 화면이 아닌 경우 true를 반환합니다. Go: `WindowIsNormal(ctx context.Context) bool`
JS: `WindowIsNormal() bool` ### WindowSetSize -Sets the width and height of the window. +창의 너비와 높이를 설정합니다. Go: `WindowSetSize(ctx context.Context, width int, height int)`
JS: `WindowSetSize(size: Size)` ### WindowGetSize -Gets the width and height of the window. +창의 너비와 높이를 가져옵니다. Go: `WindowGetSize(ctx context.Context) (width int, height int)`
JS: `WindowGetSize() : Size` ### WindowSetMinSize -Sets the minimum window size. Will resize the window if the window is currently smaller than the given dimensions. +최소 창 크기를 설정합니다. 창이 현재 지정된 크기보다 작은 경우 창 크기를 조정합니다. -Setting a size of `0,0` will disable this constraint. +`0,0`의 크기를 설정하면 이 제약 조건이 비활성화됩니다. Go: `WindowSetMinSize(ctx context.Context, width int, height int)`
JS: `WindowSetMinSize(size: Size)` ### WindowSetMaxSize -Sets the maximum window size. Will resize the window if the window is currently larger than the given dimensions. +최대 창 크기를 설정합니다. 창이 현재 지정된 크기보다 큰 경우 창 크기를 조정합니다. -Setting a size of `0,0` will disable this constraint. +`0,0`의 크기를 설정하면 이 제약 조건이 비활성화됩니다. Go: `WindowSetMaxSize(ctx context.Context, width int, height int)`
JS: `WindowSetMaxSize(size: Size)` ### WindowSetAlwaysOnTop -Sets the window AlwaysOnTop or not on top. +창을 항상위 또는 맨 위에 놓지 않도록 설정합니다. Go: `WindowSetAlwaysOnTop(ctx context.Context, b bool)`
JS: `WindowSetAlwaysOnTop(b: Boolen)` ### WindowSetPosition -Sets the window position relative to the monitor the window is currently on. +창이 현재 켜져 있는 모니터를 기준으로 창 위치를 설정합니다. Go: `WindowSetPosition(ctx context.Context, x int, y int)`
JS: `WindowSetPosition(position: Position)` ### WindowGetPosition -Gets the window position relative to the monitor the window is currently on. +창이 현재 있는 모니터에 상대적인 창 위치를 가져옵니다. Go: `WindowGetPosition(ctx context.Context) (x int, y int)`
JS: `WindowGetPosition() : Position` ### WindowMaximise -Maximises the window to fill the screen. +창을 최대화하여 화면을 채웁니다. Go: `WindowMaximise(ctx context.Context)`
JS: `WindowMaximise()` ### WindowUnmaximise -Restores the window to the dimensions and position prior to maximising. +창을 최대화하기 전의 크기와 위치로 복원합니다. Go: `WindowUnmaximise(ctx context.Context)`
JS: `WindowUnmaximise()` ### WindowIsMaximised -Returns true if the window is maximised. +창이 최대화되면 true를 반환합니다. Go: `WindowIsMaximised(ctx context.Context) bool`
JS: `WindowIsMaximised() bool` ### WindowToggleMaximise -Toggles between Maximised and UnMaximised. +최대화와 최대화 해제 사이를 전환합니다. Go: `WindowToggleMaximise(ctx context.Context)`
JS: `WindowToggleMaximise()` ### WindowMinimise -Minimises the window. +창을 최소화합니다. Go: `WindowMinimise(ctx context.Context)`
JS: `WindowMinimise()` ### WindowUnminimise -Restores the window to the dimensions and position prior to minimising. +최소화하기 전의 크기와 위치로 창을 복원합니다. Go: `WindowUnminimise(ctx context.Context)`
JS: `WindowUnminimise()` ### WindowIsMinimised -Returns true if the window is minimised. +창이 최소화된 경우 true를 반환합니다. Go: `WindowIsMinimised(ctx context.Context) bool`
JS: `WindowIsMinimised() bool` ### WindowSetBackgroundColour -Sets the background colour of the window to the given RGBA colour definition. This colour will show through for all transparent pixels. +창의 배경색을 지정된 RGBA 색상 정의로 설정합니다. 이 색상은 모든 투명 픽셀에 대해 표시됩니다. -Valid values for R, G, B and A are 0-255. +R, G, B 및 A의 유효한 값은 0-255입니다. :::info Windows -On Windows, only alpha values of 0 or 255 are supported. Any value that is not 0 will be considered 255. +Windows에서는 0 또는 255의 알파 값만 지원됩니다. 0이 아닌 모든 값은 255로 간주됩니다. ::: Go: `WindowSetBackgroundColour(ctx context.Context, R, G, B, A uint8)`
JS: `WindowSetBackgroundColour(R, G, B, A)` -## Typescript Object Definitions +## TypeScript Object Definitions -### Position +### 위치 ```ts interface Position { @@ -211,7 +211,7 @@ interface Position { } ``` -### Size +### 크기 ```ts interface Size { diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/current/tutorials/dogsapi.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/current/tutorials/dogsapi.mdx index 1af16f774..98129e5b7 100644 --- a/website/i18n/ko/docusaurus-plugin-content-docs/current/tutorials/dogsapi.mdx +++ b/website/i18n/ko/docusaurus-plugin-content-docs/current/tutorials/dogsapi.mdx @@ -17,25 +17,25 @@ sidebar_position: 20 :::note -This tutorial has been kindly provided by [@tatadan](https://twitter.com/tatadan) and forms part of their [Wails Examples Repository](https://github.com/tataDan/wails-v2-examples). +이 튜토리얼은 [@tatadan](https://twitter.com/tatadan)에 의해 제공되었습니다. 그리고 [ Wails 예시 리포지토리](https://github.com/tataDan/wails-v2-examples)에서 예시를 확인할 수 있습니다. ::: -In this tutorial we are going to develop an application that retrieves photos of dogs from the web and then displays them. +이 튜토리얼에서는 웹에서 개 사진을 검색한 다음 표시하는 애플리케이션을 개발할 것입니다. -### Create the project +### 프로젝트 생성 -Let's create the application. From a terminal enter: `wails init -n dogs-api -t svelte` +애플리케이션을 생성합니다. 터미널에 다음과 같이 입력합니다: `wails init -n dogs-api -t svelte` -Note: We could optionally add `-ide vscode` or `-ide goland` to the end of this command if you wanted to add IDE support. +참고: 원하는 경우 선택적으로 이 명령의 끝에 `-ide vscode` 또는 `-ide goland`를 추가할 수 있습니다. IDE 지원을 추가합니다. -Now let's `cd dogs-api` and start editing the project files. +이제 `cd dogs-api`를 만들고 프로젝트 파일 편집을 시작합니다. -### Remove unused code +### 사용하지 않는 코드 제거 -We will start by removing some elements that we know we will not use: +사용하지 않는 몇가지 요소를 제거합니다. -- Open `app.go` and remove the following lines: +- `app.go`를 열고 다음 줄을 제거합니다. ```go // Greet returns a greeting for the given name @@ -44,14 +44,14 @@ func (a *App) Greet(name string) string { } ``` -- Open `frontend/src/App.svelte` and delete all lines. -- Delete the `frontend/src/assets/images/logo-universal.png` file +- `frontend/src/App.svelte`를 열고 모든 줄을 삭제합니다. +- `frontend/src/assets/images/logo-universal.png` 파일을 삭제합니다. -### Creating our application +### 우리만의 애플리케이션 생성하기 -Now let's add our new Go code. +이제 새로운 Go 코드를 추가합니다. -Add the following struct declarations to `app.go` before the function definitions: +함수 정의 앞에 다음 구조체 선언을 `app.go`에 추가합니다. ```go type RandomImage struct { @@ -70,7 +70,7 @@ type ImagesByBreed struct { } ``` -Add the following functions to `app.go` (perhaps after the existing function definitions): +`app.go`에 다음 함수를 추가합니다(함수 정의 뒤쪽에 존재): ```go func (a *App) GetRandomImageUrl() string { @@ -135,7 +135,7 @@ func (a *App) GetImageUrlsByBreed(breed string) []string { } ``` -Modify the `import` section of `app.go` to look like this: +`app.go`의 `import` 섹션을 다음과 같이 수정합니다. ```go import ( @@ -149,7 +149,7 @@ import ( ) ``` -Add the following lines to `frontend/src/App.svelte`: +`frontend/src/App.svelte`에 다음 줄을 추가합니다. ```html @@ -236,10 +236,10 @@ Add the following lines to `frontend/src/App.svelte`: ``` -### Testing the application +### 애플리케이션 테스트하기 -To generate the bindings and test the application, run `wails dev`. +바인딩을 생성하고 애플리케이션을 테스트하려면 `wails dev`를 실행합니다. -### Compiling the application +### 애플리케이션 컴파일하기 -To compile the application to a single, production grade binary, run `wails build`. +응용 프로그램을 단일 바이너리로 컴파일하려면 `wails build`를 실행합니다. diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/current/tutorials/helloworld.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/current/tutorials/helloworld.mdx index b783461da..8eceef489 100644 --- a/website/i18n/ko/docusaurus-plugin-content-docs/current/tutorials/helloworld.mdx +++ b/website/i18n/ko/docusaurus-plugin-content-docs/current/tutorials/helloworld.mdx @@ -4,27 +4,27 @@ sidebar_position: 10 # Hello World -The aim of this tutorial is to get you up and running with the most basic application using Wails. You will be able to: +이 튜토리얼의 목표는 Wails를 사용하여 가장 기본적인 애플리케이션을 시작하고 실행하는 것입니다. 튜토리얼을 통해 다음과 같은 것들을 할 수있습니다. -- Create a new Wails application -- Build the application -- Run the application +- 새로운 Wails 애플리케이션 생성 +- 애플리케이션 빌드 +- 애플리케이션 실행 :::note -This tutorial uses Windows as the target platform. Output will vary slightly depending on your operating system. +이 튜토리얼에서는 Windows를 대상 플랫폼으로 사용합니다. 출력이 약간 다를 수 있습니다. 운영체제에 따라 다릅니다. ::: -## 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: +기본 바닐라 JS 템플릿을 사용하여 새 Wails 애플리케이션을 만들려면, 다음 명령을 실행해야 합니다: ```bash wails init -n helloworld ``` -You should see something similar to the following: +실행 결과로 다음과 유사한 결과가 반환됩니다. ``` Wails CLI v2.0.0 @@ -40,7 +40,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: +이렇게 하면 현재 디렉터리에 `helloworld`라는 새 디렉터리가 생성됩니다. 이 디렉토리에는 여러 파일이 있습니다: ``` build/ - Contains the build files + compiled application @@ -52,15 +52,15 @@ 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: +애플리케이션을 빌드하려면 새 `helloworld` 프로젝트 디렉토리로 변경하고 다음 명령을 실행하십시오. ```bash wails build ``` -You should see something like the following: +다음과 같은 내용이 표시되어야 합니다: ``` Wails CLI v2.0.0 @@ -86,11 +86,11 @@ Building target: windows/amd64 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. +이것은 애플리케이션을 컴파일하고 `build/bin` 디렉토리에 결과 실행파일을 저장합니다. -## Run the application +## 애플리케이션 실행 -If we view the `build/bin` directory in Windows Explorer, we should see our project binary: +Windows 탐색기에서 `build/bin` 디렉토리를 보면 프로젝트 바이너리가 표시되어야 합니다. ```mdx-code-block
@@ -102,13 +102,13 @@ If we view the `build/bin` directory in Windows Explorer, we should see our proj
``` -We can run it by simply double-clicking the `helloworld.exe` file. +`helloworld.exe` 파일을 두 번 클릭하면 실행됩니다. -On Mac, Wails generates a `helloworld.app` file which can be run by double-clicking it. +Mac에서 Wails는 두 번 클릭하여 실행할 수 있는 `helloworld.app` 파일을 생성합니다. -On Linux, you can run the application using `./helloworld` from the `build/bin` directory. +Linux에서는 `build/bin` 디렉토리에서 `./helloworld`를 사용하여 애플리케이션을 실행할 수 있습니다. -You should see the application working as expected: +애플리케이션이 예상대로 동작하는지 확인해야 합니다. ```mdx-code-block
diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1.json b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1.json index a589cd400..56715aca9 100644 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1.json +++ b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1.json @@ -4,11 +4,11 @@ "description": "The label for version v2.0.0-rc.1" }, "sidebar.docs.category.Getting Started": { - "message": "시작하기", + "message": "Getting Started", "description": "The label for category Getting Started in sidebar docs" }, "sidebar.docs.category.Reference": { - "message": "참조", + "message": "Reference", "description": "The label for category Reference in sidebar docs" }, "sidebar.docs.category.Runtime": { @@ -16,7 +16,7 @@ "description": "The label for category Runtime in sidebar docs" }, "sidebar.docs.category.Community": { - "message": "커뮤니티", + "message": "Community", "description": "The label for category Community in sidebar docs" }, "sidebar.docs.category.Showcase": { @@ -24,15 +24,15 @@ "description": "The label for category Showcase in sidebar docs" }, "sidebar.docs.category.Guides": { - "message": "가이드", + "message": "Guides", "description": "The label for category Guides in sidebar docs" }, "sidebar.docs.category.Tutorials": { - "message": "튜토리얼", + "message": "Tutorials", "description": "The label for category Tutorials in sidebar docs" }, "sidebar.docs.link.Contributing": { - "message": "기여", + "message": "Contributing", "description": "The label for link Contributing in sidebar docs, linking to /community-guide#ways-of-contributing" } } diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0.json b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0.json index cb58bc575..74029b122 100644 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0.json +++ b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0.json @@ -4,11 +4,11 @@ "description": "The label for version v2.0.0" }, "sidebar.docs.category.Getting Started": { - "message": "시작하기", + "message": "Getting Started", "description": "The label for category Getting Started in sidebar docs" }, "sidebar.docs.category.Reference": { - "message": "참조", + "message": "Reference", "description": "The label for category Reference in sidebar docs" }, "sidebar.docs.category.Runtime": { @@ -16,7 +16,7 @@ "description": "The label for category Runtime in sidebar docs" }, "sidebar.docs.category.Community": { - "message": "커뮤니티", + "message": "Community", "description": "The label for category Community in sidebar docs" }, "sidebar.docs.category.Showcase": { @@ -24,15 +24,15 @@ "description": "The label for category Showcase in sidebar docs" }, "sidebar.docs.category.Guides": { - "message": "가이드", + "message": "Guides", "description": "The label for category Guides in sidebar docs" }, "sidebar.docs.category.Tutorials": { - "message": "튜토리얼", + "message": "Tutorials", "description": "The label for category Tutorials in sidebar docs" }, "sidebar.docs.link.Contributing": { - "message": "기여", + "message": "Contributing", "description": "The label for link Contributing in sidebar docs, linking to /community-guide#ways-of-contributing" } } diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.1.0.json b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.1.0.json index 0f237faf0..2e5fb8df3 100644 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.1.0.json +++ b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.1.0.json @@ -4,11 +4,11 @@ "description": "The label for version v2.1.0" }, "sidebar.docs.category.Getting Started": { - "message": "시작하기", + "message": "Getting Started", "description": "The label for category Getting Started in sidebar docs" }, "sidebar.docs.category.Reference": { - "message": "참조", + "message": "Reference", "description": "The label for category Reference in sidebar docs" }, "sidebar.docs.category.Runtime": { @@ -16,7 +16,7 @@ "description": "The label for category Runtime in sidebar docs" }, "sidebar.docs.category.Community": { - "message": "커뮤니티", + "message": "Community", "description": "The label for category Community in sidebar docs" }, "sidebar.docs.category.Showcase": { @@ -24,15 +24,15 @@ "description": "The label for category Showcase in sidebar docs" }, "sidebar.docs.category.Guides": { - "message": "가이드", + "message": "Guides", "description": "The label for category Guides in sidebar docs" }, "sidebar.docs.category.Tutorials": { - "message": "튜토리얼", + "message": "Tutorials", "description": "The label for category Tutorials in sidebar docs" }, "sidebar.docs.link.Contributing": { - "message": "기여", + "message": "Contributing", "description": "The label for link Contributing in sidebar docs, linking to /community-guide#ways-of-contributing" } } diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.2.0.json b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.2.0.json index 130804ee9..7a73bd66f 100644 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.2.0.json +++ b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.2.0.json @@ -4,11 +4,11 @@ "description": "The label for version v2.2.0" }, "sidebar.docs.category.Getting Started": { - "message": "시작하기", + "message": "Getting Started", "description": "The label for category Getting Started in sidebar docs" }, "sidebar.docs.category.Reference": { - "message": "참조", + "message": "Reference", "description": "The label for category Reference in sidebar docs" }, "sidebar.docs.category.Runtime": { @@ -16,7 +16,7 @@ "description": "The label for category Runtime in sidebar docs" }, "sidebar.docs.category.Community": { - "message": "커뮤니티", + "message": "Community", "description": "The label for category Community in sidebar docs" }, "sidebar.docs.category.Showcase": { @@ -24,15 +24,15 @@ "description": "The label for category Showcase in sidebar docs" }, "sidebar.docs.category.Guides": { - "message": "가이드", + "message": "Guides", "description": "The label for category Guides in sidebar docs" }, "sidebar.docs.category.Tutorials": { - "message": "튜토리얼", + "message": "Tutorials", "description": "The label for category Tutorials in sidebar docs" }, "sidebar.docs.link.Contributing": { - "message": "기여", + "message": "Contributing", "description": "The label for link Contributing in sidebar docs, linking to /community-guide#ways-of-contributing" } } diff --git a/website/i18n/ko/docusaurus-plugin-content-pages/changelog.mdx b/website/i18n/ko/docusaurus-plugin-content-pages/changelog.mdx index 6cfefcb79..a1af11ddd 100644 --- a/website/i18n/ko/docusaurus-plugin-content-pages/changelog.mdx +++ b/website/i18n/ko/docusaurus-plugin-content-pages/changelog.mdx @@ -17,10 +17,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - Added `OpenInspectorOnStartup` to debug options to allow opening the WebInspector during startup of the application in debug mode. Added by @stffabi in [PR](https://github.com/wailsapp/wails/pull/2080) - On macOS `wails doctor` now also shows the version of Xcode installed. Added by @stffabi in [PR](https://github.com/wailsapp/wails/pull/2089) - The [AssetServer](/docs/reference/options#assetserver) now supports handling range-requests if the [Assets](/docs/reference/options/#assets-1) `fs.FS` provides an `io.ReadSeeker`. Added by @stffabi in [PR](https://github.com/wailsapp/wails/pull/2091) +- Add new property for the `wails.json` config file - `bindings`. More information on the new property can be found in the updated [schema](/schemas/config.v2.json). Properties `prefix` and `suffix` allow you to control the generated TypeScript entity name in the `model.ts` file. Added by @OlegGulevskyy in [PR](https://github.com/wailsapp/wails/pull/2101) +- The `WindowSetAlwaysOnTop` method is now exposed in the JS runtime. Fixed by @gotid in [PR](https://github.com/wailsapp/wails/pull/2128) ### Fixed - The `noreload` flag in wails dev wasn't applied. Fixed by @stffabi in this [PR](https://github.com/wailsapp/wails/pull/2081) - `build/bin` folder was duplicating itself on each reload in `wails dev` mode. Fixed by @OlegGulevskyy in this [PR](https://github.com/wailsapp/wails/pull/2103) +- Prevent a thin white line at the bottom of a frameless window on Windows. Fixed by @stffabi in this [PR](https://github.com/wailsapp/wails/pull/2111) ## v2.2.0 - 2022-11-09 @@ -39,7 +42,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ### Fixed - Webview2 on Windows returns a potential whitespace when defining the style like this style="--wails-draggable: drag". Fixed by @stffabi in https://github.com/wailsapp/wails/pull/1989 -- Bound structs that had `struct{}` field types would cause the Typescript generation to fail. Thanks to @ParkourLiu for the [PR](https://github.com/wailsapp/wails/pull/1999) +- Bound structs that had `struct{}` field types would cause the TypeScript generation to fail. Thanks to @ParkourLiu for the [PR](https://github.com/wailsapp/wails/pull/1999) - When maximising a frameless window on Windows with multiple monitors, the window could sometimes become blank. Thanks to @stffabi for the [fix](https://github.com/wailsapp/wails/pull/2043) ### Changed @@ -84,7 +87,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - Remove the `.git` directory in the template - @misitebao in https://github.com/wailsapp/wails/pull/1929 - Fix wails dev - @JulioDRF in https://github.com/wailsapp/wails/pull/1931 - Fix for considering new `go` files in dev filesystem watcher - @scottopell in https://github.com/wailsapp/wails/pull/1946 -- Prevent type parsing to interfere with Typescript package name - @ValentinTrinque in https://github.com/wailsapp/wails/pull/1942 +- Prevent type parsing to interfere with TypeScript package name - @ValentinTrinque in https://github.com/wailsapp/wails/pull/1942 - [dev] Do not try to infer assetdir from fs.FS when a frontend dev server is in use - @stffabi in https://github.com/wailsapp/wails/pull/1972 - Fix init command not listed in wails help message - @lyon-lee-dev in https://github.com/wailsapp/wails/pull/1976 @@ -479,7 +482,7 @@ Experimental: &options.Experimental{ - 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) - [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) +- 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) - Added docs for [code-signing](https://wails.io/docs/guides/signing) and [NSIS installer](https://wails.io/docs/guides/windows-installer) - [@gardc](https://github.com/gardc) - Add support for `-trimpath` [build flag](https://wails.io/docs/reference/cli#build) @@ -489,7 +492,7 @@ Experimental: &options.Experimental{ - Improved mimetype detection for BOM marker and comments - [@napalu](https://github.com/napalu) - Remove duplicate mimetype entries - [@napalu](https://github.com/napalu) -- Remove duplicate Typescript imports in generated definition files - [@adalessa](https://github.com/adalessa) +- Remove duplicate TypeScript imports in generated definition files - [@adalessa](https://github.com/adalessa) - Add missing method declaration - [@adalessa](https://github.com/adalessa) - Fix Linux sigabrt on start - [@napalu](https://github.com/napalu) - Double Click event now works on elements with `data-wails-drag` attribute - [@jicg](https://github.com/jicg) diff --git a/website/i18n/ko/docusaurus-plugin-content-pages/community-guide.mdx b/website/i18n/ko/docusaurus-plugin-content-pages/community-guide.mdx index a6bf1812b..c16971b79 100644 --- a/website/i18n/ko/docusaurus-plugin-content-pages/community-guide.mdx +++ b/website/i18n/ko/docusaurus-plugin-content-pages/community-guide.mdx @@ -70,6 +70,7 @@ The process for fixing bugs are as follows: - The scope of the issue including platforms affected - 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](https://stackoverflow.com/help/minimal-reproducible-example) - The output of `wails doctor` +- A test that can reproduce the bug - 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/_` diff --git a/website/i18n/pt/code.json b/website/i18n/pt/code.json index c31f2dc29..5e13a33d0 100644 --- a/website/i18n/pt/code.json +++ b/website/i18n/pt/code.json @@ -1,37 +1,37 @@ { "homepage.Features.Title1": { - "message": "homepage.Features.Title1" + "message": "Feature Rich" }, "homepage.Features.Description1": { - "message": "homepage.Features.Description1" + "message": "Construa aplicativos abrangentes multiplataformas usando elementos de interface nativos como menus e diálogos." }, "homepage.Features.Title2": { - "message": "homepage.Features.Title2" + "message": "Familiar" }, "homepage.Features.Description2": { - "message": "homepage.Features.Description2" + "message": "Use as tecnologias que você já sabe para construir aplicativos incríveis." }, "homepage.Features.Title3": { - "message": "homepage.Features.Title3" + "message": "Rápido" }, "homepage.Features.Description3": { - "message": "homepage.Features.Description3" + "message": "Gere rapidamente, construa e empacote seus projetos usando a CLI Wails." }, "homepage.Tagline": { - "message": "homepage.Tagline" + "message": "Crie belos aplicativos multiplataforma usando Go" }, "homepage.ButtonText": { - "message": "homepage.ButtonText" + "message": "Guia de Introdução" }, "homepage.LearnMoreButtonText": { - "message": "homepage.LearnMoreButtonText" + "message": "Saiba Mais" }, "theme.ErrorPageContent.title": { - "message": "This page crashed.", + "message": "Esta página parou de funcionar.", "description": "The title of the fallback page when the page crashed" }, "theme.ErrorPageContent.tryAgain": { - "message": "Try again", + "message": "Tente novamente", "description": "The label of the button to try again when the page crashed" }, "theme.NotFound.title": { @@ -39,11 +39,11 @@ "description": "The title of the 404 page" }, "theme.NotFound.p1": { - "message": "Não foi possível encontrar o que você está procurando.", + "message": "Não foi possível encontrar aquilo que procura.", "description": "The first paragraph of the 404 page" }, "theme.NotFound.p2": { - "message": "Entre em contato com o proprietário do site que lhe trouxe para cá e lhe informe que o link está quebrado.", + "message": "Por favor entre em contato com o proprietário do site que o vinculou à URL original e informe que o link não funciona.", "description": "The 2nd paragraph of the 404 page" }, "theme.AnnouncementBar.closeButtonAriaLabel": { @@ -51,7 +51,7 @@ "description": "The ARIA label for close button of announcement bar" }, "theme.blog.archive.title": { - "message": "Arquivo", + "message": "Arquivar", "description": "The page & hero title of the blog archive page" }, "theme.blog.archive.description": { @@ -59,39 +59,39 @@ "description": "The page & hero description of the blog archive page" }, "theme.BackToTopButton.buttonAriaLabel": { - "message": "Volte para o topo", + "message": "Voltar ao topo", "description": "The ARIA label for the back to top button" }, "theme.blog.paginator.navAriaLabel": { - "message": "Navegação da página de listagem do blog", + "message": "Navegação da página blog", "description": "The ARIA label for the blog pagination" }, "theme.blog.paginator.newerEntries": { - "message": "Conteúdo mais novo", + "message": "Entradas mais recentes", "description": "The label used to navigate to the newer blog posts page (previous page)" }, "theme.blog.paginator.olderEntries": { - "message": "Conteúdo mais antigo", + "message": "Entradas mais antigas", "description": "The label used to navigate to the older blog posts page (next page)" }, "theme.blog.post.readingTime.plurals": { - "message": "Leitura de um minuto|Leitura de {readingTime} minutos", + "message": "Leitura de min|{readingTime} min", "description": "Pluralized label for \"{readingTime} min read\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)" }, "theme.blog.post.readMoreLabel": { - "message": "Read more about {title}", + "message": "Leia mais sobre {title}", "description": "The ARIA label for the link to full blog posts from excerpts" }, "theme.blog.post.readMore": { - "message": "Leia Mais", + "message": "Ler Mais", "description": "The label used in blog post item excerpts to link to full blog posts" }, "theme.blog.post.paginator.navAriaLabel": { - "message": "Navegação da página de postagem do blog", + "message": "Página de navegação do blog", "description": "The ARIA label for the blog posts pagination" }, "theme.blog.post.paginator.newerPost": { - "message": "Postagem mais nova", + "message": "Publicação mais recente", "description": "The blog post button label to navigate to the newer/previous post" }, "theme.blog.post.paginator.olderPost": { @@ -99,11 +99,11 @@ "description": "The blog post button label to navigate to the older/next post" }, "theme.blog.sidebar.navAriaLabel": { - "message": "Blog recent posts navigation", + "message": "Navegação nas postagens recentes do blog", "description": "The ARIA label for recent posts in the blog sidebar" }, "theme.blog.post.plurals": { - "message": "Uma postagem|{count} postagens", + "message": "Uma publicação|{count} publicações", "description": "Pluralized label for \"{count} posts\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)" }, "theme.blog.tagTitle": { @@ -111,11 +111,11 @@ "description": "The title of the page for a blog tag" }, "theme.tags.tagsPageLink": { - "message": "Ver todas os Marcadores", + "message": "Ver Todas as Tags", "description": "The label of the link targeting the tag list page" }, "theme.CodeBlock.copyButtonAriaLabel": { - "message": "Copiar código para a área de transferência", + "message": "Copiar código para área de transferência", "description": "The ARIA label for copy code blocks button" }, "theme.CodeBlock.copied": { @@ -127,15 +127,15 @@ "description": "The copy button label on code blocks" }, "theme.colorToggle.ariaLabel": { - "message": "Switch between dark and light mode (currently {mode})", + "message": "Alternar entre modo escuro e claro (atualmente {mode})", "description": "The ARIA label for the navbar color mode toggle" }, "theme.colorToggle.ariaLabel.mode.dark": { - "message": "dark mode", + "message": "modo escuro", "description": "The name for the dark color mode" }, "theme.colorToggle.ariaLabel.mode.light": { - "message": "light mode", + "message": "modo claro", "description": "The name for the light color mode" }, "theme.docs.DocCard.categoryDescription": { @@ -143,7 +143,7 @@ "description": "The default description for a category card in the generated index about how many items this category includes" }, "theme.docs.sidebar.expandButtonTitle": { - "message": "Expandir painel lateral", + "message": "Expandir barra lateral", "description": "The ARIA label and title attribute for expand button of doc sidebar" }, "theme.docs.sidebar.expandButtonAriaLabel": { @@ -151,7 +151,7 @@ "description": "The ARIA label and title attribute for expand button of doc sidebar" }, "theme.docs.paginator.navAriaLabel": { - "message": "Navigação das páginas de documentação", + "message": "Navegação de páginas da documentação", "description": "The ARIA label for the docs pagination" }, "theme.docs.paginator.previous": { @@ -159,11 +159,11 @@ "description": "The label used to navigate to the previous doc" }, "theme.docs.paginator.next": { - "message": "Próxima", + "message": "Próximo", "description": "The label used to navigate to the next doc" }, "theme.docs.sidebar.collapseButtonTitle": { - "message": "Fechar painel lateral", + "message": "Recolher barra lateral", "description": "The title attribute for collapse button of doc sidebar" }, "theme.docs.sidebar.collapseButtonAriaLabel": { @@ -171,11 +171,11 @@ "description": "The title attribute for collapse button of doc sidebar" }, "theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": { - "message": "Toggle the collapsible sidebar category '{label}'", + "message": "Alternar a categoria da barra lateral oculta '{label}'", "description": "The ARIA label to toggle the collapsible sidebar category" }, "theme.docs.tagDocListPageTitle.nDocsTagged": { - "message": "Um documento selecionado|{count} documentos selecionados", + "message": "Um documento marcado {count} documentos marcados", "description": "Pluralized label for \"{count} docs tagged\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)" }, "theme.docs.tagDocListPageTitle": { @@ -183,10 +183,10 @@ "description": "The title of the page for a docs tag" }, "theme.docs.versionBadge.label": { - "message": "Version: {versionLabel}" + "message": "Versão: {versionLabel}" }, "theme.docs.versions.unreleasedVersionLabel": { - "message": "Esta é uma documentação não lançada para {siteTitle} {versionLabel}.", + "message": "Essa documentação não foi lançada para a versão {siteTitle} {versionLabel}.", "description": "The label used to tell the user that he's browsing an unreleased doc version" }, "theme.docs.versions.unmaintainedVersionLabel": { diff --git a/website/i18n/pt/docusaurus-plugin-content-blog/2021-09-27-v2-beta1-release-notes.mdx b/website/i18n/pt/docusaurus-plugin-content-blog/2021-09-27-v2-beta1-release-notes.mdx index 5f4ea2856..d01b542b1 100644 --- a/website/i18n/pt/docusaurus-plugin-content-blog/2021-09-27-v2-beta1-release-notes.mdx +++ b/website/i18n/pt/docusaurus-plugin-content-blog/2021-09-27-v2-beta1-release-notes.mdx @@ -116,11 +116,11 @@ It also provides the additional features: In addition to this, a webserver will start on port 34115. This will serve your application to any browser that connects to it. All connected web browsers will respond to system events like hot reload on asset change. -In Go, we are used to dealing with structs in our applications. It's often useful to send structs to our frontend and use them as state in our application. In v1, this was a very manual process and a bit of a burden on the developer. I'm happy to announce that in v2, any application run in dev mode will automatically generate Typescript models for all structs that are input or output parameters to bound methods. This enables seamless interchange of data models between the two worlds. +In Go, we are used to dealing with structs in our applications. It's often useful to send structs to our frontend and use them as state in our application. In v1, this was a very manual process and a bit of a burden on the developer. I'm happy to announce that in v2, any application run in dev mode will automatically generate TypeScript models for all structs that are input or output parameters to bound methods. This enables seamless interchange of data models between the two worlds. In addition to this, another JS module is dynamically generated wrapping all your bound methods. This provides JSDoc for your methods, providing code completion and hinting in your IDE. It's really cool when you get data models auto-imported when hitting tab in an auto-generated module wrapping your Go code! -### Modelos Remotos +### Remote Templates ```mdx-code-block
diff --git a/website/i18n/pt/docusaurus-plugin-content-blog/2021-11-08-v2-beta2-release-notes.mdx b/website/i18n/pt/docusaurus-plugin-content-blog/2021-11-08-v2-beta2-release-notes.mdx index 28d9d42d9..86d44616f 100644 --- a/website/i18n/pt/docusaurus-plugin-content-blog/2021-11-08-v2-beta2-release-notes.mdx +++ b/website/i18n/pt/docusaurus-plugin-content-blog/2021-11-08-v2-beta2-release-notes.mdx @@ -74,11 +74,11 @@ It also provides the additional features: In addition to this, a webserver will start on port 34115. This will serve your application to any browser that connects to it. All connected web browsers will respond to system events like hot reload on asset change. -In Go, we are used to dealing with structs in our applications. It's often useful to send structs to our frontend and use them as state in our application. In v1, this was a very manual process and a bit of a burden on the developer. I'm happy to announce that in v2, any application run in dev mode will automatically generate Typescript models for all structs that are input or output parameters to bound methods. This enables seamless interchange of data models between the two worlds. +In Go, we are used to dealing with structs in our applications. It's often useful to send structs to our frontend and use them as state in our application. In v1, this was a very manual process and a bit of a burden on the developer. I'm happy to announce that in v2, any application run in dev mode will automatically generate TypeScript models for all structs that are input or output parameters to bound methods. This enables seamless interchange of data models between the two worlds. In addition to this, another JS module is dynamically generated wrapping all your bound methods. This provides JSDoc for your methods, providing code completion and hinting in your IDE. It's really cool when you get data models auto-imported when hitting tab in an auto-generated module wrapping your Go code! -### Modelos Remotos +### Remote Templates ```mdx-code-block
diff --git a/website/i18n/pt/docusaurus-plugin-content-blog/2022-02-22-v2-beta3-release-notes.mdx b/website/i18n/pt/docusaurus-plugin-content-blog/2022-02-22-v2-beta3-release-notes.mdx index 2cdea89e7..b405953cf 100644 --- a/website/i18n/pt/docusaurus-plugin-content-blog/2022-02-22-v2-beta3-release-notes.mdx +++ b/website/i18n/pt/docusaurus-plugin-content-blog/2022-02-22-v2-beta3-release-notes.mdx @@ -61,11 +61,11 @@ It also provides the additional features: In addition to this, a webserver will start on port 34115. This will serve your application to any browser that connects to it. All connected web browsers will respond to system events like hot reload on asset change. -In Go, we are used to dealing with structs in our applications. It's often useful to send structs to our frontend and use them as state in our application. In v1, this was a very manual process and a bit of a burden on the developer. I'm happy to announce that in v2, any application run in dev mode will automatically generate Typescript models for all structs that are input or output parameters to bound methods. This enables seamless interchange of data models between the two worlds. +In Go, we are used to dealing with structs in our applications. It's often useful to send structs to our frontend and use them as state in our application. In v1, this was a very manual process and a bit of a burden on the developer. I'm happy to announce that in v2, any application run in dev mode will automatically generate TypeScript models for all structs that are input or output parameters to bound methods. This enables seamless interchange of data models between the two worlds. In addition to this, another JS module is dynamically generated wrapping all your bound methods. This provides JSDoc for your methods, providing code completion and hinting in your IDE. It's really cool when you get data models auto-imported when hitting tab in an auto-generated module wrapping your Go code! -### Modelos Remotos +### Remote Templates ```mdx-code-block
diff --git a/website/i18n/pt/docusaurus-plugin-content-blog/2022-09-22-v2-release-notes.mdx b/website/i18n/pt/docusaurus-plugin-content-blog/2022-09-22-v2-release-notes.mdx index e9d570afa..c321f5042 100644 --- a/website/i18n/pt/docusaurus-plugin-content-blog/2022-09-22-v2-release-notes.mdx +++ b/website/i18n/pt/docusaurus-plugin-content-blog/2022-09-22-v2-release-notes.mdx @@ -45,7 +45,7 @@ The v2 release is a huge leap forward for the project, addressing many of the pa - A rich [runtime library](/docs/reference/runtime/intro) providing utility methods for window manipulation, eventing, dialogs, menus and logging. - Support for [obfuscating](/docs/guides/obfuscated) your application using [garble](https://github.com/burrowers/garble). - Support for compressing your application using [UPX](https://upx.github.io/). -- Automatic Typescript generation of Go structs. More info [here](/docs/howdoesitwork#calling-bound-go-methods). +- Automatic TypeScript generation of Go structs. More info [here](/docs/howdoesitwork#calling-bound-go-methods). - No extra libraries or DLLs are required to be shipped with your application. For any platform. - No requirement to bundle frontend assets. Just develop your application like any other web application. diff --git a/website/i18n/pt/docusaurus-plugin-content-docs/current/community/showcase/filehound.mdx b/website/i18n/pt/docusaurus-plugin-content-docs/current/community/showcase/filehound.mdx index 48010ca6d..b8ee7fdf3 100644 --- a/website/i18n/pt/docusaurus-plugin-content-docs/current/community/showcase/filehound.mdx +++ b/website/i18n/pt/docusaurus-plugin-content-docs/current/community/showcase/filehound.mdx @@ -13,4 +13,4 @@ O Utilitário de Exportação FileHound permite os admnistradores FileHound a ca Backend construído com: Go 1.15 Wails 1.11.0 go-sqlite3 1.14.6 go-linq 3.2 -Frontend com: Vue 2.6.11 Vuex 3.4.0 Typescript Tailwind 1.9.6 +Frontend with: Vue 2.6.11 Vuex 3.4.0 TypeScript Tailwind 1.9.6 diff --git a/website/i18n/pt/docusaurus-plugin-content-docs/current/gettingstarted/development.mdx b/website/i18n/pt/docusaurus-plugin-content-docs/current/gettingstarted/development.mdx index 39c94e87b..de8bebe77 100644 --- a/website/i18n/pt/docusaurus-plugin-content-docs/current/gettingstarted/development.mdx +++ b/website/i18n/pt/docusaurus-plugin-content-docs/current/gettingstarted/development.mdx @@ -7,7 +7,7 @@ sidebar_position: 5 Você pode executar sua aplicação no modo de desenvolvimento executando `wails dev` no diretório do seu projeto. Isso fará o seguinte: - Construa seu aplicativo e o execute -- Vincula seu código Go para o frontend para que ele possa ser chamado a partir de Javascript +- Bind your Go code to the frontend so it can be called from JavaScript - Usando o poder do [Vite](https://vitejs.dev/), observará modificações em seus arquivos Go e reconstruir/re-executar na alteração - Configure um [servidor web](http://localhost:34115) que irá servir seu aplicativo em um navegador. Isso permite usar suas extensões de navegador favoritas. Você pode até mesmo chamar seu código Go do console diff --git a/website/i18n/pt/docusaurus-plugin-content-docs/current/gettingstarted/firstproject.mdx b/website/i18n/pt/docusaurus-plugin-content-docs/current/gettingstarted/firstproject.mdx index 7b646835a..f98b71ee4 100644 --- a/website/i18n/pt/docusaurus-plugin-content-docs/current/gettingstarted/firstproject.mdx +++ b/website/i18n/pt/docusaurus-plugin-content-docs/current/gettingstarted/firstproject.mdx @@ -26,61 +26,61 @@ import TabItem from "@theme/TabItem"; ]} > - Generate a Svelte project using Javascript with:

+ Generate a Svelte project using JavaScript with:

wails init -n myproject -t svelte -If you would rather use Typescript:
+If you would rather use TypeScript:
wails init -n myproject -t svelte-ts
- Generate a React project using Javascript with:

+ Generate a React project using JavaScript with:

wails init -n myproject -t react -If you would rather use Typescript:
+If you would rather use TypeScript:
wails init -n myproject -t react-ts
- Generate a Vue project using Javascript with:

+ Generate a Vue project using JavaScript with:

wails init -n myproject -t vue -If you would rather use Typescript:
+If you would rather use TypeScript:
wails init -n myproject -t vue-ts
- Generate a Preact project using Javascript with:

+ Generate a Preact project using JavaScript with:

wails init -n myproject -t preact -If you would rather use Typescript:
+If you would rather use TypeScript:
wails init -n myproject -t preact-ts
- Generate a Lit project using Javascript with:

+ Generate a Lit project using JavaScript with:

wails init -n myproject -t lit -If you would rather use Typescript:
+If you would rather use TypeScript:
wails init -n myproject -t lit-ts
- Generate a Vanilla project using Javascript with:

+ Generate a Vanilla project using JavaScript with:

wails init -n myproject -t vanilla -If you would rather use Typescript:
+If you would rather use TypeScript:
wails init -n myproject -t vanilla-ts diff --git a/website/i18n/pt/docusaurus-plugin-content-docs/current/guides/local-development.mdx b/website/i18n/pt/docusaurus-plugin-content-docs/current/guides/local-development.mdx index 9532fe784..4ba1f34c3 100644 --- a/website/i18n/pt/docusaurus-plugin-content-docs/current/guides/local-development.mdx +++ b/website/i18n/pt/docusaurus-plugin-content-docs/current/guides/local-development.mdx @@ -1,6 +1,6 @@ # Local Development -## Visão geral +## Overview Wails is in constant development and new releases are regularly "tagged". This usually happens when all the newer code on `master` has been tested and confirmed working. If you need a bugfix or feature that has not yet made it to a release, it's possible to use the latest "bleeding edge" version using the following steps: diff --git a/website/i18n/pt/docusaurus-plugin-content-docs/current/guides/migrating.mdx b/website/i18n/pt/docusaurus-plugin-content-docs/current/guides/migrating.mdx index b985e2a66..7123cbe6b 100644 --- a/website/i18n/pt/docusaurus-plugin-content-docs/current/guides/migrating.mdx +++ b/website/i18n/pt/docusaurus-plugin-content-docs/current/guides/migrating.mdx @@ -1,6 +1,6 @@ # Migrating from v1 -## Visão geral +## Overview Wails v2 is a significant change from v1. This document aims to highlight the changes and the steps in migrating an existing project. @@ -118,7 +118,7 @@ The _biggest_ change in v2 is how assets are handled. In v1, assets were passed via 2 application options: -- `JS` - The application's Javascript +- `JS` - The application's JavaScript - `CSS` - The application's CSS This meant that the responsibility of generating a single JS and CSS file was on the developer. This essentially required the use of complicated packers such as webpack. diff --git a/website/i18n/pt/docusaurus-plugin-content-docs/current/guides/troubleshooting.mdx b/website/i18n/pt/docusaurus-plugin-content-docs/current/guides/troubleshooting.mdx index 7e7081faf..2accc4e5f 100644 --- a/website/i18n/pt/docusaurus-plugin-content-docs/current/guides/troubleshooting.mdx +++ b/website/i18n/pt/docusaurus-plugin-content-docs/current/guides/troubleshooting.mdx @@ -105,9 +105,9 @@ go env -w GOPROXY=https://goproxy.cn,direct Source: https://github.com/wailsapp/wails/issues/1233 -## The generated Typescript doesn't have the correct types +## 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. 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). ## When I navigate away from `index.html`, I am unable to call methods on the frontend diff --git a/website/i18n/pt/docusaurus-plugin-content-docs/current/howdoesitwork.mdx b/website/i18n/pt/docusaurus-plugin-content-docs/current/howdoesitwork.mdx index 663684ff7..163701520 100644 --- a/website/i18n/pt/docusaurus-plugin-content-docs/current/howdoesitwork.mdx +++ b/website/i18n/pt/docusaurus-plugin-content-docs/current/howdoesitwork.mdx @@ -4,7 +4,7 @@ sidebar_position: 20 # How does it work? -A Wails application is a standard Go application, with a webkit frontend. The Go part of the application consists of the application code and a runtime library that provides a number of useful operations, like controlling the application window. The frontend is a webkit window that will display the frontend assets. Also available to the frontend is a Javascript version of the runtime library. Finally, it is possible to bind Go methods to the frontend, and these will appear as Javascript methods that can be called, just as if they were local Javascript methods. +A Wails application is a standard Go application, with a webkit frontend. The Go part of the application consists of the application code and a runtime library that provides a number of useful operations, like controlling the application window. The frontend is a webkit window that will display the frontend assets. Also available to the frontend is a JavaScript version of the runtime library. Finally, it is possible to bind Go methods to the frontend, and these will appear as JavaScript methods that can be called, just as if they were local JavaScript methods. ```mdx-code-block
@@ -14,7 +14,7 @@ A Wails application is a standard Go application, with a webkit frontend. The Go ## The Main Application -### Visão geral +### Overview The main application consists of a single call to `wails.Run()`. It accepts the application configuration which describes the size of the application window, the window title, what assets to use, etc. A basic application might look like this: @@ -103,13 +103,13 @@ More details can be found in the [Application Development Guide](guides/applicat #### Application Lifecycle Callbacks -Just before the frontend is about to load `index.html`, a callback is made to the function provided in [OnStartup](reference/options.mdx#onstartup). A standard Go context is passed to this method. This context is required when calling the runtime so a standard pattern is to save a reference to in this method. Just before the application shuts down, the [OnShutdown](reference/options.mdx#onshutdown) callback is called in the same way, again with the context. There is also an [OnDomReady](reference/options.mdx#ondomready) callback for when the frontend has completed loading all assets in `index.html` and is equivalent of the [`body onload`](https://www.w3schools.com/jsref/event_onload.asp) event in Javascript. It is also possible to hook into the window close (or application quit) event by setting the option [OnBeforeClose](reference/options.mdx#onbeforeclose). +Just before the frontend is about to load `index.html`, a callback is made to the function provided in [OnStartup](reference/options.mdx#onstartup). A standard Go context is passed to this method. This context is required when calling the runtime so a standard pattern is to save a reference to in this method. Just before the application shuts down, the [OnShutdown](reference/options.mdx#onshutdown) callback is called in the same way, again with the context. There is also an [OnDomReady](reference/options.mdx#ondomready) callback for when the frontend has completed loading all assets in `index.html` and is equivalent of the [`body onload`](https://www.w3schools.com/jsref/event_onload.asp) event in JavaScript. It is also possible to hook into the window close (or application quit) event by setting the option [OnBeforeClose](reference/options.mdx#onbeforeclose). #### Method Binding -The `Bind` option is one of the most important options in a Wails application. It specifies which struct methods to expose to the frontend. Think of structs like "controllers" in a traditional web application. When the application starts, it examines the struct instances listed in the `Bind` field in the options, determines which methods are public (starts with an uppercase letter) and will generate Javascript versions of those methods that can be called by the frontend code. +The `Bind` option is one of the most important options in a Wails application. It specifies which struct methods to expose to the frontend. Think of structs like "controllers" in a traditional web application. When the application starts, it examines the struct instances listed in the `Bind` field in the options, determines which methods are public (starts with an uppercase letter) and will generate JavaScript versions of those methods that can be called by the frontend code. -:::info Nota +:::info Note Wails requires that you pass in an _instance_ of the struct for it to bind it correctly @@ -184,15 +184,15 @@ You may bind as many structs as you like. Just make sure you create an instance When you run `wails dev` (or `wails generate module`), a frontend module will be generated containing the following: -- Javascript bindings for all bound methods -- Typescript declarations for all bound methods -- Typescript definitions for all Go structs used as inputs or outputs by the bound methods +- JavaScript bindings for all bound methods +- TypeScript declarations for all bound methods +- TypeScript definitions for all Go structs used as inputs or outputs by the bound methods This makes it incredibly simple to call Go code from the frontend, using the same strongly typed datastructures. ## The Frontend -### Visão geral +### Overview The frontend is a collection of files rendered by webkit. It's like a browser and webserver in one. There is virtually[^1] no limit to which frameworks or libraries you can use. The main points of interaction between the frontend and your Go code are: @@ -201,7 +201,7 @@ The frontend is a collection of files rendered by webkit. It's like a browser an ### Calling bound Go methods -When you run your application with `wails dev`, it will automatically generate Javascript bindings for your structs in a directory called `wailsjs/go` (You can also do this by running `wails generate module`). The generated files mirror the package names in your application. In the example above, we bind `app`, which has one public method `Greet`. This will lead to the generation of the following files: +When you run your application with `wails dev`, it will automatically generate JavaScript bindings for your structs in a directory called `wailsjs/go` (You can also do this by running `wails generate module`). The generated files mirror the package names in your application. In the example above, we bind `app`, which has one public method `Greet`. This will lead to the generation of the following files: ```bash wailsjs @@ -211,7 +211,7 @@ wailsjs └─App.js ``` -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: ```javascript // ... @@ -224,27 +224,27 @@ function doGreeting(name) { } ``` -The Typescript declaration file gives you the correct types for the bound methods: +The TypeScript declaration file gives you the correct types for the bound methods: ```ts export function Greet(arg1: string): Promise; ``` -The generated methods return a Promise. A successful call will result in the first return value from the Go call to be passed to the `resolve` handler. An unsuccessful call is when a Go method that has an error type as it's second return value, passes an error instance back to the caller. This is passed back via the `reject` handler. In the example above, `Greet` only returns a `string` so the Javascript call will never reject - unless invalid data is passed to it. +The generated methods return a Promise. A successful call will result in the first return value from the Go call to be passed to the `resolve` handler. An unsuccessful call is when a Go method that has an error type as it's second return value, passes an error instance back to the caller. This is passed back via the `reject` handler. In the example above, `Greet` only returns a `string` so the JavaScript call will never reject - unless invalid data is passed to it. -All data types are correctly translated between Go and Javascript. Even structs. If you return a struct from a Go call, it will be returned to your frontend as a Javascript class. +All data types are correctly translated between Go and JavaScript. Even structs. If you return a struct from a Go call, it will be returned to your frontend as a JavaScript class. -:::info Nota +:::info Note -Struct fields *must* have a valid `json` tag to be included in the generated Typescript. +Struct fields *must* have a valid `json` tag to be included in the generated TypeScript. Anonymous nested structs are not supported at this time. ::: -It is possible to send structs back to Go. Any Javascript map/class passed as an argument that is expecting a struct, will be converted to that struct type. To make this process a lot easier, in `dev` mode, a TypeScript module is generated, defining all the struct types used in bound methods. Using this module, it's possible to construct and send native Javascript objects to the Go code. +It is possible to send structs back to Go. Any JavaScript map/class passed as an argument that is expecting a struct, will be converted to that struct type. To make this process a lot easier, in `dev` mode, a TypeScript module is generated, defining all the struct types used in bound methods. Using this module, it's possible to construct and send native JavaScript objects to the Go code. -There is also support for Go methods that use structs in their signature. All Go structs specified by a bound method (either as parameters or return types) will have Typescript versions auto generated as part of the Go code wrapper module. Using these, it's possible to share the same data model between Go and Javascript. +There is also support for Go methods that use structs in their signature. All Go structs specified by a bound method (either as parameters or return types) will have TypeScript versions auto generated as part of the Go code wrapper module. Using these, it's possible to share the same data model between Go and JavaScript. Example: We update our `Greet` method to accept a `Person` instead of a string: @@ -358,7 +358,7 @@ More information on Binding can be found in the [Binding Methods](guides/applica ### Calling runtime methods -The Javascript runtime is located at `window.runtime` and contains many methods to do various tasks such as emit an event or perform logging operations: +The JavaScript runtime is located at `window.runtime` and contains many methods to do various tasks such as emit an event or perform logging operations: ```js title="mycode.js" window.runtime.EventsEmit("my-event", 1); diff --git a/website/i18n/pt/docusaurus-plugin-content-docs/current/introduction.mdx b/website/i18n/pt/docusaurus-plugin-content-docs/current/introduction.mdx index 63022cdd0..e03250e3b 100644 --- a/website/i18n/pt/docusaurus-plugin-content-docs/current/introduction.mdx +++ b/website/i18n/pt/docusaurus-plugin-content-docs/current/introduction.mdx @@ -13,8 +13,8 @@ Considere uma alternativa leve e rápida do Electron para o Go. Você pode facil - Menus Nativos, Dialogs, Temas e Transparência - Suporte a Windows, macOS e Linux - Modelos embutidos para Svelte, React, Preact, Vue, Lit e Vanilla JS -- Chame métodos do Go facilmente a partir do Javascript -- Construção automática para geração de modelos do Typescript +- Easily call Go methods from JavaScript +- Automatic Go struct to TypeScript model generation - Não são necessárias DLLs externas ou CGO no Windows - Modo de desenvolvimento ao vivo usando o poder do [Vite](https://vitejs.dev/) - Poderoso CLI para criar, Construir e Empacotar facilmente @@ -36,7 +36,7 @@ Este é [vago](https://varly.app) - um aplicativo para desktop para MacOS & Wind ### Criação Rápida de Template -Há uma série de modelos pré-configurados que permitem que o aplicativo entre em funcionamento rapidamente. Há modelos para os seguintes frameworks: Svelte, React, Vue, Preact, Lit e Vanilla. Existem as versões Javascript e Typescript para cada modelo. +Há uma série de modelos pré-configurados que permitem que o aplicativo entre em funcionamento rapidamente. Há modelos para os seguintes frameworks: Svelte, React, Vue, Preact, Lit e Vanilla. There are both JavaScript and TypeScript versions for each template. ### Elementos Nativos @@ -44,13 +44,13 @@ Wails uses a purpose built library for handling native elements such as Window, **Ele não incorpora um navegador**, então é eficiente em recursos. Ao invés disso, ele usa o mecanismo de renderização nativo para a plataforma. No Windows, esta é a nova biblioteca da Microsoft Webview2, construída no Chromium. -### Interoperabilidade entre Go e Javascript +### Go & JavaScript Interoperability -O Wails automaticamente torna seus métodos Go disponíveis para Javascript, para que você possa chamá-los pelo nome a partir do seu frontend! Ele até gera modelos de Typescript para as structs usadas pelos seus métodos Go, então você pode passar as mesmas estruturas de dados entre Go e Javascript. +Wails automatically makes your Go methods available to JavaScript, so you can call them by name from your frontend! It even generates TypeScript models for the structs used by your Go methods, so you can pass the same data structures between Go and JavaScript. ### Biblioteca de tempo de execução -Wails fornece uma biblioteca de tempo de execução, para Go e Javascript, que lida com muitas das coisas que as aplicações modernas precisam, como Evento, Loging, Diálogos, etc. +Wails provides a runtime library, for both Go and JavaScript, that handles a lot of the things modern applications need, like Eventing, Logging, Dialogs, etc. ### Experiência de Desenvolvimento Ao Vivo diff --git a/website/i18n/pt/docusaurus-plugin-content-docs/current/reference/cli.mdx b/website/i18n/pt/docusaurus-plugin-content-docs/current/reference/cli.mdx index 76f5fa820..591766c6e 100644 --- a/website/i18n/pt/docusaurus-plugin-content-docs/current/reference/cli.mdx +++ b/website/i18n/pt/docusaurus-plugin-content-docs/current/reference/cli.mdx @@ -37,11 +37,11 @@ Exemplo: `wails init -n teste -t https://github.com/leaanthony/testtemplate[@v1. Uma lista de modelos mantidos pela comunidade pode ser encontrada [aqui](../community/templates.mdx) -:::warning Atenção +:::warning Attention -**O projeto Wails não é mantido, não é responsável nem responsável por modelos de terceiros!** +**The Wails project does not maintain, is not responsible nor liable for 3rd party templates!** -Se você não tiver certeza sobre um template, inspecione `package.json` e `wails.json` para quais scripts são executados e quais pacotes estão instalados. +If you are unsure about a template, inspect `package.json` and `wails.json` for what scripts are run and what packages are installed. ::: @@ -157,7 +157,7 @@ Your system is ready for Wails development! - Um servidor web foi iniciado em `http://localhost:34115` que serve sua aplicação (não apenas frontend) sobre http. Isso permite que você use suas extensões de desenvolvimento de navegador favoritas - Todos os conteúdos do aplicativo são carregados do disco. Se forem alterados, o aplicativo irá recarregar automaticamente (não reconstruir). Todos os navegadores conectados também recarregarão - Um módulo JS é gerado que fornece o seguinte: - - Wrappers de javascript dos seus métodos Go com JSDoc, gerada automaticamente, fornecendo dicas de código + - JavaScript wrappers of your Go methods with autogenerated JSDoc, providing code hinting - Versões do TypeScript de suas structs Go, que podem ser construídas e passadas para os métodos da sua ida - Um segundo módulo JS é gerado que fornece uma declaração wrapper + TS para o tempo de execução - No macOS, ele irá empacotar a aplicação em um arquivo `.app` e executá-lo. Será usado um `build/darwin/Info.dev.plist` para desenvolvimento. diff --git a/website/i18n/pt/docusaurus-plugin-content-docs/current/reference/options.mdx b/website/i18n/pt/docusaurus-plugin-content-docs/current/reference/options.mdx index 8c0df21b8..a42d44424 100644 --- a/website/i18n/pt/docusaurus-plugin-content-docs/current/reference/options.mdx +++ b/website/i18n/pt/docusaurus-plugin-content-docs/current/reference/options.mdx @@ -2,7 +2,7 @@ sidebar_position: 3 --- -# Opções +# Options ## Application Options @@ -145,7 +145,7 @@ Deprecated: Please use [WindowStartState](#windowstartstate). Defines how the window should present itself at startup. -| Valor | Win | Mac | Lin | +| Value | Win | Mac | Lin | | ---------- | --- | --- | --- | | Fullscreen | ✅ | ✅ | ✅ | | Maximised | ✅ | ✅ | ✅ | @@ -409,7 +409,7 @@ Name: BackdropType
Type `windows.BackdropType` The value can be one of the following: -| Valor | Description | +| Value | Description | | ------- | ----------------------------------------------------------------------------------------- | | Auto | Let Windows decide which backdrop to use | | None | Do not use translucency | @@ -453,7 +453,7 @@ Minimum Windows Version: Windows 10 2004/20H1 This defines the theme that the application should use: -| Valor | Description | +| Value | Description | | ------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | | SystemDefault | _Default_. The theme will be based on the system default. If the user changes their theme, the application will update to use the new setting | | Dark | The application will use a dark theme exclusively | @@ -607,7 +607,7 @@ Name: Appearance
Type: [`mac.AppearanceType`](#appearance-type) You can specify the application's [appearance](https://developer.apple.com/documentation/appkit/nsappearance?language=objc). -| Valor | Description | +| Value | Description | | ----------------------------------------------------- | --------------------------------------------------------------- | | DefaultAppearance | DefaultAppearance uses the default system value | | NSAppearanceNameAqua | The standard light system appearance | diff --git a/website/i18n/pt/docusaurus-plugin-content-docs/current/reference/runtime/browser.mdx b/website/i18n/pt/docusaurus-plugin-content-docs/current/reference/runtime/browser.mdx index 2af4a03aa..2765c844d 100644 --- a/website/i18n/pt/docusaurus-plugin-content-docs/current/reference/runtime/browser.mdx +++ b/website/i18n/pt/docusaurus-plugin-content-docs/current/reference/runtime/browser.mdx @@ -2,7 +2,7 @@ sidebar_position: 7 --- -# Navegador +# Browser Esses métodos estão relacionados com o navegador do sistema. diff --git a/website/i18n/pt/docusaurus-plugin-content-docs/current/reference/runtime/dialog.mdx b/website/i18n/pt/docusaurus-plugin-content-docs/current/reference/runtime/dialog.mdx index c7329b427..6a12ce135 100644 --- a/website/i18n/pt/docusaurus-plugin-content-docs/current/reference/runtime/dialog.mdx +++ b/website/i18n/pt/docusaurus-plugin-content-docs/current/reference/runtime/dialog.mdx @@ -6,7 +6,7 @@ sidebar_position: 5 Esta parte do tempo de execução fornece acesso a dialogos nativos, como os Seletores de Arquivo e caixas de mensagem. -:::info Javascript +:::info JavaScript O dialog não é suportado pelo runtime do JS. diff --git a/website/i18n/pt/docusaurus-plugin-content-docs/current/reference/runtime/events.mdx b/website/i18n/pt/docusaurus-plugin-content-docs/current/reference/runtime/events.mdx index 11b08ce1e..68eae0c4a 100644 --- a/website/i18n/pt/docusaurus-plugin-content-docs/current/reference/runtime/events.mdx +++ b/website/i18n/pt/docusaurus-plugin-content-docs/current/reference/runtime/events.mdx @@ -2,9 +2,9 @@ sidebar_position: 2 --- -# Eventos +# Events -O tempo de execução do Wails fornece um sistema unificado de eventos onde os eventos podem ser emitidos ou recebidos por Go ou Javascript. Opcionalmente, dados podem ser passados com os eventos. Os ouvintes receberão os dados nos tipos de dados locais. +The Wails runtime provides a unified events system, where events can be emitted or received by either Go or JavaScript. Opcionalmente, dados podem ser passados com os eventos. Os ouvintes receberão os dados nos tipos de dados locais. ### EventsOn diff --git a/website/i18n/pt/docusaurus-plugin-content-docs/current/reference/runtime/intro.mdx b/website/i18n/pt/docusaurus-plugin-content-docs/current/reference/runtime/intro.mdx index 33d00b179..f8a9667af 100644 --- a/website/i18n/pt/docusaurus-plugin-content-docs/current/reference/runtime/intro.mdx +++ b/website/i18n/pt/docusaurus-plugin-content-docs/current/reference/runtime/intro.mdx @@ -2,9 +2,9 @@ sidebar_position: 1 --- -# Introdução +# Introduction -O runtime é uma biblioteca que fornece métodos utilitários para sua aplicação. Existe tanto um tempo de execução Go quanto Javascript e o objetivo é tentar mantê-los na paridade quando possível. +O runtime é uma biblioteca que fornece métodos utilitários para sua aplicação. There is both a Go and JavaScript runtime and the aim is to try and keep them at parity where possible. Ele tem métodos de utilitário para: @@ -12,7 +12,7 @@ Ele tem métodos de utilitário para: - [Menus](menu.mdx) - [Caixa de diálogo](dialog.mdx) - [Eventos](events.mdx) -- [Navegador](browser.mdx) +- [Browser](browser.mdx) - [Registro](log.mdx) O runtime do Go está disponível através da importação de `github.com/wailsapp/wails/v2/pkg/runtime`. Todos os métodos neste pacote assumem um contexto como o primeiro parâmetro. Este contexto deve ser obtido a partir dos ganchos [OnStartup](../options.mdx#onstartup) ou [OnDomReady](../options.mdx#ondomready). @@ -23,7 +23,7 @@ Embora o contexto seja fornecido para o método [Inicialização](../options.mdx ::: -A biblioteca Javascript está disponível no frontend através do map `window.runtime`. Há um pacote de runtime gerado ao usar o modo `dev` que fornece declarações de Typescript para o tempo de execução. Isso deve ser localizado no diretório `wailsjs` em seu diretório frontend. +The JavaScript library is available to the frontend via the `window.runtime` map. There is a runtime package generated when using `dev` mode that provides TypeScript declarations for the runtime. Isso deve ser localizado no diretório `wailsjs` em seu diretório frontend. ### Hide diff --git a/website/i18n/pt/docusaurus-plugin-content-docs/current/reference/runtime/log.mdx b/website/i18n/pt/docusaurus-plugin-content-docs/current/reference/runtime/log.mdx index 45e721b50..0513b9431 100644 --- a/website/i18n/pt/docusaurus-plugin-content-docs/current/reference/runtime/log.mdx +++ b/website/i18n/pt/docusaurus-plugin-content-docs/current/reference/runtime/log.mdx @@ -4,13 +4,13 @@ sidebar_position: 3 # Registro -O runtime do Wails fornece um mecanismo de registro que pode ser chamado de Go ou Javascript. Como a maioria dos registros de, há um número de níveis de log: +The Wails runtime provides a logging mechanism that may be called from Go or JavaScript. Como a maioria dos registros de, há um número de níveis de log: - Trace - Debug - Info - Warning -- Erro +- Error - Fatal O logger irá gerar qualquer mensagem de log no nível atual, ou superior, de log. Exemplo: O `Debug` log level irá retornar todas as mensagens exceto `Trace` mensagens. @@ -101,7 +101,7 @@ Go: `LogFatalf(ctx context.Context, format string, args ...interface{})`
### LogSetLogLevel -Define o nível de log. Em Javascript, o número diz respeito aos seguintes níveis de log: +Define o nível de log. In JavaScript, the number relates to the following log levels: | Valor | Nível de Log | | ----- | ------------ | diff --git a/website/i18n/pt/docusaurus-plugin-content-docs/current/reference/runtime/menu.mdx b/website/i18n/pt/docusaurus-plugin-content-docs/current/reference/runtime/menu.mdx index 924648caf..ae07d327c 100644 --- a/website/i18n/pt/docusaurus-plugin-content-docs/current/reference/runtime/menu.mdx +++ b/website/i18n/pt/docusaurus-plugin-content-docs/current/reference/runtime/menu.mdx @@ -6,7 +6,7 @@ sidebar_position: 6 Estes métodos estão relacionados ao menu da aplicação. -:::info Javascript +:::info JavaScript O menu não é suportado atualmente no runtime do JS. diff --git a/website/i18n/pt/docusaurus-plugin-content-docs/current/reference/runtime/window.mdx b/website/i18n/pt/docusaurus-plugin-content-docs/current/reference/runtime/window.mdx index 2f06c7485..d834e7655 100644 --- a/website/i18n/pt/docusaurus-plugin-content-docs/current/reference/runtime/window.mdx +++ b/website/i18n/pt/docusaurus-plugin-content-docs/current/reference/runtime/window.mdx @@ -200,7 +200,7 @@ No Windows, apenas valores alfa de 0 ou 255 são suportados. Qualquer valor que Go: `WindowSetBackgroundColour(ctx context.Context, R, G, B, A uint8)`
JS: `WindowSetBackgroundColour(R, G, B, A)` -## Definições de Objetos Typescript +## TypeScript Object Definitions ### Position diff --git a/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.0.0-rc.1.json b/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.0.0-rc.1.json index 131be071e..49cf4687e 100644 --- a/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.0.0-rc.1.json +++ b/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.0.0-rc.1.json @@ -4,11 +4,11 @@ "description": "The label for version v2.0.0-rc.1" }, "sidebar.docs.category.Getting Started": { - "message": "Guia de Introdução", + "message": "Getting Started", "description": "The label for category Getting Started in sidebar docs" }, "sidebar.docs.category.Reference": { - "message": "Referências", + "message": "Reference", "description": "The label for category Reference in sidebar docs" }, "sidebar.docs.category.Runtime": { @@ -16,23 +16,23 @@ "description": "The label for category Runtime in sidebar docs" }, "sidebar.docs.category.Community": { - "message": "Comunidade", + "message": "Community", "description": "The label for category Community in sidebar docs" }, "sidebar.docs.category.Showcase": { - "message": "Demonstração", + "message": "Showcase", "description": "The label for category Showcase in sidebar docs" }, "sidebar.docs.category.Guides": { - "message": "Guias", + "message": "Guides", "description": "The label for category Guides in sidebar docs" }, "sidebar.docs.category.Tutorials": { - "message": "Tutoriais", + "message": "Tutorials", "description": "The label for category Tutorials in sidebar docs" }, "sidebar.docs.link.Contributing": { - "message": "Contribuição", + "message": "Contributing", "description": "The label for link Contributing in sidebar docs, linking to /community-guide#ways-of-contributing" } } diff --git a/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.0.0.json b/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.0.0.json index ffabd9b6f..421c838e6 100644 --- a/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.0.0.json +++ b/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.0.0.json @@ -4,11 +4,11 @@ "description": "The label for version v2.0.0" }, "sidebar.docs.category.Getting Started": { - "message": "Guia de Introdução", + "message": "Getting Started", "description": "The label for category Getting Started in sidebar docs" }, "sidebar.docs.category.Reference": { - "message": "Referências", + "message": "Reference", "description": "The label for category Reference in sidebar docs" }, "sidebar.docs.category.Runtime": { @@ -16,23 +16,23 @@ "description": "The label for category Runtime in sidebar docs" }, "sidebar.docs.category.Community": { - "message": "Comunidade", + "message": "Community", "description": "The label for category Community in sidebar docs" }, "sidebar.docs.category.Showcase": { - "message": "Demonstração", + "message": "Showcase", "description": "The label for category Showcase in sidebar docs" }, "sidebar.docs.category.Guides": { - "message": "Guias", + "message": "Guides", "description": "The label for category Guides in sidebar docs" }, "sidebar.docs.category.Tutorials": { - "message": "Tutoriais", + "message": "Tutorials", "description": "The label for category Tutorials in sidebar docs" }, "sidebar.docs.link.Contributing": { - "message": "Contribuição", + "message": "Contributing", "description": "The label for link Contributing in sidebar docs, linking to /community-guide#ways-of-contributing" } } diff --git a/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.1.0.json b/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.1.0.json index be7997238..f29e6b248 100644 --- a/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.1.0.json +++ b/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.1.0.json @@ -4,11 +4,11 @@ "description": "The label for version v2.1.0" }, "sidebar.docs.category.Getting Started": { - "message": "Guia de Introdução", + "message": "Getting Started", "description": "The label for category Getting Started in sidebar docs" }, "sidebar.docs.category.Reference": { - "message": "Referências", + "message": "Reference", "description": "The label for category Reference in sidebar docs" }, "sidebar.docs.category.Runtime": { @@ -16,23 +16,23 @@ "description": "The label for category Runtime in sidebar docs" }, "sidebar.docs.category.Community": { - "message": "Comunidade", + "message": "Community", "description": "The label for category Community in sidebar docs" }, "sidebar.docs.category.Showcase": { - "message": "Demonstração", + "message": "Showcase", "description": "The label for category Showcase in sidebar docs" }, "sidebar.docs.category.Guides": { - "message": "Guias", + "message": "Guides", "description": "The label for category Guides in sidebar docs" }, "sidebar.docs.category.Tutorials": { - "message": "Tutoriais", + "message": "Tutorials", "description": "The label for category Tutorials in sidebar docs" }, "sidebar.docs.link.Contributing": { - "message": "Contribuição", + "message": "Contributing", "description": "The label for link Contributing in sidebar docs, linking to /community-guide#ways-of-contributing" } } diff --git a/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.2.0.json b/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.2.0.json index c6a01669c..1074035c4 100644 --- a/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.2.0.json +++ b/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.2.0.json @@ -4,11 +4,11 @@ "description": "The label for version v2.2.0" }, "sidebar.docs.category.Getting Started": { - "message": "Guia de Introdução", + "message": "Getting Started", "description": "The label for category Getting Started in sidebar docs" }, "sidebar.docs.category.Reference": { - "message": "Referências", + "message": "Reference", "description": "The label for category Reference in sidebar docs" }, "sidebar.docs.category.Runtime": { @@ -16,23 +16,23 @@ "description": "The label for category Runtime in sidebar docs" }, "sidebar.docs.category.Community": { - "message": "Comunidade", + "message": "Community", "description": "The label for category Community in sidebar docs" }, "sidebar.docs.category.Showcase": { - "message": "Demonstração", + "message": "Showcase", "description": "The label for category Showcase in sidebar docs" }, "sidebar.docs.category.Guides": { - "message": "Guias", + "message": "Guides", "description": "The label for category Guides in sidebar docs" }, "sidebar.docs.category.Tutorials": { - "message": "Tutoriais", + "message": "Tutorials", "description": "The label for category Tutorials in sidebar docs" }, "sidebar.docs.link.Contributing": { - "message": "Contribuição", + "message": "Contributing", "description": "The label for link Contributing in sidebar docs, linking to /community-guide#ways-of-contributing" } } diff --git a/website/i18n/pt/docusaurus-plugin-content-pages/changelog.mdx b/website/i18n/pt/docusaurus-plugin-content-pages/changelog.mdx index a35e7850b..face79ef7 100644 --- a/website/i18n/pt/docusaurus-plugin-content-pages/changelog.mdx +++ b/website/i18n/pt/docusaurus-plugin-content-pages/changelog.mdx @@ -17,10 +17,13 @@ O formato é baseado em [Manter um Log de Alterações](https://keepachangelog.c - Added `OpenInspectorOnStartup` to debug options to allow opening the WebInspector during startup of the application in debug mode. Added by @stffabi in [PR](https://github.com/wailsapp/wails/pull/2080) - On macOS `wails doctor` now also shows the version of Xcode installed. Added by @stffabi in [PR](https://github.com/wailsapp/wails/pull/2089) - The [AssetServer](/docs/reference/options#assetserver) now supports handling range-requests if the [Assets](/docs/reference/options/#assets-1) `fs.FS` provides an `io.ReadSeeker`. Added by @stffabi in [PR](https://github.com/wailsapp/wails/pull/2091) +- Add new property for the `wails.json` config file - `bindings`. More information on the new property can be found in the updated [schema](/schemas/config.v2.json). Properties `prefix` and `suffix` allow you to control the generated TypeScript entity name in the `model.ts` file. Added by @OlegGulevskyy in [PR](https://github.com/wailsapp/wails/pull/2101) +- The `WindowSetAlwaysOnTop` method is now exposed in the JS runtime. Fixed by @gotid in [PR](https://github.com/wailsapp/wails/pull/2128) ### Corrigido - The `noreload` flag in wails dev wasn't applied. Fixed by @stffabi in this [PR](https://github.com/wailsapp/wails/pull/2081) - `build/bin` folder was duplicating itself on each reload in `wails dev` mode. Fixed by @OlegGulevskyy in this [PR](https://github.com/wailsapp/wails/pull/2103) +- Prevent a thin white line at the bottom of a frameless window on Windows. Fixed by @stffabi in this [PR](https://github.com/wailsapp/wails/pull/2111) ## v2.2.0 - 2022-11-09 @@ -39,7 +42,7 @@ O formato é baseado em [Manter um Log de Alterações](https://keepachangelog.c ### Corrigido - Webview2 on Windows returns a potential whitespace when defining the style like this style="--wails-draggable: drag". Fixed by @stffabi in https://github.com/wailsapp/wails/pull/1989 -- Bound structs that had `struct{}` field types would cause the Typescript generation to fail. Thanks to @ParkourLiu for the [PR](https://github.com/wailsapp/wails/pull/1999) +- Bound structs that had `struct{}` field types would cause the TypeScript generation to fail. Thanks to @ParkourLiu for the [PR](https://github.com/wailsapp/wails/pull/1999) - When maximising a frameless window on Windows with multiple monitors, the window could sometimes become blank. Thanks to @stffabi for the [fix](https://github.com/wailsapp/wails/pull/2043) ### Alterado @@ -84,7 +87,7 @@ O formato é baseado em [Manter um Log de Alterações](https://keepachangelog.c - Remova o diretório `.git` no template - @misitebao em https://github.com/wailsapp/wails/pull/1929 - Corrigir wails dev - @JulioDRF em https://github.com/wailsapp/wails/pull/1931 - Correção para considerar novos `go` arquivos no observador do sistema de arquivos de desenvolvimento - @scottopell em https://github.com/wailsapp/wails/pull/1946 -- Impeça a análise de tipos para interferir com o nome do pacote Typescript - @ValentinTrinque em https://github.com/wailsapp/wails/pull/1942 +- Prevent type parsing to interfere with TypeScript package name - @ValentinTrinque in https://github.com/wailsapp/wails/pull/1942 - [dev] Não tente infer assetdir from fs.FS quando um servidor de desenvolvimento de frontend estiver em uso - @stffabi em https://github.com/wailsapp/wails/pull/1972 - Corrigir fix init não listado em wails help message - @lyon-lee-dev em https://github.com/wailsapp/wails/pull/1976 @@ -479,7 +482,7 @@ Experimental: &options.Experimental{ - 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) - [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) +- 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) - Added docs for [code-signing](https://wails.io/docs/guides/signing) and [NSIS installer](https://wails.io/docs/guides/windows-installer) - [@gardc](https://github.com/gardc) - Add support for `-trimpath` [build flag](https://wails.io/docs/reference/cli#build) @@ -489,7 +492,7 @@ Experimental: &options.Experimental{ - Improved mimetype detection for BOM marker and comments - [@napalu](https://github.com/napalu) - Remove duplicate mimetype entries - [@napalu](https://github.com/napalu) -- Remove duplicate Typescript imports in generated definition files - [@adalessa](https://github.com/adalessa) +- Remove duplicate TypeScript imports in generated definition files - [@adalessa](https://github.com/adalessa) - Add missing method declaration - [@adalessa](https://github.com/adalessa) - Fix Linux sigabrt on start - [@napalu](https://github.com/napalu) - Double Click event now works on elements with `data-wails-drag` attribute - [@jicg](https://github.com/jicg) diff --git a/website/i18n/pt/docusaurus-plugin-content-pages/community-guide.mdx b/website/i18n/pt/docusaurus-plugin-content-pages/community-guide.mdx index dc7753d96..14bc204e7 100644 --- a/website/i18n/pt/docusaurus-plugin-content-pages/community-guide.mdx +++ b/website/i18n/pt/docusaurus-plugin-content-pages/community-guide.mdx @@ -70,6 +70,7 @@ The process for fixing bugs are as follows: - The scope of the issue including platforms affected - 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](https://stackoverflow.com/help/minimal-reproducible-example) - The output of `wails doctor` +- A test that can reproduce the bug - 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/_` diff --git a/website/i18n/pt/docusaurus-theme-classic/footer.json b/website/i18n/pt/docusaurus-theme-classic/footer.json index 4d6eb27da..e162c8874 100644 --- a/website/i18n/pt/docusaurus-theme-classic/footer.json +++ b/website/i18n/pt/docusaurus-theme-classic/footer.json @@ -4,7 +4,7 @@ "description": "The title of the footer links column with title=Docs in the footer" }, "link.title.Community": { - "message": "Comunidade", + "message": "Community", "description": "The title of the footer links column with title=Community in the footer" }, "link.title.More": { @@ -12,11 +12,11 @@ "description": "The title of the footer links column with title=More in the footer" }, "link.item.label.Introduction": { - "message": "Introdução", + "message": "Introduction", "description": "The label of footer link with label=Introduction linking to /docs/introduction" }, "link.item.label.Getting Started": { - "message": "Guia de Introdução", + "message": "Getting Started", "description": "The label of footer link with label=Getting Started linking to /docs/gettingstarted/installation" }, "link.item.label.Changelog": { diff --git a/website/i18n/pt/docusaurus-theme-classic/navbar.json b/website/i18n/pt/docusaurus-theme-classic/navbar.json index ad228a5f8..b8957114c 100644 --- a/website/i18n/pt/docusaurus-theme-classic/navbar.json +++ b/website/i18n/pt/docusaurus-theme-classic/navbar.json @@ -4,7 +4,7 @@ "description": "Navbar item with label Sponsor" }, "item.label.Docs": { - "message": "Documentação", + "message": "Docs", "description": "Navbar item with label Docs" }, "item.label.Blog": { diff --git a/website/i18n/ru/code.json b/website/i18n/ru/code.json index 052cf8996..d60c126c2 100644 --- a/website/i18n/ru/code.json +++ b/website/i18n/ru/code.json @@ -55,7 +55,7 @@ "description": "The page & hero title of the blog archive page" }, "theme.blog.archive.description": { - "message": "Архив", + "message": "Archive", "description": "The page & hero description of the blog archive page" }, "theme.BackToTopButton.buttonAriaLabel": { @@ -147,7 +147,7 @@ "description": "The ARIA label and title attribute for expand button of doc sidebar" }, "theme.docs.sidebar.expandButtonAriaLabel": { - "message": "Развернуть боковую панель", + "message": "Expand sidebar", "description": "The ARIA label and title attribute for expand button of doc sidebar" }, "theme.docs.paginator.navAriaLabel": { @@ -167,7 +167,7 @@ "description": "The title attribute for collapse button of doc sidebar" }, "theme.docs.sidebar.collapseButtonAriaLabel": { - "message": "Свернуть боковую панель", + "message": "Collapse sidebar", "description": "The title attribute for collapse button of doc sidebar" }, "theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": { diff --git a/website/i18n/ru/docusaurus-plugin-content-blog/2021-09-27-v2-beta1-release-notes.mdx b/website/i18n/ru/docusaurus-plugin-content-blog/2021-09-27-v2-beta1-release-notes.mdx index 8cbbff9fa..f23f73d6d 100644 --- a/website/i18n/ru/docusaurus-plugin-content-blog/2021-09-27-v2-beta1-release-notes.mdx +++ b/website/i18n/ru/docusaurus-plugin-content-blog/2021-09-27-v2-beta1-release-notes.mdx @@ -116,7 +116,7 @@ It also provides the additional features: In addition to this, a webserver will start on port 34115. This will serve your application to any browser that connects to it. All connected web browsers will respond to system events like hot reload on asset change. -In Go, we are used to dealing with structs in our applications. It's often useful to send structs to our frontend and use them as state in our application. In v1, this was a very manual process and a bit of a burden on the developer. I'm happy to announce that in v2, any application run in dev mode will automatically generate Typescript models for all structs that are input or output parameters to bound methods. This enables seamless interchange of data models between the two worlds. +In Go, we are used to dealing with structs in our applications. It's often useful to send structs to our frontend and use them as state in our application. In v1, this was a very manual process and a bit of a burden on the developer. I'm happy to announce that in v2, any application run in dev mode will automatically generate TypeScript models for all structs that are input or output parameters to bound methods. This enables seamless interchange of data models between the two worlds. In addition to this, another JS module is dynamically generated wrapping all your bound methods. This provides JSDoc for your methods, providing code completion and hinting in your IDE. It's really cool when you get data models auto-imported when hitting tab in an auto-generated module wrapping your Go code! diff --git a/website/i18n/ru/docusaurus-plugin-content-blog/2021-11-08-v2-beta2-release-notes.mdx b/website/i18n/ru/docusaurus-plugin-content-blog/2021-11-08-v2-beta2-release-notes.mdx index 76ae8c80a..86d44616f 100644 --- a/website/i18n/ru/docusaurus-plugin-content-blog/2021-11-08-v2-beta2-release-notes.mdx +++ b/website/i18n/ru/docusaurus-plugin-content-blog/2021-11-08-v2-beta2-release-notes.mdx @@ -74,7 +74,7 @@ It also provides the additional features: In addition to this, a webserver will start on port 34115. This will serve your application to any browser that connects to it. All connected web browsers will respond to system events like hot reload on asset change. -In Go, we are used to dealing with structs in our applications. It's often useful to send structs to our frontend and use them as state in our application. In v1, this was a very manual process and a bit of a burden on the developer. I'm happy to announce that in v2, any application run in dev mode will automatically generate Typescript models for all structs that are input or output parameters to bound methods. This enables seamless interchange of data models between the two worlds. +In Go, we are used to dealing with structs in our applications. It's often useful to send structs to our frontend and use them as state in our application. In v1, this was a very manual process and a bit of a burden on the developer. I'm happy to announce that in v2, any application run in dev mode will automatically generate TypeScript models for all structs that are input or output parameters to bound methods. This enables seamless interchange of data models between the two worlds. In addition to this, another JS module is dynamically generated wrapping all your bound methods. This provides JSDoc for your methods, providing code completion and hinting in your IDE. It's really cool when you get data models auto-imported when hitting tab in an auto-generated module wrapping your Go code! diff --git a/website/i18n/ru/docusaurus-plugin-content-blog/2022-02-22-v2-beta3-release-notes.mdx b/website/i18n/ru/docusaurus-plugin-content-blog/2022-02-22-v2-beta3-release-notes.mdx index eb7f2a46a..b405953cf 100644 --- a/website/i18n/ru/docusaurus-plugin-content-blog/2022-02-22-v2-beta3-release-notes.mdx +++ b/website/i18n/ru/docusaurus-plugin-content-blog/2022-02-22-v2-beta3-release-notes.mdx @@ -61,7 +61,7 @@ It also provides the additional features: In addition to this, a webserver will start on port 34115. This will serve your application to any browser that connects to it. All connected web browsers will respond to system events like hot reload on asset change. -In Go, we are used to dealing with structs in our applications. It's often useful to send structs to our frontend and use them as state in our application. In v1, this was a very manual process and a bit of a burden on the developer. I'm happy to announce that in v2, any application run in dev mode will automatically generate Typescript models for all structs that are input or output parameters to bound methods. This enables seamless interchange of data models between the two worlds. +In Go, we are used to dealing with structs in our applications. It's often useful to send structs to our frontend and use them as state in our application. In v1, this was a very manual process and a bit of a burden on the developer. I'm happy to announce that in v2, any application run in dev mode will automatically generate TypeScript models for all structs that are input or output parameters to bound methods. This enables seamless interchange of data models between the two worlds. In addition to this, another JS module is dynamically generated wrapping all your bound methods. This provides JSDoc for your methods, providing code completion and hinting in your IDE. It's really cool when you get data models auto-imported when hitting tab in an auto-generated module wrapping your Go code! diff --git a/website/i18n/ru/docusaurus-plugin-content-blog/2022-09-22-v2-release-notes.mdx b/website/i18n/ru/docusaurus-plugin-content-blog/2022-09-22-v2-release-notes.mdx index e9d570afa..c321f5042 100644 --- a/website/i18n/ru/docusaurus-plugin-content-blog/2022-09-22-v2-release-notes.mdx +++ b/website/i18n/ru/docusaurus-plugin-content-blog/2022-09-22-v2-release-notes.mdx @@ -45,7 +45,7 @@ The v2 release is a huge leap forward for the project, addressing many of the pa - A rich [runtime library](/docs/reference/runtime/intro) providing utility methods for window manipulation, eventing, dialogs, menus and logging. - Support for [obfuscating](/docs/guides/obfuscated) your application using [garble](https://github.com/burrowers/garble). - Support for compressing your application using [UPX](https://upx.github.io/). -- Automatic Typescript generation of Go structs. More info [here](/docs/howdoesitwork#calling-bound-go-methods). +- Automatic TypeScript generation of Go structs. More info [here](/docs/howdoesitwork#calling-bound-go-methods). - No extra libraries or DLLs are required to be shipped with your application. For any platform. - No requirement to bundle frontend assets. Just develop your application like any other web application. diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/current/community/showcase/filehound.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/current/community/showcase/filehound.mdx index 1c5b0c338..22b6d9081 100644 --- a/website/i18n/ru/docusaurus-plugin-content-docs/current/community/showcase/filehound.mdx +++ b/website/i18n/ru/docusaurus-plugin-content-docs/current/community/showcase/filehound.mdx @@ -13,4 +13,4 @@ Бэкенд: Go 1.15 Wails 1.11.0 go-sqlite3 1.14.6 go-linq 3.2 -Фронтенд: Vue 2.6.11 Vuex 3.4.0 Typescript Tailwind 1.9.6 +Frontend with: Vue 2.6.11 Vuex 3.4.0 TypeScript Tailwind 1.9.6 diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/current/gettingstarted/development.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/current/gettingstarted/development.mdx index 38fcccd78..e7c6351e7 100644 --- a/website/i18n/ru/docusaurus-plugin-content-docs/current/gettingstarted/development.mdx +++ b/website/i18n/ru/docusaurus-plugin-content-docs/current/gettingstarted/development.mdx @@ -7,7 +7,7 @@ sidebar_position: 5 Вы можете запустить ваше приложение в режиме разработки, выполнив `wails dev` в вашем каталоге проекта. Это сделает следующие вещи: - Соберет ваше приложение и запустит -- Привяжет код Go к интерфейсу, чтобы его можно было вызвать из Javascript +- Bind your Go code to the frontend so it can be called from JavaScript - С помощью [Vite](https://vitejs.dev/), будет наблюдать за изменениями в ваших Go файлах и пересобирать/перезапускать при изменении - Устанавливает [веб-сервер](http://localhost:34115), который будет обслуживать ваше приложение через браузер. Это позволит вам использовать ваши любимые расширения браузера. Вы даже можете вызвать ваш Go-код из консоли diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/current/gettingstarted/firstproject.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/current/gettingstarted/firstproject.mdx index 465781960..52b58fa77 100644 --- a/website/i18n/ru/docusaurus-plugin-content-docs/current/gettingstarted/firstproject.mdx +++ b/website/i18n/ru/docusaurus-plugin-content-docs/current/gettingstarted/firstproject.mdx @@ -26,61 +26,61 @@ import TabItem from "@theme/TabItem"; ]} > - Генерируем Svelte проект с использованием Javascript с помощью команды:

+ Generate a Svelte project using JavaScript with:

wails init -n myproject -t svelte -Если вы также используете Typescript:
+If you would rather use TypeScript:
wails init -n myproject -t svelte-ts
- Генерируем a React проект с использованием Javascript with:

+ Generate a React project using JavaScript with:

wails init -n myproject -t react -Если вы также используете Typescript:
+If you would rather use TypeScript:
wails init -n myproject -t react-ts
- Генерируем Vue проект с использованием Javascript with:

+ Generate a Vue project using JavaScript with:

wails init -n myproject -t vue -Если вы также используете Typescript:
+If you would rather use TypeScript:
wails init -n myproject -t vue-ts
- Генерируем Preact проект с использованием Javascript with:

+ Generate a Preact project using JavaScript with:

wails init -n myproject -t preact -Если вы также используете Typescript:
+If you would rather use TypeScript:
wails init -n myproject -t preact-ts
- Генерируем Lit проект с использованием Javascript with:

+ Generate a Lit project using JavaScript with:

wails init -n myproject -t lit -Если вы также используете Typescript:
+If you would rather use TypeScript:
wails init -n myproject -t lit-ts
- Генерируем проект с Vanilla и Javascript with:

+ Generate a Vanilla project using JavaScript with:

wails init -n myproject -t vanilla -Если вы также используете Typescript:
+If you would rather use TypeScript:
wails init -n myproject -t vanilla-ts diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/current/guides/local-development.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/current/guides/local-development.mdx index 724a5ae15..4ba1f34c3 100644 --- a/website/i18n/ru/docusaurus-plugin-content-docs/current/guides/local-development.mdx +++ b/website/i18n/ru/docusaurus-plugin-content-docs/current/guides/local-development.mdx @@ -1,6 +1,6 @@ # Local Development -## Обзор +## Overview Wails is in constant development and new releases are regularly "tagged". This usually happens when all the newer code on `master` has been tested and confirmed working. If you need a bugfix or feature that has not yet made it to a release, it's possible to use the latest "bleeding edge" version using the following steps: diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/current/guides/migrating.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/current/guides/migrating.mdx index 72940df91..7123cbe6b 100644 --- a/website/i18n/ru/docusaurus-plugin-content-docs/current/guides/migrating.mdx +++ b/website/i18n/ru/docusaurus-plugin-content-docs/current/guides/migrating.mdx @@ -1,6 +1,6 @@ # Migrating from v1 -## Обзор +## Overview Wails v2 is a significant change from v1. This document aims to highlight the changes and the steps in migrating an existing project. @@ -118,7 +118,7 @@ The _biggest_ change in v2 is how assets are handled. In v1, assets were passed via 2 application options: -- `JS` - The application's Javascript +- `JS` - The application's JavaScript - `CSS` - The application's CSS This meant that the responsibility of generating a single JS and CSS file was on the developer. This essentially required the use of complicated packers such as webpack. diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/current/guides/obfuscated.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/current/guides/obfuscated.mdx index 2daf3ff47..8094a0324 100644 --- a/website/i18n/ru/docusaurus-plugin-content-docs/current/guides/obfuscated.mdx +++ b/website/i18n/ru/docusaurus-plugin-content-docs/current/guides/obfuscated.mdx @@ -26,7 +26,7 @@ These settings may be persisted in your [project config](../reference/project-co ::: -## Пример +## Example Импортирование метода "Greet" из биндинга: diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/current/guides/templates.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/current/guides/templates.mdx index bdf4cdbc5..23e24c4c8 100644 --- a/website/i18n/ru/docusaurus-plugin-content-docs/current/guides/templates.mdx +++ b/website/i18n/ru/docusaurus-plugin-content-docs/current/guides/templates.mdx @@ -1,4 +1,4 @@ -# Шаблоны +# Templates Wails генерирует проекты из заранее созданных шаблонов. В v1 это было трудно поддерживать набор проектов, которые были подвержены устареванию. В v2 для расширения прав и возможностей сообщества добавлено несколько новых возможностей для шаблонов: diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/current/guides/troubleshooting.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/current/guides/troubleshooting.mdx index 7e7081faf..2accc4e5f 100644 --- a/website/i18n/ru/docusaurus-plugin-content-docs/current/guides/troubleshooting.mdx +++ b/website/i18n/ru/docusaurus-plugin-content-docs/current/guides/troubleshooting.mdx @@ -105,9 +105,9 @@ go env -w GOPROXY=https://goproxy.cn,direct Source: https://github.com/wailsapp/wails/issues/1233 -## The generated Typescript doesn't have the correct types +## 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. 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). ## When I navigate away from `index.html`, I am unable to call methods on the frontend diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/current/howdoesitwork.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/current/howdoesitwork.mdx index e678188e2..163701520 100644 --- a/website/i18n/ru/docusaurus-plugin-content-docs/current/howdoesitwork.mdx +++ b/website/i18n/ru/docusaurus-plugin-content-docs/current/howdoesitwork.mdx @@ -4,7 +4,7 @@ sidebar_position: 20 # How does it work? -A Wails application is a standard Go application, with a webkit frontend. The Go part of the application consists of the application code and a runtime library that provides a number of useful operations, like controlling the application window. The frontend is a webkit window that will display the frontend assets. Also available to the frontend is a Javascript version of the runtime library. Finally, it is possible to bind Go methods to the frontend, and these will appear as Javascript methods that can be called, just as if they were local Javascript methods. +A Wails application is a standard Go application, with a webkit frontend. The Go part of the application consists of the application code and a runtime library that provides a number of useful operations, like controlling the application window. The frontend is a webkit window that will display the frontend assets. Also available to the frontend is a JavaScript version of the runtime library. Finally, it is possible to bind Go methods to the frontend, and these will appear as JavaScript methods that can be called, just as if they were local JavaScript methods. ```mdx-code-block
@@ -14,7 +14,7 @@ A Wails application is a standard Go application, with a webkit frontend. The Go ## The Main Application -### Обзор +### Overview The main application consists of a single call to `wails.Run()`. It accepts the application configuration which describes the size of the application window, the window title, what assets to use, etc. A basic application might look like this: @@ -103,11 +103,11 @@ More details can be found in the [Application Development Guide](guides/applicat #### Application Lifecycle Callbacks -Just before the frontend is about to load `index.html`, a callback is made to the function provided in [OnStartup](reference/options.mdx#onstartup). A standard Go context is passed to this method. This context is required when calling the runtime so a standard pattern is to save a reference to in this method. Just before the application shuts down, the [OnShutdown](reference/options.mdx#onshutdown) callback is called in the same way, again with the context. There is also an [OnDomReady](reference/options.mdx#ondomready) callback for when the frontend has completed loading all assets in `index.html` and is equivalent of the [`body onload`](https://www.w3schools.com/jsref/event_onload.asp) event in Javascript. It is also possible to hook into the window close (or application quit) event by setting the option [OnBeforeClose](reference/options.mdx#onbeforeclose). +Just before the frontend is about to load `index.html`, a callback is made to the function provided in [OnStartup](reference/options.mdx#onstartup). A standard Go context is passed to this method. This context is required when calling the runtime so a standard pattern is to save a reference to in this method. Just before the application shuts down, the [OnShutdown](reference/options.mdx#onshutdown) callback is called in the same way, again with the context. There is also an [OnDomReady](reference/options.mdx#ondomready) callback for when the frontend has completed loading all assets in `index.html` and is equivalent of the [`body onload`](https://www.w3schools.com/jsref/event_onload.asp) event in JavaScript. It is also possible to hook into the window close (or application quit) event by setting the option [OnBeforeClose](reference/options.mdx#onbeforeclose). #### Method Binding -The `Bind` option is one of the most important options in a Wails application. It specifies which struct methods to expose to the frontend. Think of structs like "controllers" in a traditional web application. When the application starts, it examines the struct instances listed in the `Bind` field in the options, determines which methods are public (starts with an uppercase letter) and will generate Javascript versions of those methods that can be called by the frontend code. +The `Bind` option is one of the most important options in a Wails application. It specifies which struct methods to expose to the frontend. Think of structs like "controllers" in a traditional web application. When the application starts, it examines the struct instances listed in the `Bind` field in the options, determines which methods are public (starts with an uppercase letter) and will generate JavaScript versions of those methods that can be called by the frontend code. :::info Note @@ -184,15 +184,15 @@ You may bind as many structs as you like. Just make sure you create an instance When you run `wails dev` (or `wails generate module`), a frontend module will be generated containing the following: -- Javascript bindings for all bound methods -- Typescript declarations for all bound methods -- Typescript definitions for all Go structs used as inputs or outputs by the bound methods +- JavaScript bindings for all bound methods +- TypeScript declarations for all bound methods +- TypeScript definitions for all Go structs used as inputs or outputs by the bound methods This makes it incredibly simple to call Go code from the frontend, using the same strongly typed datastructures. ## The Frontend -### Обзор +### Overview The frontend is a collection of files rendered by webkit. It's like a browser and webserver in one. There is virtually[^1] no limit to which frameworks or libraries you can use. The main points of interaction between the frontend and your Go code are: @@ -201,7 +201,7 @@ The frontend is a collection of files rendered by webkit. It's like a browser an ### Calling bound Go methods -When you run your application with `wails dev`, it will automatically generate Javascript bindings for your structs in a directory called `wailsjs/go` (You can also do this by running `wails generate module`). The generated files mirror the package names in your application. In the example above, we bind `app`, which has one public method `Greet`. This will lead to the generation of the following files: +When you run your application with `wails dev`, it will automatically generate JavaScript bindings for your structs in a directory called `wailsjs/go` (You can also do this by running `wails generate module`). The generated files mirror the package names in your application. In the example above, we bind `app`, which has one public method `Greet`. This will lead to the generation of the following files: ```bash wailsjs @@ -211,7 +211,7 @@ wailsjs └─App.js ``` -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: ```javascript // ... @@ -224,27 +224,27 @@ function doGreeting(name) { } ``` -The Typescript declaration file gives you the correct types for the bound methods: +The TypeScript declaration file gives you the correct types for the bound methods: ```ts export function Greet(arg1: string): Promise; ``` -The generated methods return a Promise. A successful call will result in the first return value from the Go call to be passed to the `resolve` handler. An unsuccessful call is when a Go method that has an error type as it's second return value, passes an error instance back to the caller. This is passed back via the `reject` handler. In the example above, `Greet` only returns a `string` so the Javascript call will never reject - unless invalid data is passed to it. +The generated methods return a Promise. A successful call will result in the first return value from the Go call to be passed to the `resolve` handler. An unsuccessful call is when a Go method that has an error type as it's second return value, passes an error instance back to the caller. This is passed back via the `reject` handler. In the example above, `Greet` only returns a `string` so the JavaScript call will never reject - unless invalid data is passed to it. -All data types are correctly translated between Go and Javascript. Even structs. If you return a struct from a Go call, it will be returned to your frontend as a Javascript class. +All data types are correctly translated between Go and JavaScript. Even structs. If you return a struct from a Go call, it will be returned to your frontend as a JavaScript class. :::info Note -Struct fields *must* have a valid `json` tag to be included in the generated Typescript. +Struct fields *must* have a valid `json` tag to be included in the generated TypeScript. Anonymous nested structs are not supported at this time. ::: -It is possible to send structs back to Go. Any Javascript map/class passed as an argument that is expecting a struct, will be converted to that struct type. To make this process a lot easier, in `dev` mode, a TypeScript module is generated, defining all the struct types used in bound methods. Using this module, it's possible to construct and send native Javascript objects to the Go code. +It is possible to send structs back to Go. Any JavaScript map/class passed as an argument that is expecting a struct, will be converted to that struct type. To make this process a lot easier, in `dev` mode, a TypeScript module is generated, defining all the struct types used in bound methods. Using this module, it's possible to construct and send native JavaScript objects to the Go code. -There is also support for Go methods that use structs in their signature. All Go structs specified by a bound method (either as parameters or return types) will have Typescript versions auto generated as part of the Go code wrapper module. Using these, it's possible to share the same data model between Go and Javascript. +There is also support for Go methods that use structs in their signature. All Go structs specified by a bound method (either as parameters or return types) will have TypeScript versions auto generated as part of the Go code wrapper module. Using these, it's possible to share the same data model between Go and JavaScript. Example: We update our `Greet` method to accept a `Person` instead of a string: @@ -358,7 +358,7 @@ More information on Binding can be found in the [Binding Methods](guides/applica ### Calling runtime methods -The Javascript runtime is located at `window.runtime` and contains many methods to do various tasks such as emit an event or perform logging operations: +The JavaScript runtime is located at `window.runtime` and contains many methods to do various tasks such as emit an event or perform logging operations: ```js title="mycode.js" window.runtime.EventsEmit("my-event", 1); diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/current/introduction.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/current/introduction.mdx index 28e124ce2..1e2463045 100644 --- a/website/i18n/ru/docusaurus-plugin-content-docs/current/introduction.mdx +++ b/website/i18n/ru/docusaurus-plugin-content-docs/current/introduction.mdx @@ -13,8 +13,8 @@ Wails - это проект, позволяющий писать настоль - Нативные меню, диалоги, темы и прозрачность - Поддержка Windows, macOS и linux - Встроенные шаблоны для Svelte, React, Preact, Vue, Lit и Vanilla JS -- Легко вызывать методы Go из Javascript -- Автоматическая генерация структур Go в Typescript модели +- Easily call Go methods from JavaScript +- Automatic Go struct to TypeScript model generation - Для Windows не требуется CGO или внешние DLL - Горячая перезагрузка, используя мощь [Vite](https://vitejs.dev/) - Мощный CLI для простого создания, сборки и упаковки приложений @@ -36,7 +36,7 @@ Wails - это проект, позволяющий писать настоль ### Шаблоны для быстрого начала -Wails поставляется с рядом предварительно настроенных шаблонов, которые позволяют вам быстро создать и запустить ваше приложение. Есть шаблоны для следующих фреймворков: Svelte, React, Vue, Preact, Lit и Vanilla. Для каждого шаблона есть и Javascript и Typescript версия. +Wails поставляется с рядом предварительно настроенных шаблонов, которые позволяют вам быстро создать и запустить ваше приложение. Есть шаблоны для следующих фреймворков: Svelte, React, Vue, Preact, Lit и Vanilla. There are both JavaScript and TypeScript versions for each template. ### Системные элементы @@ -44,13 +44,13 @@ Wails использует специально созданную библио **В нем нет встроенного браузера**, таким образом, это экономично с точки зрения ресурсов. Вместо этого он использует нативный движок отрисовки для необходимой платформы. На Windows это новая библиотека Microsoft Webview2, основанная на Chromium. -### Взаимодействие Go & Javascript +### Go & JavaScript Interoperability -Wails автоматически делает ваши методы на Go доступными в Javascript, чтобы вы могли вызывать их по имени! Он также генерирует Typescript версии структур, используемых вашими методами на Go, чтобы вы могли передавать те же данные между Go и Javascript. +Wails automatically makes your Go methods available to JavaScript, so you can call them by name from your frontend! It even generates TypeScript models for the structs used by your Go methods, so you can pass the same data structures between Go and JavaScript. ### Библиотека среды выполнения -Wails предоставляет runtime библиотеку для Go и Javascript, которая справляется со многими вещами, нужными для современных приложений, например, работа с событиями, логирование, диалоги и так далее. +Wails provides a runtime library, for both Go and JavaScript, that handles a lot of the things modern applications need, like Eventing, Logging, Dialogs, etc. ### Опыт разработки в реальном времени diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/current/reference/cli.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/current/reference/cli.mdx index f9a64773f..92888242f 100644 --- a/website/i18n/ru/docusaurus-plugin-content-docs/current/reference/cli.mdx +++ b/website/i18n/ru/docusaurus-plugin-content-docs/current/reference/cli.mdx @@ -37,11 +37,11 @@ Example: `wails init -n test -t https://github.com/leaanthony/testtemplate[@v1.0 A list of community maintained templates can be found [here](../community/templates.mdx) -::warning Внимание +:::warning Attention -**Проект Wails не поддерживает и не несет ответственности за сторонние шаблоны!** +**The Wails project does not maintain, is not responsible nor liable for 3rd party templates!** -Если вы не уверены в шаблоне, проверьте `package.json` и `wails.json` на какие скрипты запускаются и какие пакеты установлены. +If you are unsure about a template, inspect `package.json` and `wails.json` for what scripts are run and what packages are installed. ::: @@ -157,7 +157,7 @@ Your system is ready for Wails development! - A webserver is started on `http://localhost:34115` which serves your application (not just frontend) over http. This allows you to use your favourite browser development extensions - All application assets are loaded from disk. If they are changed, the application will automatically reload (not rebuild). All connected browsers will also reload - A JS module is generated that provides the following: - - Javascript wrappers of your Go methods with autogenerated JSDoc, providing code hinting + - JavaScript wrappers of your Go methods with autogenerated JSDoc, providing code hinting - TypeScript versions of your Go structs, that can be constructed and passed to your go methods - A second JS module is generated that provides a wrapper + TS declaration for the runtime - On macOS, it will bundle the application into a `.app` file and run it. It will use a `build/darwin/Info.dev.plist` for development. diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/current/reference/options.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/current/reference/options.mdx index 389ed81f9..a42d44424 100644 --- a/website/i18n/ru/docusaurus-plugin-content-docs/current/reference/options.mdx +++ b/website/i18n/ru/docusaurus-plugin-content-docs/current/reference/options.mdx @@ -581,7 +581,7 @@ type TitleBar struct { Preconfigured titlebar settings are available: -| Setting | Пример | +| Setting | Example | | --------------------------- | ---------------------------------------------- | | `mac.TitleBarDefault()` | ![](/img/reference/titlebar-default.webp) | | `mac.TitleBarHidden()` | ![](/img/reference/titlebar-hidden.webp) | diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/current/reference/runtime/dialog.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/current/reference/runtime/dialog.mdx index cf7bf37b8..9b3e6cf14 100644 --- a/website/i18n/ru/docusaurus-plugin-content-docs/current/reference/runtime/dialog.mdx +++ b/website/i18n/ru/docusaurus-plugin-content-docs/current/reference/runtime/dialog.mdx @@ -6,7 +6,7 @@ sidebar_position: 5 This part of the runtime provides access to native dialogs, such as File Selectors and Message boxes. -:::info Javascript +:::info JavaScript Dialog is currently unsupported in the JS runtime. diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/current/reference/runtime/events.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/current/reference/runtime/events.mdx index 373a65d76..4b021cc05 100644 --- a/website/i18n/ru/docusaurus-plugin-content-docs/current/reference/runtime/events.mdx +++ b/website/i18n/ru/docusaurus-plugin-content-docs/current/reference/runtime/events.mdx @@ -4,7 +4,7 @@ sidebar_position: 2 # Events -The Wails runtime provides a unified events system, where events can be emitted or received by either Go or Javascript. Optionally, data may be passed with the events. Listeners will receive the data in the local data types. +The Wails runtime provides a unified events system, where events can be emitted or received by either Go or JavaScript. Optionally, data may be passed with the events. Listeners will receive the data in the local data types. ### EventsOn diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/current/reference/runtime/intro.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/current/reference/runtime/intro.mdx index 2b7c764ba..f6be0834f 100644 --- a/website/i18n/ru/docusaurus-plugin-content-docs/current/reference/runtime/intro.mdx +++ b/website/i18n/ru/docusaurus-plugin-content-docs/current/reference/runtime/intro.mdx @@ -2,9 +2,9 @@ sidebar_position: 1 --- -# Введение +# Introduction -The runtime is a library that provides utility methods for your application. There is both a Go and Javascript runtime and the aim is to try and keep them at parity where possible. +The runtime is a library that provides utility methods for your application. There is both a Go and JavaScript runtime and the aim is to try and keep them at parity where possible. It has utility methods for: @@ -23,7 +23,7 @@ Whilst the context will be provided to the [OnStartup](../options.mdx#onstartup) ::: -The Javascript library is available to the frontend via the `window.runtime` map. There is a runtime package generated when using `dev` mode that provides Typescript declarations for the runtime. This should be located in the `wailsjs` directory in your frontend directory. +The JavaScript library is available to the frontend via the `window.runtime` map. There is a runtime package generated when using `dev` mode that provides TypeScript declarations for the runtime. This should be located in the `wailsjs` directory in your frontend directory. ### Hide diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/current/reference/runtime/log.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/current/reference/runtime/log.mdx index e5e6ea7ac..06f0423b0 100644 --- a/website/i18n/ru/docusaurus-plugin-content-docs/current/reference/runtime/log.mdx +++ b/website/i18n/ru/docusaurus-plugin-content-docs/current/reference/runtime/log.mdx @@ -4,7 +4,7 @@ sidebar_position: 3 # Log -The Wails runtime provides a logging mechanism that may be called from Go or Javascript. Like most loggers, there are a number of log levels: +The Wails runtime provides a logging mechanism that may be called from Go or JavaScript. Like most loggers, there are a number of log levels: - Trace - Debug @@ -101,7 +101,7 @@ Go: `LogFatalf(ctx context.Context, format string, args ...interface{})`
### LogSetLogLevel -Sets the log level. In Javascript, the number relates to the following log levels: +Sets the log level. In JavaScript, the number relates to the following log levels: | Value | Log Level | | ----- | --------- | diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/current/reference/runtime/menu.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/current/reference/runtime/menu.mdx index fa3108179..6b6ceb77d 100644 --- a/website/i18n/ru/docusaurus-plugin-content-docs/current/reference/runtime/menu.mdx +++ b/website/i18n/ru/docusaurus-plugin-content-docs/current/reference/runtime/menu.mdx @@ -6,7 +6,7 @@ sidebar_position: 6 Эти методы относятся к меню приложения. -:::info Javascript +:::info JavaScript В настоящее время меню не поддерживается в JS. diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/current/reference/runtime/window.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/current/reference/runtime/window.mdx index 9eeee1372..f27d2fe1b 100644 --- a/website/i18n/ru/docusaurus-plugin-content-docs/current/reference/runtime/window.mdx +++ b/website/i18n/ru/docusaurus-plugin-content-docs/current/reference/runtime/window.mdx @@ -200,7 +200,7 @@ On Windows, only alpha values of 0 or 255 are supported. Any value that is not 0 Go: `WindowSetBackgroundColour(ctx context.Context, R, G, B, A uint8)`
JS: `WindowSetBackgroundColour(R, G, B, A)` -## Typescript Object Definitions +## TypeScript Object Definitions ### Position diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1.json b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1.json index e85885a4f..49cf4687e 100644 --- a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1.json +++ b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1.json @@ -4,11 +4,11 @@ "description": "The label for version v2.0.0-rc.1" }, "sidebar.docs.category.Getting Started": { - "message": "Приступая к работе", + "message": "Getting Started", "description": "The label for category Getting Started in sidebar docs" }, "sidebar.docs.category.Reference": { - "message": "Справочник", + "message": "Reference", "description": "The label for category Reference in sidebar docs" }, "sidebar.docs.category.Runtime": { @@ -16,23 +16,23 @@ "description": "The label for category Runtime in sidebar docs" }, "sidebar.docs.category.Community": { - "message": "Сообщество", + "message": "Community", "description": "The label for category Community in sidebar docs" }, "sidebar.docs.category.Showcase": { - "message": "Примеры", + "message": "Showcase", "description": "The label for category Showcase in sidebar docs" }, "sidebar.docs.category.Guides": { - "message": "Инструкции", + "message": "Guides", "description": "The label for category Guides in sidebar docs" }, "sidebar.docs.category.Tutorials": { - "message": "Учебные материалы", + "message": "Tutorials", "description": "The label for category Tutorials in sidebar docs" }, "sidebar.docs.link.Contributing": { - "message": "Помощь проекту", + "message": "Contributing", "description": "The label for link Contributing in sidebar docs, linking to /community-guide#ways-of-contributing" } } diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0.json b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0.json index 5363dcc91..421c838e6 100644 --- a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0.json +++ b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0.json @@ -4,11 +4,11 @@ "description": "The label for version v2.0.0" }, "sidebar.docs.category.Getting Started": { - "message": "Приступая к работе", + "message": "Getting Started", "description": "The label for category Getting Started in sidebar docs" }, "sidebar.docs.category.Reference": { - "message": "Справочник", + "message": "Reference", "description": "The label for category Reference in sidebar docs" }, "sidebar.docs.category.Runtime": { @@ -16,23 +16,23 @@ "description": "The label for category Runtime in sidebar docs" }, "sidebar.docs.category.Community": { - "message": "Сообщество", + "message": "Community", "description": "The label for category Community in sidebar docs" }, "sidebar.docs.category.Showcase": { - "message": "Примеры", + "message": "Showcase", "description": "The label for category Showcase in sidebar docs" }, "sidebar.docs.category.Guides": { - "message": "Инструкции", + "message": "Guides", "description": "The label for category Guides in sidebar docs" }, "sidebar.docs.category.Tutorials": { - "message": "Учебные материалы", + "message": "Tutorials", "description": "The label for category Tutorials in sidebar docs" }, "sidebar.docs.link.Contributing": { - "message": "Помощь проекту", + "message": "Contributing", "description": "The label for link Contributing in sidebar docs, linking to /community-guide#ways-of-contributing" } } diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.1.0.json b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.1.0.json index 8cbb330c8..f29e6b248 100644 --- a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.1.0.json +++ b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.1.0.json @@ -4,11 +4,11 @@ "description": "The label for version v2.1.0" }, "sidebar.docs.category.Getting Started": { - "message": "Приступая к работе", + "message": "Getting Started", "description": "The label for category Getting Started in sidebar docs" }, "sidebar.docs.category.Reference": { - "message": "Справочник", + "message": "Reference", "description": "The label for category Reference in sidebar docs" }, "sidebar.docs.category.Runtime": { @@ -16,23 +16,23 @@ "description": "The label for category Runtime in sidebar docs" }, "sidebar.docs.category.Community": { - "message": "Сообщество", + "message": "Community", "description": "The label for category Community in sidebar docs" }, "sidebar.docs.category.Showcase": { - "message": "Примеры", + "message": "Showcase", "description": "The label for category Showcase in sidebar docs" }, "sidebar.docs.category.Guides": { - "message": "Инструкции", + "message": "Guides", "description": "The label for category Guides in sidebar docs" }, "sidebar.docs.category.Tutorials": { - "message": "Учебные материалы", + "message": "Tutorials", "description": "The label for category Tutorials in sidebar docs" }, "sidebar.docs.link.Contributing": { - "message": "Помощь проекту", + "message": "Contributing", "description": "The label for link Contributing in sidebar docs, linking to /community-guide#ways-of-contributing" } } diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.2.0.json b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.2.0.json index 505f74c49..1074035c4 100644 --- a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.2.0.json +++ b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.2.0.json @@ -4,11 +4,11 @@ "description": "The label for version v2.2.0" }, "sidebar.docs.category.Getting Started": { - "message": "Приступая к работе", + "message": "Getting Started", "description": "The label for category Getting Started in sidebar docs" }, "sidebar.docs.category.Reference": { - "message": "Справочник", + "message": "Reference", "description": "The label for category Reference in sidebar docs" }, "sidebar.docs.category.Runtime": { @@ -16,23 +16,23 @@ "description": "The label for category Runtime in sidebar docs" }, "sidebar.docs.category.Community": { - "message": "Сообщество", + "message": "Community", "description": "The label for category Community in sidebar docs" }, "sidebar.docs.category.Showcase": { - "message": "Примеры", + "message": "Showcase", "description": "The label for category Showcase in sidebar docs" }, "sidebar.docs.category.Guides": { - "message": "Инструкции", + "message": "Guides", "description": "The label for category Guides in sidebar docs" }, "sidebar.docs.category.Tutorials": { - "message": "Учебные материалы", + "message": "Tutorials", "description": "The label for category Tutorials in sidebar docs" }, "sidebar.docs.link.Contributing": { - "message": "Помощь проекту", + "message": "Contributing", "description": "The label for link Contributing in sidebar docs, linking to /community-guide#ways-of-contributing" } } diff --git a/website/i18n/ru/docusaurus-plugin-content-pages/changelog.mdx b/website/i18n/ru/docusaurus-plugin-content-pages/changelog.mdx index dca54f25e..99fce57b0 100644 --- a/website/i18n/ru/docusaurus-plugin-content-pages/changelog.mdx +++ b/website/i18n/ru/docusaurus-plugin-content-pages/changelog.mdx @@ -17,10 +17,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - Added `OpenInspectorOnStartup` to debug options to allow opening the WebInspector during startup of the application in debug mode. Added by @stffabi in [PR](https://github.com/wailsapp/wails/pull/2080) - On macOS `wails doctor` now also shows the version of Xcode installed. Added by @stffabi in [PR](https://github.com/wailsapp/wails/pull/2089) - The [AssetServer](/docs/reference/options#assetserver) now supports handling range-requests if the [Assets](/docs/reference/options/#assets-1) `fs.FS` provides an `io.ReadSeeker`. Added by @stffabi in [PR](https://github.com/wailsapp/wails/pull/2091) +- Add new property for the `wails.json` config file - `bindings`. More information on the new property can be found in the updated [schema](/schemas/config.v2.json). Properties `prefix` and `suffix` allow you to control the generated TypeScript entity name in the `model.ts` file. Added by @OlegGulevskyy in [PR](https://github.com/wailsapp/wails/pull/2101) +- The `WindowSetAlwaysOnTop` method is now exposed in the JS runtime. Fixed by @gotid in [PR](https://github.com/wailsapp/wails/pull/2128) ### Fixed - The `noreload` flag in wails dev wasn't applied. Fixed by @stffabi in this [PR](https://github.com/wailsapp/wails/pull/2081) - `build/bin` folder was duplicating itself on each reload in `wails dev` mode. Fixed by @OlegGulevskyy in this [PR](https://github.com/wailsapp/wails/pull/2103) +- Prevent a thin white line at the bottom of a frameless window on Windows. Fixed by @stffabi in this [PR](https://github.com/wailsapp/wails/pull/2111) ## v2.2.0 - 2022-11-09 @@ -39,7 +42,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ### Fixed - Webview2 on Windows returns a potential whitespace when defining the style like this style="--wails-draggable: drag". Fixed by @stffabi in https://github.com/wailsapp/wails/pull/1989 -- Bound structs that had `struct{}` field types would cause the Typescript generation to fail. Thanks to @ParkourLiu for the [PR](https://github.com/wailsapp/wails/pull/1999) +- Bound structs that had `struct{}` field types would cause the TypeScript generation to fail. Thanks to @ParkourLiu for the [PR](https://github.com/wailsapp/wails/pull/1999) - When maximising a frameless window on Windows with multiple monitors, the window could sometimes become blank. Thanks to @stffabi for the [fix](https://github.com/wailsapp/wails/pull/2043) ### Changed @@ -84,7 +87,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - Remove the `.git` directory in the template - @misitebao in https://github.com/wailsapp/wails/pull/1929 - Fix wails dev - @JulioDRF in https://github.com/wailsapp/wails/pull/1931 - Fix for considering new `go` files in dev filesystem watcher - @scottopell in https://github.com/wailsapp/wails/pull/1946 -- Prevent type parsing to interfere with Typescript package name - @ValentinTrinque in https://github.com/wailsapp/wails/pull/1942 +- Prevent type parsing to interfere with TypeScript package name - @ValentinTrinque in https://github.com/wailsapp/wails/pull/1942 - [dev] Do not try to infer assetdir from fs.FS when a frontend dev server is in use - @stffabi in https://github.com/wailsapp/wails/pull/1972 - Fix init command not listed in wails help message - @lyon-lee-dev in https://github.com/wailsapp/wails/pull/1976 @@ -479,7 +482,7 @@ Experimental: &options.Experimental{ - 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) - [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) +- 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) - Added docs for [code-signing](https://wails.io/docs/guides/signing) and [NSIS installer](https://wails.io/docs/guides/windows-installer) - [@gardc](https://github.com/gardc) - Add support for `-trimpath` [build flag](https://wails.io/docs/reference/cli#build) @@ -489,7 +492,7 @@ Experimental: &options.Experimental{ - Improved mimetype detection for BOM marker and comments - [@napalu](https://github.com/napalu) - Remove duplicate mimetype entries - [@napalu](https://github.com/napalu) -- Remove duplicate Typescript imports in generated definition files - [@adalessa](https://github.com/adalessa) +- Remove duplicate TypeScript imports in generated definition files - [@adalessa](https://github.com/adalessa) - Add missing method declaration - [@adalessa](https://github.com/adalessa) - Fix Linux sigabrt on start - [@napalu](https://github.com/napalu) - Double Click event now works on elements with `data-wails-drag` attribute - [@jicg](https://github.com/jicg) diff --git a/website/i18n/ru/docusaurus-plugin-content-pages/community-guide.mdx b/website/i18n/ru/docusaurus-plugin-content-pages/community-guide.mdx index dc7753d96..14bc204e7 100644 --- a/website/i18n/ru/docusaurus-plugin-content-pages/community-guide.mdx +++ b/website/i18n/ru/docusaurus-plugin-content-pages/community-guide.mdx @@ -70,6 +70,7 @@ The process for fixing bugs are as follows: - The scope of the issue including platforms affected - 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](https://stackoverflow.com/help/minimal-reproducible-example) - The output of `wails doctor` +- A test that can reproduce the bug - 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/_` diff --git a/website/i18n/ru/docusaurus-theme-classic/footer.json b/website/i18n/ru/docusaurus-theme-classic/footer.json index 2216bec74..096ce09a5 100644 --- a/website/i18n/ru/docusaurus-theme-classic/footer.json +++ b/website/i18n/ru/docusaurus-theme-classic/footer.json @@ -4,7 +4,7 @@ "description": "The title of the footer links column with title=Docs in the footer" }, "link.title.Community": { - "message": "Сообщество", + "message": "Community", "description": "The title of the footer links column with title=Community in the footer" }, "link.title.More": { @@ -12,11 +12,11 @@ "description": "The title of the footer links column with title=More in the footer" }, "link.item.label.Introduction": { - "message": "Введение", + "message": "Introduction", "description": "The label of footer link with label=Introduction linking to /docs/introduction" }, "link.item.label.Getting Started": { - "message": "Приступая к работе", + "message": "Getting Started", "description": "The label of footer link with label=Getting Started linking to /docs/gettingstarted/installation" }, "link.item.label.Changelog": { diff --git a/website/i18n/ru/docusaurus-theme-classic/navbar.json b/website/i18n/ru/docusaurus-theme-classic/navbar.json index 91b8d205e..48a6e4b50 100644 --- a/website/i18n/ru/docusaurus-theme-classic/navbar.json +++ b/website/i18n/ru/docusaurus-theme-classic/navbar.json @@ -4,7 +4,7 @@ "description": "Navbar item with label Sponsor" }, "item.label.Docs": { - "message": "Документация", + "message": "Docs", "description": "Navbar item with label Docs" }, "item.label.Blog": { diff --git a/website/i18n/zh-Hans/code.json b/website/i18n/zh-Hans/code.json index cc56b491b..d5a13cc5d 100644 --- a/website/i18n/zh-Hans/code.json +++ b/website/i18n/zh-Hans/code.json @@ -18,7 +18,7 @@ "message": "使用Wails CLI快速生成、构建和打包项目。" }, "homepage.Tagline": { - "message": "使用 Go + HTML + CSS + JS 构建漂亮的跨平台桌面应用" + "message": "使用 Go 构建漂亮的跨平台应用程序" }, "homepage.ButtonText": { "message": "快速入门" 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 e69a6e415..5eda1c996 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 @@ -82,7 +82,7 @@ Gophers 欢呼吧! 单个二进制文件的构想依然存在!
``` -### 无需打包资源 +### 无需打包资产 v1 的一个巨大痛点是需要将整个应用程序压缩为单个 JS 和 CSS 文件。 我很高兴地宣布,对于 v2,不需要以任何形式打包资源。 想要加载本地图片? 使用带有本地`src`路径的``标签。 想使用很酷的字体吗? 复制它并在你的 CSS 中添加它的路径。 @@ -116,7 +116,7 @@ v1 的一个巨大痛点是需要将整个应用程序压缩为单个 JS 和 CSS 除此之外,网络服务器将在端口 34115 上启动。 所有连接的 Web 浏览器都会响应系统事件,例如资源更改时的热重载。 所有连接的 Web 浏览器都会响应系统事件,例如资源更改时的热重载。 -在 Go 中,我们习惯于在应用程序中处理结构。 将结构发送到我们的前端并将它们用作我们应用程序中的状态通常很有用。 在 v1 中,这是一个非常需要手动的过程,对开发人员来说有点负担。 我很高兴地宣布,在 v2 中,任何在开发模式下运行的应用程序都将自动为所有结构生成 Typescript 模型,这些结构是绑定方法的输入或输出参数。 这实现了两个世界之间数据模型的无缝交换。 +在 Go 中,我们习惯于在应用程序中处理结构。 将结构发送到我们的前端并将它们用作我们应用程序中的状态通常很有用。 在 v1 中,这是一个非常需要手动的过程,对开发人员来说有点负担。 这实现了两个世界之间数据模型的无缝交换。 这实现了两个世界之间数据模型的无缝交换。 除此之外,还会动态生成另一个 JS 模块来包装您的所有绑定方法。 这为您的方法提供了 JSDoc,在您的 IDE 中提供代码完成和提示。 当您在自动生成的包含 Go 代码的模块中点击 Tab 时自动导入数据模型,这真的很酷! @@ -137,7 +137,7 @@ v1 的一个巨大痛点是需要将整个应用程序压缩为单个 JS 和 CSS 在 v2 中,我希望通过让您能够自己创建和托管模板来增强社区的能力,而不是依赖于 Wails 项目。 所以现在您可以使用社区支持的模板创建项目! 我希望这将激励开发人员创建一个充满活力的项目模板生态系统。 我对我们的开发者社区可以创造的东西感到非常兴奋! -### 结语 +### 总结 Wails v2 代表了该项目的新起点。 此版本的目的是获得有关新方式的反馈,并在完整版本发布之前解决所有错误。 欢迎提出您的意见。 请直接反馈到 [v2 测试版](https://github.com/wailsapp/wails/discussions/828)讨论板。 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 98bcde022..12d966004 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 @@ -51,7 +51,7 @@ tags: - 我们支持应用程序的 NSAppearance 选项 - 自动创建“关于”菜单的简单配置 -### 无需打包资源 +### 无需打包资产 v1 的一个巨大痛点是需要将整个应用程序压缩为单个 JS 和 CSS 文件。 我很高兴地宣布,对于 v2,不需要以任何形式打包资源。 想要加载本地图片? 使用带有本地`src`路径的``标签。 想使用很酷的字体吗? 复制它并在你的 CSS 中添加它的路径。 @@ -74,7 +74,7 @@ v1 的一个巨大痛点是需要将整个应用程序压缩为单个 JS 和 CSS 除此之外,网络服务器将在端口 34115 上启动。 所有连接的 Web 浏览器都会响应系统事件,例如资源更改时的热重载。 所有连接的 Web 浏览器都会响应系统事件,例如资源更改时的热重载。 -在 Go 中,我们习惯于在应用程序中处理结构。 将结构发送到我们的前端并将它们用作我们应用程序中的状态通常很有用。 在 v1 中,这是一个非常需要手动的过程,对开发人员来说有点负担。 我很高兴地宣布,在 v2 中,任何在开发模式下运行的应用程序都将自动为所有结构生成 Typescript 模型,这些结构是绑定方法的输入或输出参数。 这实现了两个世界之间数据模型的无缝交换。 +在 Go 中,我们习惯于在应用程序中处理结构。 将结构发送到我们的前端并将它们用作我们应用程序中的状态通常很有用。 在 v1 中,这是一个非常需要手动的过程,对开发人员来说有点负担。 这实现了两个世界之间数据模型的无缝交换。 这实现了两个世界之间数据模型的无缝交换。 除此之外,还会动态生成另一个 JS 模块来包装您的所有绑定方法。 这为您的方法提供了 JSDoc,在您的 IDE 中提供代码完成和提示。 当您在自动生成的包含 Go 代码的模块中点击 Tab 时自动导入数据模型,这真的很酷! @@ -110,7 +110,7 @@ v1 的一个巨大痛点是需要将整个应用程序压缩为单个 JS 和 CSS
``` -您也可以指定`darwin/amd64`为目标: +您也可以指定 `darwin/amd64` 为目标: ```mdx-code-block
@@ -123,7 +123,7 @@ v1 的一个巨大痛点是需要将整个应用程序压缩为单个 JS 和 CSS
``` -哦,我差点忘了....你也可以做`darwin/universal`....😉 +哦,我差点忘了....你也可以做 `darwin/universal`....😉 ```mdx-code-block
@@ -155,7 +155,7 @@ v1 的一个巨大痛点是需要将整个应用程序压缩为单个 JS 和 CSS V1 依赖于 WebView(现已弃用)组件。 V2 使用最新的 WKWebKit 组件,所以期待 Apple 的最新和最棒的组件。 -### 结语 +### 总结 正如我在 Windows 发行说明中所说,Wails v2 代表了该项目的新起点。 此版本的目的是获得有关新方式的反馈,并在完整版本发布之前解决所有错误。 非常欢迎您的意见! 请直接反馈到 [v2 测试版](https://github.com/wailsapp/wails/discussions/828)讨论板。 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 7cd186157..a80e551c0 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 @@ -61,7 +61,7 @@ v1 的一个巨大痛点是需要将整个应用程序压缩为单个 JS 和 CSS 除此之外,网络服务器将在端口 34115 上启动。 所有连接的 Web 浏览器都会响应系统事件,例如资源更改时的热重载。 所有连接的 Web 浏览器都会响应系统事件,例如资源更改时的热重载。 -在 Go 中,我们习惯于在应用程序中处理结构。 将结构发送到我们的前端并将它们用作我们应用程序中的状态通常很有用。 在 v1 中,这是一个非常需要手动的过程,对开发人员来说有点负担。 我很高兴地宣布,在 v2 中,任何在开发模式下运行的应用程序都将自动为所有结构生成 Typescript 模型,这些结构是绑定方法的输入或输出参数。 这实现了两个世界之间数据模型的无缝交换。 +在 Go 中,我们习惯于在应用程序中处理结构。 将结构发送到我们的前端并将它们用作我们应用程序中的状态通常很有用。 在 v1 中,这是一个非常需要手动的过程,对开发人员来说有点负担。 这实现了两个世界之间数据模型的无缝交换。 这实现了两个世界之间数据模型的无缝交换。 除此之外,还会动态生成另一个 JS 模块来包装您的所有绑定方法。 这为您的方法提供了 JSDoc,在您的 IDE 中提供代码完成和提示。 当您在自动生成的包含 Go 代码的模块中点击 Tab 时自动导入数据模型,这真的很酷! diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-blog/2022-09-22-v2-release-notes.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-blog/2022-09-22-v2-release-notes.mdx index 3c0fed7d9..26db7ba44 100644 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-blog/2022-09-22-v2-release-notes.mdx +++ b/website/i18n/zh-Hans/docusaurus-plugin-content-blog/2022-09-22-v2-release-notes.mdx @@ -45,7 +45,7 @@ V2 版本是该项目的巨大飞跃,解决了 v1 的许多痛点。 如果您 - 一个为窗口操作、事件、对话框、菜单和日志记录提供实用方法的丰富的 [运行时库](/docs/reference/runtime/intro)。 - 支持使用 [garble](https://github.com/burrowers/garble) [混淆](/docs/guides/obfuscated) 您的应用程序。 - 支持使用 [UPX](https://upx.github.io/) 压缩您的应用程序。 -- 自动为 Go 结构体的生成 Typescript。 更多信息在 [这里](/docs/howdoesitwork#调用绑定的-go-方法)。 +- 自动为 Go 结构体的生成 TypeScript。 更多信息在 [这里](/docs/howdoesitwork#调用绑定的-go-方法)。 - 您的应用程序不需要附带额外的库或 DLL。 适用于任何平台。 - 无需打包前端资产。 只需像开发任何其他 Web 应用程序一样开发您的应用程序。 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 134365aaf..bc569c3fe 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 @@ -13,4 +13,4 @@ The FileHound Export Utility allows FileHound Administrators the ability to run Backend built with: Go 1.15 Wails 1.11.0 go-sqlite3 1.14.6 go-linq 3.2 -Frontend with: Vue 2.6.11 Vuex 3.4.0 Typescript Tailwind 1.9.6 +Frontend with: Vue 2.6.11 Vuex 3.4.0 TypeScript Tailwind 1.9.6 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/gettingstarted/development.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/gettingstarted/development.mdx index e681d5940..a9020bc38 100644 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/gettingstarted/development.mdx +++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/gettingstarted/development.mdx @@ -7,7 +7,7 @@ sidebar_position: 5 您可以通过从项目目录运行 `wails dev` 在开发模式下运行您的应用程序。 这将执行以下操作: - 构建您的应用程序并运行它 -- 将您的 Go 代码绑定到前端,以便可以从 Javascript 调用它 +- 将您的 Go 代码绑定到前端,以便可以从 JavaScript 调用它 - 使用 [Vite](https://vitejs.dev/) 的强大功能,将监视您的 Go 文件中的修改并在更改时重新构建/重新运行 - 启动一个 [网络服务器](http://localhost:34115) 通过浏览器为您的应用程序提供服务。 这使您可以使用自己喜欢的浏览器扩展。 你甚至可以从控制台调用你的 Go 代码。 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 e789438b0..e6fddf1c5 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 @@ -26,61 +26,61 @@ import TabItem from "@theme/TabItem"; ]} > - 使用 Javascript 生成一个 Svelte 项目:

+ 使用 JavaScript 生成一个 Svelte 项目:

wails init -n myproject -t svelte -如果您更愿意使用 Typescript:
+如果您更愿意使用 TypeScript:
wails init -n myproject -t svelte-ts
- 使用 Javascript 生成一个 React 项目:

+ 使用 JavaScript 生成一个 React 项目:

wails init -n myproject -t react -如果您更愿意使用 Typescript:
+如果您更愿意使用 TypeScript:
wails init -n myproject -t react-ts
- 使用 Javascript 生成一个 Vue 项目:

+ 使用 JavaScript 生成一个 Vue 项目:

wails init -n myproject -t vue -如果您更愿意使用 Typescript:
+如果您更愿意使用 TypeScript:
wails init -n myproject -t vue-ts
- 使用 Javascript 生成一个 Preact 项目:

+ 使用 JavaScript 生成一个 Preact 项目:

wails init -n myproject -t preact -如果您更愿意使用 Typescript:
+如果您更愿意使用 TypeScript:
wails init -n myproject -t preact-ts
- 使用 Javascript 生成一个 Lit 项目:

+ 使用 JavaScript 生成一个 Lit 项目:

wails init -n myproject -t lit -如果您更愿意使用 Typescript:
+如果您更愿意使用 TypeScript:
wails init -n myproject -t lit-ts
- 使用 Javascript 生成一个 Vanilla 项目:

+ 使用 JavaScript 生成一个 Vanilla 项目:

wails init -n myproject -t vanilla -如果您更愿意使用 Typescript:
+如果您更愿意使用 TypeScript:
wails init -n myproject -t vanilla-ts 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 5029d69cd..9699ccc63 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 @@ -120,7 +120,7 @@ func (a *App) startup(ctx context.Context) { 在 v1 中,资源通过 2 个应用程序参数选项传递: -- `JS` - 应用程序的 Javascript +- `JS` - 应用程序的 JavaScript - `CSS` - 应用程序的 CSS 这意味着生成单个 JS 和 CSS 文件的责任在于开发人员。 这本质上需要使用繁琐的打包程序,例如 webpack。 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 f0dee12e4..d7a7e7748 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 @@ -105,9 +105,9 @@ go env -w GOPROXY=https://goproxy.cn,direct 来源:https://github.com/wailsapp/wails/issues/1233 -## 没有生成正确的 Typescript 类型 +## 没有生成正确的 TypeScript 类型 -有时生成的 Typescript 没有正确的类型。 `ts_type` 为了缓解这种情况,可以使用 struct 标签指定应该生成哪些类型。 有关详细信息,请阅读 [此](https://github.com/tkrajina/typescriptify-golang-structs#custom-types) 内容。 +有时生成的 TypeScript 没有正确的类型。 `ts_type` 为了缓解这种情况,可以使用 struct 标签指定应该生成哪些类型。 有关详细信息,请阅读 [此](https://github.com/tkrajina/typescriptify-golang-structs#custom-types) 内容。 ## 当我离开 `index.html`时,我无法在前端调用方法 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 7370af8a0..54f1dc353 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 @@ -4,7 +4,7 @@ sidebar_position: 20 # 它是如何工作的? -Wails 应用程序是一个带有一个 webkit 前端的标准的 Go 应用程序。 应用程序的 Go 部分由应用程序代码和一个运行时库组成, 该库提供了许多有用的操作,例如控制应用程序窗口。 前端是一个 webkit 窗口,将显示前端资源。 前端还可以使用运行时库的 Javascript 版本。 最后,可以将 Go 方法绑定到前端,这些将显示为可以调用的 Javascript 方法,就像它们是原生 Javascript 方法一样。 +Wails 应用程序是一个带有一个 webkit 前端的标准的 Go 应用程序。 应用程序的 Go 部分由应用程序代码和一个运行时库组成, 该库提供了许多有用的操作,例如控制应用程序窗口。 前端是一个 webkit 窗口,将显示前端资源。 前端还可以使用运行时库的 JavaScript 版本。 最后,可以将 Go 方法绑定到前端,这些将显示为可以调用的 JavaScript 方法,就像它们是原生 JavaScript 方法一样。 ```mdx-code-block
@@ -103,11 +103,11 @@ var assets embed.FS #### 应用程序生命周期回调 -在即将加载前端 `index.html` 之前,会对 [应用启动回调](./reference/options#应用启动回调) 中提供的函数进行调用。 一个标准的 Go context 被传递给这个方法。 调用运行时需要此 context ,因此标准模式是在此方法中保存对它的引用。 在应用程序关闭之前,以同样的方式调用 [应用退出回调](./reference/options#应用退出回调),并再次使用上下文 当前端加载完 `index.html` 中所有资源时,还有一个 [前端 Dom 加载完成回调](./reference/options#前端-dom-加载完成回调) ,相当于 Javascript 中的 [`body onload`](https://www.w3schools.com/jsref/event_onload.asp) 事件。 还可以通过设置 [应用关闭前回调](./reference/options#应用关闭前回调) 选项来控制窗口关闭(或应用程序退出)事件。 +在即将加载前端 `index.html` 之前,会对 [应用启动回调](./reference/options#应用启动回调) 中提供的函数进行调用。 一个标准的 Go context 被传递给这个方法。 调用运行时需要此 context ,因此标准模式是在此方法中保存对它的引用。 在应用程序关闭之前,以同样的方式调用 [应用退出回调](./reference/options#应用退出回调),并再次使用上下文 在应用程序关闭之前,以同样的方式调用 [应用退出回调](./reference/options#应用退出回调),并再次使用上下文 当前端加载完 `index.html` 中所有资源时,还有一个 [前端 Dom 加载完成回调](./reference/options#前端-dom-加载完成回调) ,相当于 JavaScript 中的 [`body onload`](https://www.w3schools.com/jsref/event_onload.asp) 事件。 还可以通过设置 [应用关闭前回调](./reference/options#应用关闭前回调) 选项来控制窗口关闭(或应用程序退出)事件。 #### 方法绑定 -`Bind` 选项是 Wails 应用程序中最重要的参数选项之一。 它指定向前端暴露哪些结构体方法。 想想传统 web 应用程序中的 "Controllers" 之类的结构 。 当应用程序启动时,它会检查 `Bind` 字段中列出的结构体实例, 确定哪些方法是公开的(以大写字母开头),并生成前端可以调用的这些方法的 Javascript 版本。 +`Bind` 选项是 Wails 应用程序中最重要的参数选项之一。 它指定向前端暴露哪些结构体方法。 想想传统 web 应用程序中的 "Controllers" 之类的结构 。 当应用程序启动时,它会检查 `Bind` 字段中列出的结构体实例, 确定哪些方法是公开的(以大写字母开头),并生成前端可以调用的这些方法的 JavaScript 版本。 :::info 注意 @@ -184,9 +184,9 @@ func (a *App) Greet(name string) string { 当您运行 `wails dev`(或 `wails generate module`)时,将生成一个前端模块,其中包含以下内容: -- 所有绑定方法的 Javascript 绑定 -- 所有绑定方法的 Typescript 声明 -- 绑定方法用作输入或输出的所有 Go 结构的 Typescript 声明 +- 所有绑定方法的 JavaScript 绑定 +- 所有绑定方法的 TypeScript 声明 +- 绑定方法用作输入或输出的所有 Go 结构的 TypeScript 声明 这使得使用相同的强类型数据结构从前端调用 Go 代码变得异常简单。 @@ -201,7 +201,7 @@ func (a *App) Greet(name string) string { ### 调用绑定的 Go 方法 -当您使用 `wails dev` 运行应用程序时,它将自动在名为 `wailsjs/go` 的目录中为您的结构体生成 Javascript 绑定(您也可以通过运行 `wails generate module` 来执行此操作)。 生成的文件反映了应用程序中的包名称。 在上面的例子中,我们绑定了有公开方法 `Greet` 的 `app`。 这将导致生成以下文件: +当您使用 `wails dev` 运行应用程序时,它将自动在名为 `wailsjs/go` 的目录中为您的结构体生成 JavaScript 绑定(您也可以通过运行 `wails generate module` 来执行此操作)。 生成的文件反映了应用程序中的包名称。 在上面的例子中,我们绑定了有公开方法 `Greet` 的 `app`。 这将导致生成以下文件: ```bash wailsjs @@ -211,7 +211,7 @@ wailsjs └─App.js ``` -在这里我们可以看到有一个 `main` 包,其中包含绑定 `App` 结构体的 Javascript 绑定,以及这些方法的 Typescript 声明文件。 要从我们的前端调用 `Greet`,我们只需导入该方法并像普通的 Javascript 函数一样调用它: +在这里我们可以看到有一个 `main` 包,其中包含绑定 `App` 结构体的 JavaScript 绑定,以及这些方法的 TypeScript 声明文件。 要从我们的前端调用 `Greet`,我们只需导入该方法并像普通的 JavaScript 函数一样调用它: ```javascript // ... @@ -224,15 +224,15 @@ function doGreeting(name) { } ``` -Typescript 声明文件为您提供了绑定方法的正确类型: +TypeScript 声明文件为您提供了绑定方法的正确类型: ```ts export function Greet(arg1: string): Promise; ``` -生成的方法返回一个 Promise 成功的调用将导致 Go 调用的第一个返回值被传递给 `resolve` 处理程序。 不成功的调用是当 Go 方法的第二个返回值具有错误类型时,将错误实例传递回调用者。 这通过 `reject` 处理程序传回的。 在上面的示例中,`Greet` 只返回一个 `string`,因此 Javascript 调用永远不会 reject - 除非将无效数据传递给它。 +生成的方法返回一个 Promise 成功的调用将导致 Go 调用的第一个返回值被传递给 `resolve` 处理程序。 不成功的调用是当 Go 方法的第二个返回值具有错误类型时,将错误实例传递回调用者。 这通过 `reject` 处理程序传回的。 在上面的示例中,`Greet` 只返回一个 `string`,因此 JavaScript 调用永远不会 reject - 除非将无效数据传递给它。 -所有数据类型都在 Go 和 Javascript 之间正确转换。 包括结构体。 如果您从 Go 调用返回一个结构体,它将作为 Javascript 类返回到您的前端。 +所有数据类型都在 Go 和 JavaScript 之间正确转换。 包括结构体。 如果您从 Go 调用返回一个结构体,它将作为 JavaScript 类返回到您的前端。 :::info 注意 @@ -242,9 +242,9 @@ export function Greet(arg1: string): Promise; ::: -也可以将结构体发送回 Go。 作为期望的结构体的参数传递的任何 Javascript map/class 都将转换为该结构体类型。 为了使这个过程更容易,在 `开发` 模式下,会生成一个 TypeScript 模块,声明绑定方法中使用的所有结构体类型。 使用此模块,可以构建原生 Javascript 对象并将其发送到 Go 代码。 +也可以将结构体发送回 Go。 为了使这个过程更容易,在 `开发` 模式下,会生成一个 TypeScript 模块,声明绑定方法中使用的所有结构体类型。 为了使这个过程更容易,在 `开发` 模式下,会生成一个 TypeScript 模块,声明绑定方法中使用的所有结构体类型。 使用此模块,可以构建原生 JavaScript 对象并将其发送到 Go 代码。 -还支持在其签名中使用结构的 Go 方法。 绑定方法(作为参数或返回类型)指定的所有 Go 结构体都将作为 Go 代码包装器模块的一部分自动生成 Typescript 版本。 使用这些,可以在 Go 和 Javascript 之间共享相同的数据模型。 +还支持在其签名中使用结构的 Go 方法。 绑定方法(作为参数或返回类型)指定的所有 Go 结构体都将作为 Go 代码包装器模块的一部分自动生成 TypeScript 版本。 使用这些,可以在 Go 和 JavaScript 之间共享相同的数据模型。 示例:我们更新 `Greet` 方法以接受一个 `Person` 而不是字符串: @@ -358,7 +358,7 @@ function generate() { ### 调用运行时方法 -Javascript 运行时位于`window.runtime`并包含许多方法来执行各种任务,例如发出事件或执行日志记录操作: +JavaScript 运行时位于`window.runtime`并包含许多方法来执行各种任务,例如发出事件或执行日志记录操作: ```js title="mycode.js" window.runtime.EventsEmit("my-event", 1); 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 b4ea09b34..f54b918d2 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 @@ -13,8 +13,8 @@ Wails 是一个可让您使用 Go 和 Web 技术编写桌面应用的项目。 - 原生菜单、对话框、主题和半透明 - Windows、macOS 和 linux 支持 - 内置 Svelte、React 、Preact 、Vue、Lit 和 Vanilla JS 的模板 -- 从 Javascript 轻松调用 Go 方法 -- 自动将Go结构体转换为TypeScript模块 +- 从 JavaScript 轻松调用 Go 方法 +- 自动将 Go 结构体转换为 TypeScript 模块 - Windows 上不需要 CGO 或外部 DLL - 使用 [Vite ](https://vitejs.dev/) 的实时开发模式 - 可以轻松创建、构建和打包应用的强大命令行工具 @@ -36,7 +36,7 @@ Wails 是一个可让您使用 Go 和 Web 技术编写桌面应用的项目。 ### 快速启动模板 -Wails 带有许多预配置的模板,可让您快速启动和运行应用程序。 有以下框架的模板:Svelte、React、Vue、Preact、Lit 和 Vanilla。 每个模板都有 Javascript 和 Typescript 版本。 +Wails 带有许多预配置的模板,可让您快速启动和运行应用程序。 有以下框架的模板:Svelte、React、Vue、Preact、Lit 和 Vanilla。 每个模板都有 JavaScript 和 TypeScript 版本。 ### 原生元素 @@ -44,13 +44,13 @@ Wails 使用专门构建的库来处理窗口、菜单、对话框等原生元 **它不嵌入浏览器**,因此性能高。 相反,它使用平台的原生渲染引擎。 在 Windows 上,是基于 Chromium 构建的新 Microsoft Webview2 库。 -### Go 和 Javascript 互操作 +### Go 和 JavaScript 互操作 -Wails 自动使您的 Go 方法可用于 Javascript,因此您可以从前端按名称调用它们! 它甚至会生成 Go 方法使用的结构体的 Typescript 版本,因此您可以在 Go 和 Javascript 之间传递相同的数据结构。 +Wails 自动使您的 Go 方法可用于 JavaScript,因此您可以从前端按名称调用它们! 它甚至会生成 Go 方法使用的结构体的 TypeScript 版本,因此您可以在 Go 和 JavaScript 之间传递相同的数据结构。 ### 运行时库 -当检测到您的应用程序资源发生更改时,您正在运行的应用程序将“重新加载”,几乎立即反馈您的更改。 +Wails 为 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 b9db1b135..4c8f99e51 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 @@ -157,7 +157,7 @@ Your system is ready for Wails development! - 启动一个网络服务器 `http://localhost:34115`,通过 http 为您的应用程序(不仅仅是前端)提供服务。 这允许您使用您喜欢的浏览器开发扩展 - 所有应用程序资源都从磁盘加载。 如果它们被更改,应用程序将自动重新加载(而不是重新构建)。 所有连接的浏览器也将重新加载 - 生成的 JS 模块提供以下内容: - - 带有自动生成的 JSDoc 的 Go 方法的 Javascript 包装器,提供代码提示 + - 带有自动生成的 JSDoc 的 Go 方法的 JavaScript 包装器,提供代码提示 - 您的 Go 结构体的 TypeScript 版本,可以构造并传递给您的 Go 方法 - 生成的第二个 JS 模块,为运行时提供包装器 + TS 声明 - 在 macOS 上,它会将应用程序打包到一个 `.app` 文件并运行它。 开发模式它将使用 `build/darwin/Info.dev.plist` 。 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 11c03cdd4..97c922740 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 @@ -6,7 +6,7 @@ sidebar_position: 5 运行时的这一部分提供对原生对话框的调用,例如文件选择器和消息框。 -:::info Javascript +:::info JavaScript JS 运行时当前不支持对话框。 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/runtime/events.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/runtime/events.mdx index 748a2eaa7..29a44bdb5 100644 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/runtime/events.mdx +++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/runtime/events.mdx @@ -4,7 +4,7 @@ sidebar_position: 2 # 事件 -Wails 运行时提供了一个统一的事件系统,其中事件可以由 Go 或 Javascript 发出或接收。 可选地,数据可以与事件一起传递。 侦听器将接收本地数据类型中的数据。 +Wails 运行时提供了一个统一的事件系统,其中事件可以由 Go 或 JavaScript 发出或接收。 可选地,数据可以与事件一起传递。 侦听器将接收本地数据类型中的数据。 ### 添加事件侦听器 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 efd387cb4..199ab5356 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 @@ -4,7 +4,7 @@ sidebar_position: 1 # 简介 -运行时是一个为应用程序提供实用方法的库。 有 Go 和 Javascript 运行时,目的是在可能的情况下尝试使它们保持一致。 +运行时是一个为应用程序提供实用方法的库。 有 Go 和 JavaScript 运行时,目的是在可能的情况下尝试使它们保持一致。 它具有以下实用方法: @@ -23,7 +23,7 @@ Go 运行时可通过导入 `github.com/wailsapp/wails/v2/pkg/runtime` 获取。 ::: -Javascript 库可通过 `window.runtime` 提供给前端。 使用 `开发` 模式时会生成一个运行时包,该包为运行时提供 Typescript 声明。 这应该位于您的前端目录的`wailsjs`目录中。 +JavaScript 库可通过 `window.runtime` 提供给前端。 使用 `开发` 模式时会生成一个运行时包,该包为运行时提供 TypeScript 声明。 这应该位于您的前端目录的`wailsjs`目录中。 ### 隐藏 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/runtime/log.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/runtime/log.mdx index d88b29e5e..2d6b45c3e 100644 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/runtime/log.mdx +++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/runtime/log.mdx @@ -4,7 +4,7 @@ sidebar_position: 3 # 日志 -Wails 运行时提供了一种可以从 Go 或 Javascript 调用的日志记录机制。 像大多数记录器一样,有许多日志级别: +Wails 运行时提供了一种可以从 Go 或 JavaScript 调用的日志记录机制。 像大多数记录器一样,有许多日志级别: - Trace(追踪) - Debug(调试) @@ -101,7 +101,7 @@ Go: `LogFatalf(ctx context.Context, format string, args ...interface{})`
### 设置日志级别 -设置日志级别。 在 Javascript 中,该数字与以下日志级别有关: +设置日志级别。 在 JavaScript 中,该数字与以下日志级别有关: | 值 | 日志等级 | | - | ----------- | @@ -109,7 +109,7 @@ Go: `LogFatalf(ctx context.Context, format string, args ...interface{})`
| 2 | Debug(调试) | | 3 | Info(信息) | | 4 | Warning(警告) | -| 5 | Error(报错) | +| 5 | Error(错误) | Go: `LogSetLogLevel(ctx context.Context, level logger.LogLevel)`
JS: `LogSetLogLevel(level: number)` 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 b7decffde..7a4250550 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 @@ -6,7 +6,7 @@ sidebar_position: 6 这些方法与应用程序菜单相关。 -:::info Javascript +:::info JavaScript JS 运行时当前不支持菜单。 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/runtime/window.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/runtime/window.mdx index 7ce68957f..d6176990f 100644 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/runtime/window.mdx +++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/runtime/window.mdx @@ -200,7 +200,7 @@ R、G、B 和 A 的有效值为 0-255。 Go: `WindowSetBackgroundColour(ctx context.Context, R, G, B, A uint8)`
JS: `WindowSetBackgroundColour(R, G, B, A)` -## Typescript 对象定义 +## TypeScript 对象定义 ### Position(位置) diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-pages/changelog.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-pages/changelog.mdx index 72c7866d8..05eb2e8ef 100644 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-pages/changelog.mdx +++ b/website/i18n/zh-Hans/docusaurus-plugin-content-pages/changelog.mdx @@ -17,10 +17,13 @@ - 添加 `OpenInspectorOnStartup` 到调试选项以允许在调试模式下启动应用程序期间打开 Web 检查器。 由 @stffabi 在这个 [PR](https://github.com/wailsapp/wails/pull/2080) 中添加。 - 在 macOS 上的 `wails doctor`,现在也会显示安装的 Xcode 版本。 由 @stffabi 在这个 [PR](https://github.com/wailsapp/wails/pull/2089) 中添加。 - 如果 [Assets](/docs/reference/options/#资产-1) `fs.FS` 提供 `io.ReadSeeker`,[AssetServer](/docs/reference/options#资产服务器) 现在支持处理范围请求。 由 @stffabi 在这个 [PR](https://github.com/wailsapp/wails/pull/2091) 中添加。 +- 为 `wails.json` 配置文件添加新属性 - `bindings`。 关于新属性的更多信息可以在更新的 [schema](/schemas/config.v2.json) 中找到。 属性 `prefix` 和 `suffix` 允许您控制在 `model.ts` 文件中生成的 TypeScript 实体名称。 由 @OlegGulevskyy 在这个 [PR](https://github.com/wailsapp/wails/pull/2101) 中修复。 +- `WindowSetAlwaysOnTop` 方法现在在 JS 运行时中公开。 由 @gotid 在这个 [PR](https://github.com/wailsapp/wails/pull/2128) 中修复。 ### 修复 - wails dev 中 `noreload` 标志未被应用。 由 @stffabi 在这个 [PR](https://github.com/wailsapp/wails/pull/2081) 中修复。 - `build/bin` 文件夹在 `wails dev` 模式下每次重新加载时都会复制自身。 由 @OlegGulevskyy 在这个 [PR](https://github.com/wailsapp/wails/pull/2103) 中修复。 +- 防止 Windows 上的无边框窗口底部出现细白线。 由 @stffabi 在这个 [PR](https://github.com/wailsapp/wails/pull/2111) 中修复。 ## v2.2.0 - 2022-11-09 @@ -39,7 +42,7 @@ ### 修复 - Webview2 on Windows returns a potential whitespace when defining the style like this style="--wails-draggable: drag". Fixed by @stffabi in https://github.com/wailsapp/wails/pull/1989 -- Bound structs that had `struct{}` field types would cause the Typescript generation to fail. Thanks to @ParkourLiu for the [PR](https://github.com/wailsapp/wails/pull/1999) +- Bound structs that had `struct{}` field types would cause the TypeScript generation to fail. Thanks to @ParkourLiu for the [PR](https://github.com/wailsapp/wails/pull/1999) - When maximising a frameless window on Windows with multiple monitors, the window could sometimes become blank. Thanks to @stffabi for the [fix](https://github.com/wailsapp/wails/pull/2043) ### 变更 @@ -84,7 +87,7 @@ - Remove the `.git` directory in the template - @misitebao in https://github.com/wailsapp/wails/pull/1929 - Fix wails dev - @JulioDRF in https://github.com/wailsapp/wails/pull/1931 - Fix for considering new `go` files in dev filesystem watcher - @scottopell in https://github.com/wailsapp/wails/pull/1946 -- Prevent type parsing to interfere with Typescript package name - @ValentinTrinque in https://github.com/wailsapp/wails/pull/1942 +- Prevent type parsing to interfere with TypeScript package name - @ValentinTrinque in https://github.com/wailsapp/wails/pull/1942 - [dev] Do not try to infer assetdir from fs.FS when a frontend dev server is in use - @stffabi in https://github.com/wailsapp/wails/pull/1972 - Fix init command not listed in wails help message - @lyon-lee-dev in https://github.com/wailsapp/wails/pull/1976 @@ -479,7 +482,7 @@ Experimental: &options.Experimental{ - 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) +- 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) - Added docs for [code-signing](https://wails.io/docs/guides/signing) and [NSIS installer](https://wails.io/docs/guides/windows-installer) - [@gardc](https://github.com/gardc) - Add support for `-trimpath` [build flag](https://wails.io/docs/reference/cli#build) @@ -489,7 +492,7 @@ Experimental: &options.Experimental{ - Improved mimetype detection for BOM marker and comments - [@napalu](https://github.com/napalu) - Remove duplicate mimetype entries - [@napalu](https://github.com/napalu) -- Remove duplicate Typescript imports in generated definition files - [@adalessa](https://github.com/adalessa) +- Remove duplicate TypeScript imports in generated definition files - [@adalessa](https://github.com/adalessa) - Add missing method declaration - [@adalessa](https://github.com/adalessa) - Fix Linux sigabrt on start - [@napalu](https://github.com/napalu) - Double Click event now works on elements with `data-wails-drag` attribute - [@jicg](https://github.com/jicg) diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-pages/community-guide.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-pages/community-guide.mdx index febe1940c..83cf391d7 100644 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-pages/community-guide.mdx +++ b/website/i18n/zh-Hans/docusaurus-plugin-content-pages/community-guide.mdx @@ -68,8 +68,9 @@ Wails 是一个开放源码、社区驱动的项目。 我们欢迎任何人加 - 检查当前的 [待办事项](https://github.com/orgs/wailsapp/projects/1/views/1) 并选择要修复的错误 - 在开发之前,请检查 Issue 是否包含以下信息: - 问题的范围包括受影响的平台 -- 重现的步骤。 有时会打开不是Wails 问题的错误,报告者有责任用 [最小的可重现示例](https://stackoverflow.com/help/minimal-reproducible-example) 证明这是Wails 问题 +- 重现的步骤。 有时会打开不是Wails 问题的错误,报告者有责任用 [最小的可重现示例](https://stackoverflow.com/help/minimal-reproducible-example) 证明这是 Wails 问题 - `wails doctor` 的输出 +- 一个可以重现错误的测试 - 如果 Issue 没有包含此信息,请随时向打开 Issue 的 个人获取信息。 - 对 Issue 发表评论,说明您希望开发修复程序 - 克隆存储库并使用 `bugfix/_` 格式创建一个分支 diff --git a/website/src/pages/changelog.mdx b/website/src/pages/changelog.mdx index d3e490fb8..9dc9d0956 100644 --- a/website/src/pages/changelog.mdx +++ b/website/src/pages/changelog.mdx @@ -18,7 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Added `OpenInspectorOnStartup` to debug options to allow opening the WebInspector during startup of the application in debug mode. Added by @stffabi in [PR](https://github.com/wailsapp/wails/pull/2080) - On macOS `wails doctor` now also shows the version of Xcode installed. Added by @stffabi in [PR](https://github.com/wailsapp/wails/pull/2089) - The [AssetServer](/docs/reference/options#assetserver) now supports handling range-requests if the [Assets](/docs/reference/options/#assets-1) `fs.FS` provides an `io.ReadSeeker`. Added by @stffabi in [PR](https://github.com/wailsapp/wails/pull/2091) -- Add new property for the `wails.json` config file - `bindings`. More information on the new property can be found in the updated [schema](static/schemas/config.v2.json). Properties `prefix` and `suffix` allow you to control the generated TypeScript entity name in the `model.ts` file. Added by @OlegGulevskyy in [PR](https://github.com/wailsapp/wails/pull/2101) +- Add new property for the `wails.json` config file - `bindings`. More information on the new property can be found in the updated [schema](/schemas/config.v2.json). Properties `prefix` and `suffix` allow you to control the generated TypeScript entity name in the `model.ts` file. Added by @OlegGulevskyy in [PR](https://github.com/wailsapp/wails/pull/2101) - The `WindowSetAlwaysOnTop` method is now exposed in the JS runtime. Fixed by @gotid in [PR](https://github.com/wailsapp/wails/pull/2128) ### Fixed @@ -43,7 +43,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Webview2 on Windows returns a potential whitespace when defining the style like this style="--wails-draggable: drag". Fixed by @stffabi in https://github.com/wailsapp/wails/pull/1989 -- Bound structs that had `struct{}` field types would cause the Typescript generation to fail. Thanks to @ParkourLiu for the [PR](https://github.com/wailsapp/wails/pull/1999) +- Bound structs that had `struct{}` field types would cause the TypeScript generation to fail. Thanks to @ParkourLiu for the [PR](https://github.com/wailsapp/wails/pull/1999) - When maximising a frameless window on Windows with multiple monitors, the window could sometimes become blank. Thanks to @stffabi for the [fix](https://github.com/wailsapp/wails/pull/2043) ### Changed @@ -88,7 +88,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Remove the `.git` directory in the template - @misitebao in https://github.com/wailsapp/wails/pull/1929 - Fix wails dev - @JulioDRF in https://github.com/wailsapp/wails/pull/1931 - Fix for considering new `go` files in dev filesystem watcher - @scottopell in https://github.com/wailsapp/wails/pull/1946 -- Prevent type parsing to interfere with Typescript package name - @ValentinTrinque in https://github.com/wailsapp/wails/pull/1942 +- Prevent type parsing to interfere with TypeScript package name - @ValentinTrinque in https://github.com/wailsapp/wails/pull/1942 - [dev] Do not try to infer assetdir from fs.FS when a frontend dev server is in use - @stffabi in https://github.com/wailsapp/wails/pull/1972 - Fix init command not listed in wails help message - @lyon-lee-dev in https://github.com/wailsapp/wails/pull/1976 @@ -511,8 +511,8 @@ Experimental: &options.Experimental{ - 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) +- 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) - Added docs for [code-signing](https://wails.io/docs/guides/signing) and [NSIS installer](https://wails.io/docs/guides/windows-installer) - [@gardc](https://github.com/gardc) @@ -523,7 +523,7 @@ Experimental: &options.Experimental{ - Improved mimetype detection for BOM marker and comments - [@napalu](https://github.com/napalu) - Remove duplicate mimetype entries - [@napalu](https://github.com/napalu) -- Remove duplicate Typescript imports in generated definition files - [@adalessa](https://github.com/adalessa) +- Remove duplicate TypeScript imports in generated definition files - [@adalessa](https://github.com/adalessa) - Add missing method declaration - [@adalessa](https://github.com/adalessa) - Fix Linux sigabrt on start - [@napalu](https://github.com/napalu) - Double Click event now works on elements with `data-wails-drag` attribute - [@jicg](https://github.com/jicg)