Skip to content

Prepare for sites localization #23

Open
@AlexxNB

Description

@AlexxNB

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions