Skip to content

Commit

Permalink
fix: change wording in "no new version found" version check prompt di…
Browse files Browse the repository at this point in the history
…alog
  • Loading branch information
Sv443 committed Dec 18, 2024
1 parent 25d31cf commit 3b285a5
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion assets/translations/de-DE.json
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
"close_and_ignore_until_reenabled": "Schließen und ignorieren, bis in den Einstellungen reaktiviert",
"expand_release_notes": "Klicke um die neuesten Release-Notes zu öffnen",
"collapse_release_notes": "Klicke um die neuesten Release-Notes zu schließen",
"no_updates_found": "Keine Updates gefunden.",
"no_new_version_found": "Keine neue Version gefunden.",

"thumbnail_overlay_behavior_never": "Nie",
"thumbnail_overlay_behavior_videos_only": "Nur bei Videos",
Expand Down
2 changes: 1 addition & 1 deletion assets/translations/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
"close_and_ignore_until_reenabled": "Close and ignore until re-enabled",
"expand_release_notes": "Click to expand the latest release notes",
"collapse_release_notes": "Click to collapse the latest release notes",
"no_updates_found": "No updates found.",
"no_new_version_found": "No new version found.",

"thumbnail_overlay_behavior_never": "Never",
"thumbnail_overlay_behavior_videos_only": "Only for videos",
Expand Down
2 changes: 1 addition & 1 deletion assets/translations/es-ES.json
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
"close_and_ignore_until_reenabled": "Cerrar y omitir hasta que se vuelva a habilitar",
"expand_release_notes": "Haga clic para expandir las últimas notas de la versión",
"collapse_release_notes": "Haga clic para contraer las últimas notas de la versión",
"no_updates_found": "No se encontraron actualizaciones.",
"no_new_version_found": "No se encontró una nueva versión.",

"thumbnail_overlay_behavior_never": "Nunca",
"thumbnail_overlay_behavior_videos_only": "Solo para videos",
Expand Down
2 changes: 1 addition & 1 deletion assets/translations/fr-FR.json
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
"close_and_ignore_until_reenabled": "Fermer et ignorer jusqu'à ce qu'il soit réactivé",
"expand_release_notes": "Cliquez pour afficher les notes de version",
"collapse_release_notes": "Cliquez pour réduire les notes de version",
"no_updates_found": "Aucune mise à jour trouvée.",
"no_new_version_found": "Aucune nouvelle version trouvée.",

"thumbnail_overlay_behavior_never": "Jamais",
"thumbnail_overlay_behavior_videos_only": "Seulement pour les vidéos",
Expand Down
2 changes: 1 addition & 1 deletion assets/translations/hi-IN.json
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
"close_and_ignore_until_reenabled": "बंद करें और नजरअंदाज करें जब तक पुनः सक्षम नहीं होता",
"expand_release_notes": "नवीनतम रिलीज़ नोट्स खोलने के लिए क्लिक करें",
"collapse_release_notes": "नवीनतम रिलीज़ नोट्स को संक्षेपित करने के लिए क्लिक करें",
"no_updates_found": "कोई अद्यतन नहीं मिला।",
"no_new_version_found": "कोई नया संस्करण नहीं मिला।",

"thumbnail_overlay_behavior_never": "कभी नहीं",
"thumbnail_overlay_behavior_videos_only": "केवल वीडियो के लिए",
Expand Down
2 changes: 1 addition & 1 deletion assets/translations/ja-JP.json
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
"close_and_ignore_until_reenabled": "閉じて無視する(再有効化されるまで)",
"expand_release_notes": "最新のリリースノートを展開する",
"collapse_release_notes": "最新のリリースノートを折りたたむ",
"no_updates_found": "更新は見つかりませんでした",
"no_new_version_found": "新しいバージョンは見つかりませんでした",

"thumbnail_overlay_behavior_never": "表示しない",
"thumbnail_overlay_behavior_videos_only": "動画のみ",
Expand Down
2 changes: 1 addition & 1 deletion assets/translations/pt-BR.json
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
"close_and_ignore_until_reenabled": "Fechar e ignorar até ser reativado",
"expand_release_notes": "Clique para expandir as notas de lançamento mais recentes",
"collapse_release_notes": "Clique para recolher as notas de lançamento mais recentes",
"no_updates_found": "Nenhuma atualização encontrada.",
"no_new_version_found": "Nenhuma nova versão encontrada.",

"thumbnail_overlay_behavior_never": "Nunca",
"thumbnail_overlay_behavior_videos_only": "Apenas para vídeos",
Expand Down
2 changes: 1 addition & 1 deletion assets/translations/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
"close_and_ignore_until_reenabled": "关闭并忽略,直到重新启用",
"expand_release_notes": "点击展开最新的更新日志",
"collapse_release_notes": "点击折叠最新的更新日志",
"no_updates_found": "未找到更新",
"no_new_version_found": "未找到新版本",

"thumbnail_overlay_behavior_never": "从不",
"thumbnail_overlay_behavior_videos_only": "仅视频",
Expand Down
10 changes: 5 additions & 5 deletions src/features/versionCheck.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ export async function initVersionCheck() {

/**
* Checks for a new version of the script and shows a dialog.
* If {@linkcode notifyNoUpdatesFound} is set to true, a dialog is also shown if no updates were found.
* If {@linkcode notifyNoNewVerFound} is set to true, a dialog is also shown if no updates were found.
*/
export async function doVersionCheck(notifyNoUpdatesFound = false) {
export async function doVersionCheck(notifyNoNewVerFound = false) {
await GM.setValue("bytm-version-check", Date.now());

const res = await sendRequest({
Expand All @@ -37,12 +37,12 @@ export async function doVersionCheck(notifyNoUpdatesFound = false) {
});

// TODO: small dialog for "no update found" message?
const noUpdateFound = () => notifyNoUpdatesFound ? showPrompt({ type: "alert", message: t("no_updates_found") }) : undefined;
const noNewVerFound = () => notifyNoNewVerFound ? showPrompt({ type: "alert", message: t("no_new_version_found") }) : undefined;

const latestTag = res.finalUrl.split("/").pop()?.replace(/[a-zA-Z]/g, "");

if(!latestTag)
return await noUpdateFound();
return await noNewVerFound();

info("Version check - current version:", scriptInfo.version, "- latest version:", latestTag, LogLevel.Info);

Expand All @@ -51,5 +51,5 @@ export async function doVersionCheck(notifyNoUpdatesFound = false) {
await dialog.open();
return;
}
return await noUpdateFound();
return await noNewVerFound();
}

0 comments on commit 3b285a5

Please sign in to comment.