Loading...
Loading...
Compare original and translation side by side
CONTRIBUTING.mdCONTRIBUTING.md| Guideline | Example |
|---|---|
| Address the reader as "you" | "You can configure..." |
| Refer to the product as "Railway", never "we" | "Railway supports..." not "We support..." |
| Use present tense | "The command creates..." not "The command will create..." |
| Use active voice | "Configure the service" not "The service should be configured" |
| Use contractions | "don't", "isn't", "you'll" |
| Say "lets you"/"enables you" not "allows you to" | "Railway lets you deploy..." |
| Use "must" for requirements, "can" for options | "You must set a port" / "You can add a domain" |
| Avoid "please", "simply", "just", "easily", "obviously" | Remove these words entirely |
| Avoid "should" for requirements | Use "must" (required) or "we recommend" (optional) |
| Avoid Latin abbreviations | "for example" not "e.g.", "that is" not "i.e." |
| Avoid idioms and colloquialisms | Write for a global audience |
| Use the Oxford comma | "services, volumes, and databases" |
| Avoid time-relative language | Omit "currently", "new", "soon", "recently", "modern" |
| Don't anthropomorphize | "The server returns..." not "The server thinks..." |
| 准则 | 示例 |
|---|---|
| 以“你”称呼读者 | "你可以配置..." |
| 称产品为"Railway",绝不用“我们” | "Railway支持...”而非“我们支持..." |
| 使用一般现在时 | "该命令会创建..."而非“该命令将创建..." |
| 使用主动语态 | "配置服务"而非“服务应被配置" |
| 使用缩约形式 | "don't", "isn't", "you'll" |
| 用"lets you"/"enables you"代替"allows you to" | "Railway lets you deploy..." |
| 用"must"表示要求,"can"表示选项 | "你必须设置端口" / "你可以添加域名" |
| 避免使用"please", "simply", "just", "easily", "obviously" | 完全删除这些词汇 |
| 避免用"should"表示要求 | 使用"must"(必填)或"we recommend"(可选) |
| 避免使用拉丁语缩写 | "for example"而非"e.g.", "that is"而非"i.e." |
| 避免习语和口语表达 | 面向全球读者写作 |
| 使用牛津逗号 | "services, volumes, and databases" |
| 避免使用与时间相关的语言 | 省略"currently", "new", "soon", "recently", "modern" |
| 不要拟人化 | "服务器返回..."而非“服务器认为..." |
| Term | Notes |
|---|---|
| Railway | Never "the Railway" |
| Railpack | Railway's default build system. Capitalized. |
| Priority Boarding | Capitalized — name of the program |
| Central Station | Capitalized — Railway's community forum |
| service | Lowercase — a Railway service |
| volume | Lowercase — a Railway volume |
| environment | Lowercase — a Railway environment |
| deployment | Lowercase — a Railway deployment |
| project | Lowercase — a Railway project |
| template | Lowercase — a Railway template |
| variable | Lowercase — a Railway variable, service variable, shared variable |
| Pro plan / Hobby plan / Trial plan | "Pro" capitalized, "plan" lowercase |
| 术语 | 说明 |
|---|---|
| Railway | 绝不用"the Railway" |
| Railpack | Railway的默认构建系统,首字母大写 |
| Priority Boarding | 首字母大写——项目名称 |
| Central Station | 首字母大写——Railway的社区论坛 |
| service | 小写——Railway服务 |
| volume | 小写——Railway存储卷 |
| environment | 小写——Railway环境 |
| deployment | 小写——Railway部署 |
| project | 小写——Railway项目 |
| template | 小写——Railway模板 |
| variable | 小写——Railway变量、服务变量、共享变量 |
| Pro plan / Hobby plan / Trial plan | "Pro"首字母大写,"plan"小写 |
| Use | Instead of |
|---|---|
| primary / main | master |
| secondary / replica | slave |
| allowlist | whitelist |
| blocklist | blacklist |
| placeholder | dummy |
| built-in | native (when referring to features) |
| 使用 | 替代 |
|---|---|
| primary / main | master |
| secondary / replica | slave |
| allowlist | whitelist |
| blocklist | blacklist |
| placeholder | dummy |
| built-in | native(指代功能时) |
content/docs/src/data/sidebar.tscontent/guides/content/docs/[topic]/troubleshooting/content/docs/integrations/api/manage-*.mdGraphQLCodeTabscontent/docs/src/data/sidebar.tscontent/guides/content/docs/[topic]/troubleshooting/content/docs/integrations/api/manage-*.mdGraphQLCodeTabsundefinedundefined
Common section progression: "How it works" then "Configure [feature]" then
"[Feature] with [integration]".
常见章节顺序:“工作原理”→“配置[功能]”→“[功能]与[集成]”。content/guides/flask.mdcontent/guides/flask.mdCONTRIBUTING.mdsrc/data/sidebar.tsCONTRIBUTING.mdsrc/data/sidebar.ts/variablesCONTRIBUTING.mdsrc/data/sidebar.ts/variablesCONTRIBUTING.mdsrc/data/sidebar.tsrailwayapp/tmprailwayapp/tmp####?####?bashshellshbashjavascriptpythonjsontomlyamlsqldockerfileplaintext```bash
railway link
``````toml
[start]
cmd = "gunicorn main:app"
```\bashshellshbashjavascriptpythonjsontomlyamlsqldockerfileplaintext```bash
railway link
``````toml
[start]
cmd = "gunicorn main:app"
```\```bash title="terminal"
railway up
```
```json filename="railway.json" showLineNumbers
{
"$schema": "https://railway.com/railway.schema.json"
}
```
```python collapsible```bash title="terminal"
railway up
```
```json filename="railway.json" showLineNumbers
{
"$schema": "https://railway.com/railway.schema.json"
}
```
```python collapsibleundefined| Option | Effect |
|---|---|
| Displays a filename in the code block header |
| Enables line numbers |
| Collapses long blocks with an expand button |
undefined| 选项 | 效果 |
|---|---|
| 在代码块头部显示文件名 |
| 启用行号显示 |
| 将长代码块折叠,带有展开按钮 |
// [!code ++] — marks a line as added (green)
// [!code --] — marks a line as removed (red)
// [!code highlight] — highlights a line// [!code ++] — 将行标记为新增(绿色)
// [!code --] — 将行标记为删除(红色)
// [!code highlight] — 高亮行[Variables](/variables)<a>target="_blank"<a href="https://example.com" target="_blank">Link text</a>[Configure the port](#configure-the-port)[Target ports](/networking/public-networking#target-ports)<!-- Don't do this -->
[Variables](https://docs.railway.com/variables)[Variables](/variables)<a>target="_blank"<a href="https://example.com" target="_blank">链接文本</a>[配置端口](#configure-the-port)[目标端口](/networking/public-networking#target-ports)<!-- 不要这样做 -->
[Variables](https://docs.railway.com/variables)Code font代码字体| Verb | When to use |
|---|---|
| click | Buttons and links: "Click Deploy" |
| select | Dropdowns and options: "Select Production" |
| enter | Text fields: "Enter your API key" |
| toggle | Switches: "Toggle Auto-deploy on" |
| expand | Collapsed sections: "Expand Advanced settings" |
| check / uncheck | Checkboxes |
| navigate to | Moving between pages: "Navigate to Settings" |
| 动词 | 使用场景 |
|---|---|
| click | 按钮和链接:“点击Deploy” |
| select | 下拉菜单和选项:“选择Production” |
| enter | 文本框:“输入你的API密钥” |
| toggle | 开关:“开启Auto-deploy” |
| expand | 折叠区域:“展开Advanced settings” |
| check / uncheck | 复选框 |
| navigate to | 页面间跳转:“导航至Settings” |
Frame<Image
src="https://res.cloudinary.com/railway/image/upload/v1234567890/image_name.png"
alt="Description of what the image shows"
layout="responsive"
width={800} height={400} quality={100}
/>altlayout"responsive""intrinsic"widthheightquality={100}quality={80}deploy-settings-panel.pngDeploySettingsPanel.pngFrame<Image
src="https://res.cloudinary.com/railway/image/upload/v1234567890/image_name.png"
alt="图片内容描述"
layout="responsive"
width={800} height={400} quality={100}
/>altlayout"responsive""intrinsic"widthheightquality={100}quality={80}deploy-settings-panel.pngDeploySettingsPanel.png**Note:**<Banner variant="info"><Banner variant="warning"><Banner variant="danger">| Variant | Use case | Default icon |
|---|---|---|
| Neutral supplementary info | (none) |
| Highlighted feature or branded callout | Star |
| Context, prerequisites, plan requirements | Info circle |
| Confirmation, positive outcome | Check circle |
| Consequences before acting | Triangle alert |
| Destructive or irreversible actions | Cross circle |
<Banner variant="info">
This feature requires a Pro plan.
</Banner>
<Banner variant="warning">
This action affects all environments.
</Banner>
<Banner variant="danger">
This action cannot be undone.
</Banner>icon={<CustomIcon />}hideIcon**Note:**<Banner variant="info"><Banner variant="warning"><Banner variant="danger">| 变体 | 使用场景 | 默认图标 |
|---|---|---|
| 中性补充信息 | (无) |
| 突出功能或品牌提示 | 星星 |
| 上下文、先决条件、计划要求 | 信息圆圈 |
| 确认信息、积极结果 | 勾选圆圈 |
| 操作前需注意的后果 | 三角形警告 |
| 破坏性或不可逆操作 | 叉号圆圈 |
<Banner variant="info">
此功能需要Pro计划。
</Banner>
<Banner variant="warning">
此操作会影响所有环境。
</Banner>
<Banner variant="danger">
此操作无法撤销。
</Banner>icon={<CustomIcon />}hideIcon**Note:** This is a preview feature under active development.**Note:** 这是一项处于活跃开发中的预览功能。**Note:** Railway uses Nixpacks to build your app by default.<Banner>**Note:** Railway默认使用Nixpacks构建你的应用。<Banner><Collapse title="How do I handle port forwarding?">
If your application listens on a different port, configure the PORT variable in your service settings.
</Collapse>slug<Collapse slug="manual-config" title="Manually configuring variables"><Collapse title="如何处理端口转发?">
如果你的应用监听其他端口,请在服务设置中配置PORT变量。
</Collapse>slug<Collapse slug="manual-config" title="手动配置变量">[](https://railway.com/deploy/TEMPLATE_ID)[](https://railway.com/deploy/TEMPLATE_ID)CodeTabCodeBlock<CodeBlock>
<CodeTab label="railway.toml" lang="toml">
{`[build]
builder = "nixpacks"
buildCommand = "echo building!"`}
</CodeTab>
<CodeTab label="railway.json" lang="json">
{`{
"build": {
"builder": "NIXPACKS",
"buildCommand": "echo building!"
}
}`}
</CodeTab>
</CodeBlock>labellang{}CodeTabCodeBlock<CodeBlock>
<CodeTab label="railway.toml" lang="toml">
{`[build]
builder = "nixpacks"
buildCommand = "echo building!"`}
</CodeTab>
<CodeTab label="railway.json" lang="json">
{`{
"build": {
"builder": "NIXPACKS",
"buildCommand": "echo building!"
}
}`}
</CodeTab>
</CodeBlock>labellang{}<GraphQLCodeTabs
query={`mutation serviceDomainCreate($input: ServiceDomainCreateInput!) {
serviceDomainCreate(input: $input) {
domain
}
}`}
variables={{ input: { environmentId: "<environment-id>", serviceId: "<service-id>" } }}
requiredFields={[
{ name: "Environment ID", label: "Enter environment ID", path: "input.environmentId" },
{ name: "Service ID", label: "Enter service ID", path: "input.serviceId" },
]}
/>queryvariablesrequiredFieldsnamelabelpathoptionalFieldsnametypedescriptionapiDefault<GraphQLCodeTabs
query={`mutation serviceDomainCreate($input: ServiceDomainCreateInput!) {
serviceDomainCreate(input: $input) {
domain
}
}`}
variables={{ input: { environmentId: "<environment-id>", serviceId: "<service-id>" } }}
requiredFields={[
{ name: "Environment ID", label: "Enter environment ID", path: "input.environmentId" },
{ name: "Service ID", label: "Enter service ID", path: "input.serviceId" },
]}
/>queryvariablesrequiredFieldsnamelabelpathoptionalFieldsnametypedescriptionapiDefault<Steps>
<Step title="Install the CLI">
Download and install the Railway CLI.
</Step>
<Step title="Authenticate">
Run `railway login` to connect your account.
</Step>
<Step title="Deploy">
Run `railway up` to deploy your app.
</Step>
</Steps>titleStepStep<Steps>
<Step title="安装CLI">
下载并安装Railway CLI。
</Step>
<Step title="认证">
运行`railway login`连接你的账户。
</Step>
<Step title="部署">
运行`railway up`部署你的应用。
</Step>
</Steps>SteptitleStep<FileTree>
<FileTree.Folder name="src" defaultOpen>
<FileTree.File name="index.ts" highlight />
<FileTree.Folder name="routes">
<FileTree.File name="api.ts" />
</FileTree.Folder>
</FileTree.Folder>
<FileTree.File name="package.json" />
<FileTree.File name="Dockerfile" />
</FileTree>FileTree.FoldernamedefaultOpenFileTree.Filenamehighlight<FileTree>
<FileTree.Folder name="src" defaultOpen>
<FileTree.File name="index.ts" highlight />
<FileTree.Folder name="routes">
<FileTree.File name="api.ts" />
</FileTree.Folder>
</FileTree.Folder>
<FileTree.File name="package.json" />
<FileTree.File name="Dockerfile" />
</FileTree>FileTree.FoldernamedefaultOpenFileTree.FilenamehighlightRailway runs your app in a <Tooltip content="An isolated Linux environment">container</Tooltip>.contentside"top""bottom""left""right"align"start""center""end"delayMsRailway在<Tooltip content="隔离的Linux环境">container</Tooltip>中运行你的应用。contentside"top""bottom""left""right"align"start""center""end"delayMsIt is highly recommended that [you eject from the template after deployment](/templates/deploy#eject-from-template-repository) to create a copy of the repo on your GitHub account.强烈建议你[在部署后从模板eject](/templates/deploy#eject-from-template-repository),在你的GitHub账户上创建仓库副本。**Note:** You can also choose from a <a href="https://railway.com/templates?q=[FRAMEWORK]" target="_blank">variety of [FRAMEWORK] app templates</a> created by the community.**Note:** 你也可以从社区创建的<a href="https://railway.com/templates?q=[FRAMEWORK]" target="_blank">多种[FRAMEWORK]应用模板</a>中选择。undefinedundefinedundefinedsrc/data/sidebar.tscontent/guides/src/data/sidebar.tscontent/guides/redirects.js{
source: "/old-path",
destination: "/new-path",
permanent: true,
}redirects.js{
source: "/old-path",
destination: "/new-path",
permanent: true,
}