1
0
mirror of https://github.com/flarum/core.git synced 2025-07-30 05:00:56 +02:00

Make front-end localizable

This commit is contained in:
Toby Zerner
2015-07-17 17:43:28 +09:30
parent 7e75eb16ff
commit f93ff7cb3f
49 changed files with 438 additions and 148 deletions

View File

@@ -1,4 +1,5 @@
import Component from 'flarum/Component';
import LoadingIndicator from 'flarum/components/LoadingIndicator';
import classList from 'flarum/utils/classList';
/**
@@ -29,19 +30,19 @@ export default class UserBio extends Component {
let content;
if (this.editing) {
content = <textarea className="FormControl" placeholder="Write something about yourself" rows="3"/>;
content = <textarea className="FormControl" placeholder={app.trans('core.bio_placeholder')} rows="3" value={user.bio()}/>;
} else {
let subContent;
if (this.loading) {
subContent = <p className="UserBio-placeholder">Saving</p>;
subContent = <p className="UserBio-placeholder">{LoadingIndicator.component()}</p>;
} else {
const bioHtml = user.bioHtml();
if (bioHtml) {
subContent = m.trust(bioHtml);
} else if (this.props.editable) {
subContent = <p className="UserBio-placeholder">Write something about yourself</p>;
subContent = <p className="UserBio-placeholder">{app.trans('core.bio_placeholder')}</p>;
}
}