diff --git a/docs/Gemfile b/docs/Gemfile index 4f4991e3b2a6e..f9703ed8fe88e 100644 --- a/docs/Gemfile +++ b/docs/Gemfile @@ -9,6 +9,9 @@ gem 'jekyll', '~>2.0' # Auto redirect pages gem 'jekyll-redirect-from' +# i18n / l10n +gem 'jekyll-multiple-languages' + # JSON gem 'json' diff --git a/docs/Gemfile.lock b/docs/Gemfile.lock index 89a0f264aab13..72cb8e43d6638 100644 --- a/docs/Gemfile.lock +++ b/docs/Gemfile.lock @@ -32,6 +32,7 @@ GEM jekyll-coffeescript (1.0.0) coffee-script (~> 2.2) jekyll-gist (1.1.0) + jekyll-multiple-languages (1.0.8) jekyll-paginate (1.0.0) jekyll-redirect-from (0.5.0) jekyll (~> 2.0) @@ -75,6 +76,7 @@ PLATFORMS DEPENDENCIES jekyll (~> 2.0) + jekyll-multiple-languages jekyll-redirect-from json rake diff --git a/docs/_config.yml b/docs/_config.yml index dedf2c6b1ac40..b3f542eca4320 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -36,4 +36,10 @@ sass: sass_dir: _css gems: - jekyll-redirect-from +- jekyll-multiple-languages react_version: 0.14.2 + +# i18n +languages: ["en", "ko-KR"] +default_language: "en" +fill_default_content: true diff --git a/docs/_data/nav_docs.yml b/docs/_data/nav_docs.yml index 5970733c929c9..ffdea3d9e37cc 100644 --- a/docs/_data/nav_docs.yml +++ b/docs/_data/nav_docs.yml @@ -1,99 +1,99 @@ -- title: Quick Start +- title: docs.titles.quick-start items: - id: getting-started - title: Getting Started + title: docs.titles.getting-started - id: tutorial - title: Tutorial + title: docs.titles.tutorial - id: thinking-in-react - title: Thinking in React -- title: Community Resources + title: docs.titles.thinking-in-react +- title: docs.titles.community-resources items: - id: conferences - title: Conferences + title: docs.titles.conferences - id: videos - title: Videos + title: docs.titles.videos - id: complementary-tools - title: Complementary Tools + title: docs.titles.complementary-tools - id: examples - title: Examples -- title: Guides + title: docs.titles.examples +- title: docs.titles.guides items: - id: why-react - title: Why React? + title: docs.titles.why-react - id: displaying-data - title: Displaying Data + title: docs.titles.displaying-data subitems: - id: jsx-in-depth - title: JSX in Depth + title: docs.titles.jsx-in-depth - id: jsx-spread - title: JSX Spread Attributes + title: docs.titles.jsx-spread - id: jsx-gotchas - title: JSX Gotchas + title: docs.titles.jsx-gotchas - id: interactivity-and-dynamic-uis - title: Interactivity and Dynamic UIs + title: docs.titles.interactivity-and-dynamic-uis - id: multiple-components - title: Multiple Components + title: docs.titles.multiple-components - id: reusable-components - title: Reusable Components + title: docs.titles.reusable-components - id: transferring-props - title: Transferring Props + title: docs.titles.transferring-props - id: forms - title: Forms + title: docs.titles.forms - id: working-with-the-browser - title: Working With the Browser + title: docs.titles.working-with-the-browser subitems: - id: more-about-refs - title: Refs to Components + title: docs.titles.more-about-refs - id: tooling-integration - title: Tooling Integration + title: docs.titles.tooling-integration - id: addons - title: Add-Ons + title: docs.titles.addons subitems: - id: animation - title: Animation + title: docs.titles.animation - id: two-way-binding-helpers - title: Two-Way Binding Helpers + title: docs.titles.two-way-binding-helpers - id: test-utils - title: Test Utilities + title: docs.titles.test-utils - id: clone-with-props - title: Cloning Elements + title: docs.titles.clone-with-props - id: create-fragment - title: Keyed Fragments + title: docs.titles.create-fragment - id: update - title: Immutability Helpers + title: docs.titles.update - id: pure-render-mixin - title: PureRenderMixin + title: docs.titles.pure-render-mixin - id: perf - title: Performance Tools + title: docs.titles.perf - id: advanced-performance - title: Advanced Performance + title: docs.titles.advanced-performance - id: context - title: Context -- title: Reference + title: docs.titles.context +- title: docs.titles.reference items: - id: top-level-api - title: Top-Level API + title: docs.titles.top-level-api - id: component-api - title: Component API + title: docs.titles.component-api - id: component-specs - title: Component Specs and Lifecycle + title: docs.titles.component-specs - id: tags-and-attributes - title: Supported Tags and Attributes + title: docs.titles.tags-and-attributes - id: events - title: Event System + title: docs.titles.events - id: dom-differences - title: DOM Differences + title: docs.titles.dom-differences - id: special-non-dom-attributes - title: Special Non-DOM Attributes + title: docs.titles.special-non-dom-attributes - id: reconciliation - title: Reconciliation + title: docs.titles.reconciliation - id: glossary - title: React (Virtual) DOM Terminology -- title: Flux + title: docs.titles.glossary +- title: docs.titles.flux items: - id: flux-overview - title: Flux Overview + title: docs.titles.flux-overview href: https://facebook.github.io/flux/docs/overview.html - id: flux-todo-list - title: Flux TodoMVC Tutorial + title: docs.titles.flux-todo-list href: https://facebook.github.io/flux/docs/todo-list.html diff --git a/docs/_data/nav_tips.yml b/docs/_data/nav_tips.yml index f568311444bdd..9bf49e5d62796 100644 --- a/docs/_data/nav_tips.yml +++ b/docs/_data/nav_tips.yml @@ -1,38 +1,40 @@ -- title: Tips +- title: tips.titles.tips items: - id: introduction - title: Introduction + title: tips.titles.introduction - id: inline-styles - title: Inline Styles + title: tips.titles.inline-styles - id: if-else-in-JSX - title: If-Else in JSX + title: tips.titles.if-else-in-JSX - id: self-closing-tag - title: Self-Closing Tag + title: tips.titles.self-closing-tag - id: maximum-number-of-jsx-root-nodes - title: Maximum Number of JSX Root Nodes + title: tips.titles.maximum-number-of-jsx-root-nodes - id: style-props-value-px - title: Shorthand for Specifying Pixel Values in style props + title: tips.titles.style-props-value-px - id: children-props-type - title: Type of the Children props + title: tips.titles.children-props-type - id: controlled-input-null-value - title: Value of null for Controlled Input + title: tips.titles.controlled-input-null-value - id: componentWillReceiveProps-not-triggered-after-mounting - title: componentWillReceiveProps Not Triggered After Mounting + title: tips.titles.componentWillReceiveProps-not-triggered-after-mounting - id: props-in-getInitialState-as-anti-pattern - title: Props in getInitialState Is an Anti-Pattern + title: tips.titles.props-in-getInitialState-as-anti-pattern - id: dom-event-listeners - title: DOM Event Listeners in a Component + title: tips.titles.dom-event-listeners - id: initial-ajax - title: Load Initial Data via AJAX + title: tips.titles.initial-ajax - id: false-in-jsx - title: False in JSX + title: tips.titles.false-in-jsx - id: communicate-between-components - title: Communicate Between Components + title: tips.titles.communicate-between-components - id: expose-component-functions - title: Expose Component Functions + title: tips.titles.expose-component-functions + - id: references-to-components + title: tips.titles.references-to-components - id: children-undefined - title: this.props.children undefined + title: tips.titles.children-undefined - id: use-react-with-other-libraries - title: Use React with Other Libraries + title: tips.titles.use-react-with-other-libraries - id: dangerously-set-inner-html - title: Dangerously Set innerHTML + title: tips.titles.dangerously-set-inner-html diff --git a/docs/_i18n/en.yml b/docs/_i18n/en.yml new file mode 100644 index 0000000000000..e31d3ca238683 --- /dev/null +++ b/docs/_i18n/en.yml @@ -0,0 +1,83 @@ +global: + next: Next + previous: Previous + +docs: + titles: + quick-start: Quick Start + getting-started: Getting Started + tutorial: Tutorial + thinking-in-react: Thinking in React + + community-resources: Community Resources + conferences: Conferences + videos: Videos + complementary-tools: Complementary Tools + examples: Examples + + guides: Guides + why-react: Why React? + displaying-data: Displaying Data + jsx-in-depth: JSX in Depth + jsx-spread: JSX Spread Attributes + jsx-gotchas: JSX Gotchas + interactivity-and-dynamic-uis: Interactivity and Dynamic UIs + multiple-components: Multiple Components + reusable-components: Reusable Components + transferring-props: Transferring Props + forms: Forms + working-with-the-browser: Working With the Browser + more-about-refs: Refs to Components + tooling-integration: Tooling Integration + addons: Add-Ons + animation: Animation + two-way-binding-helpers: Two-Way Binding Helpers + class-name-manipulation: Class Name Manipulation + test-utils: Test Utilities + clone-with-props: Cloning Elements + create-fragment: Keyed Fragments + update: Immutability Helpers + pure-render-mixin: PureRenderMixin + perf: Performance Tools + advanced-performance: Advanced Performance + context: Context + + reference: Reference + top-level-api: Top-Level API + component-api: Component API + component-specs: Component Specs and Lifecycle + tags-and-attributes: Supported Tags and Attributes + events: Event System + dom-differences: DOM Differences + special-non-dom-attributes: Special Non-DOM Attributes + reconciliation: Reconciliation + glossary: React (Virtual) DOM Terminology + + flux: Flux + flux-overview: Flux Overview + flux-todo-list: Flux TodoMVC Tutorial + + +tips: + titles: + tips: Tips + + introduction: Introduction + inline-styles: Inline Styles + if-else-in-JSX: If-Else in JSX + self-closing-tag: Self-Closing Tag + maximum-number-of-jsx-root-nodes: Maximum Number of JSX Root Nodes + style-props-value-px: Shorthand for Specifying Pixel Values in style props + children-props-type: Type of the Children props + controlled-input-null-value: Value of null for Controlled Input + componentWillReceiveProps-not-triggered-after-mounting: componentWillReceiveProps Not Triggered After Mounting + props-in-getInitialState-as-anti-pattern: Props in getInitialState Is an Anti-Pattern + dom-event-listeners: DOM Event Listeners in a Component + initial-ajax: Load Initial Data via AJAX + false-in-jsx: False in JSX + communicate-between-components: Communicate Between Components + expose-component-functions: Expose Component Functions + references-to-components: References to Components + children-undefined: this.props.children undefined + use-react-with-other-libraries: Use React with Other Libraries + dangerously-set-inner-html: Dangerously Set innerHTML diff --git a/docs/_i18n/ja-JP.yml b/docs/_i18n/ja-JP.yml new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/docs/_i18n/ko-KR.yml b/docs/_i18n/ko-KR.yml new file mode 100644 index 0000000000000..8a90777ad174f --- /dev/null +++ b/docs/_i18n/ko-KR.yml @@ -0,0 +1,87 @@ +global: + next: 다음 + previous: 이전 + +docs: + titles: + why-react: + +docs: + titles: + quick-start: Quick Start + getting-started: 시작해보기 + tutorial: 튜토리얼 + thinking-in-react: 리액트로 생각해보기 + + community-resources: Community Resources + conferences: 컨퍼런스들 + videos: 비디오들 + complementary-tools: 상호 보완적인 도구들 + examples: 예제들 + + guides: Guides + why-react: 왜 React인가? + displaying-data: 데이터를 표시하기 + jsx-in-depth: JSX 깊이보기 + jsx-spread: JSX 스프레드 어트리뷰트 + jsx-gotchas: JSX Gotchas + interactivity-and-dynamic-uis: 상호 작용 및 동적 UI + multiple-components: 복합 컴포넌트 + reusable-components: 재사용가능한 컴포넌트 + transferring-props: Props 전달 + forms: 폼 + working-with-the-browser: 브라우저에서의 동작 + more-about-refs: refs에서 컴포넌트로 + tooling-integration: 툴 통합 + addons: 애드온 + animation: 애니메이션 + two-way-binding-helpers: 양방향 바인딩 핼퍼 + class-name-manipulation: 클래스 이름 조작 + test-utils: 테스트 유틸리티 + clone-with-props: ReactElement 클론하기 + create-fragment: 키가 할당된 프래그먼트 + update: 불변성 헬퍼들 + pure-render-mixin: PureRenderMixin + perf: 성능 도구 + advanced-performance: 성능 심화 + context: 컨텍스트 + + reference: Reference + top-level-api: 최상위 API + component-api: 컴포넌트 API + component-specs: 컴포넌트 명세와 생명주기 + tags-and-attributes: 태그와 어트리뷰트 + events: 이벤트 시스템 + dom-differences: DOM과의 차이점 + special-non-dom-attributes: DOM이 아닌 특별한 어트리뷰트 + reconciliation: 비교조정(Reconciliation) + glossary: React (가상) DOM 용어 + + flux: Flux + flux-overview: Flux 애플리케이션 아키텍쳐 + flux-todo-list: Flux TodoMVC 튜토리얼 + + +tips: + titles: + tips: Tips + + introduction: 개요 + inline-styles: 인라인 스타일 + if-else-in-JSX: JSX에서 If-Else + self-closing-tag: 자기 자신을 닫는 태그 + maximum-number-of-jsx-root-nodes: JSX 루트 노드의 최대 갯수 + style-props-value-px: 스타일 속성에서 특정 픽셀 값 넣는 간단한 방법 + children-props-type: 자식 속성들의 타입 + controlled-input-null-value: 제어되는 input 내의 null 값 + componentWillReceiveProps-not-triggered-after-mounting: 마운트 후에는 componentWillReceiveProps가 실행되지 않음 + props-in-getInitialState-as-anti-pattern: getInitialState의 Props는 안티패턴 + dom-event-listeners: 컴포넌트에서 DOM 이벤트 리스너 + initial-ajax: AJAX를 통해 초기 데이터 읽어오기 + false-in-jsx: JSX에서 False + communicate-between-components: 컴포넌트간의 통신 + expose-component-functions: 컴포넌트 함수 드러내기 + references-to-components: 컴포넌트 참조 + children-undefined: 정의되지 않은 this.props.children + use-react-with-other-libraries: React와 다른 라이브러리를 함께 사용하기 + dangerously-set-inner-html: Dangerously Set innerHTML diff --git a/docs/_i18n/zh-CN.yml b/docs/_i18n/zh-CN.yml new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/docs/_includes/nav_docs.html b/docs/_includes/nav_docs.html index b3e8a277f5dcb..611b8a9fa72a5 100644 --- a/docs/_includes/nav_docs.html +++ b/docs/_includes/nav_docs.html @@ -2,16 +2,16 @@ {% for section in site.data.nav_docs %}