Skip to content

Commit

Permalink
Bring more old docs content into the new system
Browse files Browse the repository at this point in the history
More language guide and move some items into an FAQ
  • Loading branch information
NigelBreslaw authored Nov 15, 2024
1 parent 1866c4c commit 04a870a
Show file tree
Hide file tree
Showing 17 changed files with 132 additions and 138 deletions.
41 changes: 37 additions & 4 deletions docs/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -54,17 +54,46 @@ export default defineConfig({
slug: "index",
},
{
label: "Vscode Quick Start",
label: "Getting Started",
slug: "getting-started/intro",
},
{
label: "Guide",
collapsed: true,
items: [
{ label: "Introduction", slug: "guide/intro" },
{ label: "Basics", slug: "guide/basics" },
{ label: "Syntax", slug: "guide/syntax" },
{ label: "Old stuff", slug: "guide/old" },
{
label: "Slint Language",
items: [
{
label: "Basics",
slug: "guide/language/basics",
},
{
label: "Syntax",
slug: "guide/language/syntax",
},
{
label: "Types",
slug: "guide/language/types",
},
{
label: "Font Handling",
slug: "guide/language/fonts",
},
{
label: "Legacy Syntax",
slug: "guide/language/legacy_syntax",
},
],
},
{
label: "App Development",
items: [
"guide/development/debugging_techniques",
"guide/development/localization",
],
},
],
},
{
Expand Down Expand Up @@ -173,6 +202,10 @@ export default defineConfig({
{ label: "Conclusion", slug: "tutorial/conclusion" },
],
},
{
label: "FAQ",
slug: "faq",
},
{
label: "Native API",
collapsed: true,
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,31 +1,32 @@
---
<!-- Copyright © SixtyFPS GmbH <[email protected]> ; SPDX-License-Identifier: MIT -->
title: Supported Platforms
description: Supported Platforms
title: FAQ
description: Frequently Asked Questions
---
# Supported Platforms

## What Are The Supported Platforms

Slint runs on many desktop and embedded platforms and micro-controllers.

The platform descriptions below cover what has been tested for deployment. For the development environment,
we recommend using a recent desktop operating system and compiler version.

Contact [SixtyFPS GmbH](https://slint.dev/contact) if you need to support specific or older versions.

## Desktop Platforms

### Desktop Platforms

Generally, Slint runs on Windows, macOS, and popular Linux distributions. The following tables
cover versions that we specifically test. The general objective is to support the operating systems that
are supported by their vendors at the time of a Slint version release.

### Windows
#### Windows

| Operating System | Architecture |
| ---------------- | ------------ |
| Windows 10 | x86-64 |
| Windows 11 | x86-64 |

### macOS
#### macOS

| Operating System | Architecture |
| ----------------- | --------------- |
Expand All @@ -34,13 +35,13 @@ are supported by their vendors at the time of a Slint version release.
| macOS 14 Sonoma | x86-64, aarch64 |
| macOS 15 Sequoia | x86-64, aarch64 |

### Linux
#### Linux

Linux desktop distribution present a diverse landscape, and Slint should run on any of them, provided that they
are using Wayland or X-Windows, glibc, and d-bus. If a Linux distribution provides Long Term Support (LTS),
Slint should run on the most recent LTS or newer, at the time of a Slint version release.

## Embedded Platforms
### Embedded Platforms

Slint runs on a variety of embedded platforms. Generally speaking, Slint requires a modern Linux userspace
with working OpenGL ES 2.0 (or newer) or Vulkan drivers. We've had success running Slint on
Expand All @@ -49,8 +50,11 @@ with working OpenGL ES 2.0 (or newer) or Vulkan drivers. We've had success runni
- BuildRoot based distributions.
- [TorizonCore](https://www.torizon.io/torizoncore-os).

### Microcontrollers
#### Microcontrollers

Slint's platform abstraction allows for integration into any Rust or C++ based Microcontroller development
environment. Developers need to implement functionality to feed input events such as touch or keyboard, as
well as displaying the pixels rendered by Slint into a frame- or linebuffer.

## What about other platforms?
Contact [SixtyFPS GmbH](https://slint.dev/contact) if you need to support specific or older versions.
21 changes: 15 additions & 6 deletions docs/src/content/docs/getting-started/intro.mdx
Original file line number Diff line number Diff line change
@@ -1,28 +1,37 @@
---
<!-- Copyright © SixtyFPS GmbH <[email protected]> ; SPDX-License-Identifier: MIT -->
// cSpell: ignore CACHEDIR
title: VsCode Quick Start
title: Getting Started
description: Get going with Slint.
---

import { Steps, LinkCard, Tabs, TabItem, FileTree } from '@astrojs/starlight/components';

## Understanding the documentation

:::note[Note]
Slint provides a web based live-editing tool called [Slintpad](https://slintpad.com). It's
possible to open the larger snippets in this tool by clicking the `play` button in the top right
corner of the snippets.
![Screenshot showing link to Slintpad](../../../assets/getting-started/run-in-slintpad.webp)
:::

If you are new to Slint and want to quickly get started and learning the basics we recommend
using Visual Studio Code. VSCode is popular, free and thanks to our official Slint extension
using Visual Studio Code (VS Code). VS Code is popular, free and thanks to the Slint extension
it is also the easiest to get started with.

:::tip[Tip]
We support many other tools and editors see [here](https://slint.dev/get-started)).
:::


## Setting up VSCode
## Setting up VS Code


<Tabs syncKey="dev-platform">
<TabItem label="Windows" icon="seti:windows">
<Steps>
1. Install VSCode.
1. Install VS Code.
Download it [here](https://code.visualstudio.com).

2. Install the Slint extension.
Expand All @@ -37,7 +46,7 @@ This is done via the command palette (Ctrl+Shift+P).
</TabItem>
<TabItem label="macOS" icon="apple">
<Steps>
1. **Install VSCode.**
1. **Install VS Code.**
Download it [here](https://code.visualstudio.com).

2. **Install the Slint extension.**
Expand All @@ -56,7 +65,7 @@ This is done via the command palette (CMD+Shift+P).
</TabItem>
<TabItem label="Linux" icon="linux">
<Steps>
1. **Install VSCode.**
1. **Install VS Code.**
Download it [here](https://code.visualstudio.com).

2. **Install the Slint extension.**
Expand Down
10 changes: 0 additions & 10 deletions docs/src/content/docs/guide/comments.md

This file was deleted.

18 changes: 0 additions & 18 deletions docs/src/content/docs/guide/conditions.md

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@
---
<!-- Copyright © SixtyFPS GmbH <[email protected]> ; SPDX-License-Identifier: MIT -->
title: Translations
description: Translations
title: Localization (l10n)
description: Localization
---

Slint's translation infrastructure makes your application available in different languages.

## Overview

:::tip Prerequisite

:::tip[Prerequisite]
Install the `slint-tr-extractor` tool to extract translatable strings from `.slint` files:

```sh
cargo install slint-tr-extractor
```

:::


Complete the following steps to translate your application:


Expand All @@ -29,10 +27,8 @@ Complete the following steps to translate your application:

At this point, all strings marked for translation are automatically rendered in the target language.

:::{note}

:::note[Note]
Support for translations via gettext is currently not supported on Windows, see [Add support for translations on Windows #3307](https://github.com/slint-ui/slint/issues/3307).

:::

## Annotating Translatable Strings
Expand Down Expand Up @@ -108,10 +104,8 @@ find -name \*.slint | xargs slint-tr-extractor -o MY_PROJECT.pot
This creates a file called `MY_PROJECT.pot`. Replace "MY_PROJECT" with your actual project name.
To learn how the project name affects the lookup of translations, read the sections below.

:::info

:::tip[Tip]
`.pot` files are [Gettext](https://www.gnu.org/software/gettext/) template files.

:::

## Translate the Strings
Expand Down Expand Up @@ -230,14 +224,12 @@ Slint looks for `my_application.mo` in the `lang/fr/LC_MESSAGES/` directory.

## Previewing Translations with `slint-viewer`

:::tip Prerequisite

:::tip[Prerequisite]
Use `slint-viewer` to preview translations when previewing `.slint` files:

```sh
cargo install slint-viewer
```

:::

1. Enable the `gettext` feature when compiling `slint-viewer`.
Expand Down
9 changes: 0 additions & 9 deletions docs/src/content/docs/guide/identifiers.md

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
title: Basics
description: The very basics of Slint
---
import CodeSnippetMD from '../../../components/CodeSnippetMD.astro';
import CodeSnippetMD from '../../../../components/CodeSnippetMD.astro';
import { Aside, LinkCard } from '@astrojs/starlight/components';

<LinkCard
title="VsCode Quick start"
title="Quick start"
href="/master/docs/slint/getting-started/intro"
description="Follow along with our VsCode extension and live code tooling."
description="Follow along with the Slint VS Code extension and live code tooling."
/>


Expand Down
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 04a870a

Please sign in to comment.