Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a multilingual documentation structure #149

Closed
VladimirLevadnij opened this issue Mar 11, 2024 · 8 comments · May be fixed by #154
Closed

Create a multilingual documentation structure #149

VladimirLevadnij opened this issue Mar 11, 2024 · 8 comments · May be fixed by #154

Comments

@VladimirLevadnij
Copy link

Description

Now the documentation is created on the Antora engine and the documentation structure is now monolingual. It is necessary to create a new multilingual documentation structure, for a start, for example for English and Russian.

Implementation ideas

@Naros proposed this new documentation structure:

godot-orchestrator/
├── docs/
│   ├── en/
│   │   └── modules/
│   │       ├── ROOT/
│   │       │   ├── pages/
│   │       │   │   └── index.adoc
│   │       │   └── nav.adoc
│   │       └── antora.yml
│   └── ru/
│       └── modules/
│           ├── ROOT/
│           │   ├── pages/
│           │   │   └── index.adoc
│           │   └── nav.adoc
│           └── antora.yml
@VladimirLevadnij
Copy link
Author

As part of this issue, it is necessary to create the necessary documentation structure. When creating a Russian version of documentation, you must copy data from the English version. Translation of documentation into Russian will be carried out as a separate issue.

@VladimirLevadnij
Copy link
Author

@Naros could you write a short instruction on how to properly run this documentation locally to check the results of the changes?

@VladimirLevadnij
Copy link
Author

@Naros, please take a look, is this what the new documentation structure should look like?

https://github.com/VladimirLevadnij/godot-orchestrator/tree/gh149/docs

@Naros
Copy link
Member

Naros commented Mar 11, 2024

Hi @VladimirLevadnij the easiest thing to do is to install Node.js and once that's installed then you need to install Antora, which can be done by executing npm install -g @antora/cli@3.1 @antora/site-generator@3.1. Once antora is installed, you can build the docs locally using this command from the godot-orchestrator project root.

antora --fetch playbook.yml

This will build the docs inside the docs-build/ directory off the project root, which you can open and browse with a browser.

@VladimirLevadnij
Copy link
Author

VladimirLevadnij commented Mar 11, 2024

As I understand it, the playbook.yml file needs to be modified.

  1. To create documentation in different languages, we can make different .yml files for each language, as implemented in this repository https://github.com/plentymarkets/plenty-manual-docs

    Or make one common file for all languages, but then all languages will be rebuilt every time, this is probably a good option, since the documentation is not large.

  2. To start creating documentation on the local computer, you also need to change the values in the playbook.yml file or come up with some kind of parameter for building the local version (I don’t know how possible this is).

    To build locally, you need to change this path and branch name:

content:
   sources:
     - url: https://github.com/Vahera/godot-orchestrator.git
       branches:
         - 'main'
       start_path: docs

@VladimirLevadnij
Copy link
Author

VladimirLevadnij commented Mar 12, 2024

@Naros, Hi, I made the first pull request for this issue.

There is such a demo example of multilingual documentation https://gitlab.com/antora-ui-custom/antora-i18n

Here is the link to the UI demo https://antora-ui-custom.gitlab.io/antora-i18n

But this example seemed to me at the current stage to be unnecessarily complex (there are many additional modules in this example), and as I saw in this example, the structure of the documentation changes, according to the example in the anthora.yml file, instead of version: 2.0.0 you need to write in one version: en, in the case of another version: ru. That is, the logic of product versions is lost (2.0.0, 2.1.0, 3.0.0, ...) and a new logic of different language versions is obtained (en, ru, fr, ...).

I did it differently at the moment:

  1. In antora.yml, the values of the name field have been changed, previously it was name: orchestrator, now it is name: en and name: ru. The versions remain as they were before version: 2.0.0.

  2. Now links are written in a different way, for example, before there was start_page: orchestrator::overview.adoc now it became start_page: en::overview.adoc, before there was xref:orchestrator::nodes.adoc, and now depending from the language became xref:en::nodes.adoc or xref:ru::nodes.adoc.

This is what the documentation looks like in English:

image

This is what the language switching window looks like:

image

This is what the documentation looks like in Russian (there is no translation of the documentation itself yet, translation will be carried out as the next step in issue #150):

image

@VladimirLevadnij
Copy link
Author

The structure and logic of the documentation has been changed in accordance with the proposal of @Naros.

#154 (comment)

@VladimirLevadnij
Copy link
Author

This issue is no longer relevant due to the transfer of documentation to a separate repository.

https://github.com/Vahera/godot-orchestrator-docs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants