Initial work on translations / localization

Related to https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/3841

Most of the preparation for this was done by Suguru Hirahara (https://github.com/luixxiul).
I've merely reorganized/polished the scripts and instructions in the `i18n/` directory.

While translations can happen even now, more work is necessary to

- make the translation flow better (integrating Weblate), etc.

- restore the Github Actions workflows that Suguru Hirahara had already developed to
  adapt them to our new workflow
This commit is contained in:
Slavi Pantaleev
2024-12-20 09:37:38 +02:00
parent 33b493737d
commit d4f8d0918a
413 changed files with 119935 additions and 2 deletions

View File

@ -0,0 +1,446 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2018-2024, Slavi Pantaleev, Aine Etke, MDAD community
# members
# This file is distributed under the same license as the
# matrix-docker-ansible-deploy package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2024.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: matrix-docker-ansible-deploy \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-12-20 09:29+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language: jp\n"
"Language-Team: jp <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.16.0\n"
#: ../../README.md:1
msgid "Internationalization"
msgstr ""
#: ../../README.md:3
msgid ""
"Translated documentation files are published and maintained in "
"[`translated/`](translated/) directory."
msgstr ""
#: ../../README.md:5
msgid "Currently, we support translation of:"
msgstr ""
#: ../../README.md:7
msgid "Markdown files found at the top level project directory"
msgstr ""
#: ../../README.md:8
msgid ""
"Markdown files found in the [`docs`](../docs/) directory (this is where "
"the bulk of the documentation is)"
msgstr ""
#: ../../README.md:9
msgid "this current document in the `i18n` directory"
msgstr ""
#: ../../README.md:11
msgid ""
"💡 For readers' sake, we only [publish translations in a new language"
"](#publish-translations-in-a-new-language) when the translation "
"progresses beyond a certain threshold (requiring that at least the "
"project README and core installation guides are translated)."
msgstr ""
#: ../../README.md:13
msgid "Organization of this `i18n` directory is as follows:"
msgstr ""
#: ../../README.md:15
msgid ""
"[PUBLISHED_LANGUAGES](PUBLISHED_LANGUAGES): a list of languages that we "
"publish translations for (in the [translated/](translated/) directory)"
msgstr ""
#: ../../README.md:16
msgid ""
"[.gitignore](.gitignore): a list of files and directories to ignore in "
"the `i18n` directory. We intentionaly ignore translated results "
"(`translated/<language>` directories) for languages taht are still in "
"progress. We only [publish translations in a new language](#publish-"
"translations-in-a-new-language) when the translation progresses beyond a "
"certain threshold."
msgstr ""
#: ../../README.md:17
msgid ""
"[justfile](justfile): a list of recipes for "
"[just](https://github.com/casey/just) command runner"
msgstr ""
#: ../../README.md:18
msgid ""
"[requirements.txt](requirements.txt): a list of Python packages required "
"to work with translations"
msgstr ""
#: ../../README.md:19
msgid ""
"[translation-templates/](translation-templates/): a list of English "
"translation templates - strings extracted from Markdown files"
msgstr ""
#: ../../README.md:20
msgid "[locales/](locales/): localization files for languages"
msgstr ""
#: ../../README.md:21
msgid ""
"[translated/](translated/): translated documents for published languages "
"(see [PUBLISHED_LANGUAGES](PUBLISHED_LANGUAGES) and [publish translations"
" in a new language](#publish-translations-in-a-new-language))"
msgstr ""
#: ../../README.md:23
msgid "Guide for translators"
msgstr ""
#: ../../README.md:25
msgid ""
"This project uses [Sphinx](https://www.sphinx-doc.org/) to generate "
"translated documents."
msgstr ""
#: ../../README.md:27
msgid ""
"For details about using Sphinx for translation, refer [this official "
"document](https://www.sphinx-doc.org/en/master/usage/advanced/intl.html) "
"as well."
msgstr ""
#: ../../README.md:29
msgid ""
"For now, translations are handled manually by editing `.po` files in the "
"`locales/<language>` directory. In the future, we plan on integrating "
"with [Weblate](https://weblate.org/) to allow for translating from a web "
"interface."
msgstr ""
#: ../../README.md:31
msgid "(Recommended) Using the uv package manager and just command runner"
msgstr ""
#: ../../README.md:33
msgid ""
"If you have the [uv](https://docs.astral.sh/uv/) package manager and "
"[just](https://github.com/casey/just) command runner installed, you can "
"use our [justfile](justfile) recipes to easily manage translation files "
"and build translated documents."
msgstr ""
#: ../../README.md:35
msgid ""
"The recipes will use [uv](https://github.com/astral-sh/uv) to auto-create"
" [a Python virtual "
"environment](https://docs.astral.sh/uv/pip/environments/) in the `.venv` "
"directory and install the required Python packages (as per "
"[requirements.txt](requirements.txt)) to it."
msgstr ""
#: ../../README.md:37 ../../README.md:64
msgid "Preparation"
msgstr ""
#: ../../README.md:39
msgid ""
"Make sure you have the [uv](https://docs.astral.sh/uv/) package manager "
"and [just](https://github.com/casey/just) command runner installed."
msgstr ""
#: ../../README.md:41 ../../README.md:72
msgid "Translation"
msgstr ""
#: ../../README.md:43 ../../README.md:74
msgid ""
"Recommended flow when working on a new language (replace `<language>` "
"with the language code, e.g. `bg`):"
msgstr ""
#: ../../README.md:45
msgid ""
"Update the locale files for your language: `just sync-for-language "
"<language>` (internally, this automatically runs `just extract-"
"translation-templates` to make sure the translation templates are up-to-"
"date)"
msgstr ""
#: ../../README.md:47 ../../README.md:80
msgid "Use an editor to translate the files in the `locales/<language>` directory"
msgstr ""
#: ../../README.md:49
msgid "Build translated documents: `just build-for-language <language>`"
msgstr ""
#: ../../README.md:51 ../../README.md:84
msgid "Preview the result in the `translated/<language>` directory"
msgstr ""
#: ../../README.md:53 ../../README.md:86
msgid "Commit your changes done to the `locales/<language>` directory"
msgstr ""
#: ../../README.md:55 ../../README.md:88
msgid ""
"If you have progressed with the translation beyond a certain threshold, "
"consider [Publishing translations in a new language](#publish-"
"translations-in-a-new-language)"
msgstr ""
#: ../../README.md:57
msgid "Using any other package manager and manual scripts"
msgstr ""
#: ../../README.md:59
msgid ""
"If you cannot use [uv](https://docs.astral.sh/uv/) and/or "
"[just](https://github.com/casey/just), you can:"
msgstr ""
#: ../../README.md:61
msgid ""
"manage Python packages in another way "
"([pip](https://pip.pypa.io/en/stable/), [Poetry](https://python-"
"poetry.org/), etc.)"
msgstr ""
#: ../../README.md:62
msgid ""
"manage translation strings and build translated documents manually by "
"invoking scripts from the [bin](bin/) directory"
msgstr ""
#: ../../README.md:66
msgid "virtualenv and pip"
msgstr ""
#: ../../README.md:68
msgid ""
"Create a Python virtual environment in the `.venv` directory: `virtualenv"
" .venv`"
msgstr ""
#: ../../README.md:69
msgid "Activate the virtual environment: `source .venv/bin/activate`"
msgstr ""
#: ../../README.md:70
msgid ""
"Install the required Python packages using "
"[pip](https://pip.pypa.io/en/stable/): `pip install -r requirements.txt`"
msgstr ""
#: ../../README.md:76
msgid ""
"Ensure the English translation templates ([translation-templates"
"/](translation-templates/)) are extracted: `./bin/extract-translation-"
"templates.sh`"
msgstr ""
#: ../../README.md:78
msgid ""
"Update the locale files for your language: `./bin/sync-translation-"
"templates-to-locales.sh <language>`"
msgstr ""
#: ../../README.md:82
msgid "Build translated documents: `./bin/build-translated-result.sh <language>`"
msgstr ""
#: ../../README.md:90
msgid "Publish translations in a new language"
msgstr ""
#: ../../README.md:92
msgid ""
"To publish prebuilt documents translated in a new language to the "
"`translated/<language>` directory:"
msgstr ""
#: ../../README.md:94
msgid ""
"add its language code to the [PUBLISHED_LANGUAGES](PUBLISHED_LANGUAGES) "
"file"
msgstr ""
#: ../../README.md:95
msgid ""
"whitelist its `translated/<language>` directory by adding a "
"`!translated/<language>` rule to the [.gitignore](.gitignore) file"
msgstr ""
#: ../../README.md:97
msgid ""
"💡 Leave a trailing new line at the end of the "
"[PUBLISHED_LANGUAGES](PUBLISHED_LANGUAGES) file."
msgstr ""
#~ msgid "Translation guide"
#~ msgstr ""
#~ msgid ""
#~ "If you are interested in translating "
#~ "this project, please check out our "
#~ "[Weblate project](https://example.com)."
#~ msgstr ""
#~ msgid ""
#~ "If your language is not yet "
#~ "listed, please express your wishes to"
#~ " start translating it in our [Matrix"
#~ " room](https://matrix.to/#/#matrix-docker-ansible-"
#~ "deploy:devture.com). If anyone else is "
#~ "found to be working on your "
#~ "language, please co-ordinate if needed."
#~ msgstr ""
#~ msgid ""
#~ "Currently, we manage translaion of "
#~ "markdown files on the top level "
#~ "directory and inside [`docs`](../docs/), and"
#~ " this file (`README.md`) only."
#~ msgstr ""
#~ msgid ""
#~ "Translated files are published and "
#~ "maintained in [`markdown`](../markdown/) directory."
#~ msgstr ""
#~ msgid ""
#~ " For readers' sake, we set a "
#~ "minimum condition for publishing documents "
#~ "translated in your language: translating "
#~ "basic articles such as READMEs, "
#~ "installation guides ([Quick start](quick-"
#~ "start.md) and the full installation "
#~ "guide which starts at the "
#~ "[Prerequisites](prerequisites.md)), etc. If you "
#~ "think we have missed progress of "
#~ "translation in your language, please "
#~ "ping us at the Matrix room."
#~ msgstr ""
#~ msgid "Translation development guide"
#~ msgstr ""
#~ msgid "Install packages"
#~ msgstr ""
#~ msgid ""
#~ "To manage files for translation and "
#~ "build translated documents, you need to"
#~ " install packages at first. You can"
#~ " install them with "
#~ "[pip](https://pip.pypa.io/en/stable/)."
#~ msgstr ""
#~ msgid ""
#~ "After installing pip and activating the"
#~ " virtual environment, run the command "
#~ "below on this directory:"
#~ msgstr ""
#~ msgid "Update PO files"
#~ msgstr ""
#~ msgid ""
#~ "If a document is updated, it is"
#~ " necessary to generate updated `.pot` "
#~ "(catalog templates) files and to apply"
#~ " differences to translated `.po` (message"
#~ " catalogs) files."
#~ msgstr ""
#~ msgid "To do so, run these commands:"
#~ msgstr ""
#~ msgid ""
#~ "To generate `.po` files for a new"
#~ " language, e.g. Bulgarian, run the "
#~ "command below:"
#~ msgstr ""
#~ msgid ""
#~ "After the original documents have "
#~ "changed, run [i18n_update.sh](i18n_update.sh) to "
#~ "update `.po` files in all languages "
#~ "specified on [`LANG`](LANG) file:"
#~ msgstr ""
#~ msgid ""
#~ " Unless your language code is "
#~ "added to the `LANG` file, running "
#~ "the script does not generate `.po` "
#~ "files in your language in `locales` "
#~ "directory."
#~ msgstr ""
#~ msgid "Build"
#~ msgstr ""
#~ msgid "To build the documentation in English, run the command below:"
#~ msgstr ""
#~ msgid "It generates Markdown files in `_build/markdown/`."
#~ msgstr ""
#~ msgid ""
#~ " As the original documents are "
#~ "also Markdown files, the generated files"
#~ " in English are identical to the "
#~ "original ones."
#~ msgstr ""
#~ msgid "To build documents in another language, e.g. Bulgarian, run:"
#~ msgstr ""
#~ msgid ""
#~ "Running [i18n_build.sh](i18n_build.sh) builds "
#~ "Markdown files in all languages "
#~ "specified on `LANG` file into `markdown`"
#~ " directory:"
#~ msgstr ""
#~ msgid "Publish documents in a new language"
#~ msgstr ""
#~ msgid ""
#~ "To publish documents translated in a "
#~ "new language on `markdown` directory, "
#~ "add its language code to `LANG` "
#~ "file. Then, run `i18n_update.sh` and "
#~ "`i18n_build.sh`. After that, you would "
#~ "need to push the documents to the"
#~ " repository."
#~ msgstr ""
#~ msgid "💡 Leave an empty line at the end of the `LANG` file."
#~ msgstr ""
#~ msgid "Using the uv package manager and just command runner"
#~ msgstr ""
#~ msgid ""
#~ "Update the locale files for your "
#~ "language: `just sync-language <language>` "
#~ "(internally, this automatically runs `just "
#~ "extract-translation-templates` to make "
#~ "sure the translation templates are "
#~ "up-to-date)"
#~ msgstr ""