From cb755215b59beff961a418f55a52638315eb727f Mon Sep 17 00:00:00 2001 From: silentrald Date: Sun, 22 Dec 2024 13:07:43 +0800 Subject: [PATCH] [feat] changed proton logs tippy text * fixed issue with translation code where strings with "[]" characters throws an error --- assets/jsons/translations/en.json | 2 +- .../slides/launch/launch-mod-toogle.component.tsx | 4 ++-- src/renderer/services/i18n.service.ts | 9 ++++++++- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/assets/jsons/translations/en.json b/assets/jsons/translations/en.json index 5d74e9f8..a995b004 100644 --- a/assets/jsons/translations/en.json +++ b/assets/jsons/translations/en.json @@ -58,7 +58,7 @@ "map-editor": "Map Editor", "map-editor-description": "Start the official Beat Saber map editor instead of the game.", "proton-logs": "Proton Logs", - "proton-logs-description": "Writes the proton logs within the Beat Saber version. To access logs, go to \"Version Settings ⚙️ > Open Folder > Open `Logs` Folder\"." + "proton-logs-description": "Enables the recording of proton logs for this Beat Saber install to \"{versionPath}\"." }, "maps": { "search-bar": { diff --git a/src/renderer/components/version-viewer/slides/launch/launch-mod-toogle.component.tsx b/src/renderer/components/version-viewer/slides/launch/launch-mod-toogle.component.tsx index e560a7a2..8da346ac 100644 --- a/src/renderer/components/version-viewer/slides/launch/launch-mod-toogle.component.tsx +++ b/src/renderer/components/version-viewer/slides/launch/launch-mod-toogle.component.tsx @@ -2,7 +2,7 @@ import Tippy from "@tippyjs/react"; import { GlowEffect } from "renderer/components/shared/glow-effect.component"; import { BsmIcon } from "renderer/components/svgs/bsm-icon.component"; import { SvgIcon } from "renderer/components/svgs/svg-icon.type"; -import { useTranslation } from "renderer/hooks/use-translation.hook"; +import { useTranslationV2 } from "renderer/hooks/use-translation.hook"; type Props = { onClick: (active: boolean) => void; @@ -13,7 +13,7 @@ type Props = { }; export function LaunchModToogle({ onClick, active, text, icon: Icon, infoText }: Props) { - const t = useTranslation(); + const { text: t } = useTranslationV2(); return (