Commit 236d9d58 authored by aleclofabbro's avatar aleclofabbro

fixed various Trans from @lingui/macro

parent e8a05ac1
......@@ -2,8 +2,9 @@ import React from 'react';
import styled from 'ui/themes/styled';
import { Box, Text, Flex } from 'rebass/styled-components';
import SocialText from 'ui/modules/SocialText';
import { i18nMark, Trans } from '@lingui/react';
import { LocaleContext } from '../../../context/global/localizationCtx';
import { i18nMark } from '@lingui/react';
import { Trans } from '@lingui/macro';
import { FormikHook } from 'ui/@types/types';
import { Star, CornerDownLeft } from 'react-feather';
import DOMPurify from 'dompurify';
......@@ -116,11 +117,7 @@ export const LikedComment: React.SFC<CommentProps> = ({
<ActionIcon>
<Star strokeWidth="1" size="18" />
</ActionIcon>
<ActionText
variant={'text'}
sx={{ textTransform: 'capitalize' }}
ml={1}
>
<ActionText variant={'text'} sx={{ textTransform: 'capitalize' }} ml={1}>
{like.totalLikes + ' '} <Trans>Star</Trans>
</ActionText>
</ActionItem>
......@@ -148,25 +145,20 @@ const Actions = styled(Box)`
const ActionItem = styled(Flex)<{ liked?: boolean }>`
align-items: center;
color: ${props =>
props.liked ? props.theme.colors.lighter : props.theme.colors.mediumdark};
color: ${props => (props.liked ? props.theme.colors.lighter : props.theme.colors.mediumdark)};
div {
color: ${props =>
props.liked ? props.theme.colors.lighter : props.theme.colors.mediumdark};
color: ${props => (props.liked ? props.theme.colors.lighter : props.theme.colors.mediumdark)};
}
cursor: pointer;
background: ${props =>
props.liked
? props.theme.colors.secondary
: props.theme.colors.mediumlight};
props.liked ? props.theme.colors.secondary : props.theme.colors.mediumlight};
border-radius: 4px;
padding: 0 8px;
margin-right: 8px;
text-align: center;
font-size: ${typography.size.s1};
svg {
stroke: ${props =>
props.liked ? props.theme.colors.lighter : props.theme.colors.mediumdark};
stroke: ${props => (props.liked ? props.theme.colors.lighter : props.theme.colors.mediumdark)};
}
a {
display: flex;
......
import React from 'react';
import styled from 'ui/themes/styled';
import { Box, Text, Flex } from 'rebass/styled-components';
// import SocialText from 'ui/modules/SocialText';
// import { i18nMark, Trans } from '@lingui/react';
import { Trans } from '@lingui/macro';
// import { LocaleContext } from '../../../context/global/localizationCtx';
import { FormikHook } from 'ui/@types/types';
import { Star, MoreHorizontal, Flag } from 'react-feather';
import { Dropdown, DropdownItem } from 'ui/modules/Dropdown';
......@@ -68,26 +65,15 @@ export const MainComment: React.SFC<CommentProps> = ({
<ActionIcon>
<Star strokeWidth="1" size="18" />
</ActionIcon>
<ActionText
variant={'text'}
sx={{ textTransform: 'capitalize' }}
ml={1}
>
<ActionText variant={'text'} sx={{ textTransform: 'capitalize' }} ml={1}>
{like.totalLikes + ' '} <Trans>Star</Trans>
</ActionText>
</ActionItem>
<ActionItem
onClick={() => onOpen(true)}
sx={{ position: 'relative' }}
>
<ActionItem onClick={() => onOpen(true)} sx={{ position: 'relative' }}>
<ActionIcon>
<MoreHorizontal className="hover" size={18} />
</ActionIcon>
<ActionText
variant={'text'}
sx={{ textTransform: 'capitalize' }}
ml={1}
>
<ActionText variant={'text'} sx={{ textTransform: 'capitalize' }} ml={1}>
<Trans>More</Trans>
</ActionText>
{isOpen && (
......@@ -160,11 +146,9 @@ const Actions = styled(Box)`
const ActionItem = styled(Flex)<{ liked?: boolean }>`
align-items: center;
color: ${props =>
props.liked ? props.theme.colors.lighter : props.theme.colors.mediumdark};
color: ${props => (props.liked ? props.theme.colors.lighter : props.theme.colors.mediumdark)};
div {
color: ${props =>
props.liked ? props.theme.colors.lighter : props.theme.colors.mediumdark};
color: ${props => (props.liked ? props.theme.colors.lighter : props.theme.colors.mediumdark)};
}
&:hover {
background: ${props =>
......@@ -174,17 +158,14 @@ const ActionItem = styled(Flex)<{ liked?: boolean }>`
}
cursor: pointer;
background: ${props =>
props.liked
? props.theme.colors.secondary
: props.theme.colors.mediumlight};
props.liked ? props.theme.colors.secondary : props.theme.colors.mediumlight};
border-radius: 4px;
padding: 0 8px;
margin-right: 8px;
text-align: center;
font-size: ${typography.size.s1};
svg {
stroke: ${props =>
props.liked ? props.theme.colors.lighter : props.theme.colors.mediumdark};
stroke: ${props => (props.liked ? props.theme.colors.lighter : props.theme.colors.mediumdark)};
}
a {
display: flex;
......
import * as React from 'react';
import { Flex, Box, Text } from 'rebass/styled-components';
import media from 'styled-media-query';
import { i18nMark, Trans } from '@lingui/react';
import { i18nMark } from '@lingui/react';
import { Trans } from '@lingui/macro';
import styled from 'ui/themes/styled';
import { FormikHook } from 'ui/@types/types';
import {
......@@ -21,12 +22,7 @@ import DropzoneArea from 'ui/modules/DropzoneModal';
import { ContainerForm, Actions } from 'ui/modules/Modal';
import Button from 'ui/elements/Button';
// import { useHistory } from 'react-router';
import {
Wrapper,
WrapperCont,
MainContainer,
HomeBox
} from 'ui/elements/Layout';
import { Wrapper, WrapperCont, MainContainer, HomeBox } from 'ui/elements/Layout';
const tt = {
placeholders: {
......@@ -90,14 +86,12 @@ export const Settings: React.FC<Props> = ({
(file: File) => formik.setValues({ ...formik.values, icon: file }),
[formik]
);
const initialIconUrl =
'string' === typeof formik.values.icon ? formik.values.icon : '';
const initialIconUrl = 'string' === typeof formik.values.icon ? formik.values.icon : '';
const onImageFileSelected = React.useCallback(
(file: File) => formik.setValues({ ...formik.values, image: file }),
[formik]
);
const initialImageUrl =
'string' === typeof formik.values.image ? formik.values.image : '';
const initialImageUrl = 'string' === typeof formik.values.image ? formik.values.image : '';
return (
<MainContainer>
......@@ -243,10 +237,7 @@ const Sidebar = ({ basePath, isAdmin }) => {
<Nav>
<NavItem p={3} fontSize={1}>
<NavLink exact to={`${basePath}/`}>
<Flex
alignItems="center"
sx={{ textTransform: 'capitalize', fontSize: '14px' }}
>
<Flex alignItems="center" sx={{ textTransform: 'capitalize', fontSize: '14px' }}>
<Icon className="icon" mr={1}>
<Sett size={20} />
</Icon>
......@@ -256,10 +247,7 @@ const Sidebar = ({ basePath, isAdmin }) => {
</NavItem>
<NavItem p={3} fontSize={1}>
<NavLink to={`${basePath}/preferences`}>
<Flex
alignItems="center"
sx={{ textTransform: 'capitalize', fontSize: '14px' }}
>
<Flex alignItems="center" sx={{ textTransform: 'capitalize', fontSize: '14px' }}>
<Icon className="icon" mr={1}>
<Sliders size={20} />
</Icon>
......@@ -283,10 +271,7 @@ const Sidebar = ({ basePath, isAdmin }) => {
</SectionTitle>
<NavItem p={3} fontSize={1}>
<NavLink to={`${basePath}/instance`}>
<Flex
alignItems="center"
sx={{ textTransform: 'capitalize', fontSize: '14px' }}
>
<Flex alignItems="center" sx={{ textTransform: 'capitalize', fontSize: '14px' }}>
<Icon className="icon" mr={1}>
<Droplet size={20} />
</Icon>
......@@ -296,10 +281,7 @@ const Sidebar = ({ basePath, isAdmin }) => {
</NavItem>
<NavItem p={3} fontSize={1}>
<NavLink to={`${basePath}/invites`}>
<Flex
alignItems="center"
sx={{ textTransform: 'capitalize', fontSize: '14px' }}
>
<Flex alignItems="center" sx={{ textTransform: 'capitalize', fontSize: '14px' }}>
<Icon className="icon" mr={1}>
<Mail size={20} />
</Icon>
......@@ -310,10 +292,7 @@ const Sidebar = ({ basePath, isAdmin }) => {
<NavItem p={3} fontSize={1}>
{/* <NavLink to={`${basePath}/reports`}> */}
<NavLink to={`${basePath}/flags`}>
<Flex
alignItems="center"
sx={{ textTransform: 'capitalize', fontSize: '14px' }}
>
<Flex alignItems="center" sx={{ textTransform: 'capitalize', fontSize: '14px' }}>
<Icon className="icon" mr={1}>
<Flag size={20} />
</Icon>
......@@ -323,10 +302,7 @@ const Sidebar = ({ basePath, isAdmin }) => {
</NavItem>
<NavItem p={3} fontSize={1}>
<NavLink to={`${basePath}/logs`}>
<Flex
alignItems="center"
sx={{ textTransform: 'capitalize', fontSize: '14px' }}
>
<Flex alignItems="center" sx={{ textTransform: 'capitalize', fontSize: '14px' }}>
<Icon className="icon" mr={1}>
<Monitor size={20} />
</Icon>
......
import { i18nMark, Trans } from '@lingui/react';
import { i18nMark } from '@lingui/react';
import { Trans } from '@lingui/macro';
import { /* Textarea,*/ /* Checkbox, */ Input, Label } from '@rebass/forms';
import React from 'react';
import { XCircle } from 'react-feather';
......
import { i18nMark, Trans } from '@lingui/react';
import { i18nMark } from '@lingui/react';
import { Trans } from '@lingui/macro';
import { Input, Label } from '@rebass/forms';
import React from 'react';
import { Box, Text } from 'rebass/styled-components';
......@@ -14,9 +15,7 @@ import { LocaleContext } from 'context/global/localizationCtx';
const tt = {
placeholders: {
email: i18nMark(
'Add email addresses (comma-separated) to invite to instance'
)
email: i18nMark('Add email addresses (comma-separated) to invite to instance')
}
};
export interface Props {
......
......@@ -7,15 +7,10 @@ import { WrapperPanel } from 'ui/elements/Panel';
import { LoadMore } from 'ui/modules/Loadmore';
import { FormikHook } from 'ui/@types/types';
import {
Wrapper,
WrapperCont,
ObjectsList,
MainContainer,
HomeBox
} from 'ui/elements/Layout';
import { Wrapper, WrapperCont, ObjectsList, MainContainer, HomeBox } from 'ui/elements/Layout';
import SocialText from 'ui/modules/SocialText';
import { i18nMark, Trans } from '@lingui/react';
import { i18nMark } from '@lingui/react';
import { Trans } from '@lingui/macro';
import { LocaleContext } from '../../../context/global/localizationCtx';
const tt = {
......@@ -82,11 +77,7 @@ export const Thread: React.FC<Props> = ({
<TitleSection mb={2} variant="suptitle">
<Trans>Community</Trans>
</TitleSection>
<HeaderWrapper
id={communityId}
name={communityName}
icon={communityIcon}
/>
<HeaderWrapper id={communityId} name={communityName} icon={communityIcon} />
</WrapperPanel>
</MainContainer>
);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment