diff --git a/packages/console/app/script/generate-sitemap.ts b/packages/console/app/script/generate-sitemap.ts
index 6cbffcb8516..bdce205b904 100755
--- a/packages/console/app/script/generate-sitemap.ts
+++ b/packages/console/app/script/generate-sitemap.ts
@@ -3,6 +3,7 @@ import { readdir, writeFile } from "fs/promises"
import { join, dirname } from "path"
import { fileURLToPath } from "url"
import { config } from "../src/config.js"
+import { LOCALES, route } from "../src/lib/language.js"
const __dirname = dirname(fileURLToPath(import.meta.url))
const BASE_URL = config.baseUrl
@@ -27,12 +28,14 @@ async function getMainRoutes(): Promise
@@ -142,7 +144,7 @@ export function Header(props: { zen?: boolean; hideGetStarted?: boolean }) {
{i18n.t("nav.context.copyWordmark")}
-
Remember that your use of OpenCode is at all times subject to our Terms of Use,{" "} - https://opencode.ai/legal/terms-of-service, which incorporates - this Privacy Policy. Any terms we use in this Policy without defining them have the definitions given to - them in the Terms of Use. + https://opencode.ai/legal/terms-of-service, + which incorporates this Privacy Policy. Any terms we use in this Policy without defining them have the + definitions given to them in the Terms of Use.
You may print a copy of this Privacy Policy by clicking the print button in your browser.
diff --git a/packages/console/app/src/routes/legal/terms-of-service/index.tsx b/packages/console/app/src/routes/legal/terms-of-service/index.tsx index f0d7be61c06..f770aa7a067 100644 --- a/packages/console/app/src/routes/legal/terms-of-service/index.tsx +++ b/packages/console/app/src/routes/legal/terms-of-service/index.tsx @@ -1,16 +1,18 @@ import "../../brand/index.css" import "./index.css" -import { Title, Meta, Link } from "@solidjs/meta" +import { Title, Meta } from "@solidjs/meta" import { Header } from "~/component/header" -import { config } from "~/config" import { Footer } from "~/component/footer" import { Legal } from "~/component/legal" +import { LocaleLinks } from "~/component/locale-links" +import { useLanguage } from "~/context/language" export default function TermsOfService() { + const language = useLanguage() return (Certain of our Services, including Zen, may be subject to payments now or in the future (the "Paid - Services"). Please see our Paid Services page https://opencode.ai/zen for a - description of the current Paid Services. Please note that any payment terms presented to you in the - process of using or signing up for a Paid Service are deemed part of these Terms. + Services"). Please see our Paid Services page{" "} + https://opencode.ai/zen for a description of the current Paid + Services. Please note that any payment terms presented to you in the process of using or signing up for + a Paid Service are deemed part of these Terms.
You're free to do that at any time; please refer to our Privacy Policy{" "} - https://opencode.ai/legal/privacy-policy, as well as the licenses - above, to understand how we treat information you provide to us after you have stopped using our - Services. + https://opencode.ai/legal/privacy-policy, as well + as the licenses above, to understand how we treat information you provide to us after you have stopped + using our Services.
diff --git a/packages/console/app/src/routes/s/[id].ts b/packages/console/app/src/routes/s/[id].ts
index 3cdc486a4a6..628a75b2e3c 100644
--- a/packages/console/app/src/routes/s/[id].ts
+++ b/packages/console/app/src/routes/s/[id].ts
@@ -1,5 +1,5 @@
import type { APIEvent } from "@solidjs/start/server"
-import { localeFromCookieHeader, tag } from "~/lib/language"
+import { LOCALE_HEADER, localeFromCookieHeader, parseLocale, tag } from "~/lib/language"
async function handler(evt: APIEvent) {
const req = evt.request.clone()
@@ -7,7 +7,7 @@ async function handler(evt: APIEvent) {
const targetUrl = `https://docs.opencode.ai/docs${url.pathname}${url.search}`
const headers = new Headers(req.headers)
- const locale = localeFromCookieHeader(req.headers.get("cookie"))
+ const locale = parseLocale(req.headers.get(LOCALE_HEADER)) ?? localeFromCookieHeader(req.headers.get("cookie"))
if (locale) headers.set("accept-language", tag(locale))
const response = await fetch(targetUrl, {
diff --git a/packages/console/app/src/routes/t/[...path].tsx b/packages/console/app/src/routes/t/[...path].tsx
index 5cb412f7890..3f65c6822ab 100644
--- a/packages/console/app/src/routes/t/[...path].tsx
+++ b/packages/console/app/src/routes/t/[...path].tsx
@@ -1,5 +1,5 @@
import type { APIEvent } from "@solidjs/start/server"
-import { localeFromCookieHeader, tag } from "~/lib/language"
+import { LOCALE_HEADER, localeFromCookieHeader, parseLocale, tag } from "~/lib/language"
async function handler(evt: APIEvent) {
const req = evt.request.clone()
@@ -7,7 +7,7 @@ async function handler(evt: APIEvent) {
const targetUrl = `https://enterprise.opencode.ai/${url.pathname}${url.search}`
const headers = new Headers(req.headers)
- const locale = localeFromCookieHeader(req.headers.get("cookie"))
+ const locale = parseLocale(req.headers.get(LOCALE_HEADER)) ?? localeFromCookieHeader(req.headers.get("cookie"))
if (locale) headers.set("accept-language", tag(locale))
const response = await fetch(targetUrl, {
diff --git a/packages/console/app/src/routes/temp.tsx b/packages/console/app/src/routes/temp.tsx
index d6d89047938..0a2447f44e3 100644
--- a/packages/console/app/src/routes/temp.tsx
+++ b/packages/console/app/src/routes/temp.tsx
@@ -6,6 +6,7 @@ import logoDark from "../asset/logo-ornate-dark.svg"
import IMG_SPLASH from "../asset/lander/screenshot-splash.png"
import { IconCopy, IconCheck } from "../component/icon"
import { useI18n } from "~/context/i18n"
+import { useLanguage } from "~/context/language"
function CopyStatus() {
return (
@@ -18,6 +19,7 @@ function CopyStatus() {
export default function Home() {
const i18n = useI18n()
+ const language = useLanguage()
onMount(() => {
const commands = document.querySelectorAll("[data-copy]")
@@ -49,16 +51,16 @@ export default function Home() {
- {i18n.t("workspace.models.subtitle.beforeLink")} {i18n.t("common.learnMore")} - . + {i18n.t("workspace.models.subtitle.beforeLink")}{" "} + {i18n.t("common.learnMore")}.
{i18n.t("zen.privacy.beforeExceptions")}{" "} - {i18n.t("zen.privacy.exceptionsLink")}. + {i18n.t("zen.privacy.exceptionsLink")}.