From 9adf29e3e4ef92dfa6b430653959c9df6d603c41 Mon Sep 17 00:00:00 2001 From: Laurent Montel Date: Tue, 15 Sep 2026 14:26:00 +0200 Subject: [PATCH] "Version" is a UI string which must be translated --- .github/workflows/upgrade_version.yaml | 2 +- internal/compiler/widgets/common/about-slint.slint | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/upgrade_version.yaml b/.github/workflows/upgrade_version.yaml index 37303a008a2..45aea6516cf 100644 --- a/.github/workflows/upgrade_version.yaml +++ b/.github/workflows/upgrade_version.yaml @@ -43,7 +43,7 @@ jobs: sed -i "s/VersionCheck_[0-9]*_[0-9]*_[0-9]*;/VersionCheck_`echo ${{ github.event.inputs.new_version }} | sed "s/\([0-9]*\)\.\([0-9]*\).\([0-9]*\)/\1/"`_`echo ${{ github.event.inputs.new_version }} | sed "s/\([0-9]*\)\.\([0-9]*\).\([0-9]*\)/\2/"`_`echo ${{ github.event.inputs.new_version }} | sed "s/\([0-9]*\)\.\([0-9]*\).\([0-9]*\)/\3/"`;/" api/rs/slint/lib.rs api/slint-sc/lib.rs # Version in the AboutSlint widget - sed -i "s/Version [0-9]*\.[0-9]*\.[0-9]*\\\\n/Version ${{ github.event.inputs.new_version }}\\\\n/" internal/compiler/widgets/common/about-slint.slint + sed -i "s/@tr(\"Version {}\", \"[0-9]*\.[0-9]*\.[0-9]*\")/@tr(\"Version {}\", \"${{ github.event.inputs.new_version }}\")/" internal/compiler/widgets/common/about-slint.slint # Version in the docs (cargo add slint@): git ls-files | grep "\(^\|/\)docs/.*\.\(md\|rst\)\$" | grep -v "/LICENSES/" | xargs sed --follow-symlinks -i 's/slint@[0-9]\+\.[0-9]\+\.[0-9]\+/slint@${{ github.event.inputs.new_version }}/' diff --git a/internal/compiler/widgets/common/about-slint.slint b/internal/compiler/widgets/common/about-slint.slint index 8736ae062ba..d40404c014e 100644 --- a/internal/compiler/widgets/common/about-slint.slint +++ b/internal/compiler/widgets/common/about-slint.slint @@ -22,7 +22,7 @@ export component AboutSlint { } Text { - text: "Version 1.18.0\nhttps://slint.dev/"; + text: @tr("Version {}", "1.18.0") + "\nhttps://slint.dev/"; font-size: 10px; horizontal-alignment: center; }