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: fix unmarked translations #306

Merged
merged 1 commit into from
Jun 16, 2023
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
15 changes: 8 additions & 7 deletions src/orders-and-subscriptions/OrdersAndSubscriptionsPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,15 @@ import { FormattedMessage, useIntl } from '@edx/frontend-platform/i18n';

import { BasicAlert, PageLoading } from '../components';

import Subscriptions, { fetchSubscriptions } from '../subscriptions';
import OrderHistory, { fetchOrders } from '../order-history';
import Subscriptions, { fetchSubscriptions } from '../subscriptions';

import { errorSelector, loadingSelector, showSubscriptionSelector } from './selectors';
import {
errorSelector,
loadingSelector,
showSubscriptionSelector,
} from './selectors';
import messages from './OrdersAndSubscriptionsPage.messages';

const OrdersAndSubscriptionsPage = () => {
const { formatMessage } = useIntl();
Expand Down Expand Up @@ -38,11 +43,7 @@ const OrdersAndSubscriptionsPage = () => {

const renderLoading = () => (
<PageLoading
srMessage={formatMessage({
id: 'ecommerce.order.history.loading',
defaultMessage: 'Loading orders and subscriptions...',
description: 'Message when orders and subscriptions page is loading.',
})}
srMessage={formatMessage(messages['ecommerce.order.history.loading'])}
/>
);

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { defineMessages } from '@edx/frontend-platform/i18n';

const messages = defineMessages({
'ecommerce.order.history.loading': {
id: 'ecommerce.order.history.loading',
defaultMessage: 'Loading orders and subscriptions...',
description: 'Message when orders and subscriptions page is loading.',
},
});

export default messages;
18 changes: 7 additions & 11 deletions src/subscriptions/ManageSubscriptionsPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { PageLoading, SupportLink } from '../components';

import { fetchStripeCustomerPortalURL } from './actions';
import { subscriptionsSelector } from './selectors';
import messages from './ManageSubscriptionsPage.messages';

const ManageSubscriptionsPage = () => {
const { formatMessage } = useIntl();
Expand All @@ -15,12 +16,9 @@ const ManageSubscriptionsPage = () => {
subscriptionsSelector,
);

const buttonLabel = formatMessage({
id: 'ecommerce.order.history.manage.subscriptions.button',
defaultMessage: 'Orders and subscriptions',
description:
'Button label to navigate to the orders and subscriptions page.',
});
const buttonLabel = formatMessage(
messages['ecommerce.order.history.manage.subscriptions.button'],
);

useEffect(() => {
dispatch(fetchStripeCustomerPortalURL());
Expand All @@ -35,11 +33,9 @@ const ManageSubscriptionsPage = () => {

const renderLoading = () => (
<PageLoading
srMessage={formatMessage({
id: 'ecommerce.order.history.loading.manage.subscriptions',
defaultMessage: 'Loading manage subscriptions...',
description: 'Message when loading the manage subscriptions page.',
})}
srMessage={formatMessage(
messages['ecommerce.order.history.manage.subscriptions.loading'],
)}
/>
);

Expand Down
17 changes: 17 additions & 0 deletions src/subscriptions/ManageSubscriptionsPage.messages.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { defineMessages } from '@edx/frontend-platform/i18n';

const messages = defineMessages({
'ecommerce.order.history.manage.subscriptions.button': {
id: 'ecommerce.order.history.manage.subscriptions.button',
defaultMessage: 'Orders and subscriptions',
description:
'Button label to navigate to the orders and subscriptions page.',
},
'ecommerce.order.history.manage.subscriptions.loading': {
id: 'ecommerce.order.history.manage.subscriptions.loading',
defaultMessage: 'Loading manage subscriptions...',
description: 'Message when loading the manage subscriptions page.',
},
});

export default messages;
Loading