mirror of
https://github.com/wavetermdev/wails.git
synced 2026-08-05 13:53:43 -07:00
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
This commit is contained in:
@@ -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.
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
|
||||
@@ -20,5 +20,5 @@ go-linq 3.2
|
||||
Frontend with:
|
||||
Vue 2.6.11
|
||||
Vuex 3.4.0
|
||||
Typescript
|
||||
TypeScript
|
||||
Tailwind 1.9.6
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -26,61 +26,61 @@ import TabItem from "@theme/TabItem";
|
||||
]}
|
||||
>
|
||||
<TabItem value="Svelte">
|
||||
Generate a <a href={"https://svelte.dev/"}>Svelte</a> project using Javascript with:<br/><br/>
|
||||
Generate a <a href={"https://svelte.dev/"}>Svelte</a> project using JavaScript with:<br/><br/>
|
||||
|
||||
wails init -n myproject -t svelte
|
||||
|
||||
If you would rather use Typescript:<br/>
|
||||
If you would rather use TypeScript:<br/>
|
||||
|
||||
wails init -n myproject -t svelte-ts
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="React">
|
||||
Generate a <a href={"https://reactjs.org/"}>React</a> project using Javascript with:<br/><br/>
|
||||
Generate a <a href={"https://reactjs.org/"}>React</a> project using JavaScript with:<br/><br/>
|
||||
|
||||
wails init -n myproject -t react
|
||||
|
||||
If you would rather use Typescript:<br/>
|
||||
If you would rather use TypeScript:<br/>
|
||||
|
||||
wails init -n myproject -t react-ts
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="Vue">
|
||||
Generate a <a href={"https://vuejs.org/"}>Vue</a> project using Javascript with:<br/><br/>
|
||||
Generate a <a href={"https://vuejs.org/"}>Vue</a> project using JavaScript with:<br/><br/>
|
||||
|
||||
wails init -n myproject -t vue
|
||||
|
||||
If you would rather use Typescript:<br/>
|
||||
If you would rather use TypeScript:<br/>
|
||||
|
||||
wails init -n myproject -t vue-ts
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="Preact">
|
||||
Generate a <a href={"https://preactjs.com/"}>Preact</a> project using Javascript with:<br/><br/>
|
||||
Generate a <a href={"https://preactjs.com/"}>Preact</a> project using JavaScript with:<br/><br/>
|
||||
|
||||
wails init -n myproject -t preact
|
||||
|
||||
If you would rather use Typescript:<br/>
|
||||
If you would rather use TypeScript:<br/>
|
||||
|
||||
wails init -n myproject -t preact-ts
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="Lit">
|
||||
Generate a <a href={"https://lit.dev/"}>Lit</a> project using Javascript with:<br/><br/>
|
||||
Generate a <a href={"https://lit.dev/"}>Lit</a> project using JavaScript with:<br/><br/>
|
||||
|
||||
wails init -n myproject -t lit
|
||||
|
||||
If you would rather use Typescript:<br/>
|
||||
If you would rather use TypeScript:<br/>
|
||||
|
||||
wails init -n myproject -t lit-ts
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="Vanilla">
|
||||
Generate a Vanilla project using Javascript with:<br/><br/>
|
||||
Generate a Vanilla project using JavaScript with:<br/><br/>
|
||||
|
||||
wails init -n myproject -t vanilla
|
||||
|
||||
If you would rather use Typescript:<br/>
|
||||
If you would rather use TypeScript:<br/>
|
||||
|
||||
wails init -n myproject -t vanilla-ts
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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).
|
||||
|
||||
|
||||
@@ -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
|
||||
<div className="text--center">
|
||||
@@ -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<string>;
|
||||
@@ -268,29 +268,29 @@ export function Greet(arg1: string): Promise<string>;
|
||||
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"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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{})`<br/>
|
||||
|
||||
### 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 |
|
||||
| ----- | --------- |
|
||||
|
||||
@@ -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.
|
||||
|
||||
|
||||
@@ -233,7 +233,7 @@ Any value that is not 0 will be considered 255.
|
||||
Go: `WindowSetBackgroundColour(ctx context.Context, R, G, B, A uint8)`<br/>
|
||||
JS: `WindowSetBackgroundColour(R, G, B, A)`
|
||||
|
||||
## Typescript Object Definitions
|
||||
## TypeScript Object Definitions
|
||||
|
||||
### Position
|
||||
|
||||
|
||||
+34
-34
@@ -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": {
|
||||
|
||||
+22
-22
@@ -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
|
||||
<div class="text--center">
|
||||
@@ -44,15 +44,15 @@ No, I'm not joking: _No_ _CGO_ _dependency_ 🤯! The thing about Windows is tha
|
||||
<br />
|
||||
```
|
||||
|
||||
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
|
||||
<div class="text--center">
|
||||
@@ -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
|
||||
<div class="text--center">
|
||||
@@ -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 !
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user