The truly free, open-source, local-first, cross-platform CapCut replacement. Scriptable through a JSON-RPC API & MCP.
Rust ffmpegfree-video-editormodel-context-protocolnon-linear-editoroffline-firstopen-source-video-editorself-hostedvideo-editingvideo-editing-automationvideo-editing-softwarevideo-editing-toolsvideo-editorvoice-cloningyoutube-automationyoutube-shorts
feat(settings): a Version page - which release this is, whether a newer one is out, and any release from 0.2.5 on put in this one's place
Jareer85f3b5707aee
diff --git a/src/crates/concat-host/src/lib.rs b/src/crates/concat-host/src/lib.rsindex e466ffd6..212268c6 100644--- a/src/crates/concat-host/src/lib.rs+++ b/src/crates/concat-host/src/lib.rs@@ -36,6 +36,7 @@ pub mod reverse;pub mod session;pub mod templates;pub mod titles;+pub mod updates;pub use brush::{Brushes, RegionRequest};pub use cutout::{AnalyseRequest, Cutouts};diff --git a/src/crates/concat-host/src/updates.rs b/src/crates/concat-host/src/updates.rsnew file mode 100644index 00000000..b045ea63--- /dev/null+++ b/src/crates/concat-host/src/updates.rs@@ -0,0 +1,808 @@+// SPDX-License-Identifier: AGPL-3.0-or-later+// SPDX-FileCopyrightText: 2026 Jareer and Concat contributors++//! Which release this is, which releases are out, and putting one of them+//! in this one's place.+//!+//! Every release on GitHub carries a `manifest.json` naming each+//! platform's package with its URL, its size and its SHA-256 - the release+//! workflow writes it. That is what a switch reads: the list of releases+//! comes from GitHub's API, the package for this machine from the chosen+//! release's manifest, and the bytes are checked against the manifest's+//! digest before they are put anywhere, the road the models take (see+//! [`crate::models`]).+//!+//! Only releases from [`FIRST_SWITCHABLE`] on are offered. A release before+//! it has no page to come back up by, so a person who went there would be+//! stranded.+//!+//! How a package goes in place is the platform's affair. Windows runs the+//! installer, which replaces the files once the app has closed. macOS+//! copies the app out of the disk image over the bundle this is running+//! from. An AppImage is written over the file it was started from. A .deb,+//! an .rpm or a pacman package is handed to the desktop's installer. The+//! caller closes the app where that is needed and [`relaunch`] starts the+//! new one.++use std::fmt;+use std::path::{Path, PathBuf};+use std::process::Command;+use std::sync::OnceLock;+use std::sync::atomic::AtomicBool;++use crate::dirs::AppDirs;+use crate::models;++/// The repository the releases are read from.+pub const REPO: &str = "jub0t/Concat";++/// The first release with a Version page: the earliest one a person can+/// come back from, so the earliest one offered.+pub const FIRST_SWITCHABLE: Version = Version::new(0, 2, 5);++/// GitHub's list of the repository's releases, newest first. A hundred+/// covers years of releases at this pace.+const RELEASES_URL: &str = "https://api.github.com/repos/jub0t/Concat/releases?per_page=100";++/// What a download that was stopped says.+pub const CANCELLED: &str = "the download was cancelled";++/// A release's number: `0.2.5`. A tag carries a `v` in front of it.+#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]+pub struct Version {+ /// The first number.+ pub major: u64,+ /// The second.+ pub minor: u64,+ /// The third.+ pub patch: u64,+}++impl Version {+ /// The version with these three numbers.+ pub const fn new(major: u64, minor: u64, patch: u64) -> Version {+ Version {+ major,+ minor,+ patch,+ }+ }++ /// `0.2.5` or `v0.2.5`. Anything else - a pre-release such as+ /// `v0.3.0-beta.1`, the `nightly` tag, two numbers - is `None`: not a+ /// release a person is offered.+ pub fn parse(text: &str) -> Option<Version> {+ let text = text.trim();+ let text = text.strip_prefix('v').unwrap_or(text);+ let mut parts = text.split('.');+ let major = parts.next()?.parse().ok()?;+ let minor = parts.next()?.parse().ok()?;+ let patch = parts.next()?.parse().ok()?;+ if parts.next().is_some() {+ return None;+ }+ Some(Version::new(major, minor, patch))+ }++ /// The version this binary was built as: the workspace's.+ pub fn current() -> Version {+ Version::parse(env!("CARGO_PKG_VERSION")).unwrap_or(Version::new(0, 0, 0))+ }++ /// The release's tag: `v0.2.5`.+ pub fn tag(self) -> String {+ format!("v{self}")+ }+}++impl fmt::Display for Version {+ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {+ write!(f, "{}.{}.{}", self.major, self.minor, self.patch)+ }+}++/// One release a person can switch to.+#[derive(Clone, Debug, PartialEq, Eq)]+pub struct Release {+ /// Its number.+ pub version: Version,+ /// Its tag on GitHub, `v0.2.5`, which names its download folder.+ pub tag: String,+ /// The day it was published, `2026-09-24`; empty when GitHub did not+ /// say.+ pub published: String,+}++/// Reads GitHub's answer to the releases request: the stable releases from+/// [`FIRST_SWITCHABLE`] on, newest first. Drafts and pre-releases are left+/// out, as is anything whose tag is not a plain version.+pub fn releases_from_json(json: &str) -> Result<Vec<Release>, String> {+ let value: serde_json::Value = serde_json::from_str(json)+ .map_err(|error| format!("the release list does not read as JSON: {error}"))?;+ let Some(entries) = value.as_array() else {+ // GitHub answers an object with a message when it refuses: the+ // rate limit, for the most part.+ return Err(format!("GitHub answered: {}", github_message(&value)));+ };+ let mut releases: Vec<Release> = entries+ .iter()+ .filter_map(|entry| {+ let flag = |name: &str| {+ entry+ .get(name)+ .and_then(serde_json::Value::as_bool)+ .unwrap_or(false)+ };+ if flag("draft") || flag("prerelease") {+ return None;+ }+ let tag = entry.get("tag_name")?.as_str()?;+ let version = Version::parse(tag)?;+ if version < FIRST_SWITCHABLE {+ return None;+ }+ let published = entry+ .get("published_at")+ .and_then(serde_json::Value::as_str)+ .unwrap_or_default()+ .chars()+ .take(10)+ .collect();+ Some(Release {+ version,+ tag: tag.to_owned(),+ published,+ })+ })+ .collect();+ releases.sort_by(|a, b| b.version.cmp(&a.version));+ releases.dedup_by(|a, b| a.version == b.version);+ Ok(releases)+}++/// The `message` of a GitHub error body, or the body's first line.+fn github_message(value: &serde_json::Value) -> String {+ value+ .get("message")+ .and_then(serde_json::Value::as_str)+ .map_or_else(+ || value.to_string().chars().take(200).collect(),+ str::to_owned,+ )+}++/// Asks GitHub for the releases; see [`releases_from_json`].+pub fn fetch_releases() -> Result<Vec<Release>, String> {+ releases_from_json(&get_text(RELEASES_URL)?)+}++/// Where this build sits among the releases.+#[derive(Clone, Copy, Debug, PartialEq, Eq)]+pub enum Standing {+ /// This build is the newest release.+ Latest,+ /// A newer release is out: this one.+ Behind(Version),+ /// This build is newer than any release: a build from the tree.+ Ahead,+ /// No release from [`FIRST_SWITCHABLE`] on is out.+ NoReleases,+}++/// Where `current` sits among `releases`.+pub fn standing(current: Version, releases: &[Release]) -> Standing {+ match releases.iter().map(|release| release.version).max() {+ None => Standing::NoReleases,+ Some(newest) if newest > current => Standing::Behind(newest),+ Some(newest) if newest < current => Standing::Ahead,+ Some(_) => Standing::Latest,+ }+}++/// The kind of package this build was installed from, which is the kind+/// that goes in its place.+#[derive(Clone, Copy, Debug, PartialEq, Eq)]+pub enum PackageKind {+ /// A macOS disk image with the app in it.+ Dmg,+ /// The Windows installer, `Concat-<version>-windows-<arch>-setup.exe`.+ Setup,+ /// A Linux AppImage: one file, started where it lies.+ AppImage,+ /// A Debian package.+ Deb,+ /// An RPM.+ Rpm,+ /// An Arch package.+ Pacman,+}++impl PackageKind {+ /// The key the release manifest files the package under.+ pub fn key(self) -> &'static str {+ match self {+ PackageKind::Dmg => "dmg",+ PackageKind::Setup => "setup",+ PackageKind::AppImage => "appimage",+ PackageKind::Deb => "deb",+ PackageKind::Rpm => "rpm",+ PackageKind::Pacman => "pacman",+ }+ }+}++/// Why this build cannot be replaced from here.+#[derive(Clone, Copy, Debug, PartialEq, Eq)]+pub enum Fixed {+ /// A Flatpak: Flatpak keeps it up to date.+ Flatpak,+ /// A phone: its store keeps it up to date.+ Store,+ /// Not installed from any package this knows - a build from the tree,+ /// a distribution's own package.+ NotFromPackage,+}++/// How this build was installed, or why it cannot be switched from here.+/// Worked out once: on Linux it reads the package databases.+pub fn installed_as() -> Result<PackageKind, Fixed> {+ static KNOWN: OnceLock<Result<PackageKind, Fixed>> = OnceLock::new();+ *KNOWN.get_or_init(|| {+ if cfg!(target_os = "macos") {+ Ok(PackageKind::Dmg)+ } else if cfg!(target_os = "windows") {+ Ok(PackageKind::Setup)+ } else if cfg!(target_os = "linux") {+ linux_kind(+ std::env::var_os("APPIMAGE").is_some(),+ std::env::var_os("FLATPAK_ID").is_some(),+ Path::new("/var/lib/dpkg/info/concat.list").exists(),+ pacman_has_concat(),+ rpm_has_concat(),+ )+ } else {+ Err(Fixed::Store)+ }+ })+}++/// A Linux install, from what is on the machine: an AppImage says so in+/// the environment, and a package is in its manager's database.+fn linux_kind(+ appimage: bool,+ flatpak: bool,+ dpkg: bool,+ pacman: bool,+ rpm: bool,+) -> Result<PackageKind, Fixed> {+ if flatpak {+ Err(Fixed::Flatpak)+ } else if appimage {+ Ok(PackageKind::AppImage)+ } else if dpkg {+ Ok(PackageKind::Deb)+ } else if pacman {+ Ok(PackageKind::Pacman)+ } else if rpm {+ Ok(PackageKind::Rpm)+ } else {+ Err(Fixed::NotFromPackage)+ }+}++/// Whether pacman's database lists the `concat` package: a folder named+/// `concat-<version>-<release>` under its local store.+fn pacman_has_concat() -> bool {+ std::fs::read_dir("/var/lib/pacman/local").is_ok_and(|entries| {+ entries.flatten().any(|entry| {+ let name = entry.file_name();+ let name = name.to_string_lossy();+ name.strip_prefix("concat-")+ .is_some_and(|rest| rest.starts_with(|c: char| c.is_ascii_digit()))+ })+ })+}++/// Whether the RPM database lists `concat`. Asked of `rpm` itself, and only+/// where there is a database to ask about.+fn rpm_has_concat() -> bool {+ Path::new("/var/lib/rpm").exists()+ && Command::new("rpm")+ .args(["-q", "concat"])+ .output()+ .is_ok_and(|output| output.status.success())+}++/// One platform's package in a release: what to fetch and what it must+/// hash to.+#[derive(Clone, Debug, PartialEq, Eq)]+pub struct Package {+ /// Its file name, `Concat-0.2.5-macos-arm64.dmg`.+ pub file: String,+ /// Where to fetch it.+ pub url: String,+ /// Its size, for the progress bar before the server has said.+ pub bytes: u64,+ /// Its SHA-256 as lowercase hex.+ pub sha256: String,+}++/// The name the manifest gives this machine's architecture: the builds+/// say `arm64` for a Mac and `aarch64` everywhere else.+pub fn manifest_arch(os: &str, arch: &str) -> String {+ match (os, arch) {+ ("macos", "aarch64") => "arm64".to_owned(),+ _ => arch.to_owned(),+ }+}++/// The package of `kind` for `os` on `arch` in a release's manifest.+pub fn package_from_manifest(+ json: &str,+ os: &str,+ arch: &str,+ kind: PackageKind,+) -> Result<Package, String> {+ let value: serde_json::Value = serde_json::from_str(json)+ .map_err(|error| format!("the release manifest does not read as JSON: {error}"))?;+ let entry = value+ .get("binaries")+ .and_then(|binaries| binaries.get(os))+ .and_then(|platform| platform.get(manifest_arch(os, arch)))+ .and_then(|machine| machine.get(kind.key()))+ .ok_or_else(|| format!("the release has no {} package for {os} {arch}", kind.key()))?;+ let text = |name: &str| {+ entry+ .get(name)+ .and_then(serde_json::Value::as_str)+ .map(str::to_owned)+ .ok_or_else(|| format!("the manifest's package has no {name}"))+ };+ let file = text("file")?;+ // The name goes into a path under the app's own folder, and comes off+ // the network: a name with a folder in it is refused, not honoured.+ if file.is_empty() || file.starts_with('.') || file.contains(['/', '\\']) {+ return Err(format!(+ "the manifest names the package {file:?}, which is not a file name"+ ));+ }+ Ok(Package {+ file,+ url: text("url")?,+ bytes: entry+ .get("bytes")+ .and_then(serde_json::Value::as_u64)+ .unwrap_or(0),+ sha256: text("sha256")?,+ })+}++/// Where a release's manifest is.+pub fn manifest_url(tag: &str) -> String {+ format!("https://github.com/{REPO}/releases/download/{tag}/manifest.json")+}++/// The package of `kind` for this machine in `release`, from its manifest.+pub fn fetch_package(release: &Release, kind: PackageKind) -> Result<Package, String> {+ package_from_manifest(+ &get_text(&manifest_url(&release.tag))?,+ std::env::consts::OS,+ std::env::consts::ARCH,+ kind,+ )+}++/// Where packages are downloaded to.+pub fn folder(dirs: &AppDirs) -> PathBuf {+ dirs.data.join("updates")+}++/// Fetches `package` into `folder` and checks it against its digest,+/// reporting `(received, total)` bytes as it goes and stopping when+/// `cancel` is set. One package at a time: whatever an earlier switch left+/// in the folder goes first, but a partial of this same package stays and+/// is resumed.+pub fn download_package(+ package: &Package,+ folder: &Path,+ cancel: &AtomicBool,+ progress: &mut dyn FnMut(u64, u64),+) -> Result<PathBuf, String> {+ std::fs::create_dir_all(folder)+ .map_err(|error| format!("could not create {}: {error}", folder.display()))?;+ let partial = folder.join(format!("{}.part", package.file));+ let done = folder.join(&package.file);+ if let Ok(entries) = std::fs::read_dir(folder) {+ for path in entries.flatten().map(|entry| entry.path()) {+ if path != partial {+ let _ = std::fs::remove_file(&path);+ }+ }+ }+ models::download(+ &package.url,+ &partial,+ package.bytes,+ cancel,+ CANCELLED,+ progress,+ )?;+ if let Err(error) = models::verify(&partial, &package.sha256) {+ let _ = std::fs::remove_file(&partial);+ return Err(error);+ }+ std::fs::rename(&partial, &done)+ .map_err(|error| format!("could not write {}: {error}", done.display()))?;+ Ok(done)+}++/// What [`install`] did, which decides what the app does next.+#[derive(Clone, Copy, Debug, PartialEq, Eq)]+pub enum Installed {+ /// The installer is running: the app closes so it can finish.+ InstallerRunning,+ /// The new build is in this one's place: the app closes and+ /// [`relaunch`] starts it.+ Replaced,+ /// The package is open in the desktop's installer: the person finishes+ /// there and starts the app again.+ Opened,+}++/// Puts `package`, a file of `kind` already checked against its digest, in+/// this build's place.+pub fn install(package: &Path, kind: PackageKind) -> Result<Installed, String> {+ match kind {+ PackageKind::Setup => {+ Command::new(package)+ .spawn()+ .map_err(|error| format!("could not start {}: {error}", package.display()))?;+ Ok(Installed::InstallerRunning)+ }+ PackageKind::Dmg => replace_from_dmg(package),+ PackageKind::AppImage => replace_appimage(package),+ PackageKind::Deb | PackageKind::Rpm | PackageKind::Pacman => {+ run(Command::new("xdg-open").arg(package))?;+ Ok(Installed::Opened)+ }+ }+}++/// The `.app` this process runs from, or `None` for a bare binary.+fn own_bundle() -> Option<PathBuf> {+ let exe = std::env::current_exe().ok()?;+ exe.ancestors()+ .find(|path| path.extension().is_some_and(|extension| extension == "app"))+ .map(Path::to_path_buf)+}++/// Mounts the image, copies the app out of it over this one's bundle, and+/// unmounts. A process not running from a bundle - a build from the tree -+/// gets the image opened in the Finder instead, to drag from as always;+/// so does one whose bundle could not be replaced, with the reason.+fn replace_from_dmg(dmg: &Path) -> Result<Installed, String> {+ let Some(bundle) = own_bundle() else {+ run(Command::new("open").arg(dmg))?;+ return Ok(Installed::Opened);+ };+ let mount = std::env::temp_dir().join(format!("concat-update-{}", std::process::id()));+ run(Command::new("hdiutil")+ .args([+ "attach",+ "-nobrowse",+ "-readonly",+ "-noverify",+ "-mountpoint",+ ])+ .arg(&mount)+ .arg(dmg))?;+ let swapped = swap_bundle(&mount, &bundle);+ let _ = run(Command::new("hdiutil")+ .arg("detach")+ .arg(&mount)+ .arg("-quiet"));+ match swapped {+ Ok(()) => Ok(Installed::Replaced),+ Err(error) => {+ let _ = run(Command::new("open").arg(dmg));+ Err(error)+ }+ }+}++/// The app in `mount` copied beside `bundle`, then swapped in; the old+/// bundle is put back if the swap fails halfway.+fn swap_bundle(mount: &Path, bundle: &Path) -> Result<(), String> {+ let fresh = std::fs::read_dir(mount)+ .map_err(|error| format!("could not read the disk image: {error}"))?+ .flatten()+ .map(|entry| entry.path())+ .find(|path| path.extension().is_some_and(|extension| extension == "app"))+ .ok_or_else(|| "the disk image holds no app".to_owned())?;+ let staged = bundle.with_extension("app.new");+ let retired = bundle.with_extension("app.old");+ let _ = std::fs::remove_dir_all(&staged);+ let _ = std::fs::remove_dir_all(&retired);+ // ditto, not a copy of our own: it keeps the bundle's signature,+ // its links and its resource forks as the Finder would.+ run(Command::new("ditto").arg(&fresh).arg(&staged))?;+ std::fs::rename(bundle, &retired)+ .map_err(|error| format!("could not move {} aside: {error}", bundle.display()))?;+ if let Err(error) = std::fs::rename(&staged, bundle) {+ let _ = std::fs::rename(&retired, bundle);+ let _ = std::fs::remove_dir_all(&staged);+ return Err(format!("could not put the new app in place: {error}"));+ }+ let _ = std::fs::remove_dir_all(&retired);+ // The bundle came off the network, and Gatekeeper would refuse an+ // unsigned one for that - the README's own advice for a first install.+ let _ = run(Command::new("xattr")+ .args(["-dr", "com.apple.quarantine"])+ .arg(bundle));+ Ok(())+}++/// Writes the new AppImage over the file this one was started from, which+/// the environment names; the launcher entries that point at it keep+/// working.+fn replace_appimage(package: &Path) -> Result<Installed, String> {+ let target = std::env::var_os("APPIMAGE")+ .map(PathBuf::from)+ .ok_or_else(|| "this is not running as an AppImage".to_owned())?;+ let mut staged = target.clone().into_os_string();+ staged.push(".new");+ let staged = PathBuf::from(staged);+ std::fs::copy(package, &staged)+ .map_err(|error| format!("could not write {}: {error}", staged.display()))?;+ #[cfg(unix)]+ {+ use std::os::unix::fs::PermissionsExt;+ std::fs::set_permissions(&staged, std::fs::Permissions::from_mode(0o755))+ .map_err(|error| format!("could not mark {} executable: {error}", staged.display()))?;+ }+ std::fs::rename(&staged, &target)+ .map_err(|error| format!("could not replace {}: {error}", target.display()))?;+ Ok(Installed::Replaced)+}++/// Starts the build now in place a moment from now, so the caller can quit+/// first. Nothing on Windows, where the installer offers to start the app+/// itself.+pub fn relaunch() -> Result<(), String> {+ if cfg!(target_os = "macos") {+ let bundle = own_bundle().ok_or_else(|| "not running from an app bundle".to_owned())?;+ detach(+ Command::new("sh")+ .args(["-c", "sleep 1; open -n \"$0\""])+ .arg(bundle),+ )+ } else if cfg!(target_os = "linux") {+ let target = std::env::var_os("APPIMAGE")+ .map(PathBuf::from)+ .or_else(|| std::env::current_exe().ok())+ .ok_or_else(|| "could not tell what to start".to_owned())?;+ detach(+ Command::new("sh")+ .args(["-c", "sleep 1; exec \"$0\""])+ .arg(target),+ )+ } else {+ Ok(())+ }+}++/// Runs a command to its end and reads its failure off standard error.+fn run(command: &mut Command) -> Result<(), String> {+ let program = command.get_program().to_string_lossy().into_owned();+ let output = command+ .output()+ .map_err(|error| format!("could not run {program}: {error}"))?;+ if output.status.success() {+ return Ok(());+ }+ let said = String::from_utf8_lossy(&output.stderr);+ let said = said.trim();+ Err(if said.is_empty() {+ format!("{program} failed ({})", output.status)+ } else {+ format!("{program} failed: {said}")+ })+}++/// Starts a command and lets it go, with no pipes back to this process.+fn detach(command: &mut Command) -> Result<(), String> {+ let program = command.get_program().to_string_lossy().into_owned();+ command+ .stdin(std::process::Stdio::null())+ .stdout(std::process::Stdio::null())+ .stderr(std::process::Stdio::null())+ .spawn()+ .map(|_| ())+ .map_err(|error| format!("could not start {program}: {error}"))+}++/// One GET, read whole as text. GitHub wants a user agent and says so with+/// a 403 otherwise.+fn get_text(url: &str) -> Result<String, String> {+ let agent = ureq::AgentBuilder::new()+ .timeout_connect(std::time::Duration::from_secs(20))+ .timeout_read(std::time::Duration::from_secs(30))+ .build();+ let response = agent+ .get(url)+ .set("User-Agent", &format!("Concat/{}", Version::current()))+ .set("Accept", "application/vnd.github+json")+ .call()+ .map_err(|error| match error {+ ureq::Error::Status(code, response) => {+ let body = response.into_string().unwrap_or_default();+ let said = serde_json::from_str::<serde_json::Value>(&body)+ .map(|value| github_message(&value))+ .unwrap_or_else(|_| body.chars().take(200).collect());+ format!("{url} answered {code}: {said}")+ }+ other => format!("{url} did not answer: {other}"),+ })?;+ response+ .into_string()+ .map_err(|error| format!("{url} was cut short: {error}"))+}++#[cfg(test)]+mod tests {+ use super::*;++ #[test]+ fn a_version_reads_a_tag_and_orders_by_its_numbers() {+ assert_eq!(Version::parse("v0.2.5"), Some(Version::new(0, 2, 5)));+ assert_eq!(Version::parse("0.2.5"), Some(Version::new(0, 2, 5)));+ assert_eq!(Version::parse(" v1.0.0 "), Some(Version::new(1, 0, 0)));+ for not_a_release in ["v0.3.0-beta.1", "nightly", "0.2", "0.2.5.1", "", "v"] {+ assert_eq!(Version::parse(not_a_release), None, "{not_a_release:?}");+ }+ // By number, not by text: ten comes after nine.+ assert!(Version::new(0, 2, 10) > Version::new(0, 2, 9));+ assert!(Version::new(0, 3, 0) > Version::new(0, 2, 99));+ assert!(Version::new(1, 0, 0) > Version::new(0, 9, 9));+ assert_eq!(Version::new(0, 2, 5).to_string(), "0.2.5");+ assert_eq!(Version::new(0, 2, 5).tag(), "v0.2.5");+ assert!(Version::current() >= Version::new(0, 2, 4));+ }++ const RELEASES: &str = r#"[+ {"tag_name": "nightly", "draft": false, "prerelease": true, "published_at": "2026-10-03T01:00:00Z"},+ {"tag_name": "v0.2.7", "draft": true, "prerelease": false, "published_at": null},+ {"tag_name": "v0.3.0-beta.1", "draft": false, "prerelease": true, "published_at": "2026-10-02T12:00:00Z"},+ {"tag_name": "v0.2.5", "draft": false, "prerelease": false, "published_at": "2026-09-28T09:30:00Z"},+ {"tag_name": "v0.2.6", "draft": false, "prerelease": false, "published_at": "2026-10-01T17:34:02Z"},+ {"tag_name": "v0.2.4", "draft": false, "prerelease": false, "published_at": "2026-09-24T17:34:02Z"},+ {"tag_name": "v0.2.6", "draft": false, "prerelease": false, "published_at": "2026-10-01T17:34:02Z"}+ ]"#;++ #[test]+ fn the_list_keeps_stable_releases_from_the_first_switchable_newest_first() {+ let releases = releases_from_json(RELEASES).expect("reads");+ let versions: Vec<String> = releases+ .iter()+ .map(|release| release.version.to_string())+ .collect();+ assert_eq!(versions, ["0.2.6", "0.2.5"]);+ assert_eq!(releases[0].tag, "v0.2.6");+ assert_eq!(releases[0].published, "2026-10-01");+ assert_eq!(releases[1].published, "2026-09-28");+ assert!(releases_from_json("[]").expect("reads").is_empty());+ }++ #[test]+ fn a_refusal_from_github_is_read_out_in_its_own_words() {+ let error = releases_from_json(r#"{"message": "API rate limit exceeded for 1.2.3.4."}"#)+ .expect_err("refused");+ assert!(error.contains("rate limit"), "{error}");+ assert!(releases_from_json("not json").is_err());+ }++ #[test]+ fn standing_says_where_this_build_sits() {+ let releases = releases_from_json(RELEASES).expect("reads");+ assert_eq!(+ standing(Version::new(0, 2, 5), &releases),+ Standing::Behind(Version::new(0, 2, 6))+ );+ assert_eq!(standing(Version::new(0, 2, 6), &releases), Standing::Latest);+ assert_eq!(standing(Version::new(0, 2, 7), &releases), Standing::Ahead);+ assert_eq!(standing(Version::new(0, 2, 6), &[]), Standing::NoReleases);+ }++ const MANIFEST: &str = r#"{+ "schema": 2, "version": "0.2.6", "tag": "v0.2.6",+ "binaries": {+ "macos": {"arm64": {"dmg": {"file": "Concat-0.2.6-macos-arm64.dmg", "url": "https://example.test/arm64.dmg", "bytes": 59456586, "sha256": "26cc"}}},+ "linux": {"x86_64": {"appimage": {"file": "Concat-0.2.6-linux-x86_64.AppImage", "url": "https://example.test/x.AppImage", "bytes": 1, "sha256": "5c75"},+ "deb": {"file": "../evil.deb", "url": "https://example.test/evil", "bytes": 1, "sha256": "00"}}},+ "windows": {"aarch64": {"setup": {"file": "Concat-0.2.6-windows-aarch64-setup.exe", "url": "https://example.test/setup.exe", "sha256": "7042"}}}+ }+ }"#;++ #[test]+ fn the_package_is_found_by_platform_architecture_and_kind() {+ let mac =+ package_from_manifest(MANIFEST, "macos", "aarch64", PackageKind::Dmg).expect("a Mac's");+ assert_eq!(mac.file, "Concat-0.2.6-macos-arm64.dmg");+ assert_eq!(mac.bytes, 59456586);+ assert_eq!(mac.sha256, "26cc");+ let appimage = package_from_manifest(MANIFEST, "linux", "x86_64", PackageKind::AppImage)+ .expect("an AppImage");+ assert_eq!(appimage.url, "https://example.test/x.AppImage");+ // A size the manifest leaves out is zero, not a refusal.+ let setup = package_from_manifest(MANIFEST, "windows", "aarch64", PackageKind::Setup)+ .expect("an installer");+ assert_eq!(setup.bytes, 0);+ let missing = package_from_manifest(MANIFEST, "windows", "x86_64", PackageKind::Setup)+ .expect_err("no x86_64 Windows build in this manifest");+ assert!(+ missing.contains("no setup package for windows x86_64"),+ "{missing}"+ );+ // A file name with a folder in it is not a file name.+ let evil = package_from_manifest(MANIFEST, "linux", "x86_64", PackageKind::Deb)+ .expect_err("refused");+ assert!(evil.contains("not a file name"), "{evil}");+ }++ #[test]+ fn the_manifest_names_a_mac_arm64_and_everything_else_aarch64() {+ assert_eq!(manifest_arch("macos", "aarch64"), "arm64");+ assert_eq!(manifest_arch("macos", "x86_64"), "x86_64");+ assert_eq!(manifest_arch("linux", "aarch64"), "aarch64");+ assert_eq!(manifest_arch("windows", "aarch64"), "aarch64");+ }++ #[test]+ fn a_linux_install_is_told_by_what_is_on_the_machine() {+ assert_eq!(+ linux_kind(true, false, false, false, false),+ Ok(PackageKind::AppImage)+ );+ assert_eq!(+ linux_kind(false, false, true, false, false),+ Ok(PackageKind::Deb)+ );+ assert_eq!(+ linux_kind(false, false, false, true, false),+ Ok(PackageKind::Pacman)+ );+ assert_eq!(+ linux_kind(false, false, false, false, true),+ Ok(PackageKind::Rpm)+ );+ // A Flatpak is a Flatpak whatever else the environment says.+ assert_eq!(+ linux_kind(true, true, true, false, false),+ Err(Fixed::Flatpak)+ );+ assert_eq!(+ linux_kind(false, false, false, false, false),+ Err(Fixed::NotFromPackage)+ );+ for kind in [+ PackageKind::Dmg,+ PackageKind::Setup,+ PackageKind::AppImage,+ PackageKind::Deb,+ PackageKind::Rpm,+ PackageKind::Pacman,+ ] {+ assert!(!kind.key().is_empty());+ }+ assert_eq!(+ manifest_url("v0.2.6"),+ "https://github.com/jub0t/Concat/releases/download/v0.2.6/manifest.json"+ );+ }++ #[test]+ fn the_updates_folder_hangs_off_the_data_directory() {+ let dirs = AppDirs::under(Path::new("/tmp/concat-updates-test"));+ assert_eq!(folder(&dirs), Path::new("/tmp/concat-updates-test/updates"));+ }+}diff --git a/src/crates/concat/locales/de.json b/src/crates/concat/locales/de.jsonindex f9281908..f497982f 100644--- a/src/crates/concat/locales/de.json+++ b/src/crates/concat/locales/de.json@@ -699,24 +699,34 @@"settings.about": "Über","settings.accent": "Akzent","settings.address": "Adresse",+ "settings.aheadOfReleases": "Dieser Build, {0}, ist neuer als jede Veröffentlichung.","settings.amber": "Amber","settings.appearance": "Darstellung","settings.automatic": "Automatisch",+ "settings.checkForUpdates": "Nach Updates suchen",+ "settings.checkingForUpdates": "Wird geprüft…","settings.concat": "Concat {0}","settings.concatsMirror": "Concats Spiegel","settings.copySystemInformation": "Systeminformationen kopieren",+ "settings.couldNotCheck": "Updates konnten nicht geprüft werden: {0}",+ "settings.couldNotInstall": "Concat {0} konnte nicht installiert werden: {1}","settings.couldNotShowLog": "Das Protokoll konnte nicht angezeigt werden: {0}","settings.customUrl": "Eigene URL","settings.dark": "Dunkel","settings.default": "Standard","settings.deletingClipPullsWhat": "Ein, Löschen eines Clips zieht alles, was auf derselben Spur folgt, in die Lücke, und Kürzen einer Kante nimmt den Rest der Spur mit. Aus, Löschen lässt eine Lücke und Kürzen bewegt nur die Kante. Umschalt-Löschen schließt die Lücke in beiden Fällen.","settings.download": "Herunterladen",+ "settings.downloadingVersion": "Concat {0} wird heruntergeladen…","settings.downloads": "Downloads","settings.forMainlandChina": "Für Festlandchina",+ "settings.fromFlatpak": "Als Flatpak installiert: Updates kommen über Flatpak.",+ "settings.fromStore": "Updates kommen über den Store.","settings.general": "Allgemein","settings.hideTheToken": "Token ausblenden","settings.inUse": "In Verwendung",+ "settings.install": "Installieren","settings.installedMbOnDisk": "{0} installiert · {1} MB belegt",+ "settings.installerOpened": "Das Installationsprogramm für Concat {0} ist geöffnet. Concat wird jetzt geschlossen, damit es fertig werden kann.","settings.language": "Sprache","settings.light": "Hell","settings.lime": "Limette",@@ -730,10 +740,13 @@"settings.models": "Modelle","settings.modelsFetchedFirstTime": "Modelle werden geladen, wenn eine Funktion sie zum ersten Mal braucht. Hier sucht der Download zuerst; alle anderen Quellen werden danach trotzdem versucht.","settings.newToken": "Neues Token",+ "settings.noReleasesYet": "Noch keine Version ab 0.2.5 erschienen.","settings.notAnAddress": "{0} ist keine Adresse wie 127.0.0.1:7420",+ "settings.notFromPackage": "Dieser Build wurde nicht aus einem Paket installiert, es gibt also nichts, was an seine Stelle treten könnte.","settings.off": "Aus","settings.offClickRulerPast": "Off, a click on the ruler past the last clip lands the playhead there, and a clip placed at the playhead goes with it. On, the playhead never leaves the content.","settings.originalSource": "Ursprüngliche Quelle",+ "settings.packageOpened": "Concat {0} ist heruntergeladen und im Paketinstaller geöffnet. Installiere es dort und starte Concat dann neu.","settings.playhead": "Playhead","settings.remote": "Fernzugriff","settings.remoteControl": "Fernsteuerung",@@ -743,10 +756,17 @@"settings.showTheLog": "Protokoll anzeigen","settings.showTheToken": "Token anzeigen","settings.sky": "Sky",+ "settings.switchVersion": "Version wechseln",+ "settings.switchVersionNote": "Jede Version ab 0.2.5 kann an die Stelle dieser treten, neuer oder älter. Frühere Versionen haben keinen Weg zurück nach oben und werden daher nicht angeboten.","settings.systemInformation": "Systeminformationen","settings.theme": "Design",+ "settings.thisVersion": "diese Version","settings.token": "Token","settings.unpacking": "Wird entpackt…",+ "settings.upToDate": "Concat {0} ist die neueste Version.",+ "settings.updateAvailable": "Concat {0} ist erschienen. Dies ist {1}.",+ "settings.version": "Version",+ "settings.versionInstalled": "Concat {0} ist installiert. Concat startet jetzt neu.","settings.violet": "Violett","settings.voices": "Stimmen","settings.whatConnectionMustPresent": "Was eine Verbindung vor ihrem ersten Aufruf vorzeigen muss. Bleibt es leer, denkt sich der Server bei jedem Start eines aus und zeigt es hier.",diff --git a/src/crates/concat/locales/en.json b/src/crates/concat/locales/en.jsonindex 88fa33b3..5a6fa9c1 100644--- a/src/crates/concat/locales/en.json+++ b/src/crates/concat/locales/en.json@@ -699,24 +699,34 @@"settings.about": "About","settings.accent": "Accent","settings.address": "Address",+ "settings.aheadOfReleases": "This build, {0}, is newer than any release.","settings.amber": "Amber","settings.appearance": "Appearance","settings.automatic": "Automatic",+ "settings.checkForUpdates": "Check for updates",+ "settings.checkingForUpdates": "Checking…","settings.concat": "Concat {0}","settings.concatsMirror": "Concat's mirror","settings.copySystemInformation": "Copy system information",+ "settings.couldNotCheck": "Could not check for updates: {0}",+ "settings.couldNotInstall": "Could not install Concat {0}: {1}","settings.couldNotShowLog": "Could not show the log: {0}","settings.customUrl": "Custom URL","settings.dark": "Dark","settings.default": "Default","settings.deletingClipPullsWhat": "On, deleting a clip pulls what follows it on the same track into the gap, and trimming an edge moves the rest of the track with it. Off, a delete leaves a gap and a trim moves only the edge. Shift-Delete closes the gap either way.","settings.download": "Download",+ "settings.downloadingVersion": "Downloading Concat {0}…","settings.downloads": "Downloads","settings.forMainlandChina": "For mainland China",+ "settings.fromFlatpak": "Installed as a Flatpak: updates come through Flatpak.",+ "settings.fromStore": "Updates come through the store.","settings.general": "General","settings.hideTheToken": "Hide the token","settings.inUse": "In use",+ "settings.install": "Install","settings.installedMbOnDisk": "{0} installed · {1} MB on disk",+ "settings.installerOpened": "The installer for Concat {0} is open. Concat closes now so it can finish.","settings.language": "Language","settings.light": "Light","settings.lime": "Lime",@@ -730,10 +740,13 @@"settings.models": "Models","settings.modelsFetchedFirstTime": "Models are fetched the first time a feature needs one. This is where the download looks first; every other source is still tried after it.","settings.newToken": "New token",+ "settings.noReleasesYet": "No release from 0.2.5 on is out yet.","settings.notAnAddress": "{0} is not an address like 127.0.0.1:7420",+ "settings.notFromPackage": "This build was not installed from a package, so there is nothing to put in its place.","settings.off": "Off","settings.offClickRulerPast": "Off, a click on the ruler past the last clip lands the playhead there, and a clip placed at the playhead goes with it. On, the playhead never leaves the content.","settings.originalSource": "Original source",+ "settings.packageOpened": "Concat {0} is downloaded and open in the package installer. Install it there, then start Concat again.","settings.playhead": "Playhead","settings.remote": "Remote","settings.remoteControl": "Remote control",@@ -743,10 +756,17 @@"settings.showTheLog": "Show the log","settings.showTheToken": "Show the token","settings.sky": "Sky",+ "settings.switchVersion": "Switch version",+ "settings.switchVersionNote": "Any release from 0.2.5 on can be put in this one's place, newer or older. Earlier releases have no way back up, so they are not offered.","settings.systemInformation": "System information","settings.theme": "Theme",+ "settings.thisVersion": "this version","settings.token": "Token","settings.unpacking": "Unpacking…",+ "settings.upToDate": "Concat {0} is the latest release.",+ "settings.updateAvailable": "Concat {0} is out. This is {1}.",+ "settings.version": "Version",+ "settings.versionInstalled": "Concat {0} is installed. Concat starts again now.","settings.violet": "Violet","settings.voices": "Voices","settings.whatConnectionMustPresent": "What a connection must present before its first call. Left empty, the server makes one up each time it starts and shows it here.",diff --git a/src/crates/concat/locales/es.json b/src/crates/concat/locales/es.jsonindex 634ee395..db00d975 100644--- a/src/crates/concat/locales/es.json+++ b/src/crates/concat/locales/es.json@@ -699,24 +699,34 @@"settings.about": "Acerca de","settings.accent": "Acento","settings.address": "Dirección",+ "settings.aheadOfReleases": "Esta compilación, {0}, es más reciente que cualquier versión publicada.","settings.amber": "Ámbar","settings.appearance": "Apariencia","settings.automatic": "Automático",+ "settings.checkForUpdates": "Buscar actualizaciones",+ "settings.checkingForUpdates": "Comprobando…","settings.concat": "Concat {0}","settings.concatsMirror": "Espejo de Concat","settings.copySystemInformation": "Copiar información del sistema",+ "settings.couldNotCheck": "No se pudieron buscar actualizaciones: {0}",+ "settings.couldNotInstall": "No se pudo instalar Concat {0}: {1}","settings.couldNotShowLog": "No se pudo mostrar el registro: {0}","settings.customUrl": "URL personalizada","settings.dark": "Oscuro","settings.default": "Predeterminado","settings.deletingClipPullsWhat": "Activado, eliminar un clip arrastra lo que le sigue en la misma pista hacia el hueco, y recortar un borde mueve el resto de la pista con él. Desactivado, eliminar deja un hueco y recortar mueve solo el borde. Mayús-Supr cierra el hueco en ambos casos.","settings.download": "Descargar",+ "settings.downloadingVersion": "Descargando Concat {0}…","settings.downloads": "Descargas","settings.forMainlandChina": "Para China continental",+ "settings.fromFlatpak": "Instalado como Flatpak: las actualizaciones llegan a través de Flatpak.",+ "settings.fromStore": "Las actualizaciones llegan a través de la tienda.","settings.general": "General","settings.hideTheToken": "Ocultar el token","settings.inUse": "En uso",+ "settings.install": "Instalar","settings.installedMbOnDisk": "{0} instalados · {1} MB en disco",+ "settings.installerOpened": "El instalador de Concat {0} está abierto. Concat se cierra ahora para que pueda terminar.","settings.language": "Idioma","settings.light": "Claro","settings.lime": "Lima",@@ -730,10 +740,13 @@"settings.models": "Modelos","settings.modelsFetchedFirstTime": "Los modelos se descargan la primera vez que una función los necesita. Aquí busca primero la descarga; el resto de fuentes se prueban después.","settings.newToken": "Nuevo token",+ "settings.noReleasesYet": "Aún no hay ninguna versión a partir de la 0.2.5.","settings.notAnAddress": "{0} no es una dirección como 127.0.0.1:7420",+ "settings.notFromPackage": "Esta compilación no se instaló desde un paquete, así que no hay nada que poner en su lugar.","settings.off": "Apagado","settings.offClickRulerPast": "Off, a click on the ruler past the last clip lands the playhead there, and a clip placed at the playhead goes with it. On, the playhead never leaves the content.","settings.originalSource": "Fuente original",+ "settings.packageOpened": "Concat {0} se ha descargado y está abierto en el instalador de paquetes. Instálalo ahí y vuelve a abrir Concat.","settings.playhead": "Playhead","settings.remote": "Remoto","settings.remoteControl": "Control remoto",@@ -743,10 +756,17 @@"settings.showTheLog": "Mostrar el registro","settings.showTheToken": "Mostrar el token","settings.sky": "Sky",+ "settings.switchVersion": "Cambiar de versión",+ "settings.switchVersionNote": "Cualquier versión a partir de la 0.2.5 puede ocupar el lugar de esta, más nueva o más antigua. Las anteriores no tienen forma de volver a subir, así que no se ofrecen.","settings.systemInformation": "Información del sistema","settings.theme": "Tema",+ "settings.thisVersion": "esta versión","settings.token": "Token","settings.unpacking": "Desempaquetando…",+ "settings.upToDate": "Concat {0} es la última versión.",+ "settings.updateAvailable": "Concat {0} ya está disponible. Esta es la {1}.",+ "settings.version": "Versión",+ "settings.versionInstalled": "Concat {0} está instalado. Concat se reinicia ahora.","settings.violet": "Violeta","settings.voices": "Voces","settings.whatConnectionMustPresent": "Lo que una conexión debe presentar antes de su primera llamada. Si se deja vacío, el servidor inventa uno cada vez que arranca y lo muestra aquí.",diff --git a/src/crates/concat/locales/fa.json b/src/crates/concat/locales/fa.jsonindex f0e3c82a..8170812a 100644--- a/src/crates/concat/locales/fa.json+++ b/src/crates/concat/locales/fa.json@@ -699,24 +699,34 @@"settings.about": "درباره","settings.accent": "رنگ تأکید","settings.address": "آدرس",+ "settings.aheadOfReleases": "این ساخت، {0}، از هر نسخهٔ منتشرشده جدیدتر است.","settings.amber": "کهربایی","settings.appearance": "ظاهر","settings.automatic": "خودکار",+ "settings.checkForUpdates": "بررسی بهروزرسانیها",+ "settings.checkingForUpdates": "در حال بررسی…","settings.concat": "Concat {0}","settings.concatsMirror": "Mirror مربوط به Concat","settings.copySystemInformation": "کپی اطلاعات سیستم",+ "settings.couldNotCheck": "بررسی بهروزرسانیها ممکن نشد: {0}",+ "settings.couldNotInstall": "نصب Concat {0} ممکن نشد: {1}","settings.couldNotShowLog": "نمایش Log ممکن نشد: {0}","settings.customUrl": "URL سفارشی","settings.dark": "تیره","settings.default": "پیشفرض","settings.deletingClipPullsWhat": "در حالت On، حذف یک کلیپ هر چیزی را که بعد از آن روی همان ترک است به داخل فاصله میکشد و برش یک لبه بقیه ترک را همراه خود جابهجا میکند. در حالت خاموش، حذف یک فاصله باقی میگذارد و برش فقط لبه را جابهجا میکند. Shift-Delete در هر دو حالت فاصله را میبندد.","settings.download": "دانلود",+ "settings.downloadingVersion": "در حال بارگیری Concat {0}…","settings.downloads": "دانلودها","settings.forMainlandChina": "برای چینِ سرزمین اصلی",+ "settings.fromFlatpak": "بهصورت Flatpak نصب شده است: بهروزرسانیها از طریق Flatpak میآیند.",+ "settings.fromStore": "بهروزرسانیها از طریق فروشگاه میآیند.","settings.general": "عمومی","settings.hideTheToken": "مخفی کردن Token","settings.inUse": "در حال استفاده",+ "settings.install": "نصب","settings.installedMbOnDisk": "{0} نصب شده · {1} MB روی دیسک",+ "settings.installerOpened": "نصبکنندهٔ Concat {0} باز است. Concat اکنون بسته میشود تا نصب تمام شود.","settings.language": "زبان","settings.light": "روشن","settings.lime": "لیمویی",@@ -730,10 +740,13 @@"settings.models": "مدلها","settings.modelsFetchedFirstTime": "مدلها اولین باری که یک قابلیت به آنها نیاز داشته باشد دریافت میشوند. دانلود ابتدا این محل را بررسی میکند و سپس سایر منبعها نیز امتحان میشوند.","settings.newToken": "Token جدید",+ "settings.noReleasesYet": "هنوز نسخهای از 0.2.5 به بعد منتشر نشده است.","settings.notAnAddress": "{0} یک آدرس معتبر مثل 127.0.0.1:7420 نیست",+ "settings.notFromPackage": "این ساخت از یک بسته نصب نشده است، پس چیزی برای جایگزینی آن وجود ندارد.","settings.off": "خاموش","settings.offClickRulerPast": "در حالت خاموش، با کلیک روی خطکش بعد از آخرین کلیپ، نشانگر پخش همانجا قرار میگیرد و کلیپ قرارگرفته در نشانگر پخش نیز به همان نقطه میرود. در حالت On، نشانگر پخش هیچوقت از محدوده محتوا خارج نمیشود.","settings.originalSource": "منبع اصلی",+ "settings.packageOpened": "Concat {0} بارگیری شده و در نصبکنندهٔ بسته باز است. آن را همانجا نصب کنید و سپس Concat را دوباره اجرا کنید.","settings.playhead": "نشانگر پخش","settings.remote": "راه دور","settings.remoteControl": "کنترل از راه دور",@@ -743,10 +756,17 @@"settings.showTheLog": "نمایش گزارش","settings.showTheToken": "نمایش Token","settings.sky": "آسمان",+ "settings.switchVersion": "تغییر نسخه",+ "settings.switchVersionNote": "هر نسخه از 0.2.5 به بعد، جدیدتر یا قدیمیتر، میتواند جای این نسخه را بگیرد. نسخههای قدیمیتر راهی برای بازگشت به بالا ندارند، پس پیشنهاد نمیشوند.","settings.systemInformation": "اطلاعات سیستم","settings.theme": "تم",+ "settings.thisVersion": "این نسخه","settings.token": "توکن (Token)","settings.unpacking": "در حال بازکردن بسته…",+ "settings.upToDate": "Concat {0} آخرین نسخه است.",+ "settings.updateAvailable": "Concat {0} منتشر شده است. این نسخه {1} است.",+ "settings.version": "نسخه",+ "settings.versionInstalled": "Concat {0} نصب شد. Concat اکنون دوباره آغاز میشود.","settings.violet": "بنفش","settings.voices": "صداها","settings.whatConnectionMustPresent": "چیزی که اتصال باید پیش از اولین درخواست ارائه کند. اگر خالی بماند، سرور هر بار هنگام راهاندازی یک Token جدید میسازد و آن را اینجا نشان میدهد.",diff --git a/src/crates/concat/locales/fr.json b/src/crates/concat/locales/fr.jsonindex c67851b8..924cc477 100644--- a/src/crates/concat/locales/fr.json+++ b/src/crates/concat/locales/fr.json@@ -699,24 +699,34 @@"settings.about": "À propos","settings.accent": "Accent","settings.address": "Adresse",+ "settings.aheadOfReleases": "Cette compilation, {0}, est plus récente que toute version publiée.","settings.amber": "Ambre","settings.appearance": "Apparence","settings.automatic": "Automatique",+ "settings.checkForUpdates": "Rechercher des mises à jour",+ "settings.checkingForUpdates": "Vérification…","settings.concat": "Concat {0}","settings.concatsMirror": "Miroir de Concat","settings.copySystemInformation": "Copier les informations système",+ "settings.couldNotCheck": "Impossible de rechercher des mises à jour : {0}",+ "settings.couldNotInstall": "Impossible d'installer Concat {0} : {1}","settings.couldNotShowLog": "Impossible d'afficher le journal : {0}","settings.customUrl": "URL personnalisée","settings.dark": "Sombre","settings.default": "Par défaut","settings.deletingClipPullsWhat": "Activé, supprimer un clip tire ce qui le suit sur la même piste dans l'espace laissé, et rogner un bord déplace le reste de la piste avec lui. Désactivé, une suppression laisse un espace et un rognage ne déplace que le bord. Maj-Suppr referme l'espace dans les deux cas.","settings.download": "Télécharger",+ "settings.downloadingVersion": "Téléchargement de Concat {0}…","settings.downloads": "Téléchargements","settings.forMainlandChina": "Pour la Chine continentale",+ "settings.fromFlatpak": "Installé en Flatpak : les mises à jour passent par Flatpak.",+ "settings.fromStore": "Les mises à jour passent par la boutique.","settings.general": "Général","settings.hideTheToken": "Masquer le jeton","settings.inUse": "Utilisé",+ "settings.install": "Installer","settings.installedMbOnDisk": "{0} installés · {1} Mo sur le disque",+ "settings.installerOpened": "L'installateur de Concat {0} est ouvert. Concat se ferme maintenant pour le laisser terminer.","settings.language": "Langue","settings.light": "Clair","settings.lime": "Citron vert",@@ -730,10 +740,13 @@"settings.models": "Modèles","settings.modelsFetchedFirstTime": "Les modèles sont téléchargés la première fois qu'une fonction en a besoin. C'est ici que le téléchargement cherche d'abord ; les autres sources sont essayées ensuite.","settings.newToken": "Nouveau jeton",+ "settings.noReleasesYet": "Aucune version à partir de la 0.2.5 n'est encore sortie.","settings.notAnAddress": "{0} n'est pas une adresse comme 127.0.0.1:7420",+ "settings.notFromPackage": "Cette compilation n'a pas été installée depuis un paquet, il n'y a donc rien à mettre à sa place.","settings.off": "Désactivé","settings.offClickRulerPast": "Off, a click on the ruler past the last clip lands the playhead there, and a clip placed at the playhead goes with it. On, the playhead never leaves the content.","settings.originalSource": "Source d'origine",+ "settings.packageOpened": "Concat {0} est téléchargé et ouvert dans l'installateur de paquets. Installez-le là, puis relancez Concat.","settings.playhead": "Playhead","settings.remote": "À distance","settings.remoteControl": "Contrôle à distance",@@ -743,10 +756,17 @@"settings.showTheLog": "Afficher le journal","settings.showTheToken": "Afficher le jeton","settings.sky": "Sky",+ "settings.switchVersion": "Changer de version",+ "settings.switchVersionNote": "Toute version à partir de la 0.2.5 peut prendre la place de celle-ci, plus récente ou plus ancienne. Les versions antérieures n'ont aucun moyen de remonter, elles ne sont donc pas proposées.","settings.systemInformation": "Informations système","settings.theme": "Thème",+ "settings.thisVersion": "cette version","settings.token": "Jeton","settings.unpacking": "Décompression…",+ "settings.upToDate": "Concat {0} est la dernière version.",+ "settings.updateAvailable": "Concat {0} est sorti. Ceci est la {1}.",+ "settings.version": "Version",+ "settings.versionInstalled": "Concat {0} est installé. Concat redémarre maintenant.","settings.violet": "Violet","settings.voices": "Voix","settings.whatConnectionMustPresent": "Ce qu'une connexion doit présenter avant son premier appel. Laissé vide, le serveur en invente un à chaque démarrage et l'affiche ici.",diff --git a/src/crates/concat/locales/hr.json b/src/crates/concat/locales/hr.jsonindex 4d015e25..35bee0e6 100644--- a/src/crates/concat/locales/hr.json+++ b/src/crates/concat/locales/hr.json@@ -699,24 +699,34 @@"settings.about": "O programu","settings.accent": "Naglasak","settings.address": "Adresa",+ "settings.aheadOfReleases": "Ova je gradnja, {0}, novija od bilo kojeg izdanja.","settings.amber": "Jantar","settings.appearance": "Izgled","settings.automatic": "Automatski",+ "settings.checkForUpdates": "Provjeri ažuriranja",+ "settings.checkingForUpdates": "Provjera…","settings.concat": "Concat {0}","settings.concatsMirror": "Concatov zrcalni poslužitelj","settings.copySystemInformation": "Kopiraj podatke o sustavu",+ "settings.couldNotCheck": "Ažuriranja nije bilo moguće provjeriti: {0}",+ "settings.couldNotInstall": "Concat {0} nije bilo moguće instalirati: {1}","settings.couldNotShowLog": "Zapisnik se ne može prikazati: {0}","settings.customUrl": "Vlastiti URL","settings.dark": "Tamno","settings.default": "Zadano","settings.deletingClipPullsWhat": "Uključeno, brisanje klipa povlači ono što slijedi na istoj traci u prazninu, a skraćivanje ruba pomiče ostatak trake s njim. Isključeno, brisanje ostavlja prazninu, a skraćivanje pomiče samo rub. Shift-Delete zatvara prazninu u oba slučaja.","settings.download": "Preuzmi",+ "settings.downloadingVersion": "Preuzimanje Concata {0}…","settings.downloads": "Preuzimanja","settings.forMainlandChina": "Za kontinentalnu Kinu",+ "settings.fromFlatpak": "Instalirano kao Flatpak: ažuriranja dolaze putem Flatpaka.",+ "settings.fromStore": "Ažuriranja dolaze putem trgovine.","settings.general": "Općenito","settings.hideTheToken": "Sakrij token","settings.inUse": "U uporabi",+ "settings.install": "Instaliraj","settings.installedMbOnDisk": "{0} instalirano · {1} MB na disku",+ "settings.installerOpened": "Instalacijski program za Concat {0} je otvoren. Concat se sada zatvara kako bi mogao završiti.","settings.language": "Jezik","settings.light": "Svijetlo","settings.lime": "Limeta",@@ -730,10 +740,13 @@"settings.models": "Modeli","settings.modelsFetchedFirstTime": "Modeli se preuzimaju kad ih neka značajka prvi put zatreba. Ovdje preuzimanje traži prvo; ostali izvori se ipak isprobaju nakon toga.","settings.newToken": "Novi token",+ "settings.noReleasesYet": "Još nema izdanja od 0.2.5 nadalje.","settings.notAnAddress": "{0} nije adresa poput 127.0.0.1:7420",+ "settings.notFromPackage": "Ova gradnja nije instalirana iz paketa, pa je nema čime zamijeniti.","settings.off": "Isključeno","settings.offClickRulerPast": "Isključeno: klik na ravnalo iza zadnjeg klipa spušta playhead tamo, a klip postavljen na playhead ide s njim. Uključeno: playhead nikad ne napušta sadržaj.","settings.originalSource": "Izvorni izvor",+ "settings.packageOpened": "Concat {0} je preuzet i otvoren u instalacijskom programu za pakete. Instalirajte ga ondje, a zatim ponovno pokrenite Concat.","settings.playhead": "Playhead","settings.remote": "Daljinski","settings.remoteControl": "Daljinsko upravljanje",@@ -743,10 +756,17 @@"settings.showTheLog": "Prikaži zapisnik","settings.showTheToken": "Prikaži token","settings.sky": "Nebo",+ "settings.switchVersion": "Promijeni verziju",+ "settings.switchVersionNote": "Svako izdanje od 0.2.5 nadalje, novije ili starije, može zamijeniti ovo. Ranija izdanja nemaju put natrag prema gore, pa se ne nude.","settings.systemInformation": "Podaci o sustavu","settings.theme": "Tema",+ "settings.thisVersion": "ova verzija","settings.token": "Token","settings.unpacking": "Raspakiranje…",+ "settings.upToDate": "Concat {0} je najnovije izdanje.",+ "settings.updateAvailable": "Concat {0} je izašao. Ovo je {1}.",+ "settings.version": "Verzija",+ "settings.versionInstalled": "Concat {0} je instaliran. Concat se sada ponovno pokreće.","settings.violet": "Ljubičasta","settings.voices": "Glasovi","settings.whatConnectionMustPresent": "Što veza mora predočiti prije prvog poziva. Ostane li prazno, poslužitelj ga sam smisli pri svakom pokretanju i prikaže ovdje.",diff --git a/src/crates/concat/locales/it.json b/src/crates/concat/locales/it.jsonindex 420a7e52..ee4b9c6a 100644--- a/src/crates/concat/locales/it.json+++ b/src/crates/concat/locales/it.json@@ -699,24 +699,34 @@"settings.about": "Informazioni","settings.accent": "Accento","settings.address": "Indirizzo",+ "settings.aheadOfReleases": "Questa build, {0}, è più recente di qualsiasi versione pubblicata.","settings.amber": "Ambra","settings.appearance": "Aspetto","settings.automatic": "Automatico",+ "settings.checkForUpdates": "Cerca aggiornamenti",+ "settings.checkingForUpdates": "Controllo in corso…","settings.concat": "Concat {0}","settings.concatsMirror": "Mirror di Concat","settings.copySystemInformation": "Copia informazioni di sistema",+ "settings.couldNotCheck": "Impossibile cercare aggiornamenti: {0}",+ "settings.couldNotInstall": "Impossibile installare Concat {0}: {1}","settings.couldNotShowLog": "Impossibile mostrare il registro: {0}","settings.customUrl": "URL personalizzato","settings.dark": "Scuro","settings.default": "Predefinito","settings.deletingClipPullsWhat": "Attivo, eliminare una clip tira ciò che la segue sulla stessa traccia dentro lo spazio, e accorciare un bordo sposta con sé il resto della traccia. Disattivato, un'eliminazione lascia uno spazio e un accorciamento sposta solo il bordo. Maiusc-Elimina chiude lo spazio in ogni caso.","settings.download": "Scarica",+ "settings.downloadingVersion": "Download di Concat {0}…","settings.downloads": "Download","settings.forMainlandChina": "Per la Cina continentale",+ "settings.fromFlatpak": "Installato come Flatpak: gli aggiornamenti arrivano tramite Flatpak.",+ "settings.fromStore": "Gli aggiornamenti arrivano tramite lo store.","settings.general": "Generale","settings.hideTheToken": "Nascondi il token","settings.inUse": "In uso",+ "settings.install": "Installa","settings.installedMbOnDisk": "{0} installati · {1} MB su disco",+ "settings.installerOpened": "Il programma di installazione di Concat {0} è aperto. Concat si chiude ora perché possa completarsi.","settings.language": "Lingua","settings.light": "Chiaro","settings.lime": "Lime",@@ -730,10 +740,13 @@"settings.models": "Modelli","settings.modelsFetchedFirstTime": "I modelli vengono scaricati la prima volta che una funzione ne ha bisogno. Qui il download cerca per primo; le altre fonti vengono comunque provate dopo.","settings.newToken": "Nuovo token",+ "settings.noReleasesYet": "Nessuna versione dalla 0.2.5 in poi è ancora uscita.","settings.notAnAddress": "{0} non è un indirizzo come 127.0.0.1:7420",+ "settings.notFromPackage": "Questa build non è stata installata da un pacchetto, quindi non c'è nulla da mettere al suo posto.","settings.off": "Spento","settings.offClickRulerPast": "Off, a click on the ruler past the last clip lands the playhead there, and a clip placed at the playhead goes with it. On, the playhead never leaves the content.","settings.originalSource": "Fonte originale",+ "settings.packageOpened": "Concat {0} è stato scaricato ed è aperto nel programma di installazione dei pacchetti. Installalo lì, poi riavvia Concat.","settings.playhead": "Playhead","settings.remote": "Remoto","settings.remoteControl": "Controllo remoto",@@ -743,10 +756,17 @@"settings.showTheLog": "Mostra il registro","settings.showTheToken": "Mostra il token","settings.sky": "Sky",+ "settings.switchVersion": "Cambia versione",+ "settings.switchVersionNote": "Qualsiasi versione dalla 0.2.5 in poi può prendere il posto di questa, più recente o più vecchia. Le versioni precedenti non hanno modo di risalire, quindi non vengono offerte.","settings.systemInformation": "Informazioni di sistema","settings.theme": "Tema",+ "settings.thisVersion": "questa versione","settings.token": "Token","settings.unpacking": "Estrazione…",+ "settings.upToDate": "Concat {0} è l'ultima versione.",+ "settings.updateAvailable": "Concat {0} è disponibile. Questa è la {1}.",+ "settings.version": "Versione",+ "settings.versionInstalled": "Concat {0} è installato. Concat si riavvia ora.","settings.violet": "Viola","settings.voices": "Voci","settings.whatConnectionMustPresent": "Ciò che una connessione deve presentare prima della prima chiamata. Se lasciato vuoto, il server ne inventa uno a ogni avvio e lo mostra qui.",diff --git a/src/crates/concat/locales/ja.json b/src/crates/concat/locales/ja.jsonindex 3f1c3fcf..a049bf51 100644--- a/src/crates/concat/locales/ja.json+++ b/src/crates/concat/locales/ja.json@@ -699,24 +699,34 @@"settings.about": "情報","settings.accent": "アクセント","settings.address": "アドレス",+ "settings.aheadOfReleases": "このビルド {0} は、どのリリースよりも新しいものです。","settings.amber": "アンバー","settings.appearance": "外観","settings.automatic": "自動",+ "settings.checkForUpdates": "アップデートを確認",+ "settings.checkingForUpdates": "確認中…","settings.concat": "Concat {0}","settings.concatsMirror": "Concat のミラー","settings.copySystemInformation": "システム情報をコピー",+ "settings.couldNotCheck": "アップデートを確認できませんでした: {0}",+ "settings.couldNotInstall": "Concat {0} をインストールできませんでした: {1}","settings.couldNotShowLog": "ログを表示できませんでした: {0}","settings.customUrl": "カスタム URL","settings.dark": "ダーク","settings.default": "デフォルト","settings.deletingClipPullsWhat": "オンのとき、クリップを削除すると同じトラックの後続が隙間に引き寄せられ、端をトリミングするとトラックの残りも一緒に動きます。オフのとき、削除は隙間を残し、トリミングは端だけを動かします。Shift-Delete はどちらでも隙間を詰めます。","settings.download": "ダウンロード",+ "settings.downloadingVersion": "Concat {0} をダウンロード中…","settings.downloads": "ダウンロード","settings.forMainlandChina": "中国本土向け",+ "settings.fromFlatpak": "Flatpak としてインストールされています。アップデートは Flatpak から行われます。",+ "settings.fromStore": "アップデートはストアから行われます。","settings.general": "一般","settings.hideTheToken": "トークンを隠す","settings.inUse": "使用中",+ "settings.install": "インストール","settings.installedMbOnDisk": "{0} 個インストール済み · ディスク上 {1} MB",+ "settings.installerOpened": "Concat {0} のインストーラーが開きました。完了できるように Concat を終了します。","settings.language": "言語","settings.light": "ライト","settings.lime": "ライム",@@ -730,10 +740,13 @@"settings.models": "モデル","settings.modelsFetchedFirstTime": "モデルは機能が初めて必要とした時に取得されます。ここで指定した場所を最初に探し、その後も他の配布元をすべて試します。","settings.newToken": "新しいトークン",+ "settings.noReleasesYet": "0.2.5 以降のリリースはまだありません。","settings.notAnAddress": "{0} は 127.0.0.1:7420 のようなアドレスではありません",+ "settings.notFromPackage": "このビルドはパッケージからインストールされていないため、入れ替えるものがありません。","settings.off": "オフ","settings.offClickRulerPast": "Off, a click on the ruler past the last clip lands the playhead there, and a clip placed at the playhead goes with it. On, the playhead never leaves the content.","settings.originalSource": "元の配布元",+ "settings.packageOpened": "Concat {0} をダウンロードし、パッケージインストーラーで開きました。そこでインストールしてから Concat を起動し直してください。","settings.playhead": "Playhead","settings.remote": "リモート","settings.remoteControl": "リモート操作",@@ -743,10 +756,17 @@"settings.showTheLog": "ログを表示","settings.showTheToken": "トークンを表示","settings.sky": "Sky",+ "settings.switchVersion": "バージョンを切り替える",+ "settings.switchVersionNote": "0.2.5 以降のリリースなら、新旧を問わずこのバージョンと入れ替えられます。それより前のリリースには戻る手段がないため、表示されません。","settings.systemInformation": "システム情報","settings.theme": "テーマ",+ "settings.thisVersion": "このバージョン","settings.token": "トークン","settings.unpacking": "展開中…",+ "settings.upToDate": "Concat {0} が最新のリリースです。",+ "settings.updateAvailable": "Concat {0} が公開されています。現在は {1} です。",+ "settings.version": "バージョン",+ "settings.versionInstalled": "Concat {0} をインストールしました。Concat を再起動します。","settings.violet": "バイオレット","settings.voices": "声","settings.whatConnectionMustPresent": "接続が最初の呼び出しの前に提示するもの。空のままにすると、サーバーは起動のたびに自分で作り、ここに表示します。",diff --git a/src/crates/concat/locales/ko.json b/src/crates/concat/locales/ko.jsonindex 21ffc80e..a8154452 100644--- a/src/crates/concat/locales/ko.json+++ b/src/crates/concat/locales/ko.json@@ -699,24 +699,34 @@"settings.about": "정보","settings.accent": "강조색","settings.address": "주소",+ "settings.aheadOfReleases": "이 빌드 {0}은(는) 어떤 릴리스보다 새롭습니다.","settings.amber": "앰버","settings.appearance": "화면","settings.automatic": "자동",+ "settings.checkForUpdates": "업데이트 확인",+ "settings.checkingForUpdates": "확인 중…","settings.concat": "Concat {0}","settings.concatsMirror": "Concat 미러","settings.copySystemInformation": "시스템 정보 복사",+ "settings.couldNotCheck": "업데이트를 확인할 수 없습니다: {0}",+ "settings.couldNotInstall": "Concat {0}을(를) 설치할 수 없습니다: {1}","settings.couldNotShowLog": "로그를 표시할 수 없습니다: {0}","settings.customUrl": "사용자 지정 URL","settings.dark": "다크","settings.default": "기본","settings.deletingClipPullsWhat": "켜면 클립을 삭제할 때 같은 트랙의 뒤따르는 클립이 빈틈으로 당겨지고, 가장자리를 다듬으면 트랙의 나머지가 함께 움직입니다. 끄면 삭제는 빈틈을 남기고 다듬기는 가장자리만 움직입니다. Shift-Delete는 어느 쪽이든 빈틈을 닫습니다.","settings.download": "다운로드",+ "settings.downloadingVersion": "Concat {0} 다운로드 중…","settings.downloads": "다운로드","settings.forMainlandChina": "중국 본토용",+ "settings.fromFlatpak": "Flatpak으로 설치되었습니다. 업데이트는 Flatpak을 통해 이루어집니다.",+ "settings.fromStore": "업데이트는 스토어를 통해 이루어집니다.","settings.general": "일반","settings.hideTheToken": "토큰 숨기기","settings.inUse": "사용 중",+ "settings.install": "설치","settings.installedMbOnDisk": "{0}개 설치됨 · 디스크 {1} MB",+ "settings.installerOpened": "Concat {0} 설치 프로그램이 열렸습니다. 설치를 마칠 수 있도록 Concat을 종료합니다.","settings.language": "언어","settings.light": "라이트","settings.lime": "라임",@@ -730,10 +740,13 @@"settings.models": "모델","settings.modelsFetchedFirstTime": "모델은 기능이 처음 필요로 할 때 내려받습니다. 여기서 먼저 찾고, 그다음에도 다른 출처를 모두 시도합니다.","settings.newToken": "새 토큰",+ "settings.noReleasesYet": "0.2.5 이후 릴리스가 아직 없습니다.","settings.notAnAddress": "{0}은(는) 127.0.0.1:7420 같은 주소가 아닙니다",+ "settings.notFromPackage": "이 빌드는 패키지로 설치되지 않았으므로 대체할 것이 없습니다.","settings.off": "끔","settings.offClickRulerPast": "Off, a click on the ruler past the last clip lands the playhead there, and a clip placed at the playhead goes with it. On, the playhead never leaves the content.","settings.originalSource": "원본 출처",+ "settings.packageOpened": "Concat {0}을(를) 다운로드하여 패키지 설치 프로그램에서 열었습니다. 거기서 설치한 뒤 Concat을 다시 시작하세요.","settings.playhead": "Playhead","settings.remote": "원격","settings.remoteControl": "원격 제어",@@ -743,10 +756,17 @@"settings.showTheLog": "로그 표시","settings.showTheToken": "토큰 보기","settings.sky": "Sky",+ "settings.switchVersion": "버전 전환",+ "settings.switchVersionNote": "0.2.5 이후의 모든 릴리스는 더 새롭든 오래됐든 이 버전을 대체할 수 있습니다. 그 이전 릴리스는 다시 올라올 방법이 없어서 제공되지 않습니다.","settings.systemInformation": "시스템 정보","settings.theme": "테마",+ "settings.thisVersion": "이 버전","settings.token": "토큰","settings.unpacking": "압축 해제 중…",+ "settings.upToDate": "Concat {0}이(가) 최신 릴리스입니다.",+ "settings.updateAvailable": "Concat {0}이(가) 나왔습니다. 현재 버전은 {1}입니다.",+ "settings.version": "버전",+ "settings.versionInstalled": "Concat {0}이(가) 설치되었습니다. Concat을 다시 시작합니다.","settings.violet": "바이올렛","settings.voices": "목소리","settings.whatConnectionMustPresent": "연결이 첫 호출 전에 제시해야 하는 값입니다. 비워 두면 서버가 시작할 때마다 하나를 만들어 여기에 표시합니다.",diff --git a/src/crates/concat/locales/pt-BR.json b/src/crates/concat/locales/pt-BR.jsonindex 0a4ffb73..26ea3004 100644--- a/src/crates/concat/locales/pt-BR.json+++ b/src/crates/concat/locales/pt-BR.json@@ -699,24 +699,34 @@"settings.about": "Sobre","settings.accent": "Destaque","settings.address": "Endereço",+ "settings.aheadOfReleases": "Esta compilação, {0}, é mais nova que qualquer versão publicada.","settings.amber": "Âmbar","settings.appearance": "Aparência","settings.automatic": "Automático",+ "settings.checkForUpdates": "Verificar atualizações",+ "settings.checkingForUpdates": "Verificando…","settings.concat": "Concat {0}","settings.concatsMirror": "Espelho do Concat","settings.copySystemInformation": "Copiar informações do sistema",+ "settings.couldNotCheck": "Não foi possível verificar atualizações: {0}",+ "settings.couldNotInstall": "Não foi possível instalar o Concat {0}: {1}","settings.couldNotShowLog": "Não foi possível mostrar o log: {0}","settings.customUrl": "URL personalizada","settings.dark": "Escuro","settings.default": "Padrão","settings.deletingClipPullsWhat": "Ligado, excluir um clipe puxa o que vem depois dele na mesma faixa para a lacuna, e aparar uma borda move o resto da faixa junto. Desligado, uma exclusão deixa uma lacuna e um aparo move só a borda. Shift-Delete fecha a lacuna de qualquer jeito.","settings.download": "Baixar",+ "settings.downloadingVersion": "Baixando o Concat {0}…","settings.downloads": "Downloads","settings.forMainlandChina": "Para a China continental",+ "settings.fromFlatpak": "Instalado como Flatpak: as atualizações vêm pelo Flatpak.",+ "settings.fromStore": "As atualizações vêm pela loja.","settings.general": "Geral","settings.hideTheToken": "Ocultar o token","settings.inUse": "Em uso",+ "settings.install": "Instalar","settings.installedMbOnDisk": "{0} instalados · {1} MB em disco",+ "settings.installerOpened": "O instalador do Concat {0} está aberto. O Concat fecha agora para que ele possa terminar.","settings.language": "Idioma","settings.light": "Claro","settings.lime": "Limão",@@ -730,10 +740,13 @@"settings.models": "Modelos","settings.modelsFetchedFirstTime": "Os modelos são baixados na primeira vez que um recurso precisa deles. Aqui o download procura primeiro; as outras fontes ainda são tentadas depois.","settings.newToken": "Novo token",+ "settings.noReleasesYet": "Ainda não há nenhuma versão a partir da 0.2.5.","settings.notAnAddress": "{0} não é um endereço como 127.0.0.1:7420",+ "settings.notFromPackage": "Esta compilação não foi instalada a partir de um pacote, então não há o que colocar no lugar dela.","settings.off": "Desligado","settings.offClickRulerPast": "Off, a click on the ruler past the last clip lands the playhead there, and a clip placed at the playhead goes with it. On, the playhead never leaves the content.","settings.originalSource": "Fonte original",+ "settings.packageOpened": "O Concat {0} foi baixado e está aberto no instalador de pacotes. Instale-o lá e abra o Concat de novo.","settings.playhead": "Playhead","settings.remote": "Remoto","settings.remoteControl": "Controle remoto",@@ -743,10 +756,17 @@"settings.showTheLog": "Mostrar o log","settings.showTheToken": "Mostrar o token","settings.sky": "Sky",+ "settings.switchVersion": "Trocar de versão",+ "settings.switchVersionNote": "Qualquer versão a partir da 0.2.5 pode tomar o lugar desta, mais nova ou mais antiga. As anteriores não têm como voltar para cima, por isso não são oferecidas.","settings.systemInformation": "Informações do sistema","settings.theme": "Tema",+ "settings.thisVersion": "esta versão","settings.token": "Token","settings.unpacking": "Descompactando…",+ "settings.upToDate": "O Concat {0} é a versão mais recente.",+ "settings.updateAvailable": "O Concat {0} já saiu. Esta é a {1}.",+ "settings.version": "Versão",+ "settings.versionInstalled": "O Concat {0} está instalado. O Concat reinicia agora.","settings.violet": "Violeta","settings.voices": "Vozes","settings.whatConnectionMustPresent": "O que uma conexão precisa apresentar antes da primeira chamada. Se ficar vazio, o servidor inventa um a cada início e o mostra aqui.",diff --git a/src/crates/concat/locales/ru.json b/src/crates/concat/locales/ru.jsonindex 4122b363..f4739ca4 100644--- a/src/crates/concat/locales/ru.json+++ b/src/crates/concat/locales/ru.json@@ -699,24 +699,34 @@"settings.about": "О программе","settings.accent": "Акцент","settings.address": "Адрес",+ "settings.aheadOfReleases": "Эта сборка, {0}, новее любого выпуска.","settings.amber": "Янтарь","settings.appearance": "Оформление","settings.automatic": "Автоматически",+ "settings.checkForUpdates": "Проверить обновления",+ "settings.checkingForUpdates": "Проверка…","settings.concat": "Concat {0}","settings.concatsMirror": "Зеркало Concat","settings.copySystemInformation": "Копировать сведения о системе",+ "settings.couldNotCheck": "Не удалось проверить обновления: {0}",+ "settings.couldNotInstall": "Не удалось установить Concat {0}: {1}","settings.couldNotShowLog": "Не удалось показать журнал: {0}","settings.customUrl": "Свой URL","settings.dark": "Тёмная","settings.default": "По умолчанию","settings.deletingClipPullsWhat": "Вкл: удаление клипа подтягивает всё, что идёт за ним на той же дорожке, в пробел, а подрезка края двигает остаток дорожки вместе с ним. Выкл: удаление оставляет пробел, подрезка двигает только край. Shift-Delete закрывает пробел в любом случае.","settings.download": "Скачать",+ "settings.downloadingVersion": "Загрузка Concat {0}…","settings.downloads": "Загрузки","settings.forMainlandChina": "Для материкового Китая",+ "settings.fromFlatpak": "Установлено как Flatpak: обновления приходят через Flatpak.",+ "settings.fromStore": "Обновления приходят через магазин.","settings.general": "Общие","settings.hideTheToken": "Скрыть токен","settings.inUse": "Используется",+ "settings.install": "Установить","settings.installedMbOnDisk": "Установлено: {0} · {1} МБ на диске",+ "settings.installerOpened": "Установщик Concat {0} открыт. Concat сейчас закроется, чтобы установка могла завершиться.","settings.language": "Язык","settings.light": "Светлая","settings.lime": "Лайм",@@ -730,10 +740,13 @@"settings.models": "Модели","settings.modelsFetchedFirstTime": "Модели загружаются, когда функция впервые в них нуждается. Здесь загрузка ищет в первую очередь; остальные источники всё равно проверяются после.","settings.newToken": "Новый токен",+ "settings.noReleasesYet": "Выпусков начиная с 0.2.5 пока нет.","settings.notAnAddress": "{0} — не адрес вида 127.0.0.1:7420",+ "settings.notFromPackage": "Эта сборка установлена не из пакета, поэтому заменить её нечем.","settings.off": "Выкл","settings.offClickRulerPast": "Выкл: щелчок по линейке за последним клипом ставит курсор туда, и клип, поставленный по курсору, ляжет там же. Вкл: курсор никогда не выходит за содержимое.","settings.originalSource": "Исходный источник",+ "settings.packageOpened": "Concat {0} загружен и открыт в установщике пакетов. Установите его там, а затем снова запустите Concat.","settings.playhead": "Курсор","settings.remote": "Удалённый доступ","settings.remoteControl": "Удалённое управление",@@ -743,10 +756,17 @@"settings.showTheLog": "Показать журнал","settings.showTheToken": "Показать токен","settings.sky": "Небо",+ "settings.switchVersion": "Сменить версию",+ "settings.switchVersionNote": "Любой выпуск начиная с 0.2.5, новее или старее, может занять место этого. У более ранних выпусков нет пути обратно наверх, поэтому они не предлагаются.","settings.systemInformation": "Сведения о системе","settings.theme": "Тема",+ "settings.thisVersion": "эта версия","settings.token": "Токен","settings.unpacking": "Распаковка…",+ "settings.upToDate": "Concat {0} — последний выпуск.",+ "settings.updateAvailable": "Вышел Concat {0}. Сейчас установлена {1}.",+ "settings.version": "Версия",+ "settings.versionInstalled": "Concat {0} установлен. Concat сейчас перезапустится.","settings.violet": "Фиолетовый","settings.voices": "Голоса","settings.whatConnectionMustPresent": "Что соединение должно предъявить перед первым вызовом. Если оставить пустым, сервер сам придумает его при каждом запуске и покажет здесь.",diff --git a/src/crates/concat/locales/tr.json b/src/crates/concat/locales/tr.jsonindex 745242bd..2cda9f40 100644--- a/src/crates/concat/locales/tr.json+++ b/src/crates/concat/locales/tr.json@@ -699,24 +699,34 @@"settings.about": "Hakkında","settings.accent": "Vurgu","settings.address": "Adres",+ "settings.aheadOfReleases": "Bu yapı ({0}) yayımlanmış her sürümden daha yeni.","settings.amber": "Amber","settings.appearance": "Görünüm","settings.automatic": "Otomatik",+ "settings.checkForUpdates": "Güncellemeleri denetle",+ "settings.checkingForUpdates": "Denetleniyor…","settings.concat": "Concat {0}","settings.concatsMirror": "Concat yansısı","settings.copySystemInformation": "Sistem bilgilerini kopyala",+ "settings.couldNotCheck": "Güncellemeler denetlenemedi: {0}",+ "settings.couldNotInstall": "Concat {0} yüklenemedi: {1}","settings.couldNotShowLog": "Günlük gösterilemedi: {0}","settings.customUrl": "Özel URL","settings.dark": "Koyu","settings.default": "Varsayılan","settings.deletingClipPullsWhat": "Açıkken bir klibi silmek aynı parçada onu izleyenleri boşluğa çeker ve bir kenarı kırpmak parçanın geri kalanını da onunla taşır. Kapalıyken silme bir boşluk bırakır ve kırpma yalnızca kenarı taşır. Shift-Delete her iki durumda da boşluğu kapatır.","settings.download": "İndir",+ "settings.downloadingVersion": "Concat {0} indiriliyor…","settings.downloads": "İndirmeler","settings.forMainlandChina": "Çin anakarası için",+ "settings.fromFlatpak": "Flatpak olarak yüklü: güncellemeler Flatpak üzerinden gelir.",+ "settings.fromStore": "Güncellemeler mağaza üzerinden gelir.","settings.general": "Genel","settings.hideTheToken": "Belirteci gizle","settings.inUse": "Kullanımda",+ "settings.install": "Yükle","settings.installedMbOnDisk": "{0} kurulu · diskte {1} MB",+ "settings.installerOpened": "Concat {0} yükleyicisi açıldı. Yüklemenin bitebilmesi için Concat şimdi kapanıyor.","settings.language": "Dil","settings.light": "Açık","settings.lime": "Limon yeşili",@@ -730,10 +740,13 @@"settings.models": "Modeller","settings.modelsFetchedFirstTime": "Modeller bir özellik ilk kez ihtiyaç duyduğunda indirilir. İndirme önce buraya bakar; diğer tüm kaynaklar yine de sonra denenir.","settings.newToken": "Yeni belirteç",+ "settings.noReleasesYet": "0.2.5 ve sonrası için henüz bir sürüm yok.","settings.notAnAddress": "{0}, 127.0.0.1:7420 gibi bir adres değil",+ "settings.notFromPackage": "Bu yapı bir paketten yüklenmedi, dolayısıyla yerine konacak bir şey yok.","settings.off": "Kapalı","settings.offClickRulerPast": "Off, a click on the ruler past the last clip lands the playhead there, and a clip placed at the playhead goes with it. On, the playhead never leaves the content.","settings.originalSource": "Özgün kaynak",+ "settings.packageOpened": "Concat {0} indirildi ve paket yükleyicide açıldı. Orada yükleyin, sonra Concat'i yeniden başlatın.","settings.playhead": "Playhead","settings.remote": "Uzak","settings.remoteControl": "Uzaktan denetim",@@ -743,10 +756,17 @@"settings.showTheLog": "Günlüğü göster","settings.showTheToken": "Belirteci göster","settings.sky": "Sky",+ "settings.switchVersion": "Sürüm değiştir",+ "settings.switchVersionNote": "0.2.5 ve sonrasındaki her sürüm, daha yeni ya da daha eski, bunun yerine geçebilir. Daha önceki sürümlerin yukarı dönüş yolu olmadığından sunulmaz.","settings.systemInformation": "Sistem bilgileri","settings.theme": "Tema",+ "settings.thisVersion": "bu sürüm","settings.token": "Belirteç","settings.unpacking": "Açılıyor…",+ "settings.upToDate": "Concat {0} en son sürüm.",+ "settings.updateAvailable": "Concat {0} çıktı. Bu sürüm {1}.",+ "settings.version": "Sürüm",+ "settings.versionInstalled": "Concat {0} yüklendi. Concat şimdi yeniden başlıyor.","settings.violet": "Menekşe","settings.voices": "Sesler","settings.whatConnectionMustPresent": "Bir bağlantının ilk çağrısından önce sunması gereken şey. Boş bırakılırsa sunucu her başlatıldığında bir tane uydurur ve burada gösterir.",diff --git a/src/crates/concat/locales/zh-Hans.json b/src/crates/concat/locales/zh-Hans.jsonindex 48b2667a..61df08e0 100644--- a/src/crates/concat/locales/zh-Hans.json+++ b/src/crates/concat/locales/zh-Hans.json@@ -699,24 +699,34 @@"settings.about": "关于","settings.accent": "强调色","settings.address": "地址",+ "settings.aheadOfReleases": "此构建 {0} 比任何已发布版本都新。","settings.amber": "琥珀","settings.appearance": "外观","settings.automatic": "自动",+ "settings.checkForUpdates": "检查更新",+ "settings.checkingForUpdates": "正在检查…","settings.concat": "Concat {0}","settings.concatsMirror": "Concat 镜像","settings.copySystemInformation": "复制系统信息",+ "settings.couldNotCheck": "无法检查更新:{0}",+ "settings.couldNotInstall": "无法安装 Concat {0}:{1}","settings.couldNotShowLog": "无法显示日志:{0}","settings.customUrl": "自定义 URL","settings.dark": "深色","settings.default": "默认","settings.deletingClipPullsWhat": "开启时,删除片段会把同一轨道上其后的内容拉进空隙,修剪边缘时轨道上的其余内容也随之移动。关闭时,删除会留下空隙,修剪只移动边缘。无论开关与否,Shift-Delete 都会合拢空隙。","settings.download": "下载",+ "settings.downloadingVersion": "正在下载 Concat {0}…","settings.downloads": "下载项","settings.forMainlandChina": "适用于中国大陆",+ "settings.fromFlatpak": "以 Flatpak 安装:更新通过 Flatpak 进行。",+ "settings.fromStore": "更新通过应用商店进行。","settings.general": "通用","settings.hideTheToken": "隐藏令牌","settings.inUse": "使用中",+ "settings.install": "安装","settings.installedMbOnDisk": "已安装 {0} 个 · 占用磁盘 {1} MB",+ "settings.installerOpened": "Concat {0} 的安装程序已打开。Concat 现在将关闭,以便安装完成。","settings.language": "语言","settings.light": "光","settings.lime": "青柠",@@ -730,10 +740,13 @@"settings.models": "模型","settings.modelsFetchedFirstTime": "模型会在功能首次需要时下载。下载会优先从这里获取;之后仍会依次尝试其他所有来源。","settings.newToken": "生成新令牌",+ "settings.noReleasesYet": "0.2.5 及之后的版本尚未发布。","settings.notAnAddress": "{0} 不是类似 127.0.0.1:7420 的地址",+ "settings.notFromPackage": "此构建并非从软件包安装,因此没有可替换的内容。","settings.off": "关","settings.offClickRulerPast": "关闭时,在标尺上点击最后一个片段之后的位置,播放头会停在那里,放置在播放头处的片段也随之落在该处。开启时,播放头始终不会离开内容范围。","settings.originalSource": "原始来源",+ "settings.packageOpened": "Concat {0} 已下载并在软件包安装器中打开。请在那里安装,然后重新启动 Concat。","settings.playhead": "播放头","settings.remote": "远程","settings.remoteControl": "远程控制",@@ -743,10 +756,17 @@"settings.showTheLog": "显示日志","settings.showTheToken": "显示令牌","settings.sky": "天空",+ "settings.switchVersion": "切换版本",+ "settings.switchVersionNote": "0.2.5 及之后的任何版本,无论更新或更旧,都可以替换当前版本。更早的版本没有回到更高版本的途径,因此不予提供。","settings.systemInformation": "系统信息","settings.theme": "主题",+ "settings.thisVersion": "当前版本","settings.token": "令牌","settings.unpacking": "正在解包…",+ "settings.upToDate": "Concat {0} 已是最新版本。",+ "settings.updateAvailable": "Concat {0} 已发布。当前版本为 {1}。",+ "settings.version": "版本",+ "settings.versionInstalled": "Concat {0} 已安装。Concat 现在将重新启动。","settings.violet": "紫罗兰","settings.voices": "语音","settings.whatConnectionMustPresent": "连接在首次调用前必须提供的凭据。留空时,服务器每次启动都会自动生成一个并显示在此处。",diff --git a/src/crates/concat/locales/zh-TW.json b/src/crates/concat/locales/zh-TW.jsonindex 82297b2e..e4b8707e 100644--- a/src/crates/concat/locales/zh-TW.json+++ b/src/crates/concat/locales/zh-TW.json@@ -699,24 +699,34 @@"settings.about": "關於","settings.accent": "強調色","settings.address": "位址",+ "settings.aheadOfReleases": "此建置 {0} 比任何已發布版本都新。","settings.amber": "琥珀","settings.appearance": "外觀","settings.automatic": "自動",+ "settings.checkForUpdates": "檢查更新",+ "settings.checkingForUpdates": "正在檢查…","settings.concat": "Concat {0}","settings.concatsMirror": "Concat 鏡像","settings.copySystemInformation": "拷貝系統資訊",+ "settings.couldNotCheck": "無法檢查更新:{0}",+ "settings.couldNotInstall": "無法安裝 Concat {0}:{1}","settings.couldNotShowLog": "無法顯示記錄:{0}","settings.customUrl": "自訂 URL","settings.dark": "深色","settings.default": "預設","settings.deletingClipPullsWhat": "開啟時,刪除片段會把同一軌道上其後的內容拉進空隙,修剪邊緣時軌道上的其餘內容也隨之移動。關閉時,刪除會留下空隙,修剪只移動邊緣。無論開關與否,Shift-Delete 都會閉合空隙。","settings.download": "下載",+ "settings.downloadingVersion": "正在下載 Concat {0}…","settings.downloads": "下載","settings.forMainlandChina": "適用於中國大陸",+ "settings.fromFlatpak": "以 Flatpak 安裝:更新透過 Flatpak 進行。",+ "settings.fromStore": "更新透過商店進行。","settings.general": "一般","settings.hideTheToken": "隱藏權杖","settings.inUse": "使用中",+ "settings.install": "安裝","settings.installedMbOnDisk": "已安裝 {0} 個 · 佔用磁碟 {1} MB",+ "settings.installerOpened": "Concat {0} 的安裝程式已開啟。Concat 現在會關閉,讓安裝得以完成。","settings.language": "語言","settings.light": "光","settings.lime": "萊姆",@@ -730,10 +740,13 @@"settings.models": "模型","settings.modelsFetchedFirstTime": "模型會在功能首次需要時下載。下載會優先從這裡取得;之後仍會依序嘗試其他所有來源。","settings.newToken": "產生新權杖",+ "settings.noReleasesYet": "0.2.5 之後的版本尚未發布。","settings.notAnAddress": "{0} 不是類似 127.0.0.1:7420 的位址",+ "settings.notFromPackage": "此建置並非從套件安裝,因此沒有可取代的內容。","settings.off": "關","settings.offClickRulerPast": "關閉時,在尺標上點按最後一個片段之後的位置,播放磁頭會停在該處,放置於播放磁頭的片段也隨之落在該處。開啟時,播放磁頭永遠不會離開內容範圍。","settings.originalSource": "原始來源",+ "settings.packageOpened": "Concat {0} 已下載並在套件安裝程式中開啟。請在那裡安裝,然後重新啟動 Concat。","settings.playhead": "播放磁頭","settings.remote": "遠端","settings.remoteControl": "遠端控制",@@ -743,10 +756,17 @@"settings.showTheLog": "顯示記錄","settings.showTheToken": "顯示權杖","settings.sky": "天空",+ "settings.switchVersion": "切換版本",+ "settings.switchVersionNote": "0.2.5 之後的任何版本,無論較新或較舊,都可以取代目前版本。更早的版本沒有回到較新版本的途徑,因此不提供。","settings.systemInformation": "系統資訊","settings.theme": "主題",+ "settings.thisVersion": "目前版本","settings.token": "權杖","settings.unpacking": "正在解壓縮…",+ "settings.upToDate": "Concat {0} 已是最新版本。",+ "settings.updateAvailable": "Concat {0} 已發布。目前版本為 {1}。",+ "settings.version": "版本",+ "settings.versionInstalled": "Concat {0} 已安裝。Concat 現在會重新啟動。","settings.violet": "紫羅蘭","settings.voices": "語音","settings.whatConnectionMustPresent": "連線在首次呼叫前必須提供的憑證。留空時,伺服器每次啟動都會自動產生一個並顯示在此處。",diff --git a/src/crates/concat/src/lib.rs b/src/crates/concat/src/lib.rsindex 9865a99d..9198a349 100644--- a/src/crates/concat/src/lib.rs+++ b/src/crates/concat/src/lib.rs@@ -252,6 +252,8 @@ pub fn run() -> Result<(), slint::PlatformError> {app.set_app_menu_items(ModelRc::from(models.bar.clone()));app.set_transcribers(ModelRc::from(models.transcribers.clone()));app.set_voices(ModelRc::from(models.voices.clone()));+ app.set_versions(ModelRc::from(models.versions.clone()));+ app.set_version_details(ModelRc::from(models.version_details.clone()));editor.set_seats(ModelRc::from(models.seats.clone()));editor.set_dividers(ModelRc::from(models.dividers.clone()));app.set_recents(ModelRc::from(models.recents.clone()));@@ -1403,6 +1405,18 @@ pub fn run() -> Result<(), slint::PlatformError> {app.on_settings_server_token_generated(on_window!(|state| {state.handle(Msg::Settings(SettingsMsg::ServerTokenGenerated));}));+ app.on_settings_check_updates(on_window!(|state| {+ state.handle(Msg::Settings(SettingsMsg::CheckUpdates));+ }));+ app.on_settings_version_chosen(on_window!(|state, index: i32| {+ state.handle(Msg::Settings(SettingsMsg::VersionChosen(index)));+ }));+ app.on_settings_install_version(on_window!(|state| {+ state.handle(Msg::Settings(SettingsMsg::InstallVersion));+ }));+ app.on_settings_install_cancel(on_window!(|state| {+ state.handle(Msg::Settings(SettingsMsg::InstallCancel));+ }));app.on_model_activated(on_window!(|state, id: SharedString| {state.handle(Msg::Settings(SettingsMsg::ModelActivated(id.to_string())));}));diff --git a/src/crates/concat/src/panes/settings.rs b/src/crates/concat/src/panes/settings.rsindex 075551ee..a40b8f49 100644--- a/src/crates/concat/src/panes/settings.rs+++ b/src/crates/concat/src/panes/settings.rs@@ -14,8 +14,10 @@use std::collections::HashMap;use std::sync::Arc;+use std::sync::atomic::{AtomicBool, Ordering};use concat_host::models::SourcePreference;+use concat_host::updates::{self, Fixed, Installed, Release, Standing, Version};use slint::SharedString;use crate::host::{on_ui, spawn};@@ -69,8 +71,30 @@ pub enum SettingsMsg {id: String,result: Result<(), String>,},+ /// The Version page asks GitHub for the releases.+ CheckUpdates,+ /// The releases, newest first, or why they could not be had.+ UpdatesFetched(Result<Vec<Release>, String>),+ /// A release picked from the Version page's list.+ VersionChosen(i32),+ /// Put the picked release in this one's place.+ InstallVersion,+ InstallCancel,+ /// The switch's worker reporting its download, in megabytes.+ InstallProgress {+ fetched: f32,+ total: f32,+ },+ /// The switch's worker is done: what it did, or why not.+ InstallFinished {+ version: Version,+ result: Result<Installed, String>,+ },}+/// The Version page's index in the column of pages.+const VERSION_PAGE: i32 = 6;+/// One downloadable model, as the settings sheet shows it.#[derive(Clone, Debug)]pub struct ModelState {@@ -144,6 +168,24 @@ pub struct SettingsPane {pub transcribers: Vec<ModelState>,/// The voice models, installed or not.pub voices: Vec<ModelState>,+ /// The Version page's list: the stable releases from 0.2.5 on, newest+ /// first, once GitHub has been asked.+ pub releases: Vec<Release>,+ /// Which of `releases` the page's dropdown shows.+ pub version_choice: usize,+ /// What the Version page says under the version: looking, up to date,+ /// a newer release, or why it could not look.+ pub update_status: String,+ /// GitHub has been asked and has not answered yet.+ pub checking: bool,+ /// GitHub has answered this run: the page asks once when it is opened,+ /// and again only when the button is pressed.+ checked: bool,+ /// A switch in flight: megabytes fetched, and megabytes in all once+ /// the server has said.+ install: Option<(f32, f32)>,+ /// The running switch's stop flag.+ install_cancel: Arc<AtomicBool>,}impl SettingsPane {@@ -176,7 +218,15 @@ impl SettingsPane {self.open = true;}SettingsMsg::Close => self.open = false,- SettingsMsg::PageChanged(index) => self.tab = index,+ SettingsMsg::PageChanged(index) => {+ self.tab = index;+ // The Version page looks for the releases the first time it+ // is opened in a run, so it has something to say and to list+ // without a press; the button looks again.+ if index == VERSION_PAGE && !self.checked {+ self.check_updates();+ }+ }SettingsMsg::ShowLog => {// The file this run is writing, when there is one, so the// manager opens with it selected; the folder when there is@@ -315,7 +365,156 @@ impl SettingsPane {}self.refresh(studio);}+ SettingsMsg::CheckUpdates => self.check_updates(),+ SettingsMsg::UpdatesFetched(result) => {+ self.checking = false;+ match result {+ Ok(releases) => {+ self.checked = true;+ let current = Version::current();+ self.update_status = match updates::standing(current, &releases) {+ Standing::Latest => tf("settings.upToDate", &[¤t]),+ Standing::Behind(newer) => {+ tf("settings.updateAvailable", &[&newer, ¤t])+ }+ Standing::Ahead => tf("settings.aheadOfReleases", &[¤t]),+ Standing::NoReleases => t("settings.noReleasesYet"),+ };+ // The list starts on its newest release, which is+ // the one most people opened the page for.+ self.version_choice = 0;+ self.releases = releases;+ }+ Err(error) => self.update_status = tf("settings.couldNotCheck", &[&error]),+ }+ }+ SettingsMsg::VersionChosen(index) => {+ self.version_choice =+ (index.max(0) as usize).min(self.releases.len().saturating_sub(1));+ }+ SettingsMsg::InstallVersion => self.install_version(studio),+ SettingsMsg::InstallCancel => self.install_cancel.store(true, Ordering::Relaxed),+ SettingsMsg::InstallProgress { fetched, total } => {+ if self.install.is_some() {+ self.install = Some((fetched, total));+ }+ }+ SettingsMsg::InstallFinished { version, result } => {+ self.install = None;+ match result {+ Ok(Installed::InstallerRunning) => {+ log::info!("update: the installer for {version} is running; closing");+ studio.notify(&tf("settings.installerOpened", &[&version]), false);+ quit_for_switch();+ }+ Ok(Installed::Replaced) => {+ log::info!("update: {version} is in place; starting it");+ if let Err(error) = updates::relaunch() {+ log::warn!("update: could not arrange the start: {error}");+ }+ studio.notify(&tf("settings.versionInstalled", &[&version]), false);+ quit_for_switch();+ }+ Ok(Installed::Opened) => {+ studio.notify(&tf("settings.packageOpened", &[&version]), false);+ }+ // A cancel is a choice, not a failure worth a toast.+ Err(_) if self.install_cancel.load(Ordering::Relaxed) => {}+ Err(error) => {+ log::warn!("update: {version} could not be installed: {error}");+ studio.notify(&tf("settings.couldNotInstall", &[&version, &error]), true);+ }+ }+ }+ }+ }++ /// Asks GitHub for the releases on a worker; the answer comes back as+ /// [`SettingsMsg::UpdatesFetched`].+ fn check_updates(&mut self) {+ if self.checking {+ return;}+ self.checking = true;+ self.update_status = t("settings.checkingForUpdates");+ spawn(updates::fetch_releases, |studio, _, _, result| {+ studio.handle(Msg::Settings(SettingsMsg::UpdatesFetched(result)));+ });+ }++ /// Fetches the chosen release's package for this machine on a worker,+ /// checks it against the release's digest, and puts it in place. The+ /// download reports as [`SettingsMsg::InstallProgress`] and the whole+ /// ends as [`SettingsMsg::InstallFinished`].+ fn install_version(&mut self, studio: &mut Studio) {+ if self.install.is_some() {+ return;+ }+ let Some(release) = self.releases.get(self.version_choice).cloned() else {+ return;+ };+ let kind = match updates::installed_as() {+ Ok(kind) => kind,+ Err(why) => {+ studio.notify(&fixed_note(why), true);+ return;+ }+ };+ let cancel = Arc::new(AtomicBool::new(false));+ self.install_cancel = Arc::clone(&cancel);+ self.install = Some((0.0, 0.0));+ let folder = updates::folder(&studio.host.dirs);+ let version = release.version;+ log::info!(+ "update: switching to {version} by its {} package",+ kind.key()+ );+ spawn(+ move || {+ let result = updates::fetch_package(&release, kind)+ .and_then(|package| {+ let mut report = |received: u64, total: u64| {+ let msg = SettingsMsg::InstallProgress {+ fetched: received as f32 / 1_000_000.0,+ total: total as f32 / 1_000_000.0,+ };+ on_ui(move |studio, _, _| studio.handle(Msg::Settings(msg)));+ };+ updates::download_package(&package, &folder, &cancel, &mut report)+ })+ .and_then(|path| updates::install(&path, kind));+ (version, result)+ },+ |studio, _, _, (version, result)| {+ studio.handle(Msg::Settings(SettingsMsg::InstallFinished {+ version,+ result,+ }));+ },+ );+ }++ /// The Version page's list: each release's number.+ pub fn version_rows(&self) -> Vec<SharedString> {+ self.releases+ .iter()+ .map(|release| release.version.to_string().into())+ .collect()+ }++ /// Beside each release: the day it came out, or that it is this one.+ pub fn version_details(&self) -> Vec<SharedString> {+ let current = Version::current();+ self.releases+ .iter()+ .map(|release| {+ if release.version == current {+ t("settings.thisVersion").into()+ } else {+ release.published.as_str().into()+ }+ })+ .collect()}/// The remembered download source: its place in the menu, and itself.@@ -568,10 +767,63 @@ impl SettingsPane {.into()},version: env!("CARGO_PKG_VERSION").into(),+ update_status: self.update_status.as_str().into(),+ checking: self.checking,+ version_choice: self.version_choice as i32,+ installing: self.install.is_some(),+ install_progress: match self.install {+ Some((fetched, total)) if total > 0.0 => (fetched / total).min(1.0),+ _ => 0.0,+ },+ install_transferred: match self.install {+ Some((fetched, total)) if total > 0.0 => tf(+ "settings.mbOfMb",+ &[&format!("{fetched:.0}"), &format!("{total:.0}")],+ ),+ Some(_) => tf(+ "settings.downloadingVersion",+ &[&self+ .releases+ .get(self.version_choice)+ .map(|release| release.version.to_string())+ .unwrap_or_default()],+ ),+ None => String::new(),+ }+ .into(),+ can_install: self.install.is_none()+ && !self.releases.is_empty()+ && updates::installed_as().is_ok(),+ install_note: updates::installed_as()+ .err()+ .map(fixed_note)+ .unwrap_or_default()+ .into(),}}}+/// Why the Install button is off, in words.+fn fixed_note(why: Fixed) -> String {+ match why {+ Fixed::Flatpak => t("settings.fromFlatpak"),+ Fixed::Store => t("settings.fromStore"),+ Fixed::NotFromPackage => t("settings.notFromPackage"),+ }+}++/// Closes the app on the event loop's next turn, the way File › Close+/// Window does, so an installer can replace its files or the build put in+/// place can start.+fn quit_for_switch() {+ on_ui(|studio, app, _| {+ log::info!("close: quitting for a version switch");+ studio.close_project();+ slint::ComponentHandle::window(app).hide().ok();+ slint::quit_event_loop().ok();+ });+}+/// A fresh token: 128 bits from the OS's randomness, as the standard/// library hands it out through its hasher's seed, spelled in hex.pub fn new_token() -> String {diff --git a/src/crates/concat/src/studio.rs b/src/crates/concat/src/studio.rsindex 719be3e7..5225b5cb 100644--- a/src/crates/concat/src/studio.rs+++ b/src/crates/concat/src/studio.rs@@ -607,6 +607,10 @@ pub struct Models {pub speech_sample_details: Rc<VecModel<SharedString>>,pub transcribers: Rc<VecModel<ModelData>>,pub voices: Rc<VecModel<ModelData>>,+ /// The Version page's releases, and beside each its day or that it+ /// is this one.+ pub versions: Rc<VecModel<SharedString>>,+ pub version_details: Rc<VecModel<SharedString>>,pub seats: Rc<VecModel<SeatBox>>,pub dividers: Rc<VecModel<DockDivider>>,pub recents: Rc<VecModel<RecentProjectData>>,@@ -665,6 +669,8 @@ impl Models {speech_sample_details: Rc::new(VecModel::default()),transcribers: Rc::new(VecModel::default()),voices: Rc::new(VecModel::default()),+ versions: Rc::new(VecModel::default()),+ version_details: Rc::new(VecModel::default()),seats: Rc::new(VecModel::default()),dividers: Rc::new(VecModel::default()),recents: Rc::new(VecModel::default()),@@ -8340,6 +8346,8 @@ impl Studio {app.set_settings(self.settings.data(self));sync(&models.transcribers, self.settings.transcriber_rows());sync(&models.voices, self.settings.voice_rows());+ sync(&models.versions, self.settings.version_rows());+ sync(&models.version_details, self.settings.version_details());app.set_relink(self.relink.data());// The speech sheets, and the lists they choose from.diff --git a/src/crates/concat/ui/app.slint b/src/crates/concat/ui/app.slintindex 8bdba8a0..b0d9487b 100644--- a/src/crates/concat/ui/app.slint+++ b/src/crates/concat/ui/app.slint@@ -204,6 +204,8 @@ export component App inherits Window {in property <SettingsData> settings;in property <[ModelData]> transcribers;in property <[ModelData]> voices;+ in property <[string]> versions;+ in property <[string]> version-details;in property <[string]> languages;/// Settings > About's copyable block. Gathered once in main.rs and/// never republished — every line of it is fixed for the life of the@@ -247,6 +249,10 @@ export component App inherits Window {callback settings-server-port-edited(port: int);callback settings-server-token-edited(text: string);callback settings-server-token-generated();+ callback settings-check-updates();+ callback settings-version-chosen(index: int);+ callback settings-install-version();+ callback settings-install-cancel();callback model-activated(id: string);callback model-download(id: string);callback model-cancel(id: string);@@ -606,6 +612,8 @@ export component App inherits Window {data: root.settings;transcribers: root.transcribers;voices: root.voices;+ versions: root.versions;+ version-details: root.version-details;languages: root.languages;system-facts: root.system-facts;system-report: root.system-report;@@ -628,6 +636,10 @@ export component App inherits Window {server-port-edited(port) => { root.settings-server-port-edited(port); }server-token-edited(text) => { root.settings-server-token-edited(text); }server-token-generated => { root.settings-server-token-generated(); }+ check-updates => { root.settings-check-updates(); }+ version-chosen(index) => { root.settings-version-chosen(index); }+ install-version => { root.settings-install-version(); }+ install-cancel => { root.settings-install-cancel(); }model-activated(id) => { root.model-activated(id); }model-download(id) => { root.model-download(id); }model-cancel(id) => { root.model-cancel(id); }diff --git a/src/crates/concat/ui/dialogs/settings.slint b/src/crates/concat/ui/dialogs/settings.slintindex 620095c0..513da366 100644--- a/src/crates/concat/ui/dialogs/settings.slint+++ b/src/crates/concat/ui/dialogs/settings.slint@@ -48,7 +48,8 @@ export struct SystemFactData {export struct SettingsData {open: bool,- /// 0 General, 1 Appearance, 2 Transcriber, 3 Speech, 4 Remote, 5 About+ /// 0 General, 1 Appearance, 2 Transcriber, 3 Speech, 4 Remote, 5 About,+ /// 6 Versiontab: int,language: int,/// the playhead stops at the end of the content@@ -73,6 +74,20 @@ export struct SettingsData {/// "3 installed · 612 MB on disk"disk: string,version: string,+ /// what the Version page says under the version: looking, up to date,+ /// a newer release out, or why it could not look+ update-status: string,+ checking: bool,+ /// which of the sheet's `versions` the dropdown shows+ version-choice: int,+ /// a switch in flight: how far its download is, and "12 MB of 90 MB"+ installing: bool,+ install-progress: float,+ install-transferred: string,+ /// Install is live: a release is listed and this build came from a+ /// package that can be put in place; and why not, when not+ can-install: bool,+ install-note: string,}// Accuracy, as pips rather than a number: five little bars say "third of five"@@ -398,6 +413,10 @@ export component SettingsDialog inherits Modal {in property <SettingsData> data;in property <[ModelData]> transcribers;in property <[ModelData]> voices;+ /// the releases a person can switch to, newest first, and beside each+ /// the day it came out - or that it is this one+ in property <[string]> versions;+ in property <[string]> version-details;in property <[string]> languages;/// The system report, as rows. See system_facts() in main.rs.in property <[SystemFactData]> system-facts;@@ -432,6 +451,11 @@ export component SettingsDialog inherits Modal {callback server-token-edited(text: string);/// A fresh random token, in place of whatever is there.callback server-token-generated();+ /// the Version page: look for the releases, pick one, put it in place+ callback check-updates();+ callback version-chosen(index: int);+ callback install-version();+ callback install-cancel();callback model-activated(id: string);callback model-download(id: string);callback model-cancel(id: string);@@ -569,6 +593,12 @@ export component SettingsDialog inherits Modal {current: root.data.tab == 4;clicked => { root.page-changed(4); }}+ if !root.phone: PageTab {+ label: I18n.t("settings.version");+ glyph: Glyph.tag;+ current: root.data.tab == 6;+ clicked => { root.page-changed(6); }+ }PageTab {label: I18n.t("settings.about");glyph: Glyph.sparkle;@@ -1006,6 +1036,105 @@ export component SettingsDialog inherits Modal {}}+ // The Version page: which release this is, whether a newer one+ // is out, and any release from 0.2.5 on put in this one's place.+ // A desk's affair, like the Remote page: a phone's store does+ // its updating.+ if root.data.tab == 6 && !root.phone: VerticalLayout {+ DialogSection {+ first: true;+ title: I18n.t("settings.version");++ VerticalLayout {+ spacing: 8px;++ Text {+ text: I18n.t1("settings.concat", "\{root.data.version}");+ color: Theme.fg;+ font-size: Theme.fs-lg;+ font-weight: Theme.weight-title;+ }++ Text {+ text: root.data.update-status;+ color: Theme.fg-muted;+ font-size: Theme.fs-sm;+ wrap: word-wrap;+ }++ HorizontalLayout {+ alignment: start;++ Button {+ label: root.data.checking+ ? I18n.t("settings.checkingForUpdates")+ : I18n.t("settings.checkForUpdates");+ enabled: !root.data.checking;+ clicked => { root.check-updates(); }+ }+ }+ }+ }++ DialogSection {+ title: I18n.t("settings.switchVersion");+ hint: I18n.t("settings.switchVersionNote");++ VerticalLayout {+ spacing: 8px;++ HorizontalLayout {+ spacing: 8px;++ Select {+ horizontal-stretch: 1;+ options: root.versions;+ details: root.version-details;+ current: root.data.version-choice;+ placeholder: I18n.t("settings.noReleasesYet");+ enabled: root.versions.length > 0 && !root.data.installing;+ changed(index) => { root.version-chosen(index); }+ }++ if !root.data.installing: Button {+ label: I18n.t("settings.install");+ glyph: Glyph.import;+ primary: true;+ enabled: root.data.can-install;+ clicked => { root.install-version(); }+ }++ if root.data.installing: Button {+ label: I18n.t("common.cancel");+ glyph: Glyph.close;+ ghost: true;+ clicked => { root.install-cancel(); }+ }+ }++ if root.data.install-note != "": Text {+ text: root.data.install-note;+ color: Theme.fg-muted;+ font-size: Theme.fs-sm;+ wrap: word-wrap;+ }++ if root.data.installing: VerticalLayout {+ spacing: 6px;++ Progress { value: root.data.install-progress; }++ Text {+ text: root.data.install-transferred;+ color: Theme.fg-muted;+ font-family: Theme.font-technical;+ font-size: Theme.fs-sm;+ }+ }+ }+ }+ }+if root.data.tab == 5: VerticalLayout {// The name and the build, and nothing under them: the engine// and the FFmpeg it links are rows of the table below, where