feat(web): i18n (#12471)
This commit is contained in:
@@ -5,6 +5,7 @@ import logoLight from "../asset/logo-ornate-light.svg"
|
||||
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"
|
||||
|
||||
function CopyStatus() {
|
||||
return (
|
||||
@@ -16,6 +17,8 @@ function CopyStatus() {
|
||||
}
|
||||
|
||||
export default function Home() {
|
||||
const i18n = useI18n()
|
||||
|
||||
onMount(() => {
|
||||
const commands = document.querySelectorAll("[data-copy]")
|
||||
for (const button of commands) {
|
||||
@@ -38,24 +41,24 @@ export default function Home() {
|
||||
|
||||
return (
|
||||
<main data-page="home">
|
||||
<Title>opencode | AI coding agent built for the terminal</Title>
|
||||
<Title>{i18n.t("temp.title")}</Title>
|
||||
|
||||
<div data-component="content">
|
||||
<section data-component="top">
|
||||
<img data-slot="logo light" src={logoLight} alt="opencode logo light" />
|
||||
<img data-slot="logo dark" src={logoDark} alt="opencode logo dark" />
|
||||
<h1 data-slot="title">The AI coding agent built for the terminal</h1>
|
||||
<h1 data-slot="title">{i18n.t("temp.hero.title")}</h1>
|
||||
<div data-slot="login">
|
||||
<a href="/auth">opencode zen</a>
|
||||
<a href="/auth">{i18n.t("temp.zen")}</a>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section data-component="cta">
|
||||
<div data-slot="left">
|
||||
<a href="/docs">Get Started</a>
|
||||
<a href="/docs">{i18n.t("temp.getStarted")}</a>
|
||||
</div>
|
||||
<div data-slot="center">
|
||||
<a href="/auth">opencode zen</a>
|
||||
<a href="/auth">{i18n.t("temp.zen")}</a>
|
||||
</div>
|
||||
<div data-slot="right">
|
||||
<button data-copy data-slot="command">
|
||||
@@ -73,30 +76,32 @@ export default function Home() {
|
||||
<section data-component="features">
|
||||
<ul data-slot="list">
|
||||
<li>
|
||||
<strong>Native TUI</strong> A responsive, native, themeable terminal UI
|
||||
<strong>{i18n.t("temp.feature.native.title")}</strong> {i18n.t("temp.feature.native.body")}
|
||||
</li>
|
||||
<li>
|
||||
<strong>LSP enabled</strong> Automatically loads the right LSPs for the LLM
|
||||
<strong>{i18n.t("home.what.lsp.title")}</strong> {i18n.t("home.what.lsp.body")}
|
||||
</li>
|
||||
<li>
|
||||
<strong>opencode zen</strong> A <a href="/docs/zen">curated list of models</a> provided by opencode{" "}
|
||||
<label>New</label>
|
||||
<strong>{i18n.t("temp.zen")}</strong> {i18n.t("temp.feature.zen.beforeLink")}{" "}
|
||||
<a href="/docs/zen">{i18n.t("temp.feature.zen.link")}</a> {i18n.t("temp.feature.zen.afterLink")}{" "}
|
||||
<label>{i18n.t("home.banner.badge")}</label>
|
||||
</li>
|
||||
<li>
|
||||
<strong>Multi-session</strong> Start multiple agents in parallel on the same project
|
||||
<strong>{i18n.t("home.what.multiSession.title")}</strong> {i18n.t("home.what.multiSession.body")}
|
||||
</li>
|
||||
<li>
|
||||
<strong>Shareable links</strong> Share a link to any sessions for reference or to debug
|
||||
<strong>{i18n.t("home.what.shareLinks.title")}</strong> {i18n.t("home.what.shareLinks.body")}
|
||||
</li>
|
||||
<li>
|
||||
<strong>GitHub Copilot</strong> Log in with GitHub to use your Copilot account
|
||||
<strong>{i18n.t("home.what.copilot.title")}</strong> {i18n.t("home.what.copilot.body")}
|
||||
</li>
|
||||
<li>
|
||||
<strong>ChatGPT Plus/Pro</strong> Log in with OpenAI to use your ChatGPT Plus or Pro account
|
||||
<strong>{i18n.t("home.what.chatgptPlus.title")}</strong> {i18n.t("home.what.chatgptPlus.body")}
|
||||
</li>
|
||||
<li>
|
||||
<strong>Use any model</strong> Supports 75+ LLM providers through{" "}
|
||||
<a href="https://models.dev">Models.dev</a>, including local models
|
||||
<strong>{i18n.t("home.what.anyModel.title")}</strong> {i18n.t("temp.feature.models.beforeLink")}{" "}
|
||||
<a href="https://models.dev">Models.dev</a>
|
||||
{i18n.t("temp.feature.models.afterLink")}
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
@@ -142,22 +147,22 @@ export default function Home() {
|
||||
|
||||
<section data-component="screenshots">
|
||||
<figure>
|
||||
<figcaption>opencode TUI with the tokyonight theme</figcaption>
|
||||
<figcaption>{i18n.t("temp.screenshot.caption")}</figcaption>
|
||||
<a href="/docs/cli">
|
||||
<img src={IMG_SPLASH} alt="opencode TUI with tokyonight theme" />
|
||||
<img src={IMG_SPLASH} alt={i18n.t("temp.screenshot.alt")} />
|
||||
</a>
|
||||
</figure>
|
||||
</section>
|
||||
|
||||
<footer data-component="footer">
|
||||
<div data-slot="cell">
|
||||
<a href="https://x.com/opencode">X.com</a>
|
||||
<a href="https://x.com/opencode">{i18n.t("footer.x")}</a>
|
||||
</div>
|
||||
<div data-slot="cell">
|
||||
<a href="https://github.com/anomalyco/opencode">GitHub</a>
|
||||
<a href="https://github.com/anomalyco/opencode">{i18n.t("footer.github")}</a>
|
||||
</div>
|
||||
<div data-slot="cell">
|
||||
<a href="https://opencode.ai/discord">Discord</a>
|
||||
<a href="https://opencode.ai/discord">{i18n.t("footer.discord")}</a>
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user