Skip to content

Commit

Permalink
Update Lorem placeholders to use FormattedMessage component
Browse files Browse the repository at this point in the history
  • Loading branch information
victorhmp committed Jul 25, 2019
1 parent 60f5d67 commit c990b3e
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 18 deletions.
4 changes: 3 additions & 1 deletion messages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,7 @@
"docs/recipes/plugins": "Plugins Recipes",
"docs/recipes/custom-blocks": "Custom Blocks Recipes",
"docs/recipes/all": "All Recipes",
"docs/read-more": "Read more"
"docs/read-more": "Read more",
"docs/lorem": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam vel ligula sagittis, dignissim nisi non, interdum elit. Vivamus eget dolor egestas, hendrerit urna a, finibus enim. Phasellus mollis mollis dui ut mattis. In ut purus sem. Quisque volutpat ornare consequat.",
"docs/lorem-short": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod."
}
4 changes: 3 additions & 1 deletion messages/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,7 @@
"docs/recipes/plugins": "Plugins Recipes",
"docs/recipes/custom-blocks": "Custom Blocks Recipes",
"docs/recipes/all": "All Recipes",
"docs/read-more": "Read more"
"docs/read-more": "Read more",
"docs/lorem": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam vel ligula sagittis, dignissim nisi non, interdum elit. Vivamus eget dolor egestas, hendrerit urna a, finibus enim. Phasellus mollis mollis dui ut mattis. In ut purus sem. Quisque volutpat ornare consequat.",
"docs/lorem-short": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod."
}
12 changes: 4 additions & 8 deletions react/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ const Home: FunctionComponent<InjectedIntlProps> = ({ intl }) => {
<FormattedMessage id="docs/build" />
</h1>
<p className="small c-on-base w-90 w-80-ns center mb8">
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed
do eiusmod.
<FormattedMessage id="docs/lorem-short" />
</p>
<div className="w-90 w-80-ns center">
<div className="flex w-100">
Expand Down Expand Up @@ -74,8 +73,7 @@ const Home: FunctionComponent<InjectedIntlProps> = ({ intl }) => {
<FormattedMessage id="docs/recipes" />
</p>
<p className="c-muted-1">
Lorem ipsum dolor sit amet, consectetur adipiscing elit,
sed do eiusmod.
<FormattedMessage id="docs/lorem-short" />
</p>
</div>
<div className="mh3">
Expand All @@ -87,8 +85,7 @@ const Home: FunctionComponent<InjectedIntlProps> = ({ intl }) => {
<FormattedMessage id="docs/our-components" />
</p>
<p className="c-muted-1">
Lorem ipsum dolor sit amet, consectetur adipiscing elit,
sed do eiusmod.
<FormattedMessage id="docs/lorem-short" />
</p>
</div>
<div>
Expand All @@ -100,8 +97,7 @@ const Home: FunctionComponent<InjectedIntlProps> = ({ intl }) => {
<FormattedMessage id="docs/resources" />
</p>
<p className="c-muted-1">
Lorem ipsum dolor sit amet, consectetur adipiscing elit,
sed do eiusmod.
<FormattedMessage id="docs/lorem-short" />
</p>
</div>
</div>
Expand Down
10 changes: 4 additions & 6 deletions react/RecipesList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,7 @@ const RecipesList: FunctionComponent<Props> = ({
<FormattedMessage id={`docs/recipes/${params.category}`} />
</h1>
<p className="small c-on-base w-90 w-80-ns center mb8">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam
vel ligula sagittis, dignissim nisi non, interdum elit.
Vivamus eget dolor egestas, hendrerit urna a, finibus enim.
Phasellus mollis mollis dui ut mattis. In ut purus sem.
Quisque volutpat ornare consequat.
<FormattedMessage id="docs/lorem" />
</p>
<div className="w-90 w-80-ns center">
{RecipeListQuery.getRecipeList.map((recipe: Recipe) => (
Expand Down Expand Up @@ -108,7 +104,9 @@ interface Props {

function getShortRecipePath(path: string) {
// the path will always be something like: dist/vtex.docs-graphql/Recipes/<category>/<fileName>.md
return path.substring(31, path.length - 3)
const PATH_PREFIX = 'dist/vtex.docs-graphql/Recipes/'
const FILE_EXTENSION = '.md'
return path.substring(PATH_PREFIX.length, path.length - FILE_EXTENSION.length)
}

export default compose(
Expand Down
3 changes: 1 addition & 2 deletions react/components/Community.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ const Community: FunctionComponent<InjectedIntlProps> = ({ intl }) => (
<FormattedMessage id="docs/community-join" />
</p>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
eiusmod.
<FormattedMessage id="docs/lorem-short" />
</p>
</div>
</div>
Expand Down

0 comments on commit c990b3e

Please sign in to comment.