update multi lang in preview view
This commit is contained in:
parent
cc8cc26e0b
commit
65d4ca33d2
@ -2,6 +2,8 @@ import { App, Modal, TFile } from 'obsidian'
|
|||||||
import React, { useEffect, useState } from 'react'
|
import React, { useEffect, useState } from 'react'
|
||||||
import { createRoot } from 'react-dom/client'
|
import { createRoot } from 'react-dom/client'
|
||||||
|
|
||||||
|
import { t } from '../../lang/helpers'
|
||||||
|
|
||||||
type ImageSelectorProps = {
|
type ImageSelectorProps = {
|
||||||
onClose: () => void
|
onClose: () => void
|
||||||
onSelectImages: (files: File[]) => void
|
onSelectImages: (files: File[]) => void
|
||||||
@ -46,7 +48,7 @@ const ImageSelector: React.FC<ImageSelectorProps> = ({
|
|||||||
className="infio-image-search"
|
className="infio-image-search"
|
||||||
/>
|
/>
|
||||||
<label className="infio-upload-button">
|
<label className="infio-upload-button">
|
||||||
Upload New Image
|
{t('chat.input.uploadNewImage')}
|
||||||
<input
|
<input
|
||||||
type="file"
|
type="file"
|
||||||
accept="image/*"
|
accept="image/*"
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
import { getIcon } from 'obsidian'
|
import { getIcon } from 'obsidian'
|
||||||
import { useEffect, useRef } from 'react'
|
import { useEffect, useRef } from 'react'
|
||||||
|
|
||||||
|
import { t } from '../../lang/helpers'
|
||||||
import { PreviewViewState } from '../../PreviewView'
|
import { PreviewViewState } from '../../PreviewView'
|
||||||
|
|
||||||
export default function PreviewViewRoot({
|
export default function PreviewViewRoot({
|
||||||
@ -46,7 +47,7 @@ export default function PreviewViewRoot({
|
|||||||
onClick={close}
|
onClick={close}
|
||||||
>
|
>
|
||||||
{closeIcon && '✕'}
|
{closeIcon && '✕'}
|
||||||
Close
|
{t('previewView.close')}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -81,7 +81,8 @@ export default {
|
|||||||
collectedModels: "Collected Models",
|
collectedModels: "Collected Models",
|
||||||
loading: "Loading...",
|
loading: "Loading...",
|
||||||
image: "Image",
|
image: "Image",
|
||||||
createCommand: "Create Command"
|
createCommand: "Create Command",
|
||||||
|
uploadNewImage: "Upload New Image"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
inlineEdit: {
|
inlineEdit: {
|
||||||
@ -173,5 +174,8 @@ export default {
|
|||||||
fileNotFound: 'File not found',
|
fileNotFound: 'File not found',
|
||||||
acceptLine: 'Accept line',
|
acceptLine: 'Accept line',
|
||||||
excludeLine: 'Exclude line',
|
excludeLine: 'Exclude line',
|
||||||
|
},
|
||||||
|
previewView: {
|
||||||
|
close: 'Close',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -84,7 +84,8 @@ export default {
|
|||||||
collectedModels: "收集的模型",
|
collectedModels: "收集的模型",
|
||||||
loading: "加载中...",
|
loading: "加载中...",
|
||||||
image: "图片",
|
image: "图片",
|
||||||
createCommand: "创建命令"
|
createCommand: "创建命令",
|
||||||
|
uploadNewImage: "上传新图片"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
inlineEdit: {
|
inlineEdit: {
|
||||||
@ -176,5 +177,8 @@ export default {
|
|||||||
fileNotFound: '文件未找到',
|
fileNotFound: '文件未找到',
|
||||||
acceptLine: '接受此行',
|
acceptLine: '接受此行',
|
||||||
excludeLine: '排除此行',
|
excludeLine: '排除此行',
|
||||||
|
},
|
||||||
|
previewView: {
|
||||||
|
close: '关闭预览',
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user