Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Lukkoz opened this issue Jan 23, 2023 · 1 comment
Open

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

Lukkoz opened this issue Jan 23, 2023 · 1 comment

Comments

@Lukkoz
Copy link

Lukkoz commented Jan 23, 2023

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?

@joaquinicolas
Copy link

Have you fix this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants