summaryrefslogtreecommitdiff
path: root/src/i18n.tsx
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2017-05-24 15:46:49 +0200
committerFlorian Dold <florian.dold@gmail.com>2017-05-24 15:46:49 +0200
commitfc53a08bb0ffaf2bd49408f50701f17cdd603fb9 (patch)
treeed3c137c943e88dba5713f3da450a19727ddc3ea /src/i18n.tsx
parent7a3df06eb573d36142bd1a8e03c5ce8752d300b3 (diff)
downloadwallet-core-fc53a08bb0ffaf2bd49408f50701f17cdd603fb9.tar.gz
wallet-core-fc53a08bb0ffaf2bd49408f50701f17cdd603fb9.tar.bz2
wallet-core-fc53a08bb0ffaf2bd49408f50701f17cdd603fb9.zip
add some more docs
Diffstat (limited to 'src/i18n.tsx')
-rw-r--r--src/i18n.tsx11
1 files changed, 9 insertions, 2 deletions
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:
+ * ```
* <Translate>
* Hello. Your score is <span><PlayerScore player={player} /></span>
* </Translate>
+ * ```
*/
export class Translate extends React.Component<TranslateProps,void> {
render(): JSX.Element {
@@ -143,10 +148,12 @@ export class Translate extends React.Component<TranslateProps,void> {
* Should only contain TranslateSingular and TransplatePlural as children.
*
* Example:
+ * ```
* <TranslateSwitch target={n}>
* <TranslateSingular>I have {n} apple.</TranslateSingular>
* <TranslatePlural>I have {n} apples.</TranslatePlural>
* </TranslateSwitch>
+ * ```
*/
export class TranslateSwitch extends React.Component<TranslateSwitchProps,void>{
render(): JSX.Element {
@@ -181,7 +188,7 @@ interface TranslationPluralProps {
}
/**
- * @see TranslateSwitch
+ * See [[TranslateSwitch]].
*/
export class TranslatePlural extends React.Component<TranslationPluralProps,void> {
render(): JSX.Element {
@@ -213,7 +220,7 @@ export class TranslatePlural extends React.Component<TranslationPluralProps,void
/**
- * @see TranslateSwitch
+ * See [[TranslateSwitch]].
*/
export class TranslateSingular extends React.Component<TranslationPluralProps,void> {
render(): JSX.Element {