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

GH-149 A basic multilingual documentation structure has been created #154

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

VladimirLevadnij
Copy link

Fixes #149

Copy link
Member

@Naros Naros left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @VladimirLevadnij great work so far, I left a few comments.

docs/en/antora.yml Outdated Show resolved Hide resolved
docs/ru/antora.yml Outdated Show resolved Hide resolved
playbook.yml Outdated Show resolved Hide resolved
playbook.yml Outdated
Comment on lines 6 to 15
content:
sources:
- url: https://github.com/Vahera/godot-orchestrator.git
branches:
- 'main'
start_path: docs
start_path: docs/en
- url: https://github.com/Vahera/godot-orchestrator.git
branches:
- 'main'
start_path: docs/ru
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I don't care for how this is rendered, so lets take a step back and lets break the playbook.yml into two separate files, playbook_en.yml and playbook_ru.yml.

For playbook_en.yml there will be a single content source defined as follows:

context:
  sources:
    - url: https://github.com/Vahera/godot-orchestrator.git
      branches:
        - 'main'
      start_page: docs/en

Then for playbook_ru.yml:

context:
  sources:
    - url: https://github.com/Vahera/godot-orchestrator.git
      branches:
        - 'main'
      start_page: docs/ru

What we'll then do is use a different output directory for each playbook:

In playbook_en.yml:

output:
  dir: ./docs-build/en

and for playbook_ru.yml:

output:
  dir: ./docs-build/ru

This will allow for nice URLs:
https://vahera.com/docs/en/orchestrator/2.0.0/overview.html
https://vahera.com/docs/ru/orchestrator/2.0.0/overview.html

We'll modify the custom template UI layout with a drop-down widget so that the brand supports switching between the two languages and this avoids tainting component and project names for future expansion.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This means we'll need to run Antora n times, once for each language, but I think that's a worthy trade-off to avoid injecting something into Antora that it isn't currently designed to support. I know Dan, the project lead on Antora, so I'll reach out and find out what his expected lead time is on this multi-lingual feature.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@VladimirLevadnij let me know if you have any questions on my feedback.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Naros I made the changes you wrote about. But, except for one case. You suggested changing start_page: en::overview.adoc to start_page: overview.adoc in the playbook.yml file (which is now divided into two files playbook_en.yml and playbook_ru.yml), but I got an error with this change "Missing component name in start page for site: overview.adoc", so I made this line as it was originally start_page: orchestrator::overview.adoc.

In this version, as I see it, everything works. I was able to create local documentation in English and documentation in Russian (the documentation is not translated yet).

All new commits are already in this pull request.

VladimirLevadnij and others added 4 commits March 17, 2024 15:55
Co-authored-by: Chris Cranford <ccranfor@redhat.com>
Co-authored-by: Chris Cranford <ccranfor@redhat.com>
Co-authored-by: Chris Cranford <ccranfor@redhat.com>
Copy link
Member

@Naros Naros left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good, so is anyone on your team going to translate the /ru/** files to Russian?

@VladimirLevadnij
Copy link
Author

VladimirLevadnij commented Mar 17, 2024

This looks good, so is anyone on your team going to translate the /ru/** files to Russian?

Yes, after you accept this pull request and the new documentation structure gets into the main branch, Denis will begin to gradually translate the documentation and send new pull requests with changes for this issue #150

@VladimirLevadnij
Copy link
Author

@Naros I added a notification to the documentation in Russian in the overview.adoc file:

Обратите, пожалуйста, внимание, что основная документация Orchestrator написана на https://vahera.com/docs/en/[английском языке]. Документация Orchestrator на русском языке может быть не полностью переведена с английского языка, а также учитывайте, что документация по Orchestrator регулярно обновляется, и актуализация документации на русском языке занимает время. Если вы хотите получить всегда самую актуальную документацию, используйте, пожалуйста, документацию на https://vahera.com/docs/en/[английском языке].

image

In English it would sound something like this:

Please note that the main Orchestrator documentation is written in English. Orchestrator documentation in Russian may not be fully translated from English, and please note that Orchestrator documentation is regularly updated and Russian documentation may take time to update. If you want to always receive the most up-to-date documentation, please use the documentation in English.

Now users are notified that documentation in Russian may not be fully translated and therefore documentation in its current form can be created in order to begin translating it into Russian on each page separately :-)

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

Successfully merging this pull request may close these issues.

Create a multilingual documentation structure
2 participants