@hasansezertasan My only concern with manual translations is how will we maintain it as we update our docs over time? How have you seen this handled in other projects?
I thought about this often while translating the FastAPI Documentation, and there is even a discussion on it (tiangolo/fastapi#10872), but there is no clear solution there. Expired (outdated) translations need to be detected and reported.
This page at FastAPI documentation doesn't have a Turkish translation at the moment: General - How To - Recipes - FastAPI, that's why you see "The current page still doesn't have a translation for this language." message. It can tell if there is a translation page or not.
I think it also should tell or highlight if the translation is up to date or not.
How do we detect it? I can think of only one solution.
A script that tracks the modification dates of the original markdown files and keeps a log for that (in JSON maybe).
And we can use that log to let people know if the current translation is up to date or not.
Consider this directory as documentation tree:
- docs
- index.md # Original File - Modified today
- index.tr.md # Turkish Translation - Modified yesterday
- track.json
This is the example for track.json
{
"index_tr_md": {
"outdated": true
}
}
This is the example for index.md:
# This is the index!
This is the example for index.tr.md
{% if index_tr_md.outdated %}
Bu sayfa güncel değil.
{% endif %}
# Bu giriş sayfasıdır.
"Bu sayfa güncel değil." means "This page is not up to date".
What I'm talking about is a rough example.