learnxinyminutes-site icon indicating copy to clipboard operation
learnxinyminutes-site copied to clipboard

Ukrainian language

Open Menelion opened this issue 2 years ago • 1 comments

Hi @adambard,

I'm still confused about the Ukrainian language in the docs repository.

We have:

  1. Folder name uk-ua which seems correct to me;
  2. All the files have the -ua suffix (c-ua.html.markdown). Shouldn't it be then c-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!

Menelion avatar Mar 15 '22 23:03 Menelion

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 to article_en.translations
  • When generating the home page, @articles_en are looped over to produce each row, and article.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.

adambard avatar Mar 15 '22 23:03 adambard