Skip to content

Commit

Permalink
i18n Dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
juliaqiuxy committed Sep 14, 2020
1 parent df3cc6b commit 39964e5
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 13 deletions.
61 changes: 48 additions & 13 deletions src/components/Dashboard/Dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,25 +254,45 @@ const HistoryItem = ({ dashboardType, ndaType, nda }) => (
{
dashboardType === 'incoming' ? (
<RecipientRow>
<HistoryItemTitle>Sender</HistoryItemTitle>
<HistoryItemTitle>
<FormattedMessage
id="dashboard-history-item-sender-title"
defaultMessage="Sender"
/>
</HistoryItemTitle>
<RecipientInfoText>{`${getFullNameFromUser(nda.owner)} <${nda.owner.metadata.linkedInProfile.emailAddress}>`}</RecipientInfoText>
</RecipientRow>
) : (
<RecipientRow>
<HistoryItemTitle>Recipient</HistoryItemTitle>
<HistoryItemTitle>
<FormattedMessage
id="dashboard-history-item-recipient-title"
defaultMessage="Recipient"
/>
</HistoryItemTitle>
<RecipientInfoText>{`${nda.metadata.recipientFullName} <${nda.recipientEmail === 'void' ? nda.recipient.metadata.linkedInProfile.emailAddress : nda.recipientEmail}>`}</RecipientInfoText>
</RecipientRow>
)
}
<TypeAndStatusRow>
<TypeContainer>
<HistoryItemTitle>Type</HistoryItemTitle>
<HistoryItemTitle>
<FormattedMessage
id="dashboard-history-item-type-title"
defaultMessage="Type"
/>
</HistoryItemTitle>
<RecipientInfoText>
{ ndaType }
</RecipientInfoText>
</TypeContainer>
<StatusContainer>
<HistoryItemTitle>Status</HistoryItemTitle>
<HistoryItemTitle>
<FormattedMessage
id="dashboard-history-item-status-title"
defaultMessage="Status"
/>
</HistoryItemTitle>
<StatusText>{NDA_STATUS_LABEL[nda.metadata.status]}</StatusText>
</StatusContainer>
</TypeAndStatusRow>
Expand Down Expand Up @@ -339,7 +359,10 @@ const Dashboard = ({
{
(active) => (
<StyledBadgeLink active={active}>
Inbox
<FormattedMessage
id="dashboard-inbox-label"
defaultMessage="Inbox"
/>

{
pendingIncomingNDAs.length ? (
Expand All @@ -355,13 +378,23 @@ const Dashboard = ({
<ActiveLink scroll={false} href="/dashboard/[dashboardType]" as="/dashboard/outgoing">
{
(active) => (
<StyledLink active={active}>Sent</StyledLink>
<StyledLink active={active}>
<FormattedMessage
id="dashboard-sent-label"
defaultMessage="Sent"
/>
</StyledLink>
)
}
</ActiveLink>
</LinksContainer>
<Link passHref href="/">
<ButtonAnchor outline>New</ButtonAnchor>
<ButtonAnchor outline>
<FormattedMessage
id="dashboard-new-button"
defaultMessage="New"
/>
</ButtonAnchor>
</Link>
</DashboardActionRow>

Expand All @@ -387,13 +420,15 @@ const Dashboard = ({
<EmptyHistoryList>
{
dashboardType === 'incoming' ? (
<>
You have nothing in your inbox
</>
<FormattedMessage
id="dashboard-empty-inbox-text"
defaultMessage="You have nothing in your inbox"
/>
) : (
<>
You have not sent NDAs
</>
<FormattedMessage
id="dashboard-empty-sent-text"
defaultMessage="You have not sent NDAs"
/>
)
}
</EmptyHistoryList>
Expand Down
9 changes: 9 additions & 0 deletions src/langs/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@
"api-key-actions-dropdown-delete-key": "Delete Key",
"api-key-name-input-placeholder": "Key Name (e.g. Slack integration)",
"button-continue": "Continue",
"dashboard-empty-inbox-text": "You have nothing in your inbox",
"dashboard-empty-sent-text": "You have not sent NDAs",
"dashboard-history-item-recipient-title": "Recipient",
"dashboard-history-item-sender-title": "Sender",
"dashboard-history-item-status-title": "Status",
"dashboard-history-item-type-title": "Type",
"dashboard-inbox-label": "Inbox",
"dashboard-new-button": "New",
"dashboard-sent-label": "Sent",
"footer-nav-developers": "Developers",
"footer-nav-disclaimer": "NDAify is not a law firm, does not provide legal services or advice, and does not provide or participate in legal representation. Signing the NDA signifies that you have read and agree to the {privacyPolicy} and {termsOfUse}. When NDAify.com is displayed in a language other than English, we translate the most important information for your browsing and communications. Our translations are provided for your convenience. The English version of NDAify.com, including our Privacy Policy, Terms of Use and the Nondisclosure Agreements, is the definitive version.",
"footer-nav-privacy": "Privacy Policy",
Expand Down
9 changes: 9 additions & 0 deletions src/langs/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@
"api-key-actions-dropdown-delete-key": "",
"api-key-name-input-placeholder": "",
"button-continue": "",
"dashboard-empty-inbox-text": "",
"dashboard-empty-sent-text": "",
"dashboard-history-item-recipient-title": "",
"dashboard-history-item-sender-title": "",
"dashboard-history-item-status-title": "",
"dashboard-history-item-type-title": "",
"dashboard-inbox-label": "",
"dashboard-new-button": "",
"dashboard-sent-label": "",
"footer-nav-developers": "",
"footer-nav-disclaimer": "",
"footer-nav-privacy": "",
Expand Down
9 changes: 9 additions & 0 deletions src/langs/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@
"api-key-actions-dropdown-delete-key": "刪除密匙",
"api-key-name-input-placeholder": "API 密匙",
"button-continue": "繼續",
"dashboard-empty-inbox-text": "收件箱空",
"dashboard-empty-sent-text": "發件箱空",
"dashboard-history-item-recipient-title": "收件人",
"dashboard-history-item-sender-title": "發件人",
"dashboard-history-item-status-title": "狀態",
"dashboard-history-item-type-title": "種類",
"dashboard-inbox-label": "收件箱",
"dashboard-new-button": "發送新NDA",
"dashboard-sent-label": "發件箱",
"footer-nav-developers": "開發者",
"footer-nav-disclaimer": "NDAify不是律師事務所,不提供法律服務或建議,也不提供或參與法律代理。 簽訂NDA表示您已閱讀並同意{privacyPolicy}和{termsOfUse}。",
"footer-nav-privacy": "隱私政策",
Expand Down

0 comments on commit 39964e5

Please sign in to comment.