Skip to content

Commit

Permalink
Introduce internationalisation
Browse files Browse the repository at this point in the history
  • Loading branch information
freddytuxworth authored Jun 26, 2020
1 parent 1c4f76e commit 2efa8b0
Show file tree
Hide file tree
Showing 28 changed files with 402 additions and 867 deletions.
21 changes: 13 additions & 8 deletions app/features/navbar/components/HelpButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import Droplist, { Item, Group } from '@atlaskit/droplist';
import HelpIcon from '@atlaskit/icon/glyph/question-circle';

import React, { Component } from 'react';
import { withTranslation } from 'react-i18next';

import config from '../../config';
import { openExternalLink } from '../../utils';
Expand All @@ -20,7 +21,7 @@ type State = {
/**
* Help button for Navigation Bar.
*/
export default class HelpButton extends Component< *, State> {
class HelpButton extends Component<*, State> {
/**
* Initializes a new {@code HelpButton} instance.
*
Expand Down Expand Up @@ -87,34 +88,38 @@ export default class HelpButton extends Component< *, State> {
* @returns {ReactElement}
*/
render() {
const { t } = this.props;

return (
<Droplist
isOpen = { this.state.droplistOpen }
onClick = { this._onIconClick }
onOpenChange = { this._onOpenChange }
position = 'right bottom'
trigger = { <HelpIcon /> }>
<Group heading = 'Help'>
<Group heading = { t('help') } >
<Item onActivate = { this._onTermsClick }>
Terms
{ t('termsLink') }
</Item>
<Item onActivate = { this._onPrivacyClick }>
Privacy
{ t('privacyLink') }
</Item>
<Item onActivate = { this._onSendFeedbackClick }>
Send Feedback
{ t('sendFeedbackLink') }
</Item>
<Item onActivate = { this._onAboutClick }>
About
{ t('aboutLink') }
</Item>
<Item onActivate = { this._onSourceClick }>
Source
{ t('sourceLink') }
</Item>
<Item>
Version: { version }
{ t('versionLabel', { version }) }
</Item>
</Group>
</Droplist>
);
}
}

export default withTranslation()(HelpButton);
78 changes: 0 additions & 78 deletions app/features/onboarding/components/AlwaysOnTopWindowSpotlight.js

This file was deleted.

70 changes: 0 additions & 70 deletions app/features/onboarding/components/ConferenceURLSpotlight.js

This file was deleted.

68 changes: 0 additions & 68 deletions app/features/onboarding/components/EmailSettingSpotlight.js

This file was deleted.

69 changes: 0 additions & 69 deletions app/features/onboarding/components/NameSettingSpotlight.js

This file was deleted.

4 changes: 2 additions & 2 deletions app/features/onboarding/components/Onboarding.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ class Onboarding extends Component<Props, *> {
const steps = onboardingSteps[section];

if (_activeOnboarding && steps.includes(_activeOnboarding)) {
const ActiveOnboarding = onboardingComponents[_activeOnboarding];
const { type: ActiveOnboarding, ...props } = onboardingComponents[_activeOnboarding];

return <ActiveOnboarding />;
return <ActiveOnboarding { ...props } />;
}

return null;
Expand Down
Loading

0 comments on commit 2efa8b0

Please sign in to comment.