Closed CDN18 closed 3 weeks ago
Below is the preview of the zh version of the gts document on Read the Docs. Temperately available until the pr is closed: https://gts-doc-test.readthedocs.io
god damn, this is brilliant work!
This is amazing, thank you!!! Will have a look through properly tomorrow, but the new structure and suggestions seem very sensible :)
I've squash merged it! Thank you very very much for this brilliant work!
Hooray! I'll do my best to keep up with maintaining this translation and get started on the TODO items!
Description
This PR adds a currently-up-to-date Simplified Chinese support to the GotSocial documentation. The Chinese documentation will be available at
https://docs.gotosocial.org/zh-cn/
.Key Changes
locales
directory has been created within thedocs
folder to store document translations, with Chinese documents located indocs/locales/zh
. Repo docs (README, ROADMAP, etc.) are also translated, placed underdocs/locales/zh/repo
.overrides
directory. To avoid conflicts with the material for mkdocs theme’s overrides directory, it has been renamed topublic
. That is to say, thedocs/assets
directory is now moved todocs/override/public
, and both the original (English) and Chinese documentation references have been updated accordingly. The shared resource directory is set throughtheme.custom_dir
.docs/locales
directory and its subdirectories to avoid redundant builds and warnings.Note
gotosocial-zh
readthedocs project is needed. Under Settings, change thePath for .readthedocs.yaml
todocs/locales/zh/.readthedocs.yaml
, then save the settings to re-trigger a build.Versions
menu at the bottom right of the readthedocs page includesstable
. This might be because readthedocs has automatically enabled astable
version build for thegotosocial-zh
project. As we don’t currently have this version of the documentation, this branch should be temporarily disabled.The Translation Workflow
To add a new document translation, fork the repo and create a
docs/locales/<language_code>
directory in the repository and add the translated documents in the same structure. Refer todocs/locales/zh
to establish the corresponding readthedocs and mkdocs configurations. (The main documentation has a language switch feature, so you also need to update the corresponding language item in the main documentation configuration.) Then request the maintainers to create and configure agotosocial-<language_code>
project in Read the Docs to enable the language variant.To update translations, simply make changes and raise a PR as you would with the original documentation. To avoid too many "Translation Update" PRs clogging the merging queue, consider suggesting a maximum update frequency, like every two weeks or once a month.
TODO
0.x
version updates. Will make a seperate PR if this is acceptable,summary
and puts detailed descriptions in thedescription
section. For example, in the/.well-known/host-meta
endpoint, the original title is "Returns a compliant hostmeta response to web host metadata queries," while in the Chinese version (translated back into English here), the title is "Get host-meta response," with the original title moved to the beginning of thedescription
. This change was made for personal reasons, but given the large size of the Swagger file (over 10,000 lines), it’s challenging to revert this change. Since the meaning remains the same and no information is lost, I believe this does not impact comprehension.Checklist
Please put an x inside each checkbox to indicate that you've read and followed it:
[ ]
->[x]
If this is a documentation change, only the first checkbox must be filled (you can delete the others if you want).
go fmt ./...
andgolangci-lint run
.