mirror of
https://github.com/flarum/framework.git
synced 2025-02-18 12:33:22 +08:00
parent
9a5063c083
commit
46eab64f41
|
@ -1,5 +1,6 @@
|
|||
import extract from './utils/extract';
|
||||
import username from './helpers/username';
|
||||
import extractText from "./utils/extractText";
|
||||
|
||||
type Translations = { [key: string]: string };
|
||||
|
||||
|
@ -33,6 +34,10 @@ export default class Translator {
|
|||
return id;
|
||||
}
|
||||
|
||||
transText(id: string, parameters = null) {
|
||||
return extractText(this.trans(id, parameters));
|
||||
}
|
||||
|
||||
apply(translation: string, input: any) {
|
||||
if ('user' in input) {
|
||||
const user = extract(input, 'user');
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import Component from '../../common/Component';
|
||||
import LoadingIndicator from '../../common/components/LoadingIndicator';
|
||||
import ItemList from '../../common/utils/ItemList';
|
||||
import extractText from '../../common/utils/extractText';
|
||||
import KeyboardNavigatable from '../utils/KeyboardNavigatable';
|
||||
import icon from '../../common/helpers/icon';
|
||||
import DiscussionsSearchSource from './DiscussionsSearchSource';
|
||||
|
@ -85,7 +84,7 @@ export default class Search extends Component {
|
|||
<div className="Search-input">
|
||||
<input className="FormControl"
|
||||
type="search"
|
||||
placeholder={extractText(app.translator.trans('core.forum.header.search_placeholder'))}
|
||||
placeholder={app.translator.transText('core.forum.header.search_placeholder')}
|
||||
value={this.value()}
|
||||
oninput={m.withAttr('value', this.value)}
|
||||
onfocus={() => this.hasFocus = true}
|
||||
|
|
Loading…
Reference in New Issue
Block a user