Codync
免费开源的 1:1 Grok Bot 与 Muse 替代方案。可在 iPhone、Mac 或 Linux 桌面上将 Claude 代码、Codex、Cursor 以及 40 多个编码代理作为持久机器人使用。支持群组聊天、线程、应用。
AI 翻译
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证i18n for React, Vue, Svelte, Solid, Next.js and Nuxt with typed keys. One MIT core, ICU plurals, rich text without innerHTML, translations from a CDN so text changes don't need a deploy.
翻译准备中
取自仓库 README
正在加载完整 README。
查看完整 README ↗Comvi i18n puts translated text on screen, from a catalog in your source or from the Comvi platform over a CDN. It is a framework-agnostic core with bindings for React, Next.js, Vue, Nuxt, Svelte and Solid, and plugins you add only when you need them.
One package per framework; each binding brings @comvi/core with it.
npm install @comvi/react
npm install @comvi/next
npm install @comvi/vue
npm install @comvi/nuxt
npm install @comvi/svelte
npm install @comvi/solid
npm install @comvi/core
| Framework | Package | Peer dependencies | Guide | Try it |
|---|---|---|---|---|
| React | @comvi/react | react | React | StackBlitz |
| Next.js | @comvi/next | next, react | Next.js | StackBlitz |
| Vue | @comvi/vue | vue | Vue | StackBlitz |
| Nuxt | @comvi/nuxt | nuxt | Nuxt | StackBlitz |
| Svelte | @comvi/svelte | svelte | Svelte | StackBlitz |
| Solid | @comvi/solid | solid-js | Solid | StackBlitz |
| Vanilla JavaScript | @comvi/core | none | Vanilla | StackBlitz |
The packages are ESM-only and released together, so install the same version of every
@comvi/* package. The runtime packages need Node 20 or newer; @comvi/cli and
@comvi/vite-plugin need Node 22.
Create the i18n instance and hand it to React, in src/main.tsx:
import { createRoot } from "react-dom/client";
import { createI18n, I18nProvider, useI18n } from "@comvi/react";
const i18n = createI18n({
locale: "en",
fallbackLocale: "en",
messages: {
en: { greeting: "Hello, {name}!" },
uk: { greeting: "Привіт, {name}!" },
},
});
function App() {
const { t } = useI18n();
return <h1>{t("greeting", { name: "Alice" })}</h1>;
}
createRoot(document.getElementById("root")!).render(
<I18nProvider i18n={i18n}>
<App />
</I18nProvider>,
);
<I18nProvider> initializes the i18n instance, and useI18n() gives your components t(), the
current locale and setLocale(). Every binding has the same shape: create the instance, hand it
to the framework, call useI18n() in components. The other frameworks are on
Quick start.
createI18n() returns the i18n instance: it holds the catalog, the current locale and t(). A
binding hands the instance to your framework and re-renders what reads it when the locale or the
catalog changes. The base instance does text and {param} interpolation. Async loading, locale
detection and the in-context editor are capabilities you compose with .use(installer), and ICU
plurals are a constructor option, compiler: icuCompiler; what you never name never enters your
bundle.
npm install @comvi/plugin-fetch-loader
Compose the loader on the instance, in src/main.tsx:
import { createRoot } from "react-dom/client";
import { createI18n, I18nProvider } from "@comvi/react";
import { cdnLoader } from "@comvi/plugin-fetch-loader";
import App from "./App";
const i18n = createI18n({
locale: "en",
fallbackLocale: "en",
}).use(cdnLoader({ cdnUrl: "https://cdn.comvi.io/<project-token>" }));
createRoot(document.getElementById("root")!).render(
<I18nProvider i18n={i18n} fallback={<div className="spinner" />}>
<App />
</I18nProvider>,
);
.use(cdnLoader({ cdnUrl })) fetches each locale from the CDN, so a wording change ships when a
translator saves it, without a redeploy. The CDN URL comes from Settings → Content Deploy in
the Comvi project; the walkthrough is Connect to Comvi.
If your keys use ICU ({count, plural, …}), add compiler: icuCompiler as on
Plurals and ICU; the platform and the compiler are
independent.
| Package | What it does | Docs |
|---|---|---|
@comvi/plugin-fetch-loader | Load translations from the Comvi CDN or API | Fetch loader |
@comvi/plugin-locale-detector | Detect the locale from query, cookie, storage, browser | Locale detector |
@comvi/plugin-in-context-editor | Edit translations inside the running app | In-context editor |
@comvi/vite-plugin | Generate TranslationKeys from local JSON at dev/build | Vite plugin |
@comvi/cli | Pull, push, check and generate types from the terminal | Comvi CLI |
Bug reports, docs fixes and pull requests are welcome. CONTRIBUTING.md explains the repository layout, the setup and what CI checks.
MIT © Comvi