stackblitz / tutorialkit

TutorialKit by StackBlitz - Create interactive tutorials powered by the WebContainer API
https://tutorialkit.dev
MIT License
232 stars 22 forks source link

fix: missing preview i18n #255

Closed ycs77 closed 3 weeks ago

ycs77 commented 3 weeks ago

Problem

I'm currently using the tutorialkit version v0.1.5, if added some i18n texts:

docs/demo/src/content/tutorial/meta.md

---
type: tutorial
mainCommand: ['npm run dev', 'Starting http server']
prepareCommands:
  - ['npm install', 'Installing dependencies']

# add the i18n texts
i18n:
  prepareEnvironmentTitleText: '啟動環境'
  previewTitleText: '預覽'
  toggleTerminalButtonText: '切換終端機'
---

The i18n will work on webcontainer starting:

螢幕擷取畫面 2024-08-18 153215

But not working on webcontainer started:

螢幕擷取畫面 2024-08-18 155256

PR Added

stackblitz[bot] commented 3 weeks ago

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

ycs77 commented 3 weeks ago

The preview title is also configurable via previews option:

Oh, I see.


When I want to do i18n, I intuitively look for replaceable values ​​in the i18n options.

ycs77 commented 3 weeks ago

Wait a minute while I look at why the test failed.

AriPerkkio commented 3 weeks ago

All tests are failing. We are pinning a dependency version of transitive dependency in test cases. Another dependency just updated and doesn't support that version. There's fix in https://github.com/stackblitz/tutorialkit/pull/261.

Nemikolh commented 3 weeks ago

@ycs77 You have a lint error! Once fixed, we can merge your PR :raised_hands: