Skip to content

Commit

Permalink
[docs] add zh docs (#3507)
Browse files Browse the repository at this point in the history
* [docs] add zh docs

* [docs] add lang dropdown

* [docs] update mkdocs zh config

* [docs] migrate assets

* [docs] update overrides dir in mkdocs zh config

* [docs] exclude locales director in main mkdocs config

* [docs] rename assets to public to avoid conflicting with template

* [docs] extra_css change followup

* [docs] add theme.palette.toggle.icon back into mkdocs zh config

* [docs] fix zh readme reference + migrate language-specific repo markdown to docs

* [docs] translate remaining repo docs + update reference

* [docs] update zh index.md reference

* [docs/zh] wording alignment
  • Loading branch information
CDN authored Nov 5, 2024
1 parent e953d80 commit 38a08cd
Show file tree
Hide file tree
Showing 139 changed files with 20,407 additions and 24 deletions.
2 changes: 1 addition & 1 deletion docs/admin/federation_modes.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ When your instance encounters a mention or an announce of a status or account it

It is possible to both block and allow the same domain, and the effect of combining these two things depends on which federation mode your instance is currently using.

![A flow chart diagram showing how the two different federation modes treat incoming requests.](../assets/diagrams/federation_modes.png)
![A flow chart diagram showing how the two different federation modes treat incoming requests.](../public/diagrams/federation_modes.png)

### In blocklist mode

Expand Down
14 changes: 7 additions & 7 deletions docs/admin/settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ Instance moderation settings.

### Reports

![List of reports for testing, showing one open report.](../assets/admin-settings-reports.png)
![List of reports for testing, showing one open report.](../public/admin-settings-reports.png)

The reports section shows a list of reports, originating from your local users, or remote instances (shown anonymously as just the name of the instance, without specific username).

Clicking a report shows if it was resolved (with the reasoning if available), more information, and a list of reported toots if selected by the reporting user. You can also use this view to mark a report as resolved, and fill in a comment. Whatever comment you enter here will be visible to the user that created the report, if that user is from your instance.

![The detailed view of an open report, showing the reported status and the reason for the report.](../assets/admin-settings-report-detail.png)
![The detailed view of an open report, showing the reported status and the reason for the report.](../public/admin-settings-report-detail.png)

Clicking on the username of the reported account opens that account in the 'Accounts' view, allowing you to perform moderation actions on it.

Expand All @@ -36,7 +36,7 @@ You can use this section to search for an account and perform moderation actions

### Federation

![List of suspended instances, with a field to filter/add new blocks. Below is a link to the bulk import/export interface](../assets/admin-settings-federation.png)
![List of suspended instances, with a field to filter/add new blocks. Below is a link to the bulk import/export interface](../public/admin-settings-federation.png)

In the federation section you can create, delete, and review explicit domain blocks and domain allows.

Expand All @@ -56,7 +56,7 @@ The domain allows section works much like the domain blocks section, described a

Through the link at the bottom of the Federation section (or going to `/settings/admin/federation/import-export`) you can do bulk import/export of blocklists and allowlists.

![List of domains included in an import, providing ways to select some or all of them, change their domains, and update the use of subdomains.](../assets/admin-settings-federation-import-export.png)
![List of domains included in an import, providing ways to select some or all of them, change their domains, and update the use of subdomains.](../public/admin-settings-federation-import-export.png)

Upon importing a list, either through the input field or from a file, you can review the entries in the list before importing a subset. You'll also be warned for entries that use subdomains, providing an easy way to change them to the main domain.

Expand Down Expand Up @@ -86,23 +86,23 @@ Custom Emoji will be automatically fetched when included in remote toots, but to

#### Local

![Local custom emoji section, showing an overview of custom emoji sorted by category. There are a lot of garfields.](../assets/admin-settings-emoji-local.png)
![Local custom emoji section, showing an overview of custom emoji sorted by category. There are a lot of garfields.](../public/admin-settings-emoji-local.png)

This section shows an overview of all the custom emoji enabled on your instance, sorted by their category. Clicking an emoji shows it's details, and provides options to change the category or image, or delete it completely. The shortcode cannot be updated here, you would have to upload it with the new shortcode yourself (and optionally delete the old one).

Below the overview you can upload your own custom emoji, after previewing how they look in a toot. PNG and (animated) GIF's are supported.

#### Remote

![Remote custom emoji section, showing a list of 3 emoji parsed from the entered toot, garfield, blobfoxbox and blobhajmlem. They can be selected, their shortcode can be tweaked, and they can be assigned to a category, before submitting as a copy or delete operation](../assets/admin-settings-emoji-remote.png)
![Remote custom emoji section, showing a list of 3 emoji parsed from the entered toot, garfield, blobfoxbox and blobhajmlem. They can be selected, their shortcode can be tweaked, and they can be assigned to a category, before submitting as a copy or delete operation](../public/admin-settings-emoji-remote.png)

Through the 'remote' section, you can look up a link to any remote toots (provided the instance isn't suspended). If they use any custom emoji they will be listed, providing an easy way to copy them to the local emoji (for use in your own toots), or disable them ( hiding them from toots).

**Note:** as the testrig server does not federate, this feature can't be used in development (500: Internal Server Error).

### Instance Settings

![Screenshot of the GoToSocial admin panel, showing the fields to change an instance's settings](../assets/admin-settings-instance.png)
![Screenshot of the GoToSocial admin panel, showing the fields to change an instance's settings](../public/admin-settings-instance.png)

Here you can set various metadata for your instance, like the displayed name/title, thumbnail image, (short) description, and contact info.

Expand Down
6 changes: 3 additions & 3 deletions docs/admin/signups.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ You can open new account sign-ups for your instance by changing the variable `ac

A sign-up form for your instance will be available at the `/signup` endpoint. For example, `https://your-instance.example.org/signup`.

![Sign-up form, showing email, password, username, and reason fields.](../assets/signup-form.png)
![Sign-up form, showing email, password, username, and reason fields.](../public/signup-form.png)

Also, your instance homepage and "about" pages will be updated to reflect that registrations are open.

Expand All @@ -29,11 +29,11 @@ In the meantime, admins and moderators on your instance will receive an email an

Instance admins and moderators can handle a new sign-up by either approving or rejecting it via the "accounts" -> "pending" section in the admin panel.

![Admin settings panel open to "accounts" -> "pending", showing one account in a list.](../assets/signup-pending.png)
![Admin settings panel open to "accounts" -> "pending", showing one account in a list.](../public/signup-pending.png)

If you have no sign-ups, the list pictured above will be empty. If you have a pending account sign-up, however, you can click on it to open that account in the account details screen:

![Details of a new pending account, giving options to approve or reject the sign-up.](../assets/signup-account.png)
![Details of a new pending account, giving options to approve or reject the sign-up.](../public/signup-account.png)

At the bottom, you will find actions that let you approve or reject the sign-up.

Expand Down
2 changes: 1 addition & 1 deletion docs/advanced/tracing.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ If you wanted to see all GoToSocial traces, you could instead run:
Once you select a trace, a second panel will open up visualising the span. You can drill down from there, by clicking into every sub-span to see what it was doing.
![Grafana showing a trace for the /api/v1/instance endpoint](../assets/tracing.png)
![Grafana showing a trace for the /api/v1/instance endpoint](../public/tracing.png)
[traceql]: https://grafana.com/docs/tempo/latest/traceql/
2 changes: 1 addition & 1 deletion docs/federation/posts.md
Original file line number Diff line number Diff line change
Expand Up @@ -914,7 +914,7 @@ Now, `remote_1` boosts/reblogs a post from a third account, `remote_2`, residing

`local_account` does not follow `remote_2`, and neither does anybody else on `our.server`, which means that `our.server` has not seen this post by `remote_2` before.

![A diagram of the conversation thread, showing the post from remote_2, and possible ancestor and descendant posts](../assets/diagrams/conversation_thread.png)
![A diagram of the conversation thread, showing the post from remote_2, and possible ancestor and descendant posts](../public/diagrams/conversation_thread.png)

What GoToSocial will do now, is 'dereference' the post by `remote_2` to check if it is part of a thread and, if so, whether any other parts of the thread can be obtained.

Expand Down
2 changes: 1 addition & 1 deletion docs/getting_started/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ You can find more detail on system requirements below, but in short you should a

For a small instance (1-20 active users), GoToSocial will likely hover consistently between 250MB and 350MB of RAM usage once the internal caches are hydrated:

![Grafana graph showing GoToSocial heap in use hovering around 250MB and spiking occasionally to 400MB-500MB.](../assets/getting-started-memory-graph.png)
![Grafana graph showing GoToSocial heap in use hovering around 250MB and spiking occasionally to 400MB-500MB.](../public/getting-started-memory-graph.png)

In the graph above you can see that RAM usage spikes during periods of load. This happens, for example, when when a status gets boosted by someone with many followers, or when the embedded `ffmpeg` binary is decoding or reencoding media files into thumbnails (especially larger video files).

Expand Down
17 changes: 17 additions & 0 deletions docs/locales/zh/.readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

build:
os: ubuntu-22.04
tools:
python: "mambaforge-22.9" # https://docs.readthedocs.io/en/stable/guides/conda.html#making-builds-faster-with-mamba

mkdocs:
configuration: "docs/locales/zh/mkdocs.yml"

conda:
environment: "docs/environment.yml"
Loading

0 comments on commit 38a08cd

Please sign in to comment.