Announcement
Hello, Lemmy Community,
I am the author of the @localizethedocs organization. And I’m glad to announce that the 🎉 lemmy-docs-l10n 🎉 project is published now:
The goal of this project is to translate The Lemmy Documentation into multiple languages. Translations are contributed via the Crowdin platform, automatically synchronized with the GitHub repository, and can be previewed on GitHub Pages.
How to Contribute Translations?
To contribute the translations, just follow the following steps:
- Create an account on Crowdin Enterprise if you don't have one.
- Log in and go the lemmy-docs-l10n project.
- Choose the language you would like to contribute.
If translators want to translate a language that is not yet supported, they just need to open a new issue to request the new language. Once the requested language is added, they can begin translating.
How to Reuse Translations?
If the upstream project or anyone wants to reuse the translated .po files prepared by the lemmy-docs-l10n project, they can clone the .po files from the po/${VERSION} branch by using the following command:
git clone --depth=1 --branch=po/${VERSION} https://github.com/localizethedocs/lemmy-docs-l10n.git locale
Those po/${VERSION} branches are created to facilitate reusage by the upstream project. For instance, the zh_TW documentation for the main version can be generated using the commands below:
BRANCH=main
VERSION=main
LANGUAGE=zh_TW
RENDERER=html
# Prepare the repository and environment
git clone --branch=${BRANCH} --depth=1 --recurse-submodules --shallow-submodules https://github.com/LemmyNet/lemmy-docs.git lemmy-docs
cd lemmy-docs
conda create --prefix ./.conda --yes
conda activate ./.conda
conda install rust=1 dasel=2 jq -c conda-forge -c nodefaults --yes
export CARGO_INSTALL_ROOT=$(pwd)/.conda
cargo install mdbook@^0.4 mdbook-i18n-helpers@^0.3
# Clone the .po files to the 'locale' directory
git clone --branch=po/${VERSION} --depth=1 https://github.com/localizethedocs/lemmy-docs-l10n.git locale
# Build and Preview the documentation
export MDBOOK_BOOK__LANGUAGE=${LANGUAGE}
export MDBOOK_OUTPUT="{\"$RENDERER\":$(dasel -f book.toml "output.$RENDERER" -w json)}"
export MDBOOK_PREPROCESSOR__GETTEXT=$(jq -n -c '{"after":["links"],"po-dir":"locale"}')
mdbook build . --dest-dir $(pwd)/output/${LANGUAGE}
firefox $(pwd)/output/${LANGUAGE}/index.html
Related Dicussions
There is an issue discussing about translating the Lemmy documentation:
And I believe the lemmy-docs-l10n project should be able to surve this purpose.
Announcement
Hello, Lemmy Community,
I am the author of the @localizethedocs organization. And I’m glad to announce that the 🎉 lemmy-docs-l10n 🎉 project is published now:
The goal of this project is to translate The Lemmy Documentation into multiple languages. Translations are contributed via the Crowdin platform, automatically synchronized with the GitHub repository, and can be previewed on GitHub Pages.
How to Contribute Translations?
To contribute the translations, just follow the following steps:
If translators want to translate a language that is not yet supported, they just need to open a new issue to request the new language. Once the requested language is added, they can begin translating.
How to Reuse Translations?
If the upstream project or anyone wants to reuse the translated
.pofiles prepared by thelemmy-docs-l10nproject, they can clone the.pofiles from thepo/${VERSION}branch by using the following command:git clone --depth=1 --branch=po/${VERSION} https://github.com/localizethedocs/lemmy-docs-l10n.git localeThose
po/${VERSION}branches are created to facilitate reusage by the upstream project. For instance, thezh_TWdocumentation for themainversion can be generated using the commands below:Related Dicussions
There is an issue discussing about translating the Lemmy documentation:
And I believe the
lemmy-docs-l10nproject should be able to surve this purpose.