Skip to content

Commit

Permalink
feat: welcome and version upgrade modal now use english
Browse files Browse the repository at this point in the history
  • Loading branch information
yyc-git committed Mar 8, 2019
1 parent 2c7fa7e commit 803177e
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 51 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,32 +14,25 @@ module Method = {

let getVersion = () => LocalStorage.getValue(getVersionKey());

let buildWelComeUserModalContent = () => [|
<div className="content-text" key="text1">
{
DomHelper.textEl(
{j|欢迎使用Wonder编辑器,我们为您服务~|j},
)
}
</div>,
let _buildLinkContent = () => [|
<div className="content-white" key="text2" />,
<div className="content-text" key="text1">
<a href="https://www.wonder-3d.com/" target="view_window">
{DomHelper.textEl({j|官方网站|j})}
{DomHelper.textEl({j|Website|j})}
</a>
</div>,
<div className="content-small-white" key="text2" />,
<div className="content-text" key="text1">
<a href="https://forum.wonder-3d.com/" target="view_window">
{DomHelper.textEl({j|论坛|j})}
{DomHelper.textEl({j|Forum|j})}
</a>
</div>,
<div className="content-small-white" key="text2" />,
<div className="content-text" key="text1">
<a
href="https://www.wonder-3d.com/docs/docs/doc1-1/"
target="view_window">
{DomHelper.textEl({j|文档|j})}
{DomHelper.textEl({j|Doc|j})}
</a>
</div>,
<div className="content-small-white" key="text2" />,
Expand All @@ -50,40 +43,27 @@ module Method = {
</div>,
|];

let buildWelComeUserModalContent = () =>
[|
<div className="content-text" key="text1">
{
DomHelper.textEl(
{j|Welcome to use Wonder editor, We are here to serve you~ Thanks for your trust~|j},
)
}
</div>,
|]
|> ArrayService.fastConcat(_, _buildLinkContent());

let buildVersionUpgradeModalContent = () => {
let newVersion = Copyright.getVersion();

[|
<div className="content-text" key="text1">
{DomHelper.textEl({j|已为您升级为$newVersion版本。|j})}
</div>,
<div className="content-white" key="text2" />,
<div className="content-text" key="text1">
<a href="https://www.wonder-3d.com/" target="view_window">
{DomHelper.textEl({j|官方网站|j})}
</a>
</div>,
<div className="content-small-white" key="text2" />,
<div className="content-text" key="text1">
<a href="https://forum.wonder-3d.com/" target="view_window">
{DomHelper.textEl({j|论坛|j})}
</a>
</div>,
<div className="content-small-white" key="text2" />,
<div className="content-text" key="text1">
<a
href="https://www.wonder-3d.com/docs/docs/doc1-1/"
target="view_window">
{DomHelper.textEl({j|文档|j})}
</a>
</div>,
<div className="content-small-white" key="text2" />,
<div className="content-text" key="text1">
<a href="https://github.com/Wonder-Technology" target="view_window">
{DomHelper.textEl({j|Github|j})}
</a>
{DomHelper.textEl({j|Upgrade to $newVersion Version, We are here to serve you~ Thanks for your trust~|j})}
</div>,
|];
|]
|> ArrayService.fastConcat(_, _buildLinkContent());
};
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ exports[`Header Notice test show notice else else, if localStorage version !== c
<div
className="content-text"
>
已为您升级为1.0.0-rc.1版本。
Upgrade to 1.0.0-rc.1 Version, We are here to serve you~ Thanks for your trust~
</div>
<div
className="content-white"
Expand All @@ -37,7 +37,7 @@ exports[`Header Notice test show notice else else, if localStorage version !== c
href="https://www.wonder-3d.com/"
target="view_window"
>
官方网站
Website
</a>
</div>
<div
Expand All @@ -50,7 +50,7 @@ exports[`Header Notice test show notice else else, if localStorage version !== c
href="https://forum.wonder-3d.com/"
target="view_window"
>
论坛
Forum
</a>
</div>
<div
Expand All @@ -63,7 +63,7 @@ exports[`Header Notice test show notice else else, if localStorage version !== c
href="https://www.wonder-3d.com/docs/docs/doc1-1/"
target="view_window"
>
文档
Doc
</a>
</div>
<div
Expand Down Expand Up @@ -120,7 +120,7 @@ exports[`Header Notice test show notice else if localStorage have no version key
<div
className="content-text"
>
已为您升级为1.0.0-rc.1版本。
Upgrade to 1.0.0-rc.1 Version, We are here to serve you~ Thanks for your trust~
</div>
<div
className="content-white"
Expand All @@ -132,7 +132,7 @@ exports[`Header Notice test show notice else if localStorage have no version key
href="https://www.wonder-3d.com/"
target="view_window"
>
官方网站
Website
</a>
</div>
<div
Expand All @@ -145,7 +145,7 @@ exports[`Header Notice test show notice else if localStorage have no version key
href="https://forum.wonder-3d.com/"
target="view_window"
>
论坛
Forum
</a>
</div>
<div
Expand All @@ -158,7 +158,7 @@ exports[`Header Notice test show notice else if localStorage have no version key
href="https://www.wonder-3d.com/docs/docs/doc1-1/"
target="view_window"
>
文档
Doc
</a>
</div>
<div
Expand Down Expand Up @@ -215,7 +215,7 @@ exports[`Header Notice test show notice if localStorage have no welcomeUser key
<div
className="content-text"
>
欢迎使用Wonder编辑器,我们为您服务~
Welcome to use Wonder editor, We are here to serve you~ Thanks for your trust~
</div>
<div
className="content-white"
Expand All @@ -227,7 +227,7 @@ exports[`Header Notice test show notice if localStorage have no welcomeUser key
href="https://www.wonder-3d.com/"
target="view_window"
>
官方网站
Website
</a>
</div>
<div
Expand All @@ -240,7 +240,7 @@ exports[`Header Notice test show notice if localStorage have no welcomeUser key
href="https://forum.wonder-3d.com/"
target="view_window"
>
论坛
Forum
</a>
</div>
<div
Expand All @@ -253,7 +253,7 @@ exports[`Header Notice test show notice if localStorage have no welcomeUser key
href="https://www.wonder-3d.com/docs/docs/doc1-1/"
target="view_window"
>
文档
Doc
</a>
</div>
<div
Expand Down

0 comments on commit 803177e

Please sign in to comment.