From 2c25450985e799d39481d29f4a78abcbae4ad6c4 Mon Sep 17 00:00:00 2001 From: Harmony Weblate <96563367+harmony-weblate@users.noreply.github.com> Date: Thu, 20 Jul 2023 02:24:41 +0200 Subject: i18n: Translations update from Weblate (#436) Translated using Weblate (Polish) Currently translated at 100.0% (102 of 102 strings) Translation: Northstar/FlightCore Translate-URL: https://translate.harmony.tf/projects/northstar/flightcore/pl/ Co-authored-by: p0358 --- src-vue/src/i18n/lang/pl.json | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src-vue/src/i18n/lang/pl.json b/src-vue/src/i18n/lang/pl.json index c9c632b7..f13d9ae3 100644 --- a/src-vue/src/i18n/lang/pl.json +++ b/src-vue/src/i18n/lang/pl.json @@ -107,11 +107,16 @@ "reinstall_text": "Proszę czekać", "reinstall_success": "Pomyślnie przeinstalowano Northstar", "title": "Okno naprawy FlightCore", - "warning": "To okno zawiera różne funkcje do naprawy typowych problemów z Northstar i FlightCore." + "warning": "To okno zawiera różne funkcje do naprawy typowych problemów z Northstar i FlightCore.", + "disable_modsettings": "Wyłącz moda ModSettings", + "disable_modsettings_success": "Wyłączono moda ModSettings" } }, "nb_ts_mods_per_page_desc1": "Ma to wpływ na wydajność wyświetlania podczas przeglądania modów Thunderstore.", - "open_game_folder": "Otwórz folder" + "open_game_folder": "Otwórz folder", + "show_deprecated_mods_desc2": "Ostrożnie, mody są zazwyczaj oznaczone jako przestarzałe nie bez powodu.", + "show_deprecated_mods": "Pokaż przestarzałe mody Thunderstore", + "show_deprecated_mods_desc1": "Pozwala to zobaczyć przestarzałe mody w kolekcji modów online." }, "notification": { "game_folder": { -- cgit v1.2.3 From 99920002511676f55b8a45e51b5c735f50db4bd6 Mon Sep 17 00:00:00 2001 From: Jan Date: Thu, 20 Jul 2023 14:02:46 +0200 Subject: feat: Compare Flightcore versions as semver (#423) development versions are checked with: current_version < newest_version release versions are checked with: current_version != newest_version --- src-tauri/src/github/release_notes.rs | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src-tauri/src/github/release_notes.rs b/src-tauri/src/github/release_notes.rs index 6db5b617..16b65183 100644 --- a/src-tauri/src/github/release_notes.rs +++ b/src-tauri/src/github/release_notes.rs @@ -58,14 +58,17 @@ pub async fn get_newest_flightcore_version() -> Result Result { let newest_flightcore_release = get_newest_flightcore_version().await?; + // Parse version number excluding leading `v` + let newest_version = semver::Version::parse(&newest_flightcore_release.tag_name[1..]).unwrap(); - // Get version of installed FlightCore... - let version = env!("CARGO_PKG_VERSION"); - // ...and format it - let version = format!("v{}", version); + // Get version of installed FlightCore + let current_version = env!("CARGO_PKG_VERSION"); + let current_version = semver::Version::parse(current_version).unwrap(); - // TODO: This shouldn't be a string compare but promper semver compare - let is_outdated = version != newest_flightcore_release.tag_name; + #[cfg(debug_assertions)] + let is_outdated = current_version < newest_version; + #[cfg(not(debug_assertions))] + let is_outdated = current_version != newest_version; // If outdated, check how new the update is if is_outdated { -- cgit v1.2.3