diff --git a/Website/src/hoc/withRequireNewVersion.tsx b/Website/src/hoc/withRequireNewVersion.tsx index 51c4103c..214dae21 100644 --- a/Website/src/hoc/withRequireNewVersion.tsx +++ b/Website/src/hoc/withRequireNewVersion.tsx @@ -5,6 +5,7 @@ import { Toolbar } from "@Components/onsenui/Toolbar"; import { useActivity } from "@Hooks/useActivity"; import { BuildConfig } from "@Native/BuildConfig"; import Box from "@mui/material/Box"; +import { useStrings } from "@Hooks/useStrings"; interface HOC_Options

{ versionCode?: number; @@ -14,17 +15,16 @@ interface HOC_Options

{ } function withRequireNewVersion

(opt: HOC_Options

): HOC_Options

["component"] { + const { strings } = useStrings(); const { versionCode = BuildConfig.VERSION_CODE, component, title = "New version required!", - text = ( - <> - This config requires MMRL above {versionCode} (versionCode) -
- Check the latest release - - ), + text = strings("hoc_with_require_new_version", { + versionCode, + br:
, + url: release, + }), } = opt; const { context } = useActivity(); diff --git a/Website/src/locales/en.ts b/Website/src/locales/en.ts index ecac7f7f..9a872fb7 100644 --- a/Website/src/locales/en.ts +++ b/Website/src/locales/en.ts @@ -151,5 +151,6 @@ export const en = { // terminal activity reboot_device: "Reboot device?", reboot_device_desc: "Are you sure to reboot your device?", - privacy_privacy: "Privacy Privacy" + privacy_privacy: "Privacy Privacy", + hoc_with_require_new_version: "This config requires MMRL above {versionCode} (versionCode){br}Check the latest {url}" };