Skip to content

Commit

Permalink
FFE-31 Use ISO locale
Browse files Browse the repository at this point in the history
  • Loading branch information
Torgeir Pedersen Cook committed Nov 15, 2016
1 parent c5fa7cb commit 5f1dc8f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
8 changes: 6 additions & 2 deletions src/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export default class Base extends Component {
<button
className="ffe-context-message__close-button"
tabIndex="0"
aria-label={texts[locale].CLOSE}
aria-label={texts[locale].FFE_CONTEXT_MESSAGE_CLOSE}
onClick={this.close}
>
<CloseIcon className="ffe-context-message__close-button-svg"/>
Expand All @@ -63,10 +63,14 @@ export default class Base extends Component {
Base.propTypes = {
children: PropTypes.node.isRequired,
messageType: PropTypes.oneOf(['info', 'tip']).isRequired,
locale: PropTypes.oneOf(['nb', 'ny', 'en']).isRequired,
locale: PropTypes.oneOf(['nb', 'nn', 'en']),
icon: PropTypes.element.isRequired,
header: PropTypes.string,
style: PropTypes.object,
onClose: PropTypes.func,
};

Base.defaultProps = {
locale : 'nb'
};

10 changes: 5 additions & 5 deletions src/locale/texts.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
const nb = {};
const ny = {};
const nn = {};
const en = {};

nb.CLOSE = 'Lukk';
ny.CLOSE = 'Lukk';
en.CLOSE = 'Close';
nb.FFE_CONTEXT_MESSAGE_CLOSE = 'Lukk';
nn.FFE_CONTEXT_MESSAGE_CLOSE = 'Lukk';
en.FFE_CONTEXT_MESSAGE_CLOSE = 'Close';

export default { nb, ny, en };
export default { nb, nn, en };

0 comments on commit 5f1dc8f

Please sign in to comment.