Skip to content

Commit

Permalink
update translations
Browse files Browse the repository at this point in the history
  • Loading branch information
DerGoogler committed May 12, 2024
1 parent cdf6290 commit ea03459
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
14 changes: 7 additions & 7 deletions Website/src/hoc/withRequireNewVersion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<P = {}> {
versionCode?: number;
Expand All @@ -14,17 +15,16 @@ interface HOC_Options<P = {}> {
}

function withRequireNewVersion<P = {}>(opt: HOC_Options<P>): HOC_Options<P>["component"] {
const { strings } = useStrings();
const {
versionCode = BuildConfig.VERSION_CODE,
component,
title = "New version required!",
text = (
<>
This config requires MMRL above {versionCode} (versionCode)
<br />
Check the latest <Anchor href="https://github.com/DerGoogler/MMRL/releases">release</Anchor>
</>
),
text = strings("hoc_with_require_new_version", {
versionCode,
br: <br />,
url: <Anchor href="https://github.com/DerGoogler/MMRL/releases">release</Anchor>,
}),
} = opt;
const { context } = useActivity();

Expand Down
3 changes: 2 additions & 1 deletion Website/src/locales/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
};

0 comments on commit ea03459

Please sign in to comment.