diff --git a/app/core/src/main/resources/messages_en_GB.properties b/app/core/src/main/resources/messages_en_GB.properties index f78e80b65..9ddc32c23 100644 --- a/app/core/src/main/resources/messages_en_GB.properties +++ b/app/core/src/main/resources/messages_en_GB.properties @@ -366,6 +366,38 @@ navbar.sections.popular=Popular settings.title=Settings settings.update=Update available settings.updateAvailable={0} is the current installed version. A new version ({1}) is available. + +# Update modal and notification strings +update.urgentUpdateAvailable=🚨 Update Available +update.updateAvailable=Update Available +update.modalTitle=Update Available +update.current=Current +update.latest=Latest +update.latestStable=Latest Stable +update.priority=Priority +update.recommendedAction=Recommended Action +update.breakingChangesDetected=⚠️ Breaking Changes Detected +update.breakingChangesMessage=This update contains breaking changes. Please review the migration guides below. +update.migrationGuides=Migration Guides: +update.viewGuide=View Guide +update.loadingDetailedInfo=Loading detailed version information... +update.close=Close +update.viewAllReleases=View All Releases +update.downloadLatest=Download Latest +update.availableUpdates=Available Updates: +update.unableToLoadDetails=Unable to load detailed version information. +update.version=Version + +# Update priority levels +update.priority.urgent=URGENT +update.priority.normal=NORMAL +update.priority.minor=MINOR +update.priority.low=LOW + +# Breaking changes text +update.breakingChanges=Breaking Changes: +update.breakingChangesDefault=This version contains breaking changes +update.migrationGuide=Migration Guide settings.appVersion=App Version: settings.downloadOption.title=Choose download option (For single file non zip downloads): settings.downloadOption.1=Open in same window diff --git a/app/core/src/main/resources/static/js/githubVersion.js b/app/core/src/main/resources/static/js/githubVersion.js index 059fcccfa..20a89ace9 100644 --- a/app/core/src/main/resources/static/js/githubVersion.js +++ b/app/core/src/main/resources/static/js/githubVersion.js @@ -46,6 +46,17 @@ function getDownloadUrl() { return null; } +// Function to get translated priority text +function getTranslatedPriority(priority) { + switch(priority?.toLowerCase()) { + case 'urgent': return updatePriorityUrgent; + case 'normal': return updatePriorityNormal; + case 'minor': return updatePriorityMinor; + case 'low': return updatePriorityLow; + default: return priority?.toUpperCase() || 'NORMAL'; + } +} + async function getUpdateSummary() { // Map Java License enum to API types let type = 'normal'; @@ -153,13 +164,13 @@ async function checkForUpdate() { // Style button based on priority if (priority === 'urgent') { updateBtn.classList.add("btn-danger"); - updateBtn.innerHTML = "🚨 Update Available"; + updateBtn.innerHTML = urgentUpdateAvailable; } else if (priority === 'normal') { updateBtn.classList.add("btn-warning"); - updateBtn.innerHTML = "Update Available"; + updateBtn.innerHTML = updateAvailableText; } else { updateBtn.classList.add("btn-outline-primary"); - updateBtn.innerHTML = "Update Available"; + updateBtn.innerHTML = updateAvailableText; } // Store summary for initial display @@ -221,7 +232,7 @@ async function showUpdateModal() {