import React from 'react';
import PropTypes from 'prop-types';
import { interpolate } from '../classes/gettext';
class Trans extends React.Component {
static propTypes = {
params: PropTypes.object
}
static defaultProps = {
params: {}
};
render() {
if (!this.props.children) return ();
let content = "";
if (typeof this.props.children === "string"){
content = ();
}else{
content = [];
let i = 0;
this.props.children.forEach(c => {
if (typeof c === "string"){
content.push(
);
}else{
content.push({c});
}
i++;
});
}
return content;
}
}
export default Trans;