Upgrading to Babel 7; Fixing failing tests
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
import { merge } from 'lodash';
|
||||
import { en } from './en.yaml';
|
||||
import { _de } from './de.yaml';
|
||||
import en from './en.yaml';
|
||||
import _de from './de.yaml';
|
||||
|
||||
// Merge languages with English. This provides English fallbacks to untranslated
|
||||
// fields without breaking the UI (with blanks)
|
||||
@ -8,8 +8,6 @@ import { _de } from './de.yaml';
|
||||
const de = {};
|
||||
merge(de, en, _de);
|
||||
|
||||
console.log('en', en);
|
||||
|
||||
const available = [
|
||||
{ key: 'en', name: en.name },
|
||||
{ key: 'de', name: de.name },
|
||||
|
||||
@ -98,6 +98,7 @@ time:
|
||||
plural: years
|
||||
specs:
|
||||
tracks: '%{count} tracks'
|
||||
albums: '%{count} albums'
|
||||
followers: '%{count} followers'
|
||||
listeners: '%{count} listeners'
|
||||
playlists: '%{count} playlists'
|
||||
|
||||
@ -39,13 +39,18 @@ const I18n = ({
|
||||
children,
|
||||
contentAfter,
|
||||
...params
|
||||
}) => (
|
||||
<Fragment>
|
||||
{!contentAfter && children}
|
||||
{i18n(path, params, transform)}
|
||||
{contentAfter && children}
|
||||
</Fragment>
|
||||
);
|
||||
}) => {
|
||||
if (!children) {
|
||||
return i18n(path, params, transform);
|
||||
}
|
||||
return (
|
||||
<Fragment>
|
||||
{!contentAfter && children}
|
||||
{i18n(path, params, transform)}
|
||||
{contentAfter && children}
|
||||
</Fragment>
|
||||
);
|
||||
};
|
||||
|
||||
export default {
|
||||
I18n,
|
||||
|
||||
Reference in New Issue
Block a user