-
-
Notifications
You must be signed in to change notification settings - Fork 149
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(i18n): add English translations
- Loading branch information
Showing
96 changed files
with
4,785 additions
and
127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Compatibility | ||
|
||
## Browser Compatibility | ||
|
||
The Artalk client production environment code is built using esbuild with a target of `es2015`. However, please note that the build process only handles syntax transpilation to comply with the `es2015` standard and does not address API compatibility (no polyfills are included). | ||
|
||
If your project needs to support older browsers and devices, consider including global polyfills in your bundled application. We recommend using the [Polyfill.io](https://polyfill.io/) service, which dynamically returns the necessary polyfills based on the user's User-Agent. Alternatively, you can manually add polyfills using [core-js](https://github.com/zloirock/core-js) or [Babel](https://babeljs.io/). | ||
|
||
Here is a list of modern features used by Artalk: | ||
|
||
- [All ECMAScript 2015 (ES6) features](https://compat-table.github.io/compat-table/es6/) | ||
- [Fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) | ||
- [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController) | ||
- [Intersection Observer](https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API) | ||
|
||
## Server Compatibility | ||
|
||
The Artalk server program is developed in Golang and supports operating systems such as Linux, Windows, and macOS. The current Golang version for Artalk can be found in the [go.mod](https://github.com/ArtalkJS/Artalk/blob/master/go.mod#L3). For the minimum operating system requirements for Golang, refer to the [Go Wiki](https://go.dev/wiki/MinimumRequirements). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<script setup lang="ts"> | ||
if (!import.meta.env.SSR) window.location = 'https://github.com/ArtalkJS/Artalk/blob/master/CONTRIBUTING.md'; | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# Frontend Event | ||
|
||
## Basic Events | ||
|
||
| Event Name | Description | | ||
| ------------------- | ------------------------------- | | ||
| `created` | After initialization | | ||
| `mounted` | After data loading | | ||
| `updated` | After data update | | ||
| `unmounted` | After destruction | | ||
| `list-fetch` | During comment list request | | ||
| `list-fetched` | After comment list request | | ||
| `list-load` | Before comment loading | | ||
| `list-loaded` | After comment loading | | ||
| `list-failed` | When comment loading fails | | ||
| `list-goto-first` | When comment list resets | | ||
| `list-reach-bottom` | When comment list reaches bottom| | ||
| `comment-inserted` | After comment insertion | | ||
| `comment-updated` | After comment update | | ||
| `comment-deleted` | After comment deletion | | ||
| `comment-rendered` | After comment node rendering | | ||
| `notifies-updated` | When unread messages change | | ||
| `list-goto` | During comment jump | | ||
| `page-loaded` | After page data update | | ||
| `editor-submit` | When editor submits | | ||
| `editor-submitted` | After editor submission | | ||
| `user-changed` | When local user data changes | | ||
| `sidebar-show` | When sidebar is shown | | ||
| `sidebar-hide` | When sidebar is hidden | | ||
|
||
Event declaration code: [@ArtalkJS/Artalk - src/types/event.ts](https://github.com/ArtalkJS/Artalk/blob/master/ui/artalk/src/types/event.ts) | ||
|
||
## Adding Event Listeners | ||
|
||
```js | ||
artalk.on('list-loaded', () => { | ||
alert('Comments have been loaded') | ||
}) | ||
``` | ||
|
||
## Removing Event Listeners | ||
|
||
```js | ||
let foo = function () { | ||
/* do something */ | ||
} | ||
|
||
artalk.on('list-loaded', foo) | ||
artalk.off('list-loaded', foo) | ||
``` |
Oops, something went wrong.