pxt icon indicating copy to clipboard operation
pxt copied to clipboard

Proper directory setup for localized .md files for pxt-target

Open Lukkoz opened this issue 3 years ago • 1 comments

Hi

I am implementing a new pxt target with exapmles and tutorials basing on the "pxt-sample" repository. I created new Gallery "tutorials" and a following tutorials.md and file in the doc directory:

# Tutorials


## Fun stuff

[{
  "name": "T 1",
  "description": "O 1",
  "url":"/tutorials/tutorial1",
  "cardType": "tutorial"
}, {
  "name": "T 2",
  "description": "O 2",
  "url": "/tutorials/tutorial2",
  "cardType": "tutorial"
}]

tutorial1.md and tutorial2.md are files in the /doc directory.

Everything works fine and tutorials display and run properaly.

The problem is with the localization. I've added lozalization files to the /libs/core/_locales/[language_code]. Both .jsons and localized versions of tutorial1.md and tutorial2.md. (According to this documentation https://makecode.com/writing-docs/user-tutorials ) The string from .json files are implemented propearly when i change the language setting, but the .md files are still taken from the /docs folder. What is the proper way to set the directories and files for the localized .md files? I know this is possible since the microbit target supports it for some languages, but i just do not know how to do it right?

Lukkoz avatar Jan 23 '23 16:01 Lukkoz

Have you fix this?

joaquinicolas avatar Jul 06 '23 21:07 joaquinicolas