Skip to content

Commit aadff98

Browse files
authored
Translation: All documents for ko, ja (#2)
* feat: Add complete i18n support for landing and playground pages - Add comprehensive Korean and Japanese translations for all page content - Implement Docusaurus Translate component in index.tsx - Implement Docusaurus Translate component in playground.tsx - Add translation keys for hero section, features, code showcase, quick start, and tooling - Add translation keys for playground UI elements and examples All pages now properly support language switching between English, Korean, and Japanese. Fixes language switching issue where landing page and playground displayed only English content. * chore: Use SVG logo as favicon * docs: Rewrite README with proper project description Replace the default Docusaurus template README with a comprehensive description of the T-Ruby documentation site, including: - Project logo and tagline - Link to T-Ruby main repository - What is T-Ruby section with code examples - Local development instructions - Contributing guide reference * docs: Add complete Korean and Japanese translations for all documentation Translate all 45 documentation files to both Korean (ko) and Japanese (ja): - Introduction: why-t-ruby, t-ruby-vs-others - Getting Started: first-trb-file, editor-setup, project-configuration - Learn/Basics: basic-types, type-annotations, type-inference - Learn/Everyday Types: primitives, arrays-and-hashes, union-types, literal-types, type-narrowing - Learn/Functions: parameter-return-types, optional-rest-parameters, blocks-procs-lambdas - Learn/Classes: class-annotations, instance-class-variables, inheritance-mixins, abstract-classes - Learn/Interfaces: defining-interfaces, implementing-interfaces, duck-typing - Learn/Generics: generic-functions-classes, constraints, built-in-generics - Learn/Advanced: type-aliases, intersection-types, conditional-types, mapped-types, utility-types - CLI: commands, compiler-options, configuration - Reference: cheatsheet, built-in-types, type-operators, stdlib-types - Tooling: rbs-integration, steep, ruby-lsp, migrating-from-ruby - Project: contributing, roadmap, changelog Total: 90 translation files (45 docs × 2 languages) ---------
1 parent 500d8a3 commit aadff98

File tree

96 files changed

+56676
-99
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+56676
-99
lines changed

README.md

Lines changed: 71 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,97 @@
1-
# Website
1+
<p align="center">
2+
<img src="static/img/logo.svg" width="200" alt="T-Ruby Logo">
3+
</p>
24

3-
This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.
5+
<h1 align="center">T-Ruby Documentation</h1>
46

5-
## Installation
7+
<p align="center">
8+
<b>Type-safe Ruby, the TypeScript way</b>
9+
</p>
10+
11+
<p align="center">
12+
<a href="https://type-ruby.github.io">Documentation</a> •
13+
<a href="https://github.com/type-ruby/t-ruby">T-Ruby Repository</a>
14+
</p>
15+
16+
---
17+
18+
## About This Repository
19+
20+
This repository contains the source code for the [T-Ruby official documentation website](https://type-ruby.github.io).
21+
22+
The documentation site is built with [Docusaurus](https://docusaurus.io/) and supports multiple languages (English, Korean, Japanese).
23+
24+
## What is T-Ruby?
25+
26+
**T-Ruby** is a typed superset of Ruby that compiles to plain Ruby — just like TypeScript does for JavaScript.
27+
28+
- Write `.trb` files with type annotations
29+
- Compile to standard `.rb` files with **zero runtime overhead**
30+
- Automatically generate `.rbs` signature files for type checkers
31+
32+
```ruby
33+
# input.trb
34+
def greet(name: String): String
35+
"Hello, #{name}!"
36+
end
37+
```
38+
39+
```ruby
40+
# output.rb (compiled)
41+
def greet(name)
42+
"Hello, #{name}!"
43+
end
44+
```
45+
46+
```ruby
47+
# output.rbs (generated)
48+
def greet: (String name) -> String
49+
```
50+
51+
For more information, visit the [T-Ruby repository](https://github.com/type-ruby/t-ruby).
52+
53+
## Local Development
54+
55+
### Prerequisites
56+
57+
- Node.js 20.0 or higher
58+
- pnpm
59+
60+
### Installation
661
762
```bash
863
pnpm install
964
```
1065
11-
## Local Development
66+
### Start Development Server
1267
1368
```bash
1469
pnpm start
1570
```
1671
1772
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
1873
19-
## Build
74+
### Build
2075
2176
```bash
2277
pnpm build
2378
```
2479
25-
This command generates static content into the `build` directory and can be served using any static contents hosting service.
80+
This command generates static content into the `build` directory.
2681
27-
## Deployment
82+
### Deployment
2883
2984
```bash
3085
pnpm deploy
3186
```
3287
3388
This command builds the website and pushes to the `gh-pages` branch for GitHub Pages hosting.
89+
90+
## Contributing
91+
92+
We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.
93+
94+
## Related Links
95+
96+
- [T-Ruby Repository](https://github.com/type-ruby/t-ruby) - The main T-Ruby compiler
97+
- [Documentation Website](https://type-ruby.github.io) - Live documentation site

docusaurus.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import type * as Preset from '@docusaurus/preset-classic';
55
const config: Config = {
66
title: 'T-Ruby',
77
tagline: 'Type-safe Ruby, the TypeScript way',
8-
favicon: 'img/favicon.ico',
8+
favicon: 'img/logo.svg',
99

1010
future: {
1111
v4: true,

i18n/ja/code.json

Lines changed: 260 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,5 +202,265 @@
202202
"homepage.features.zeroRuntime.description": {
203203
"message": "型はビルド時にのみ存在します。ランタイムオーバーヘッドなしで純粋なRubyコードにコンパイルされます。",
204204
"description": "Feature description"
205+
},
206+
"homepage.hero.badge": {
207+
"message": "実験的",
208+
"description": "Experimental badge"
209+
},
210+
"homepage.hero.title2": {
211+
"message": "型安全なRubyを",
212+
"description": "Hero title line 1"
213+
},
214+
"homepage.hero.titleHighlight": {
215+
"message": "TypeScriptの方法で",
216+
"description": "Hero title line 2 highlighted"
217+
},
218+
"homepage.hero.subtitle2": {
219+
"message": "型アノテーション付きの.trbファイルを書きましょう。ランタイムオーバーヘッドなしで標準の.rbファイルにコンパイルします。",
220+
"description": "Hero subtitle"
221+
},
222+
"homepage.install.command": {
223+
"message": "gem install t-ruby",
224+
"description": "Install command"
225+
},
226+
"homepage.features.typeSafety.title": {
227+
"message": "型安全性",
228+
"description": "Feature title"
229+
},
230+
"homepage.features.typeSafety.description": {
231+
"message": "ランタイムではなくコンパイル時に型エラーをキャッチします。既存のRubyコードに徐々に型を追加できます。",
232+
"description": "Feature description"
233+
},
234+
"homepage.features.rbsGeneration.title": {
235+
"message": "RBS生成",
236+
"description": "Feature title"
237+
},
238+
"homepage.features.rbsGeneration.description": {
239+
"message": "Steep、Ruby LSPなどとの統合のために.rbsシグネチャファイルを自動的に生成します。",
240+
"description": "Feature description"
241+
},
242+
"homepage.features.tsInspired.title": {
243+
"message": "TypeScriptにインスパイア",
244+
"description": "Feature title"
245+
},
246+
"homepage.features.tsInspired.description": {
247+
"message": "TypeScript開発者にとって馴染みのある構文。Union型、ジェネリクス、インターフェースなどをサポートします。",
248+
"description": "Feature description"
249+
},
250+
"homepage.features.greatDX.title": {
251+
"message": "優れたDX",
252+
"description": "Feature title"
253+
},
254+
"homepage.features.greatDX.description": {
255+
"message": "構文ハイライト、LSP、リアルタイムエラー報告をサポートするVS CodeとNeovimのサポート。",
256+
"description": "Feature description"
257+
},
258+
"homepage.features.gradualAdoption.title": {
259+
"message": "段階的な導入",
260+
"description": "Feature title"
261+
},
262+
"homepage.features.gradualAdoption.description": {
263+
"message": "1つのファイルから始めましょう。型付きコードと型なしコードを混在させることができます。自分のペースで移行してください。",
264+
"description": "Feature description"
265+
},
266+
"homepage.codeShowcase.title": {
267+
"message": "実際の動作を見る",
268+
"description": "Code showcase title"
269+
},
270+
"homepage.codeShowcase.subtitle": {
271+
"message": "型付きRubyを書いて、生成された型シグネチャと共に標準Rubyにコンパイルします。",
272+
"description": "Code showcase subtitle"
273+
},
274+
"homepage.codeShowcase.input": {
275+
"message": "入力",
276+
"description": "Input label"
277+
},
278+
"homepage.codeShowcase.output": {
279+
"message": "出力",
280+
"description": "Output label"
281+
},
282+
"homepage.codeShowcase.generated": {
283+
"message": "生成",
284+
"description": "Generated label"
285+
},
286+
"homepage.quickStart.title": {
287+
"message": "クイックスタート",
288+
"description": "Quick start title"
289+
},
290+
"homepage.quickStart.step1.title": {
291+
"message": "T-Rubyをインストール",
292+
"description": "Step 1 title"
293+
},
294+
"homepage.quickStart.step2.title": {
295+
"message": ".trbファイルを作成",
296+
"description": "Step 2 title"
297+
},
298+
"homepage.quickStart.step3.title": {
299+
"message": "コンパイルして実行",
300+
"description": "Step 3 title"
301+
},
302+
"homepage.quickStart.cta": {
303+
"message": "完全なガイドを読む",
304+
"description": "Quick start CTA"
305+
},
306+
"homepage.tooling.title": {
307+
"message": "お使いのツールと連携",
308+
"description": "Tooling title"
309+
},
310+
"homepage.tooling.subtitle": {
311+
"message": "T-RubyはRubyエコシステムとシームレスに統合されます。",
312+
"description": "Tooling subtitle"
313+
},
314+
"homepage.tooling.editors.title": {
315+
"message": "エディタ",
316+
"description": "Editors title"
317+
},
318+
"homepage.tooling.editors.vscode": {
319+
"message": "VS Code拡張機能",
320+
"description": "VS Code extension"
321+
},
322+
"homepage.tooling.editors.neovim": {
323+
"message": "Neovimプラグイン",
324+
"description": "Neovim plugin"
325+
},
326+
"homepage.tooling.editors.lsp": {
327+
"message": "ランゲージサーバー(LSP)",
328+
"description": "Language server"
329+
},
330+
"homepage.tooling.typeCheckers.title": {
331+
"message": "型チェッカー",
332+
"description": "Type checkers title"
333+
},
334+
"homepage.tooling.typeCheckers.steep": {
335+
"message": "Steep",
336+
"description": "Steep"
337+
},
338+
"homepage.tooling.typeCheckers.rubyLsp": {
339+
"message": "Ruby LSP",
340+
"description": "Ruby LSP"
341+
},
342+
"homepage.tooling.typeCheckers.sorbet": {
343+
"message": "Sorbet(RBS経由)",
344+
"description": "Sorbet via RBS"
345+
},
346+
"homepage.tooling.ecosystem.title": {
347+
"message": "Rubyエコシステム",
348+
"description": "Ruby ecosystem title"
349+
},
350+
"homepage.tooling.ecosystem.rbs": {
351+
"message": "RBS互換",
352+
"description": "RBS compatible"
353+
},
354+
"homepage.tooling.ecosystem.ruby": {
355+
"message": "すべてのRubyバージョン",
356+
"description": "Any Ruby version"
357+
},
358+
"homepage.tooling.ecosystem.gems": {
359+
"message": "すべてのgemが動作",
360+
"description": "All gems work"
361+
},
362+
"homepage.layout.title": {
363+
"message": "型安全なRuby",
364+
"description": "Layout title"
365+
},
366+
"homepage.layout.description": {
367+
"message": "T-Ruby: RubyのためのTypeScriptスタイル型システム。型アノテーション付きの.trbファイルを書いて、標準の.rbファイルにコンパイルします。",
368+
"description": "Layout description"
369+
},
370+
"playground.title": {
371+
"message": "プレイグラウンド",
372+
"description": "Playground title"
373+
},
374+
"playground.subtitle": {
375+
"message": "T-Rubyコードを書いて、コンパイルされた出力をリアルタイムで確認しましょう。",
376+
"description": "Playground subtitle"
377+
},
378+
"playground.input.title": {
379+
"message": "入力",
380+
"description": "Input panel title"
381+
},
382+
"playground.input.filename": {
383+
"message": "example.trb",
384+
"description": "Input filename"
385+
},
386+
"playground.input.placeholder": {
387+
"message": "ここにT-Rubyコードを書いてください...",
388+
"description": "Editor placeholder"
389+
},
390+
"playground.output.title": {
391+
"message": "出力",
392+
"description": "Output panel title"
393+
},
394+
"playground.output.ruby": {
395+
"message": ".rb",
396+
"description": "Ruby output tab"
397+
},
398+
"playground.output.rbs": {
399+
"message": ".rbs",
400+
"description": "RBS output tab"
401+
},
402+
"playground.output.errors": {
403+
"message": "エラー",
404+
"description": "Errors tab"
405+
},
406+
"playground.output.noErrors": {
407+
"message": "エラーなし",
408+
"description": "No errors message"
409+
},
410+
"playground.output.compilationErrors": {
411+
"message": "コンパイルエラー",
412+
"description": "Compilation errors title"
413+
},
414+
"playground.output.clickToCompile": {
415+
"message": "# 出力を見るには「コンパイル」をクリックしてください",
416+
"description": "Click to compile message"
417+
},
418+
"playground.output.clickToGenerateRbs": {
419+
"message": "# RBSを生成するには「コンパイル」をクリックしてください",
420+
"description": "Click to generate RBS message"
421+
},
422+
"playground.compile.button": {
423+
"message": "コンパイル",
424+
"description": "Compile button"
425+
},
426+
"playground.compile.compiling": {
427+
"message": "コンパイル中...",
428+
"description": "Compiling state"
429+
},
430+
"playground.examples.helloWorld": {
431+
"message": "Hello World",
432+
"description": "Hello World example"
433+
},
434+
"playground.examples.basicTypes": {
435+
"message": "基本型",
436+
"description": "Basic Types example"
437+
},
438+
"playground.examples.unionTypes": {
439+
"message": "Union型",
440+
"description": "Union Types example"
441+
},
442+
"playground.examples.generics": {
443+
"message": "ジェネリクス",
444+
"description": "Generics example"
445+
},
446+
"playground.examples.interfaces": {
447+
"message": "インターフェース",
448+
"description": "Interfaces example"
449+
},
450+
"playground.examples.classes": {
451+
"message": "クラス",
452+
"description": "Classes example"
453+
},
454+
"playground.footer.note": {
455+
"message": "このプレイグラウンドはデモンストレーション用に簡略化されたコンパイラを使用しています。完全な機能を使用するには、gem install t-rubyでT-Rubyをローカルにインストールしてください。",
456+
"description": "Footer note"
457+
},
458+
"playground.layout.title": {
459+
"message": "プレイグラウンド",
460+
"description": "Layout title"
461+
},
462+
"playground.layout.description": {
463+
"message": "ブラウザでT-Rubyを試してみましょう",
464+
"description": "Layout description"
205465
}
206466
}

0 commit comments

Comments
 (0)