Skip to content
This repository has been archived by the owner on Mar 27, 2023. It is now read-only.

Commit

Permalink
Fix typo in translations loader
Browse files Browse the repository at this point in the history
  • Loading branch information
Vincent Martinez committed Jul 1, 2017
1 parent 804b688 commit 11f046b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 7 additions & 4 deletions app/javascript/components/ComponentWrapper.js
Expand Up @@ -13,14 +13,17 @@ function WrapInStore({ store, children }) {

export default class ComponentWrapper extends Component {
props: {
store?: Store;
children?: any;
locale: string;
store?: Store,
children?: any,
locale: string,
};

render() {
return (
<IntlProvider locale={this.props.locale} messages={ loadTranslations(this.props.locale) }>
<IntlProvider
locale={this.props.locale}
messages={loadTranslations(this.props.locale)}
>
<WrapInStore store={this.props.store}>
<div className="App">
{this.props.children}
Expand Down
2 changes: 1 addition & 1 deletion app/javascript/util/TranslationsLoader.js
Expand Up @@ -3,7 +3,7 @@ import translations from './locales/translations';

export default function loadTranslations(locale: string) {
if (!translations[locale]) {
throw new Error(`Unsuported locale: ${locale}`);
throw new Error(`Unsupported locale: ${locale}`);
}
return translations[locale];
}

0 comments on commit 11f046b

Please sign in to comment.