learnxinyminutes-site
learnxinyminutes-site copied to clipboard
Ukrainian language
Hi @adambard,
I'm still confused about the Ukrainian language in the docs repository.
We have:
- Folder name
uk-ua
which seems correct to me; - All the files have the
-ua
suffix (c-ua.html.markdown
). Shouldn't it be thenc-uk
instead? I'm not proficient in those things and don't know how the parsers/file processors deal with language codes.
Any ideas would be highly appreciated. Thanks!
How the process works is (approximately and allowing for mistakes in my recollection):
- All articles are all collected into a flat list (i.e. ignoring their directory). Call these
@articles
- A separate list of english-language-only articles is collected from the above (via .filter). Call these
@articles_en
- For each
article
in@articles
:- Its english-language version
article_en
is looked up (via a lookup table generated from@articles_en
) - The article
article
is appended toarticle_en.translations
- Its english-language version
- When generating the home page,
@articles_en
are looped over to produce each row, andarticle.translations
is looped over to show each translation badge/link
So, the only thing that really matters for article discovery is the language
tag on the document itself. The filename and the directory are manifested in the generated URL, but don't matter much outside of this.
If there are Ukrainian-language articles that are not appearing, most likely some error in parsing of either the yaml file header ("frontmatter") or the article itself (usually an unrecognized syntax highlighter) is preventing it from being picked up at the start of this process.