-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
30 changed files
with
348 additions
and
163 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"presets": [ | ||
"@babel/preset-env", | ||
"@babel/preset-react" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: Build Docs | ||
on: | ||
push: | ||
branches: | ||
- master | ||
jobs: | ||
build-docs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout 🛎️ | ||
uses: actions/[email protected] | ||
|
||
- name: Install and Build 🔧 | ||
run: | | ||
yarn | ||
yarn run docs | ||
- name: Deploy 🚀 | ||
uses: JamesIves/[email protected] | ||
with: | ||
branch: gh-pages | ||
folder: docs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
lib | ||
docs | ||
|
||
# Node specific # | ||
################# | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,17 @@ | ||
import React, { Component } from 'react' | ||
import { withLocales } from 'react-localized' | ||
|
||
@withLocales() | ||
export default class DecoratedClassComponent extends Component { | ||
class DecoratedClassComponent extends Component { | ||
render() { | ||
const { gettext, ngettext, formats, formatDate } = this.props | ||
const { gettext, formats, formatDate } = this.props | ||
return ( | ||
<> | ||
{gettext('My name is %s', 'Anna')} | ||
<br /> | ||
{ngettext('%s apple', '%s apples', 10, 10)} | ||
<br /> | ||
{formatDate(new Date(), formats.date)} | ||
<br /> | ||
<p>{gettext('My name is %s', 'Anna')}</p> | ||
<p>{gettext('My name is %s', 'John')}</p> | ||
<p>{formatDate(new Date(), formats.date)}</p> | ||
</> | ||
) | ||
} | ||
} | ||
|
||
export default withLocales()(DecoratedClassComponent) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
import React from 'react' | ||
import { withLocales } from 'react-localized' | ||
|
||
export default withLocales()(({ gettext, ngettext }) => ( | ||
const DecoratedFunctionalComponent = ({ ngettext }) => ( | ||
<> | ||
{gettext('My name is %s', 'John')} | ||
<br /> | ||
{ngettext('%s apple', '%s apples', 2, 2)} | ||
<br /> | ||
{ngettext('%s table', '%s tables', 10, 10)} | ||
<br /> | ||
<p>{ngettext('%s apple', '%s apples', 1, 1)}</p> | ||
<p>{ngettext('%s apple', '%s apples', 2, 2)}</p> | ||
<p>{ngettext('%s apple', '%s apples', 10, 10)}</p> | ||
<p>{ngettext('%s table', '%s tables', 5, 5)}</p> | ||
</> | ||
)) | ||
) | ||
|
||
export default withLocales()(DecoratedFunctionalComponent) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.