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

Prepare for sites localization #23

Open
AlexxNB opened this issue Dec 24, 2021 · 0 comments
Open

Prepare for sites localization #23

AlexxNB opened this issue Dec 24, 2021 · 0 comments

Comments

@AlexxNB
Copy link

AlexxNB commented Dec 24, 2021

I've mentioned about localization in the issue for sites repo. But I think that localization process should be started from API. When we will be able to get localized documentation from API then 80% of work will be done =)

Let's discuss what changes we need for API in this case:

  1. While deploying, Action should search for en,ru,fr and etc folders in documentation derictory of the repo. The en will be main source, other languages are copy its structure and filenames. Copies may not have all files, at start of translating there may be only few translated files. In translation progress files will be added and updated.
  2. Also Action should remember last commit date for each file. Is it possible now?
  3. API should accept target language on request - it may be query parameter, slug or header.
  4. API should return content in requested language according this rules:
    • If translated file found and last commit was after than english one -> return translated content, no any label
    • If translated file found, but last commit was before than english one -> return translated content, add label 'outdated'
    • If translated file doesn't exist -> return english content, add label 'untranslated'

Labels may be used by site to show notification for visitors, with some instructions how to help with site translation.

What do you think about this?

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

No branches or pull requests

1 participant