Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix missing Text on website #2237

Merged
merged 2 commits into from
Dec 13, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/web/src/brandkit/IconsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const Overview = withNamespaces(NameSpaces.brand)(function _Overview({ t }: I18n
{t('licenseTitle')}
</Text>
<Text style={[fonts.p, brandStyles.gap, standardStyles.elementalMargin]}>
<Trans i18nKey="icons.license">
<Trans ns={NameSpaces.brand} i18nKey="icons.license">
<InlineAnchor href={CeloLinks.iconsLicense}>
Creative Commons Attribution-NoDerivatives 4.0 International License
</InlineAnchor>
Expand Down
2 changes: 1 addition & 1 deletion packages/web/src/brandkit/Intro.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const Overview = withNamespaces(NameSpaces.brand)(function _Overview({ t }: I18n
<H4 style={standardStyles.blockMarginBottom}>{t('home.introduction')}</H4>
<Text style={[fonts.h5, standardStyles.elementalMarginBottom]}>{t('home.useageTitle')}</Text>
<Text style={fonts.p}>
<Trans i18nKey="home.useageText">
<Trans ns={NameSpaces.brand} i18nKey="home.useageText">
<InlineAnchor href={menuItems.CODE_OF_CONDUCT.link}>Code Of Conduct</InlineAnchor>
</Trans>
</Text>
Expand Down
10 changes: 4 additions & 6 deletions packages/web/src/brandkit/Logo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import Judgement, { Value } from 'src/brandkit/logo/Judgement'
import LogoExample, { Logos } from 'src/brandkit/logo/LogoExample'
import LogoWithBackground from 'src/brandkit/logo/LogoWithBackground'
import { Digital, Print } from 'src/brandkit/logo/Minimums'
import { H1, H3 } from 'src/fonts/Fonts'
import { H1, H4 } from 'src/fonts/Fonts'
import { I18nProps, NameSpaces, Trans, withNamespaces } from 'src/i18n'
import { ScreenProps, ScreenSizes, withScreenSize } from 'src/layout/ScreenSize'
import LogoLightBg from 'src/logos/LogoLightBg'
Expand Down Expand Up @@ -44,15 +44,13 @@ export default React.memo(function Logo() {
})

const Overview = withNamespaces(NameSpaces.brand)(
withScreenSize<I18nProps>(function _Overview({ t, screen }: I18nProps & ScreenProps) {
withScreenSize(function _Overview({ t, screen }: I18nProps & ScreenProps) {
const glyphAreaStyle = screen === ScreenSizes.DESKTOP ? styles.pilar : styles.square
return (
<View style={styles.container}>
<View style={styles.gap}>
<H1 style={standardStyles.elementalMarginBottom}>{t('logo.title')}</H1>
<Text style={[fonts.p, standardStyles.elementalMarginBottom]}>
{t('logo.overviewCopy')}
</Text>
<H4 style={standardStyles.elementalMarginBottom}>{t('logo.overviewCopy')}</H4>
<Button
kind={BTN.PRIMARY}
text={t('logo.overviewBtn')}
Expand All @@ -62,7 +60,7 @@ const Overview = withNamespaces(NameSpaces.brand)(
<Text
style={[fonts.p, standardStyles.blockMarginBottom, standardStyles.elementalMarginTop]}
>
<Trans i18nKey="logo.license">
<Trans ns={NameSpaces.brand} i18nKey="logo.license">
<InlineAnchor href={menuItems.CODE_OF_CONDUCT.link}>here</InlineAnchor>
</Trans>
</Text>
Expand Down
6 changes: 3 additions & 3 deletions packages/web/src/brandkit/Typography.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export default React.memo(function Typography() {
})

const Overview = withNamespaces(NameSpaces.brand)(
React.memo(function _Overview({ t }: I18nProps) {
React.memo(function _Overview({ t, i18n }: I18nProps) {
return (
<View>
<PageHeadline
Expand All @@ -50,7 +50,7 @@ const Overview = withNamespaces(NameSpaces.brand)(
<View style={brandStyles.gap}>
<Text style={fonts.h5}>{t('typography.facesTitle')}</Text>
<Text style={[fonts.p, standardStyles.elementalMargin]}>
<Trans i18nKey={'typography.facesText'}>
<Trans ns={NameSpaces.brand} i18nKey={'typography.facesText'}>
<InlineAnchor href="https://medium.com/celohq/the-why-of-the-celo-coin-part-1-of-3-5e5701805847">
philosophy
</InlineAnchor>
Expand Down Expand Up @@ -79,7 +79,7 @@ const TYPEFACES = [
{ font: fonts.h2, name: 'Heading Two', data: fontInfo.h2 },
{ font: fonts.h3, name: 'Heading Three', data: fontInfo.h3 },
{ font: fonts.h4, name: 'Heading Four', data: fontInfo.h4 },
{ font: fonts.h5, name: 'Heading Five', data: fontInfo.h5a },
{ font: fonts.h5, name: 'Heading Five', data: fontInfo.h5 },
{ font: fonts.h6, name: 'Heading Six', data: fontInfo.h6 },
{ font: fonts.p, name: 'Body', data: fontInfo.p },
{ font: fonts.legal, name: 'Small', data: fontInfo.legal },
Expand Down
10 changes: 5 additions & 5 deletions packages/web/src/community/CodeOfConduct.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import defaultContent from 'src/../static/locales/en/codeofconduct.json'
import { IntegratingAnimation } from 'src/community/connect/CodeOfConduct'
import { H1, Li, Ul } from 'src/fonts/Fonts'
import OpenGraph from 'src/header/OpenGraph'
import { I18nProps, Trans, withNamespaces } from 'src/i18n'
import { I18nProps, NameSpaces, Trans, withNamespaces } from 'src/i18n'
import { Cell, GridRow, Spans } from 'src/layout/GridRow'
import SideTitledSection from 'src/layout/SideTitledSection'
import Button, { BTN } from 'src/shared/Button.3'
Expand Down Expand Up @@ -39,7 +39,7 @@ export class CodeOfConduct extends React.Component<I18nProps> {
<SideTitledSection
title={t('OpenSource')}
text={
<Trans i18nKey={'OpenSourceText'}>
<Trans ns={NameSpaces.codeofconduct} i18nKey={'OpenSourceText'}>
{
'A supplemental goal of this Code of Conduct is to increase open source citizenship by encouraging participants to recognize and strengthen the relationships between our actions and their effects on our community.\n\n Communities mirror the societies in which they exist and positive action is essential to counteract the many forms of inequality and abuses of power that exist in society.\n\n If you see someone who is making an extra effort to ensure our community is welcoming, friendly, and encourages all participants to contribute to the fullest extent, let us know by email '
}
Expand All @@ -66,7 +66,7 @@ export class CodeOfConduct extends React.Component<I18nProps> {
<SideTitledSection
title={t('Reporting')}
text={
<Trans i18nKey="ReportingText">
<Trans ns={NameSpaces.codeofconduct} i18nKey="ReportingText">
If you are subject to or witness unacceptable behavior, or have any other concerns,
please notify <CommunityEmail /> as soon as possible.
</Trans>
Expand All @@ -75,7 +75,7 @@ export class CodeOfConduct extends React.Component<I18nProps> {
<SideTitledSection
title={t('Grievances')}
text={
<Trans i18nKey="GrievancesText">
<Trans ns={NameSpaces.codeofconduct} i18nKey="GrievancesText">
If you feel you have been falsely or unfairly accused of violating this Code of
Conduct, you should notify <CommunityEmail /> with a concise description of your
grievance.
Expand All @@ -85,7 +85,7 @@ export class CodeOfConduct extends React.Component<I18nProps> {
<SideTitledSection
title={t('License')}
text={
<Trans i18nKey={'LicenseText'}>
<Trans ns={NameSpaces.codeofconduct} i18nKey={'LicenseText'}>
This Code of Conduct is distributed under a{' '}
<Button
href={'https://creativecommons.org/licenses/by-sa/3.0/'}
Expand Down
6 changes: 3 additions & 3 deletions packages/web/src/dev/Cover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Image, StyleSheet, Text, View } from 'react-native'
import Fade from 'react-reveal/Fade'
import Transceive from 'src/dev/Transceive'
import { H2, H3, H4 } from 'src/fonts/Fonts'
import { I18nProps, Trans, withNamespaces } from 'src/i18n'
import { I18nProps, NameSpaces, Trans, withNamespaces } from 'src/i18n'
import { Cell, GridRow, Spans } from 'src/layout/GridRow'
import Button, { BTN, SIZE } from 'src/shared/Button.3'
import { CeloLinks } from 'src/shared/menu-items'
Expand Down Expand Up @@ -52,14 +52,14 @@ const CoverComponent = React.memo(function Cover({ t }: I18nProps) {
</Cell>
<Cell span={Spans.half}>
<H4 style={[textStyles.invert, standardStyles.elementalMarginBottom]}>
<Trans i18nKey={'purposeText'}>
<Trans ns={NameSpaces.dev} i18nKey={'purposeText'}>
<Text href={CeloLinks.discourse} style={styles.colorEmphasis}>
2 million Celo Gold in rewards.
</Text>*
</Trans>
</H4>
<Text style={[fonts.p, textStyles.invert]}>
<Trans i18nKey={'purposeAsterisk'}>
<Trans ns={NameSpaces.dev} i18nKey={'purposeAsterisk'}>
<Link href={CeloLinks.stakeOffTerms}>Terms and Conditions</Link>
</Trans>
</Text>
Expand Down
4 changes: 2 additions & 2 deletions packages/web/src/dev/FaucetPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class FaucetPage extends React.Component<I18nProps, State> {
<SideTitledSection
title={t('getTestnetAddress')}
text={
<Trans i18nKey={'getTestnetText'}>
<Trans ns={NameSpaces.faucet} i18nKey={'getTestnetText'}>
<InlineAnchor href={CeloLinks.walletApp}>INVITE</InlineAnchor>{' '}
<InlineAnchor href={CeloLinks.tutorial}>CLI</InlineAnchor>
</Trans>
Expand All @@ -48,7 +48,7 @@ class FaucetPage extends React.Component<I18nProps, State> {
<SideTitledSection
title={t('haveAnAccount')}
text={
<Trans i18nKey={'haveAccountText'}>
<Trans ns={NameSpaces.faucet} i18nKey={'haveAccountText'}>
You can access an existing account from the Celo Wallet by pressing `Import It` on
the first screen and entering your seed phrase.
</Trans>
Expand Down
1 change: 1 addition & 0 deletions packages/web/src/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export const Trans = NextI18NextInstance.Trans
export interface I18nProps {
t: TFunction
i18n: I18n
tReady: boolean
}

export default NextI18NextInstance
Expand Down
2 changes: 1 addition & 1 deletion packages/web/src/shared/Footer.3.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ const Details = React.memo(function _Details({ t }: { t: I18nProps['t'] }) {
</Responsive>
<Responsive medium={[textStyles.left, styles.detailsText, fonts.legal]}>
<Text style={[textStyles.center, styles.detailsText, fonts.legal]}>
<Trans i18nKey={'footerReadMoreTerms'}>
<Trans ns={NameSpaces.common} i18nKey={'footerReadMoreTerms'}>
<InlineAnchor href={menu.TERMS.link}>Terms of Service</InlineAnchor>
</Trans>
</Text>
Expand Down