Translate, concept for translation and id strings

This commit is contained in:
Chi Vinh Le
2018-07-10 18:44:56 -03:00
parent 5e5b0a3888
commit 358fe97069
18 changed files with 611 additions and 411 deletions
@@ -36,52 +36,73 @@ exports[`loads more comments 1`] = `
</button>
</div>
</form>
<div>
<div
className="Comment-root Comment-gutterBottom"
>
<h1
className="Typography-root Typography-heading2 Typography-gutterBottom Username-root"
<div
aria-live="polite"
id="talk-comments-stream-log"
role="log"
>
<div>
<div
className="Comment-root Comment-gutterBottom"
role="article"
>
Markus
</h1>
<p
className="Typography-root Typography-body1"
>
Joining Too
</p>
<div
className="Comment-topBar"
>
<span
className="Username-root"
>
Markus
</span>
</div>
<p
className="Typography-root Typography-body1"
>
Joining Too
</p>
</div>
</div>
</div>
<div>
<div
className="Comment-root Comment-gutterBottom"
>
<h1
className="Typography-root Typography-heading2 Typography-gutterBottom Username-root"
<div>
<div
className="Comment-root Comment-gutterBottom"
role="article"
>
Lukas
</h1>
<p
className="Typography-root Typography-body1"
>
What's up?
</p>
<div
className="Comment-topBar"
>
<span
className="Username-root"
>
Lukas
</span>
</div>
<p
className="Typography-root Typography-body1"
>
What's up?
</p>
</div>
</div>
</div>
<div>
<div
className="Comment-root Comment-gutterBottom"
>
<h1
className="Typography-root Typography-heading2 Typography-gutterBottom Username-root"
<div>
<div
className="Comment-root Comment-gutterBottom"
role="article"
>
Isabelle
</h1>
<p
className="Typography-root Typography-body1"
>
Hey!
</p>
<div
className="Comment-topBar"
>
<span
className="Username-root"
>
Isabelle
</span>
</div>
<p
className="Typography-root Typography-body1"
>
Hey!
</p>
</div>
</div>
</div>
</div>
@@ -124,49 +145,66 @@ exports[`renders comment stream 1`] = `
</button>
</div>
</form>
<div>
<div
className="Comment-root Comment-gutterBottom"
>
<h1
className="Typography-root Typography-heading2 Typography-gutterBottom Username-root"
>
Markus
</h1>
<p
className="Typography-root Typography-body1"
>
Joining Too
</p>
</div>
</div>
<div>
<div
className="Comment-root Comment-gutterBottom"
>
<h1
className="Typography-root Typography-heading2 Typography-gutterBottom Username-root"
>
Lukas
</h1>
<p
className="Typography-root Typography-body1"
>
What's up?
</p>
</div>
</div>
<button
className="BaseButton-root Button-root Button-invert Button-fullWidth Button-secondary"
disabled={false}
id="talk-stream--load-more"
onBlur={[Function]}
onClick={[Function]}
onFocus={[Function]}
onMouseDown={[Function]}
<div
aria-live="polite"
id="talk-comments-stream-log"
role="log"
>
Load More
</button>
<div>
<div
className="Comment-root Comment-gutterBottom"
role="article"
>
<div
className="Comment-topBar"
>
<span
className="Username-root"
>
Markus
</span>
</div>
<p
className="Typography-root Typography-body1"
>
Joining Too
</p>
</div>
</div>
<div>
<div
className="Comment-root Comment-gutterBottom"
role="article"
>
<div
className="Comment-topBar"
>
<span
className="Username-root"
>
Lukas
</span>
</div>
<p
className="Typography-root Typography-body1"
>
What's up?
</p>
</div>
</div>
<button
aria-controls="talk-comments-stream-log"
className="BaseButton-root Button-root Button-invert Button-fullWidth Button-secondary"
disabled={false}
id="talk-comments-stream-loadMore"
onBlur={[Function]}
onClick={[Function]}
onFocus={[Function]}
onMouseDown={[Function]}
>
Load More
</button>
</div>
</div>
</div>
`;
@@ -36,68 +36,99 @@ exports[`renders comment stream 1`] = `
</button>
</div>
</form>
<div>
<div
className="Comment-root Comment-gutterBottom"
>
<h1
className="Typography-root Typography-heading2 Typography-gutterBottom Username-root"
>
Markus
</h1>
<p
className="Typography-root Typography-body1"
>
Joining Too
</p>
</div>
</div>
<div>
<div
className="Comment-root Comment-gutterBottom"
>
<h1
className="Typography-root Typography-heading2 Typography-gutterBottom Username-root"
>
Markus
</h1>
<p
className="Typography-root Typography-body1"
>
I like yoghurt
</p>
</div>
<div
className="Indent-root Indent-level0"
>
<div
aria-live="polite"
id="talk-comments-stream-log"
role="log"
>
<div>
<div
className="Comment-root Comment-gutterBottom"
role="article"
>
<h1
className="Typography-root Typography-heading2 Typography-gutterBottom Username-root"
<div
className="Comment-topBar"
>
Markus
</h1>
<span
className="Username-root"
>
Markus
</span>
</div>
<p
className="Typography-root Typography-body1"
>
Joining Too
</p>
</div>
</div>
<div>
<div
className="Comment-root Comment-gutterBottom"
role="article"
>
<h1
className="Typography-root Typography-heading2 Typography-gutterBottom Username-root"
<div
className="Comment-topBar"
>
Lukas
</h1>
<span
className="Username-root"
>
Markus
</span>
</div>
<p
className="Typography-root Typography-body1"
>
What's up?
I like yoghurt
</p>
</div>
<div
className="Indent-root Indent-level0"
>
<div
id="talk-comments-replyList-log--comment-with-replies"
role="log"
>
<div
className="Comment-root Comment-gutterBottom"
role="article"
>
<div
className="Comment-topBar"
>
<span
className="Username-root"
>
Markus
</span>
</div>
<p
className="Typography-root Typography-body1"
>
Joining Too
</p>
</div>
<div
className="Comment-root Comment-gutterBottom"
role="article"
>
<div
className="Comment-topBar"
>
<span
className="Username-root"
>
Lukas
</span>
</div>
<p
className="Typography-root Typography-body1"
>
What's up?
</p>
</div>
</div>
</div>
</div>
</div>
</div>
@@ -36,36 +36,52 @@ exports[`renders comment stream 1`] = `
</button>
</div>
</form>
<div>
<div
className="Comment-root Comment-gutterBottom"
>
<h1
className="Typography-root Typography-heading2 Typography-gutterBottom Username-root"
<div
aria-live="polite"
id="talk-comments-stream-log"
role="log"
>
<div>
<div
className="Comment-root Comment-gutterBottom"
role="article"
>
Markus
</h1>
<p
className="Typography-root Typography-body1"
>
Joining Too
</p>
<div
className="Comment-topBar"
>
<span
className="Username-root"
>
Markus
</span>
</div>
<p
className="Typography-root Typography-body1"
>
Joining Too
</p>
</div>
</div>
</div>
<div>
<div
className="Comment-root Comment-gutterBottom"
>
<h1
className="Typography-root Typography-heading2 Typography-gutterBottom Username-root"
<div>
<div
className="Comment-root Comment-gutterBottom"
role="article"
>
Lukas
</h1>
<p
className="Typography-root Typography-body1"
>
What's up?
</p>
<div
className="Comment-topBar"
>
<span
className="Username-root"
>
Lukas
</span>
</div>
<p
className="Typography-root Typography-body1"
>
What's up?
</p>
</div>
</div>
</div>
</div>
@@ -36,49 +36,71 @@ exports[`renders comment stream 1`] = `
</button>
</div>
</form>
<div>
<div
className="Comment-root Comment-gutterBottom"
>
<h1
className="Typography-root Typography-heading2 Typography-gutterBottom Username-root"
>
Markus
</h1>
<p
className="Typography-root Typography-body1"
>
Joining Too
</p>
</div>
<div
className="Indent-root Indent-level0"
>
<div
aria-live="polite"
id="talk-comments-stream-log"
role="log"
>
<div>
<div
className="Comment-root Comment-gutterBottom"
role="article"
>
<h1
className="Typography-root Typography-heading2 Typography-gutterBottom Username-root"
<div
className="Comment-topBar"
>
Lukas
</h1>
<span
className="Username-root"
>
Markus
</span>
</div>
<p
className="Typography-root Typography-body1"
>
What's up?
Joining Too
</p>
</div>
<button
className="BaseButton-root Button-root Button-invert Button-fullWidth Button-secondary"
disabled={false}
id="talk-reply-list--show-all--comment-0"
onBlur={[Function]}
onClick={[Function]}
onFocus={[Function]}
onMouseDown={[Function]}
<div
className="Indent-root Indent-level0"
>
Show All Replies
</button>
<div
id="talk-comments-replyList-log--comment-0"
role="log"
>
<div
className="Comment-root Comment-gutterBottom"
role="article"
>
<div
className="Comment-topBar"
>
<span
className="Username-root"
>
Lukas
</span>
</div>
<p
className="Typography-root Typography-body1"
>
What's up?
</p>
</div>
<button
aria-controls="talk-comments-replyList-log--comment-0"
className="BaseButton-root Button-root Button-invert Button-fullWidth Button-secondary"
disabled={false}
id="talk-comments-replyList-showAll--comment-0"
onBlur={[Function]}
onClick={[Function]}
onFocus={[Function]}
onMouseDown={[Function]}
>
Show All Replies
</button>
</div>
</div>
</div>
</div>
</div>
@@ -121,51 +143,77 @@ exports[`show all replies 1`] = `
</button>
</div>
</form>
<div>
<div
className="Comment-root Comment-gutterBottom"
>
<h1
className="Typography-root Typography-heading2 Typography-gutterBottom Username-root"
>
Markus
</h1>
<p
className="Typography-root Typography-body1"
>
Joining Too
</p>
</div>
<div
className="Indent-root Indent-level0"
>
<div
aria-live="polite"
id="talk-comments-stream-log"
role="log"
>
<div>
<div
className="Comment-root Comment-gutterBottom"
role="article"
>
<h1
className="Typography-root Typography-heading2 Typography-gutterBottom Username-root"
<div
className="Comment-topBar"
>
Lukas
</h1>
<span
className="Username-root"
>
Markus
</span>
</div>
<p
className="Typography-root Typography-body1"
>
What's up?
Joining Too
</p>
</div>
<div
className="Comment-root Comment-gutterBottom"
className="Indent-root Indent-level0"
>
<h1
className="Typography-root Typography-heading2 Typography-gutterBottom Username-root"
<div
id="talk-comments-replyList-log--comment-0"
role="log"
>
Isabelle
</h1>
<p
className="Typography-root Typography-body1"
>
Hey!
</p>
<div
className="Comment-root Comment-gutterBottom"
role="article"
>
<div
className="Comment-topBar"
>
<span
className="Username-root"
>
Lukas
</span>
</div>
<p
className="Typography-root Typography-body1"
>
What's up?
</p>
</div>
<div
className="Comment-root Comment-gutterBottom"
role="article"
>
<div
className="Comment-topBar"
>
<span
className="Username-root"
>
Isabelle
</span>
</div>
<p
className="Typography-root Typography-body1"
>
Hey!
</p>
</div>
</div>
</div>
</div>
</div>
@@ -89,7 +89,7 @@ it("renders comment stream", async () => {
it("loads more comments", async () => {
testRenderer.root
.findByProps({ id: "talk-stream--load-more" })
.findByProps({ id: "talk-comments-stream-loadMore" })
.props.onClick();
// Wait for loading.
@@ -105,7 +105,7 @@ it("renders comment stream", async () => {
it("show all replies", async () => {
testRenderer.root
.findByProps({ id: `talk-reply-list--show-all--${comments[0].id}` })
.findByProps({ id: `talk-comments-replyList-showAll--${comments[0].id}` })
.props.onClick();
// Wait for loading.