Concepts
Languages
The Dashboard speaks English and Simplified Chinese (
zh-CN). This page says how it chooses
between them, where its words live, and which Chinese term stands for each of Davloom's own.Choosing the language
- With nothing chosen, the Dashboard follows the browser: any Chinese in
navigator.languages, in any script or region (zh,zh-CN,zh-TW,zh-Hant-HK), shows Simplified Chinese, and anything else shows English. - Settings > Appearance > Language offers English, 简体中文 and System. The choice is kept in this
browser's
localStorageunderdavloom-language, applies at once to every open tab, and System removes it. Without storage, as in a private window, a choice lasts until the page closes. langon<html>always names the language shown, so screen readers and the browser's own features, such as hyphenation and font choice, read it right.
First paint
Each prerendered page holds its frame twice, once in each language, in elements marked
data-frame-locale. A small script in <head> (apps/web/src/features/i18n/script.ts) sets lang
on <html> from the stored choice or the browser before <body> is parsed, and for Chinese it also
writes the page's Chinese title and description. The stylesheet shows only the frame whose language
matches lang, so a Chinese reader never sees English first. Once the code loads, the page renders
in one language only.Where the words live
apps/web/src/features/i18n/messages/en.tsholds every English word of the Dashboard, by key. Braces hold a placeholder, such as{name}, and a message whose words depend on a number hasoneandotherforms, whichIntl.PluralRuleschooses between. Chinese has onlyother.apps/web/src/features/i18n/messages/zh-CN.tsholds the same keys in Chinese. TypeScript fails when a key is missing, andi18n.test.tsxfails when a text is empty or its placeholders or tags differ from the English.apps/web/src/features/i18n/messages/astryx-zh-CN.tssupplies the words of Astryx components that Astryx's own Chinese catalog leaves out.- A component reads its words with
const t = useT()andt("key", { name }). Numbers, sizes, dates, times, relative times and lists go throught.count,t.bytes,t.date,t.dateTime,t.relativeandt.list, which format them withIntlfor the language shown. - A message that holds a link marks it with a tag, such as
<link>Credentials</link>, so a translation can move the link within its sentence;RichTextrenders it.
To add words, add the key to
en.ts and to zh-CN.ts. Write a whole sentence per key rather
than joining fragments, because Chinese orders a sentence's parts differently.Style
Write Chinese that is short and plain, as a native product would say it. Use full-width punctuation
(
,。:;?!“”()) and leave a space between Chinese and a Latin word or a number, as in
3 个文件 or Davloom 实例. Address the reader as 你, and keep error messages to what happened and
what to do next.Glossary
Names stay as they are in both languages: Davloom, WebDAV, Finder, rclone, Cloudflare, Durable
Objects, S3 and API.
| English | Chinese |
|---|---|
| Dashboard | 控制台 |
| Overview | 概览 |
| Files | 文件 |
| Folder | 文件夹 |
| Credentials | 凭据 |
| API Key, key | API 密钥, 密钥 |
| Storage & Mounts | 存储与挂载 |
| Mount | 挂载点 |
| Backend, storage backend | 后端, 存储后端 |
| S3 compatible | 兼容 S3 |
| Bucket | 存储桶 |
| Endpoint | 端点 |
| Region | 区域 |
| Settings | 设置 |
| Appearance | 外观 |
| Profile | 个人资料 |
| Sign in, sign out | 登录, 退出登录 |
| Create account | 创建账户 |
| Password | 密码 |
| Passkey | 通行密钥 |
| Two-step verification | 两步验证 |
| Authenticator app | 身份验证器应用 |
| Backup code | 备用验证码 |
| Setup token | 初始化令牌 |
| Session | 会话 |
| Revoke | 吊销 |
| Read only, read and write | 只读, 读写 |
| Instance | 实例 |
| Data export | 数据导出 |
| Available, unavailable | 可用, 不可用 |
PreviousArchitecture
NextManagement API
On this page