Upgrading to Babel 7; Fixing failing tests

This commit is contained in:
James Barnsley
2020-08-04 21:04:07 +12:00
parent df7a02a863
commit dbb41b4f57
15 changed files with 27928 additions and 28276 deletions

View File

@ -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 },

View File

@ -98,6 +98,7 @@ time:
plural: years
specs:
tracks: '%{count} tracks'
albums: '%{count} albums'
followers: '%{count} followers'
listeners: '%{count} listeners'
playlists: '%{count} playlists'

View File

@ -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,