From 97a53368238bdaed4e2de9043cffaea7768fa7b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Storl=C3=B8kken=20Melseth?= Date: Thu, 26 Sep 2024 14:57:49 +0200 Subject: [PATCH] fix: [DHIS2-17322] Ensure app hub id is in the right format --- i18n/en.pot | 23 +++++++++++++++++++++-- src/App.js | 9 ++++++++- 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/i18n/en.pot b/i18n/en.pot index 97e4c96b..f21a7c95 100644 --- a/i18n/en.pot +++ b/i18n/en.pot @@ -5,8 +5,18 @@ msgstr "" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1)\n" -"POT-Creation-Date: 2022-11-16T12:52:56.478Z\n" -"PO-Revision-Date: 2022-11-16T12:52:56.478Z\n" +"POT-Creation-Date: 2024-09-26T12:27:51.211Z\n" +"PO-Revision-Date: 2024-09-26T12:27:51.211Z\n" + +msgid "" +"Your session has expired. Please refresh the page and login before trying " +"again." +msgstr "" +"Your session has expired. Please refresh the page and login before trying " +"again." + +msgid "An unexpected error occurred" +msgstr "An unexpected error occurred" msgid "Version {{version}} installed" msgstr "Version {{version}} installed" @@ -56,12 +66,18 @@ msgstr "App uninstalled successfully" msgid "Failed to uninstall app: {{errorMessage}}" msgstr "Failed to uninstall app: {{errorMessage}}" +msgid "Installing..." +msgstr "Installing..." + msgid "Update to latest version" msgstr "Update to latest version" msgid "Install" msgstr "Install" +msgid "There are no compatible versions available." +msgstr "There are no compatible versions available." + msgid "{{channel}} release {{version}}" msgstr "{{channel}} release {{version}}" @@ -155,6 +171,9 @@ msgstr "All installed custom apps" msgid "Search installed custom apps" msgstr "Search installed custom apps" +msgid "View app details" +msgstr "View app details" + msgid "Uploading..." msgstr "Uploading..." diff --git a/src/App.js b/src/App.js index a774a191..7792e53b 100644 --- a/src/App.js +++ b/src/App.js @@ -12,6 +12,10 @@ import { InstalledApp } from './pages/InstalledApp/InstalledApp.js' import { ManualInstall } from './pages/ManualInstall/ManualInstall.js' import './locales/index.js' +// Used to ensure we are matching the pattern of a valid app hub id, which should be a UUID version 4 +const APP_HUB_ID_REGEXP = + '[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}' + const App = () => ( ( component={InstalledApp} /> - +