TeaWeb/shared/js/ui/react-elements/i18n/index.tsx
2020-04-10 20:57:50 +02:00

14 lines
No EOL
342 B
TypeScript

import * as React from "react";
export class Translatable extends React.Component<{ message: string }, { translated: string }> {
constructor(props) {
super(props);
this.state = {
translated: /* @tr-ignore */ tr(props.message)
}
}
render() {
return this.state.translated || "";
}
}