Files
frontend-component-header/src/Header.messages.jsx
Carlos Muniz c35df7ef60 feat: Add StudioHeader with optional AppMenu (#199)
* feat: Add StudioHeader with optional AppMenu

StudioHeader is a graft of Header with an additional optional AppMenu.
Some Frontend Apps use Menus in their custom headers to provide more
functionality in their apps. By adding this functionality in
StudioHeader, it will be easier for frontend apps in Studio to adopt
this component without it affecting the main Header component.

* test: Add tests for StudioHeader and AppMenu

* fix: Remove orderHistory

* fix: Remove Responsive components

* fix: Redefine User Menu for Studio

The userMenu in StudioHeader will be used more for Studio related items
such as Studio Home and Studio Maintenance. This requires new messages
and reestablishing the url destinations of these menu items.

* fix: Remove loggedOutItems

* fix: Remove AUTHN_MINIMAL_HEADER items

* fix: Remove unnecessary tests

Anonymous sessions do not exist in the Studio. And Studio is not Mobile
Ready. Tests of these kind are superfluous and have been removed.

* feat: Turn mainMenu into an optional prop

* test: Add test for optional mainMenu prop

* feat: Update snapshots

* fix: Remove ResponsiveContext

* fix: Remove href and update appMenu prop

Dropping the href because having a link that also works as a dropdown
can be mildly confusing. Changing menu (type, href, content ) triplet
to stick to the pattern; so we removed "menu". Also adding brackets around
the triplet. Lastly, updating test and snapshot.

Co-authored-by: Carlos Muniz <cmuniz@trcil.org>
2022-04-21 13:43:37 -04:00

117 lines
3.6 KiB
JavaScript

import { defineMessages } from '@edx/frontend-platform/i18n';
const messages = defineMessages({
'header.links.courses': {
id: 'header.links.courses',
defaultMessage: 'Courses',
description: 'Link to the learner course dashboard',
},
'header.links.programs': {
id: 'header.links.programs',
defaultMessage: 'Programs',
description: 'Link to the learner program dashboard',
},
'header.links.content.search': {
id: 'header.links.content.search',
defaultMessage: 'Discover New',
description: 'Link to the content search page',
},
'header.links.schools': {
id: 'header.links.schools',
defaultMessage: 'Schools & Partners',
description: 'Link to the schools and partners landing page',
},
'header.user.menu.dashboard': {
id: 'header.user.menu.dashboard',
defaultMessage: 'Dashboard',
description: 'Link to the user dashboard',
},
'header.user.menu.profile': {
id: 'header.user.menu.profile',
defaultMessage: 'Profile',
description: 'Link to the user profile',
},
'header.user.menu.account.settings': {
id: 'header.user.menu.account.settings',
defaultMessage: 'Account',
description: 'Link to account settings',
},
'header.user.menu.order.history': {
id: 'header.user.menu.order.history',
defaultMessage: 'Order History',
description: 'Link to order history',
},
'header.user.menu.logout': {
id: 'header.user.menu.logout',
defaultMessage: 'Logout',
description: 'Logout link',
},
'header.user.menu.login': {
id: 'header.user.menu.login',
defaultMessage: 'Login',
description: 'Login link',
},
'header.user.menu.register': {
id: 'header.user.menu.register',
defaultMessage: 'Sign Up',
description: 'Link to registration',
},
'header.user.menu.studio.home': {
id: 'header.user.menu.studio.home',
defaultMessage: 'Studio Home',
description: 'Link to the Studio Home',
},
'header.user.menu.studio.maintenance': {
id: 'header.user.menu.studio.maintenance',
defaultMessage: 'Maintenance',
description: 'Link to the Studio Maintenance',
},
'header.label.account.nav': {
id: 'header.label.account.nav',
defaultMessage: 'Account',
description: 'The aria label for the account menu nav',
},
'header.label.account.menu': {
id: 'header.label.account.menu',
defaultMessage: 'Account Menu',
description: 'The aria label for the account menu trigger',
},
'header.label.account.menu.for': {
id: 'header.label.account.menu.for',
defaultMessage: 'Account menu for {username}',
description: 'The aria label for the account menu trigger when the username is displayed in it',
},
'header.label.main.nav': {
id: 'header.label.main.nav',
defaultMessage: 'Main',
description: 'The aria label for the main menu nav',
},
'header.label.main.menu': {
id: 'header.label.main.menu',
defaultMessage: 'Main Menu',
description: 'The aria label for the main menu trigger',
},
'header.label.main.header': {
id: 'header.label.main.header',
defaultMessage: 'Main',
description: 'The aria label for the main header',
},
'header.label.secondary.nav': {
id: 'header.label.secondary.nav',
defaultMessage: 'Secondary',
description: 'The aria label for the seconary nav',
},
'header.label.skip.nav': {
id: 'header.label.skip.nav',
defaultMessage: 'Skip to main content',
description: 'A link used by screen readers to allow users to skip to the main content of the page.',
},
'header.label.app.nav': {
id: 'header.label.app.nav',
defaultMessage: 'App',
description: 'The aria label for the app Nav',
},
});
export default messages;