Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 46 additions & 5 deletions docs/tutorialkit.dev/src/content/docs/reference/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ The `I18nText` type has the following shape:
```ts
type I18nText = {
/**
* Template for formatting a part. Variables: ${index} and ${title}.
* Template on how to format a part. Variables: ${index} and ${title}.
*
* @default 'Part ${index}: ${title}'
*/
Expand All @@ -53,7 +53,7 @@ type I18nText = {
*
* @default 'Edit this page'
*/
editPageText?: string
editPageText?: string,

/**
* Text of the WebContainer link.
Expand All @@ -70,12 +70,53 @@ type I18nText = {
startWebContainerText?: string,

/**
* Text shown on the call to action button to start webcontainer when boot was blocked
* due to memory restrictions.
* Text shown in the preview section when there are no steps to run and no preview to show.
*
* @default 'No preview to run nor steps to show'
*/
noPreviewNorStepsText?: string,

/**
* Text shown on top of the file tree.
*
* @default 'Files'
*/
filesTitleText?: string,

/**
* Text shown on top of the steps section.
*
* @default 'Preparing Environment'
*/
prepareEnvironmentTitleText?: string,

/**
* Text shown on top of the preview section when `previews[_].title` is not configured.
*
* @default 'Preview'
*/
defaultPreviewTitleText?: string,

/**
* Text for the toggle terminal button.
*
* @default 'Toggle Terminal'
*/
toggleTerminalButtonText?: string,

/**
* Text for the solve button.
*
* @default 'Solve'
*/
solveButtonText?: string,

/**
* Text for the reset button.
*
* @default 'Reset'
*/
resetButtonText?: string,
}

```
Expand Down Expand Up @@ -238,4 +279,4 @@ type OpenInStackBlitz =

type TemplateType = "html" | "node" | "angular-cli" | "create-react-app" | "javascript" | "polymer" | "typescript" | "vue"

```
```
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export const DEFAULT_LOCALIZATION = {
webcontainerLinkText: 'Powered by WebContainers',
filesTitleText: 'Files',
prepareEnvironmentTitleText: 'Preparing Environment',
previewTitleText: 'Preview',
defaultPreviewTitleText: 'Preview',
toggleTerminalButtonText: 'Toggle Terminal',
solveButtonText: 'Solve',
resetButtonText: 'Reset',
Expand Down
2 changes: 1 addition & 1 deletion packages/components/react/src/Panels/PreviewPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ function previewTitle(preview: PreviewInfo, previewCount: number, i18n: I18n) {
}

if (previewCount === 1) {
return i18n.previewTitleText;
return i18n.defaultPreviewTitleText;
}

return `Preview on port ${preview.port}`;
Expand Down
2 changes: 1 addition & 1 deletion packages/types/src/schemas/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export const i18nSchema = z.object({
*
* @default 'Preview'
*/
previewTitleText: z.string().optional().describe('Text shown on top of the preview section.'),
defaultPreviewTitleText: z.string().optional().describe('Text shown on top of the preview section.'),

/**
* Text for the toggle terminal button.
Expand Down
Loading