From fc53a08bb0ffaf2bd49408f50701f17cdd603fb9 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Wed, 24 May 2017 15:46:49 +0200 Subject: add some more docs --- src/i18n.tsx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/i18n.tsx') diff --git a/src/i18n.tsx b/src/i18n.tsx index 656bb3a05..48631afb2 100644 --- a/src/i18n.tsx +++ b/src/i18n.tsx @@ -18,6 +18,9 @@ * Translation helpers for React components and template literals. */ +/** + * Imports. + */ import * as jedLib from "jed"; import {strings} from "./i18n/strings"; import * as React from "react"; @@ -102,9 +105,11 @@ interface TranslateProps { * in a another non-text element. * * Example: + * ``` * * Hello. Your score is * + * ``` */ export class Translate extends React.Component { render(): JSX.Element { @@ -143,10 +148,12 @@ export class Translate extends React.Component { * Should only contain TranslateSingular and TransplatePlural as children. * * Example: + * ``` * * I have {n} apple. * I have {n} apples. * + * ``` */ export class TranslateSwitch extends React.Component{ render(): JSX.Element { @@ -181,7 +188,7 @@ interface TranslationPluralProps { } /** - * @see TranslateSwitch + * See [[TranslateSwitch]]. */ export class TranslatePlural extends React.Component { render(): JSX.Element { @@ -213,7 +220,7 @@ export class TranslatePlural extends React.Component { render(): JSX.Element { -- cgit v1.2.3