Adds i18n to Prev and Next buttons in modlog

This commit is contained in:
Matteo Guglielmetti 2019-10-18 10:33:29 +02:00
parent 605cee9084
commit ccbf2b4aab

View File

@ -8,6 +8,7 @@ import { msgOp, addTypeInfo, fetchLimit } from '../utils';
import { MomentTime } from './moment-time';
import * as moment from 'moment';
import { i18n } from '../i18next';
import { T } from 'inferno-i18next';
interface ModlogState {
combined: Array<{type_: string, data: ModRemovePost | ModLockPost | ModStickyPost | ModRemoveCommunity | ModAdd | ModBan}>,
@ -200,9 +201,9 @@ export class Modlog extends Component<any, ModlogState> {
return (
<div class="mt-2">
{this.state.page > 1 &&
<button class="btn btn-sm btn-secondary mr-1" onClick={linkEvent(this, this.prevPage)}>Prev</button>
<button class="btn btn-sm btn-secondary mr-1" onClick={linkEvent(this, this.prevPage)}><T i18nKey="prev">#</T></button>
}
<button class="btn btn-sm btn-secondary" onClick={linkEvent(this, this.nextPage)}>Next</button>
<button class="btn btn-sm btn-secondary" onClick={linkEvent(this, this.nextPage)}><T i18nKey="next">#</T></button>
</div>
);
}