diff --git a/src-ui/logics/ui_configs.js b/src-ui/logics/ui_configs.js index 8d1d4487..49b4239f 100644 --- a/src-ui/logics/ui_configs.js +++ b/src-ui/logics/ui_configs.js @@ -137,5 +137,26 @@ export const whisper_weight_type_status = [ export const deepl_auth_key_url = "https://www.deepl.com/ja/your-account/keys"; +export const vrct_document_home_url = "https://misyaguziya.github.io/VRCT-Docs"; +export const vrct_document_url_chunk_faq = "docs/faq"; +export const vrct_document_url_chunk_ui_guide = "docs/ui-guide"; + +export const generateLocalizedDocumentUrl = (lang_code = "en") => { + const supported_languages = ["en", "ja"]; + + if (supported_languages.includes(lang_code) === false) { + lang_code = "en"; + } + + const lang_path = (lang_code === "en") ? "" : `/${lang_code}`; + + return { + vrct_document_home_url: `${vrct_document_home_url}`, + vrct_document_faq_url: `${vrct_document_home_url}${lang_path}/${vrct_document_url_chunk_faq}`, + vrct_document_ui_guide_url: `${vrct_document_home_url}${lang_path}/${vrct_document_url_chunk_ui_guide}`, + }; +}; + + export const supporters_data_url = "https://shiinasakamoto.github.io/vrct_supporters/assets/supporters/data.json"; export const supporters_images_url = "https://ShiinaSakamoto.github.io/vrct_supporters/assets/supporters"; \ No newline at end of file diff --git a/src-ui/views/app/config_page/setting_section/setting_box/about_vrct/AboutVrct.jsx b/src-ui/views/app/config_page/setting_section/setting_box/about_vrct/AboutVrct.jsx index a939ebbe..01e46cc3 100644 --- a/src-ui/views/app/config_page/setting_section/setting_box/about_vrct/AboutVrct.jsx +++ b/src-ui/views/app/config_page/setting_section/setting_box/about_vrct/AboutVrct.jsx @@ -31,6 +31,8 @@ import { useI18n } from "@useI18n"; import { useAppearance } from "@logics_configs"; import { PosterShowcaseContents } from "./poster_showcase_contents/PosterShowcaseContents"; +import { generateLocalizedDocumentUrl } from "@ui_configs"; + export const AboutVrct = () => { const { t } = useI18n(); const { currentUiLanguage } = useAppearance(); @@ -153,7 +155,7 @@ const about_vrct_links = { dev_shiina_x: { img: dev_x_icon, href: "https://twitter.com/Shiina_12siy" }, project_link_booth: { img: project_link_booth, href: "https://misyaguziya.booth.pm/items/5155325" }, - project_link_documents: { img: project_link_documents, href: "https://mzsoftware.notion.site/VRCT-Documents-be79b7a165f64442ad8f326d86c22246" }, + project_link_documents: { img: project_link_documents, href: generateLocalizedDocumentUrl().vrct_document_home_url }, project_link_vrct_github: { img: project_link_vrct_github, href: "https://github.com/misyaguziya/VRCT" }, project_link_contact_us: { img: project_link_contact_us, href: "https://docs.google.com/forms/d/e/1FAIpQLSei-xoydOY60ivXqhOjaTzNN8PiBQIDcNhzfy6cw2sjYkcg_g/viewform" }, diff --git a/src-ui/views/app/main_page/main_section/top_bar/right_side_components/RightSideComponents.jsx b/src-ui/views/app/main_page/main_section/top_bar/right_side_components/RightSideComponents.jsx index d76616e0..2cd87eb4 100644 --- a/src-ui/views/app/main_page/main_section/top_bar/right_side_components/RightSideComponents.jsx +++ b/src-ui/views/app/main_page/main_section/top_bar/right_side_components/RightSideComponents.jsx @@ -9,10 +9,17 @@ import { useIsOscAvailable, } from "@logics_common"; -import { useVr, useOthers } from "@logics_configs"; +import { + useAppearance, + useVr, + useOthers, +} from "@logics_configs"; import { OpenQuickSettingButton } from "./_buttons/OpenQuickSettingButton"; +import { generateLocalizedDocumentUrl } from "@ui_configs"; + export const RightSideComponents = () => { + const { currentUiLanguage } = useAppearance(); return (
@@ -23,7 +30,7 @@ export const RightSideComponents = () => { diff --git a/src-ui/views/app/others/splash_component/SplashComponent.jsx b/src-ui/views/app/others/splash_component/SplashComponent.jsx index a9ac4aeb..b34ab288 100644 --- a/src-ui/views/app/others/splash_component/SplashComponent.jsx +++ b/src-ui/views/app/others/splash_component/SplashComponent.jsx @@ -6,6 +6,7 @@ import MegaphoneSvg from "@images/megaphone.svg?react"; import XMarkSvg from "@images/cancel.svg?react"; import { useWindow } from "@logics_common"; import clsx from "clsx"; +import { generateLocalizedDocumentUrl } from "@ui_configs"; export const SplashComponent = () => { return ( @@ -56,7 +57,7 @@ const AnnouncementsContainer = () => { [styles.is_shown]: is_shown, [styles.is_labels_active]: is_labels_active, })} - href="https://docs.google.com/spreadsheets/d/1_L5i-1U6PB1dnaPPTE_5uKMfqOpkLziPyRkiMLi4mqU/edit?usp=sharing" + href={generateLocalizedDocumentUrl().vrct_document_faq_url} target="_blank" rel="noreferrer" >