From 83137498d95683c20badcb69a994ad416a1430f9 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Mon, 21 Mar 2022 13:33:10 -0500 Subject: [PATCH] Generalize some language --- app/soapbox/actions/soapbox.js | 2 +- app/soapbox/components/error_boundary.js | 6 ++++-- app/soapbox/components/helmet.js | 2 +- .../components/follow_recommendations_container.js | 2 +- app/soapbox/features/public_layout/components/pre_header.js | 4 +++- app/soapbox/features/verification/registration.js | 5 +++-- app/soapbox/locales/en.json | 2 +- 7 files changed, 14 insertions(+), 9 deletions(-) diff --git a/app/soapbox/actions/soapbox.js b/app/soapbox/actions/soapbox.js index 5001ecd61..34e1c723d 100644 --- a/app/soapbox/actions/soapbox.js +++ b/app/soapbox/actions/soapbox.js @@ -47,7 +47,7 @@ export const makeDefaultConfig = features => { }), extensions: ImmutableMap(), defaultSettings: ImmutableMap(), - copyright: `©${year} TRUTH Social`, + copyright: `♥${year}. Copying is an act of love. Please copy and share.`, navlinks: ImmutableMap({ homeFooter: ImmutableList(), }), diff --git a/app/soapbox/components/error_boundary.js b/app/soapbox/components/error_boundary.js index af4a64259..9489b0e75 100644 --- a/app/soapbox/components/error_boundary.js +++ b/app/soapbox/components/error_boundary.js @@ -14,6 +14,7 @@ const mapStateToProps = (state) => { const soapboxConfig = getSoapboxConfig(state); return { + siteTitle: state.instance.title, helpLink: soapboxConfig.getIn(['links', 'help']), supportLink: soapboxConfig.getIn(['links', 'support']), statusLink: soapboxConfig.getIn(['links', 'status']), @@ -25,6 +26,7 @@ class ErrorBoundary extends React.PureComponent { static propTypes = { children: PropTypes.node, + siteTitle: PropTypes.string, supportLink: PropTypes.string, helpLink: PropTypes.string, statusLink: PropTypes.string, @@ -78,7 +80,7 @@ class ErrorBoundary extends React.PureComponent { render() { const { browser, hasError } = this.state; - const { children, helpLink, statusLink, supportLink } = this.props; + const { children, siteTitle, helpLink, statusLink, supportLink } = this.props; if (!hasError) { return children; @@ -93,7 +95,7 @@ class ErrorBoundary extends React.PureComponent {
- Truth Social + {siteTitle}
diff --git a/app/soapbox/components/helmet.js b/app/soapbox/components/helmet.js index 6acca54f4..9e86883b4 100644 --- a/app/soapbox/components/helmet.js +++ b/app/soapbox/components/helmet.js @@ -22,7 +22,7 @@ const mapStateToProps = state => { const settings = getSettings(state); return { - siteTitle: state.getIn(['instance', 'title'], 'Truth Social'), + siteTitle: state.getIn(['instance', 'title']), unreadCount: getNotifTotals(state), demetricator: settings.get('demetricator'), }; diff --git a/app/soapbox/features/follow_recommendations/components/follow_recommendations_container.js b/app/soapbox/features/follow_recommendations/components/follow_recommendations_container.js index 0dd15c871..59c4f382b 100644 --- a/app/soapbox/features/follow_recommendations/components/follow_recommendations_container.js +++ b/app/soapbox/features/follow_recommendations/components/follow_recommendations_container.js @@ -20,7 +20,7 @@ export default class FollowRecommendationsContainer extends React.Component { return (
-

 (Beta)

+

diff --git a/app/soapbox/features/public_layout/components/pre_header.js b/app/soapbox/features/public_layout/components/pre_header.js index 6e756eb8b..5130f6804 100644 --- a/app/soapbox/features/public_layout/components/pre_header.js +++ b/app/soapbox/features/public_layout/components/pre_header.js @@ -3,6 +3,7 @@ import { defineMessages, useIntl } from 'react-intl'; import { Link } from 'react-router-dom'; import { IconButton } from 'soapbox/components/ui'; +import { useAppSelector } from 'soapbox/hooks'; const messages = defineMessages({ close: { id: 'pre_header.close', defaultMessage: 'Close' }, @@ -12,6 +13,7 @@ export default () => { const intl = useIntl(); const [hidden, setHidden] = React.useState(false); + const siteTitle = useAppSelector((state) => state.instance.title); const handleClose = () => { localStorage.setItem('soapbox:welcome-banner', '0'); @@ -33,7 +35,7 @@ export default () => {

- Welcome to TRUTH Social + Welcome to {siteTitle}

diff --git a/app/soapbox/features/verification/registration.js b/app/soapbox/features/verification/registration.js index 43ea15990..fb874b597 100644 --- a/app/soapbox/features/verification/registration.js +++ b/app/soapbox/features/verification/registration.js @@ -21,6 +21,7 @@ const Registration = () => { const intl = useIntl(); const isLoading = useSelector((state) => state.getIn(['verification', 'isLoading'])); + const siteTitle = useSelector((state) => state.instance.title); const [state, setState] = React.useState(initialState); const [shouldRedirect, setShouldRedirect] = React.useState(false); @@ -41,8 +42,8 @@ const Registration = () => { snackbar.success( intl.formatMessage({ id: 'registrations.success', - defaultMessage: 'Welcome to Truth Social!', - }), + defaultMessage: 'Welcome to {siteTitle}!', + }, { siteTitle }), ), ); }) diff --git a/app/soapbox/locales/en.json b/app/soapbox/locales/en.json index 3abfaadb5..b3d3d18ad 100644 --- a/app/soapbox/locales/en.json +++ b/app/soapbox/locales/en.json @@ -440,7 +440,7 @@ "filters.removed": "Filter deleted.", "follow_recommendations.done": "Done", "follow_recommendations.heading": "Follow people you'd like to see posts from! Here are some suggestions.", - "follow_recommendations.lead": "Posts from people you follow will show up in chronological order on your home feed. Don't be afraid to make mistakes, you can unfollow people just as easily any time!", + "follow_recommendations.lead": "Don’t be afraid to make mistakes; you can unfollow people at any time.", "follow_request.authorize": "Authorize", "follow_request.reject": "Reject", "follow_recommendations.heading": "Who To Follow",