1
0
Fork 0
mirror of https://github.com/anyproto/anytype-ts.git synced 2025-06-11 10:18:07 +09:00

fix: translate error

This commit is contained in:
lavac 2023-12-31 16:21:29 +08:00
parent 9531db81dd
commit 4059cbe477
3 changed files with 13 additions and 8 deletions

View file

@ -35,10 +35,11 @@ class Filter extends React.Component<Props, State> {
public static defaultProps = {
className: '',
inputClassName: '',
placeholder: translate('commonFilterClick'),
tooltipY: I.MenuDirection.Bottom,
};
private defaultPlaceholder = translate('commonFilterClick');
state = {
isActive: false,
};
@ -59,7 +60,7 @@ class Filter extends React.Component<Props, State> {
render () {
const { isActive } = this.state;
const { id, value, icon, tooltip, tooltipCaption, tooltipX, tooltipY, placeholder, className, inputClassName, focusOnMount, onKeyDown, onKeyUp, onClick, onIconClick } = this.props;
const { id, value, icon, tooltip, tooltipCaption, tooltipX, tooltipY, placeholder = this.defaultPlaceholder, className, inputClassName, focusOnMount, onKeyDown, onKeyUp, onClick, onIconClick } = this.props;
const cn = [ 'filter' ];
if (className) {
@ -122,6 +123,7 @@ class Filter extends React.Component<Props, State> {
this.ref.setValue(this.props.value);
this.placeholder = node.find('#placeholder');
this.checkButton();
this.resize();
};

View file

@ -31,10 +31,11 @@ enum Size { Icon = 0, Small = 1, Full = 2 };
class InputWithFile extends React.Component<Props, State> {
public static defaultProps = {
textUrl: translate('inputWithFileTextUrl'),
withFile: true,
canResize: true,
};
private defalutPlaceholder = translate('inputWithFileTextUrl');
_isMounted = false;
node: any = null;
@ -56,7 +57,7 @@ class InputWithFile extends React.Component<Props, State> {
render () {
const { focused, size } = this.state;
const { icon, textUrl, textFile, withFile, readonly } = this.props;
const { icon, textUrl = this.defalutPlaceholder, textFile, withFile, readonly } = this.props;
const cn = [ 'inputWithFile', 'resizable' ];
const or = ` ${translate('commonOr')} `;
const onBlur = focused ? this.onBlur : null;

View file

@ -18,10 +18,7 @@ enum View {
const cmd = keyboard.cmdSymbol();
const alt = keyboard.altSymbol();
const Tabs = [
{ id: I.StoreTab.Type, name: translate('pageMainStoreTypes'), tooltipCaption: `${cmd} + T` },
{ id: I.StoreTab.Relation, name: translate('pageMainStoreRelations'), tooltipCaption: `${cmd} + ${alt} + T` },
];
const PageMainStore = observer(class PageMainStore extends React.Component<I.PageComponent, State> {
@ -62,6 +59,11 @@ const PageMainStore = observer(class PageMainStore extends React.Component<I.Pag
return null;
};
const Tabs = [
{ id: I.StoreTab.Type, name: translate('pageMainStoreTypes'), tooltipCaption: `${cmd} + T` },
{ id: I.StoreTab.Relation, name: translate('pageMainStoreRelations'), tooltipCaption: `${cmd} + ${alt} + T` },
];
const { isPopup } = this.props;
const views = this.getViews();
const items = this.getItems();