Add missing strings to translation, enable formatjs ESLint rules
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
@@ -11,6 +11,7 @@ import type { AxiosResponse } from 'axios';
|
||||
const noOp = () => {};
|
||||
|
||||
const messages = defineMessages({
|
||||
captcha: { id: 'registration.captcha', defaultMessage: 'Captcha' },
|
||||
placeholder: { id: 'registration.captcha.placeholder', defaultMessage: 'Enter the pictured text' },
|
||||
});
|
||||
|
||||
@@ -110,7 +111,7 @@ const NativeCaptchaField: React.FC<INativeCaptchaField> = ({ captcha, onChange,
|
||||
return (
|
||||
<Stack space={2}>
|
||||
<div className='flex w-full items-center justify-center rounded-md border border-solid border-gray-300 bg-white dark:border-gray-600'>
|
||||
<img alt='captcha' src={captcha.get('url')} onClick={onClick} />
|
||||
<img alt={intl.formatMessage(messages.captcha)} src={captcha.get('url')} onClick={onClick} />
|
||||
</div>
|
||||
|
||||
<Input
|
||||
|
||||
@@ -18,8 +18,8 @@ const messages = defineMessages({
|
||||
delete: { id: 'chats.actions.delete', defaultMessage: 'Delete for both' },
|
||||
copy: { id: 'chats.actions.copy', defaultMessage: 'Copy' },
|
||||
report: { id: 'chats.actions.report', defaultMessage: 'Report' },
|
||||
deleteForMe: { id: 'chats.actions.deleteForMe', defaultMessage: 'Delete for me' },
|
||||
blockedBy: { id: 'chat_message_list.blockedBy', defaultMessage: 'You are blocked by' },
|
||||
deleteForMe: { id: 'chats.actions.delete_for_me', defaultMessage: 'Delete for me' },
|
||||
blockedBy: { id: 'chat_message_list.blocked_by', defaultMessage: 'You are blocked by' },
|
||||
networkFailureTitle: { id: 'chat_message_list.network_failure.title', defaultMessage: 'Whoops!' },
|
||||
networkFailureSubtitle: { id: 'chat_message_list.network_failure.subtitle', defaultMessage: 'We encountered a network failure.' },
|
||||
networkFailureAction: { id: 'chat_message_list.network_failure.action', defaultMessage: 'Try again' },
|
||||
|
||||
@@ -26,7 +26,7 @@ import type { ChatMessage as ChatMessageEntity } from 'soapbox/types/entities';
|
||||
const messages = defineMessages({
|
||||
copy: { id: 'chats.actions.copy', defaultMessage: 'Copy' },
|
||||
delete: { id: 'chats.actions.delete', defaultMessage: 'Delete for both' },
|
||||
deleteForMe: { id: 'chats.actions.deleteForMe', defaultMessage: 'Delete for me' },
|
||||
deleteForMe: { id: 'chats.actions.delete_for_me', defaultMessage: 'Delete for me' },
|
||||
more: { id: 'chats.actions.more', defaultMessage: 'More' },
|
||||
report: { id: 'chats.actions.report', defaultMessage: 'Report' },
|
||||
});
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import clsx from 'clsx';
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import { defineMessages, useIntl } from 'react-intl';
|
||||
import { FormattedMessage, defineMessages, useIntl } from 'react-intl';
|
||||
import { useLocation } from 'react-router-dom';
|
||||
|
||||
import { fetchDirectory, expandDirectory } from 'soapbox/actions/directory';
|
||||
@@ -53,9 +53,13 @@ const Directory = () => {
|
||||
<Stack space={4}>
|
||||
<div className='grid grid-cols-2 gap-2'>
|
||||
<div>
|
||||
<Text weight='medium'>Display filter</Text>
|
||||
<Text weight='medium'>
|
||||
<FormattedMessage id='directory.display_filter' defaultMessage='Display filter' />
|
||||
</Text>
|
||||
<fieldset className='mt-3'>
|
||||
<legend className='sr-only'>Display filter</legend>
|
||||
<legend className='sr-only'>
|
||||
<FormattedMessage id='directory.display_filter' defaultMessage='Display filter' />
|
||||
</legend>
|
||||
<div className='space-y-2'>
|
||||
<RadioButton name='order' value='active' label={intl.formatMessage(messages.recentlyActive)} checked={order === 'active'} onChange={handleChangeOrder} />
|
||||
<RadioButton name='order' value='new' label={intl.formatMessage(messages.newArrivals)} checked={order === 'new'} onChange={handleChangeOrder} />
|
||||
@@ -65,9 +69,13 @@ const Directory = () => {
|
||||
|
||||
{features.federating && (
|
||||
<div>
|
||||
<Text weight='medium'>Fediverse filter</Text>
|
||||
<Text weight='medium'>
|
||||
<FormattedMessage id='directory.fediverse_filter' defaultMessage='Fediverse filter' />
|
||||
</Text>
|
||||
<fieldset className='mt-3'>
|
||||
<legend className='sr-only'>Fediverse filter</legend>
|
||||
<legend className='sr-only'>
|
||||
<FormattedMessage id='directory.fediverse_filter' defaultMessage='Fediverse filter' />
|
||||
</legend>
|
||||
<div className='space-y-2'>
|
||||
<RadioButton name='local' value='1' label={intl.formatMessage(messages.local, { domain: instance.title })} checked={local} onChange={handleChangeLocal} />
|
||||
<RadioButton name='local' value='0' label={intl.formatMessage(messages.federated)} checked={!local} onChange={handleChangeLocal} />
|
||||
|
||||
@@ -9,7 +9,7 @@ import AccountContainer from 'soapbox/containers/account-container';
|
||||
import { useAppDispatch, useAppSelector } from 'soapbox/hooks';
|
||||
|
||||
const messages = defineMessages({
|
||||
heading: { id: 'followRecommendations.heading', defaultMessage: 'Suggested Profiles' },
|
||||
heading: { id: 'follow_recommendations.heading', defaultMessage: 'Suggested Profiles' },
|
||||
});
|
||||
|
||||
const FollowRecommendations: React.FC = () => {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import React from 'react';
|
||||
import { FormattedMessage } from 'react-intl';
|
||||
|
||||
import { Avatar, Button, CardTitle, Stack } from 'soapbox/components/ui';
|
||||
import { type Card as StatusCard } from 'soapbox/types/entities';
|
||||
@@ -28,7 +29,7 @@ const GroupLinkPreview: React.FC<IGroupLinkPreview> = ({ card }) => {
|
||||
<CardTitle title={<span dangerouslySetInnerHTML={{ __html: group.display_name_html }} />} />
|
||||
|
||||
<Button theme='primary' to={`/group/${group.slug}`} block>
|
||||
View Group
|
||||
<FormattedMessage id='group.popover.action' defaultMessage='View Group' />
|
||||
</Button>
|
||||
</Stack>
|
||||
</Stack>
|
||||
|
||||
@@ -100,7 +100,7 @@ const DetailedStatus: React.FC<IDetailedStatus> = ({
|
||||
if (actualStatus.pleroma.get('quote_visible', true) === false) {
|
||||
quote = (
|
||||
<div className='quoted-actualStatus-tombstone'>
|
||||
<p><FormattedMessage id='actualStatuses.quote_tombstone' defaultMessage='Post is unavailable.' /></p>
|
||||
<p><FormattedMessage id='status.quote_tombstone' defaultMessage='Post is unavailable.' /></p>
|
||||
</div>
|
||||
);
|
||||
} else {
|
||||
@@ -190,7 +190,7 @@ const DetailedStatus: React.FC<IDetailedStatus> = ({
|
||||
tabIndex={0}
|
||||
>
|
||||
<Text tag='span' theme='muted' size='sm'>
|
||||
<FormattedMessage id='actualStatus.edited' defaultMessage='Edited {date}' values={{ date: intl.formatDate(new Date(actualStatus.edited_at), { hour12: true, month: 'short', day: '2-digit', hour: 'numeric', minute: '2-digit' }) }} />
|
||||
<FormattedMessage id='status.edited' defaultMessage='Edited {date}' values={{ date: intl.formatDate(new Date(actualStatus.edited_at), { hour12: true, month: 'short', day: '2-digit', hour: 'numeric', minute: '2-digit' }) }} />
|
||||
</Text>
|
||||
</div>
|
||||
</>
|
||||
|
||||
@@ -25,6 +25,16 @@ const messages = defineMessages({
|
||||
export: { id: 'theme_editor.export', defaultMessage: 'Export theme' },
|
||||
import: { id: 'theme_editor.import', defaultMessage: 'Import theme' },
|
||||
importSuccess: { id: 'theme_editor.import_success', defaultMessage: 'Theme was successfully imported!' },
|
||||
colorPrimary: { id: 'theme_editor.colors.primary', defaultMessage: 'Primary' },
|
||||
colorSecondary: { id: 'theme_editor.colors.secondary', defaultMessage: 'Secondary' },
|
||||
colorAccent: { id: 'theme_editor.colors.accent', defaultMessage: 'Accent' },
|
||||
colorGray: { id: 'theme_editor.colors.gray', defaultMessage: 'Gray' },
|
||||
colorSuccess: { id: 'theme_editor.colors.success', defaultMessage: 'Success' },
|
||||
colorDanger: { id: 'theme_editor.colors.danger', defaultMessage: 'Danger' },
|
||||
colorGreentext: { id: 'theme_editor.colors.greentext', defaultMessage: 'Greentext' },
|
||||
colorAccentBlue: { id: 'theme_editor.colors.accent_blue', defaultMessage: 'Accent Blue' },
|
||||
colorGradientStart: { id: 'theme_editor.colors.gradient_start', defaultMessage: 'Gradient Start' },
|
||||
colorGradientEnd: { id: 'theme_editor.colors.gradient_end', defaultMessage: 'Gradient End' },
|
||||
});
|
||||
|
||||
interface IThemeEditor {
|
||||
@@ -125,42 +135,42 @@ const ThemeEditor: React.FC<IThemeEditor> = () => {
|
||||
<Form onSubmit={handleSubmit}>
|
||||
<List>
|
||||
<PaletteListItem
|
||||
label='Primary'
|
||||
label={intl.formatMessage(messages.colorPrimary)}
|
||||
palette={colors.primary}
|
||||
onChange={updateColors('primary')}
|
||||
resetKey={resetKey}
|
||||
/>
|
||||
|
||||
<PaletteListItem
|
||||
label='Secondary'
|
||||
label={intl.formatMessage(messages.colorSecondary)}
|
||||
palette={colors.secondary}
|
||||
onChange={updateColors('secondary')}
|
||||
resetKey={resetKey}
|
||||
/>
|
||||
|
||||
<PaletteListItem
|
||||
label='Accent'
|
||||
label={intl.formatMessage(messages.colorAccent)}
|
||||
palette={colors.accent}
|
||||
onChange={updateColors('accent')}
|
||||
resetKey={resetKey}
|
||||
/>
|
||||
|
||||
<PaletteListItem
|
||||
label='Gray'
|
||||
label={intl.formatMessage(messages.colorGray)}
|
||||
palette={colors.gray}
|
||||
onChange={updateColors('gray')}
|
||||
resetKey={resetKey}
|
||||
/>
|
||||
|
||||
<PaletteListItem
|
||||
label='Success'
|
||||
label={intl.formatMessage(messages.colorSuccess)}
|
||||
palette={colors.success}
|
||||
onChange={updateColors('success')}
|
||||
resetKey={resetKey}
|
||||
/>
|
||||
|
||||
<PaletteListItem
|
||||
label='Danger'
|
||||
label={intl.formatMessage(messages.colorDanger)}
|
||||
palette={colors.danger}
|
||||
onChange={updateColors('danger')}
|
||||
resetKey={resetKey}
|
||||
@@ -169,25 +179,25 @@ const ThemeEditor: React.FC<IThemeEditor> = () => {
|
||||
|
||||
<List>
|
||||
<ColorListItem
|
||||
label='Greentext'
|
||||
label={intl.formatMessage(messages.colorGreentext)}
|
||||
value={colors.greentext}
|
||||
onChange={updateColor('greentext')}
|
||||
/>
|
||||
|
||||
<ColorListItem
|
||||
label='Accent Blue'
|
||||
label={intl.formatMessage(messages.colorAccentBlue)}
|
||||
value={colors['accent-blue']}
|
||||
onChange={updateColor('accent-blue')}
|
||||
/>
|
||||
|
||||
<ColorListItem
|
||||
label='Gradient Start'
|
||||
label={intl.formatMessage(messages.colorGradientStart)}
|
||||
value={colors['gradient-start']}
|
||||
onChange={updateColor('gradient-start')}
|
||||
/>
|
||||
|
||||
<ColorListItem
|
||||
label='Gradient End'
|
||||
label={intl.formatMessage(messages.colorGradientEnd)}
|
||||
value={colors['gradient-end']}
|
||||
onChange={updateColor('gradient-end')}
|
||||
/>
|
||||
@@ -210,7 +220,7 @@ const ThemeEditor: React.FC<IThemeEditor> = () => {
|
||||
}]}
|
||||
/>
|
||||
<Button theme='secondary' onClick={resetTheme}>
|
||||
<FormattedMessage id='theme_editor.Reset' defaultMessage='Reset' />
|
||||
<FormattedMessage id='theme_editor.reset' defaultMessage='Reset' />
|
||||
</Button>
|
||||
|
||||
<Button type='submit' theme='primary' disabled={submitting}>
|
||||
|
||||
@@ -8,7 +8,7 @@ import { useRegistrationStatus, useSoapboxConfig } from 'soapbox/hooks';
|
||||
|
||||
const messages = defineMessages({
|
||||
download: { id: 'landing_page_modal.download', defaultMessage: 'Download' },
|
||||
helpCenter: { id: 'landing_page_modal.helpCenter', defaultMessage: 'Help Center' },
|
||||
helpCenter: { id: 'landing_page_modal.help_center', defaultMessage: 'Help Center' },
|
||||
login: { id: 'header.login.label', defaultMessage: 'Log in' },
|
||||
register: { id: 'header.register.label', defaultMessage: 'Register' },
|
||||
});
|
||||
|
||||
@@ -22,8 +22,8 @@ const messages = defineMessages({
|
||||
done: { id: 'report.done', defaultMessage: 'Done' },
|
||||
next: { id: 'report.next', defaultMessage: 'Next' },
|
||||
submit: { id: 'report.submit', defaultMessage: 'Submit' },
|
||||
reportContext: { id: 'report.chatMessage.context', defaultMessage: 'When reporting a user’s message, the five messages before and five messages after the one selected will be passed along to our moderation team for context.' },
|
||||
reportMessage: { id: 'report.chatMessage.title', defaultMessage: 'Report message' },
|
||||
reportContext: { id: 'report.chat_message.context', defaultMessage: 'When reporting a user’s message, the five messages before and five messages after the one selected will be passed along to our moderation team for context.' },
|
||||
reportMessage: { id: 'report.chat_message.title', defaultMessage: 'Report message' },
|
||||
reportGroup: { id: 'report.group.title', defaultMessage: 'Report Group' },
|
||||
cancel: { id: 'common.cancel', defaultMessage: 'Cancel' },
|
||||
previous: { id: 'report.previous', defaultMessage: 'Previous' },
|
||||
|
||||
@@ -12,11 +12,11 @@ import { getDomain } from 'soapbox/utils/accounts';
|
||||
import type { Account } from 'soapbox/schemas';
|
||||
|
||||
const messages = defineMessages({
|
||||
addAdditionalStatuses: { id: 'report.otherActions.addAdditional', defaultMessage: 'Would you like to add additional statuses to this report?' },
|
||||
addMore: { id: 'report.otherActions.addMore', defaultMessage: 'Add more' },
|
||||
furtherActions: { id: 'report.otherActions.furtherActions', defaultMessage: 'Further actions:' },
|
||||
hideAdditionalStatuses: { id: 'report.otherActions.hideAdditional', defaultMessage: 'Hide additional statuses' },
|
||||
otherStatuses: { id: 'report.otherActions.otherStatuses', defaultMessage: 'Include other statuses?' },
|
||||
addAdditionalStatuses: { id: 'report.other_actions.add_additional', defaultMessage: 'Would you like to add additional statuses to this report?' },
|
||||
addMore: { id: 'report.other_actions.add_more', defaultMessage: 'Add more' },
|
||||
furtherActions: { id: 'report.other_actions.further_actions', defaultMessage: 'Further actions:' },
|
||||
hideAdditionalStatuses: { id: 'report.other_actions.hide_additional', defaultMessage: 'Hide additional statuses' },
|
||||
otherStatuses: { id: 'report.other_actions.other_statuses', defaultMessage: 'Include other statuses?' },
|
||||
});
|
||||
|
||||
interface IOtherActionsStep {
|
||||
|
||||
@@ -15,7 +15,7 @@ interface ITrendsPanel {
|
||||
|
||||
const messages = defineMessages({
|
||||
viewAll: {
|
||||
id: 'trendsPanel.viewAll',
|
||||
id: 'trends_panel.view_all',
|
||||
defaultMessage: 'View all',
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user