Skip to content

Commit 4a835dc

Browse files
committed
fix(translations): moved update url to a constant
1 parent 29d0294 commit 4a835dc

12 files changed

Lines changed: 16 additions & 12 deletions

File tree

src/tagstudio/core/constants.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
VERSION: str = "9.5.7" # Major.Minor.Patch
66
VERSION_BRANCH: str = "" # Usually "" or "Pre-Release"
7+
GITHUB_RELEASE_URL = "https://github.com/TagStudioDev/TagStudio/releases/latest"
78

89
# The folder & file names where TagStudio keeps its data relative to a library.
910
TS_FOLDER_NAME: str = ".TagStudio"

src/tagstudio/qt/controllers/out_of_date_message_box.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from PySide6.QtCore import Qt
33
from PySide6.QtWidgets import QMessageBox
44

5-
from tagstudio.core.constants import VERSION
5+
from tagstudio.core.constants import GITHUB_RELEASE_URL, VERSION
66
from tagstudio.core.ts_core import TagStudioCore
77
from tagstudio.core.utils.types import unwrap
88
from tagstudio.qt.models.palette import ColorType, UiColor, get_ui_color
@@ -37,4 +37,7 @@ def __init__(self):
3737
installed_version=f"<span style='color:{red}'>{VERSION}</span>",
3838
latest_release_version=f"<span style='color:{green}'>{latest_release_version}</span>",
3939
)
40-
self.setText(f"{Translations['version_modal.description']}<br><br>{status}")
40+
description = Translations.format(
41+
"version_modal.description", github_url=GITHUB_RELEASE_URL
42+
)
43+
self.setText(f"{description}<br><br>{status}")

src/tagstudio/resources/translations/de.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@
351351
"trash.dialog.title.singular": "Datei löschen",
352352
"trash.name.generic": "Mülleimer",
353353
"trash.name.windows": "Papierkorb",
354-
"version_modal.description": "Eine neue Version von TagStudio ist verfügbar! Du kannst die neueste Version auf <a href=\"https://github.com/TagStudioDev/TagStudio/releases/latest\">GitHub</a> herunterladen.",
354+
"version_modal.description": "Eine neue Version von TagStudio ist verfügbar! Du kannst die neueste Version auf <a href=\"{github_url}\">GitHub</a> herunterladen.",
355355
"version_modal.status": "Installierte Version: {installed_version}<br>Letzte veröffentlichte Version: {latest_release_version}",
356356
"version_modal.title": "TagStudio Aktualisierung verfügbar",
357357
"view.size.0": "Mini",

src/tagstudio/resources/translations/en.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@
354354
"trash.name.generic": "Trash",
355355
"trash.name.windows": "Recycle Bin",
356356
"version_modal.title": "TagStudio Update Available",
357-
"version_modal.description": "A new version of TagStudio is available! You can download the latest release from <a href=\"https://github.com/TagStudioDev/TagStudio/releases/latest\">Github</a>.",
357+
"version_modal.description": "A new version of TagStudio is available! You can download the latest release from <a href=\"{github_url}\">GitHub</a>.",
358358
"version_modal.status": "Installed Version: {installed_version}<br>Latest Release Version: {latest_release_version}",
359359
"view.size.0": "Mini",
360360
"view.size.1": "Small",

src/tagstudio/resources/translations/es.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@
348348
"trash.dialog.title.singular": "Eliminar archivo",
349349
"trash.name.generic": "Basura",
350350
"trash.name.windows": "Papelera de reciclaje",
351-
"version_modal.description": "¡Ya está disponible una nueva versión de TagStudio! Puedes descargar la última versión desde <a href=\"https://github.com/TagStudioDev/TagStudio/releases/latest\">Github</a>.",
351+
"version_modal.description": "¡Ya está disponible una nueva versión de TagStudio! Puedes descargar la última versión desde <a href=\"{github_url}\">Github</a>.",
352352
"version_modal.status": "Versión Instalada: {installed_version}<br>Última Versión Publicada: {latest_release_version}",
353353
"version_modal.title": "Actualización de TagStudio disponible",
354354
"view.size.0": "Mini",

src/tagstudio/resources/translations/fi.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@
307307
"trash.dialog.title.singular": "Poista tiedosto",
308308
"trash.name.generic": "Roskakori",
309309
"trash.name.windows": "Roskakori",
310-
"version_modal.description": "TagStudion uusi versio on saatavilla! Voit ladata uusimman version <a href=\"https://github.com/TagStudioDev/TagStudio/releases/latest\">Githubista</a>.",
310+
"version_modal.description": "TagStudion uusi versio on saatavilla! Voit ladata uusimman version <a href=\"{github_url}\">Githubista</a>.",
311311
"version_modal.status": "Asennettu versio: {installed_version}<br>Uusin julkaisuversio: {latest_release_version}",
312312
"version_modal.title": "TagStudio päivitys saatavilla",
313313
"view.size.0": "Mini",

src/tagstudio/resources/translations/fr.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@
349349
"trash.dialog.title.singular": "Supprimer le Fichier",
350350
"trash.name.generic": "Poubelle",
351351
"trash.name.windows": "Corbeille",
352-
"version_modal.description": "Une nouvelle version de TagStudio est disponible! Vous pouvez télécharger la version la plus récente sur <a href=\"https://github.com/TagStudioDev/TagStudio/releases/latest\">Github</a>.",
352+
"version_modal.description": "Une nouvelle version de TagStudio est disponible! Vous pouvez télécharger la version la plus récente sur <a href=\"{github_url}\">Github</a>.",
353353
"version_modal.status": "Version installer : {installed_version}<br>Dernière version disponible : {latest_release_version}",
354354
"version_modal.title": "Mise à jour de TagStudio disponible",
355355
"view.size.0": "Mini",

src/tagstudio/resources/translations/hu.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@
353353
"trash.dialog.title.singular": "Fájl törlése",
354354
"trash.name.generic": "kukába",
355355
"trash.name.windows": "lomtárba",
356-
"version_modal.description": "Elérhetővé vált egy TagStudio-frissítés. A legújabb verziót a <a href=\"https://github.com/TagStudioDev/TagStudio/releases/latest\">Githubról</a> töltheti le.",
356+
"version_modal.description": "Elérhetővé vált egy TagStudio-frissítés. A legújabb verziót a <a href=\"{github_url}\">Githubról</a> töltheti le.",
357357
"version_modal.status": "Telepített verzió: {installed_version}<br>Legújabb stabil verzió: {latest_release_version}",
358358
"version_modal.title": "TagStudio-frissítés",
359359
"view.size.0": "Apró",

src/tagstudio/resources/translations/it.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@
348348
"trash.dialog.title.singular": "Elimina File",
349349
"trash.name.generic": "Spazzatura",
350350
"trash.name.windows": "Cestino",
351-
"version_modal.description": "Una nuova versione di TagStudio è disponibile! Puoi scaricare l'ultima versione da <a href=\"https://github.com/TagStudioDev/TagStudio/releases/latest\">Github</a>.",
351+
"version_modal.description": "Una nuova versione di TagStudio è disponibile! Puoi scaricare l'ultima versione da <a href=\"{github_url}\">Github</a>.",
352352
"version_modal.status": "Versione Installata: {installed_version}<br>Ultima Versione Rilasciata: {latest_release_version}",
353353
"version_modal.title": "Aggiornamento di TagStudio Disponibile",
354354
"view.size.0": "Mini",

src/tagstudio/resources/translations/ja.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@
348348
"trash.dialog.title.singular": "ファイルの削除",
349349
"trash.name.generic": "ごみ箱",
350350
"trash.name.windows": "ごみ箱",
351-
"version_modal.description": "TagStudio の新しいバージョンが利用できます。<a href=\"https://github.com/TagStudioDev/TagStudio/releases/latest\">GitHub</a> から最新リリースをダウンロードできます。",
351+
"version_modal.description": "TagStudio の新しいバージョンが利用できます。<a href=\"{github_url}\">GitHub</a> から最新リリースをダウンロードできます。",
352352
"version_modal.status": "インストール済みのバージョン: {installed_version}<br>最新リリースのバージョン: {latest_release_version}",
353353
"version_modal.title": "TagStudio の更新があります",
354354
"view.size.0": "極小",

0 commit comments

Comments
 (0)