🎨 Add OCR-related operations to the picture menu https://github.com/siyuan-note/siyuan/issues/7203
This commit is contained in:
parent
acffdeb803
commit
867852a462
6 changed files with 12 additions and 2 deletions
|
@ -1,4 +1,6 @@
|
|||
{
|
||||
"ocrResult": "OCR result text",
|
||||
"reOCR": "Re OCR",
|
||||
"continueReview1": "Continue Review",
|
||||
"continueReview2": "There are still <code class='fn__code'>${count}</code> cards to review, continue?",
|
||||
"whatsNewInSiYuan": "What's New in SiYuan",
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
{
|
||||
"ocrResult": "Texte du résultat OCR",
|
||||
"ocrResult": "Texto de resultado de OCR",
|
||||
"reOCR": "Re-OCR",
|
||||
"continueReview1": "Continuar revisión",
|
||||
"continueReview2": "Todavía hay tarjetas <code class='fn__code'>${count}</code> para revisar, ¿continuar?",
|
||||
"whatsNewInSiYuan": "Novedades en SiYuan",
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"reOCR": "ReOCR",
|
||||
"continueReview1": "Continuer la révision",
|
||||
"continueReview2": "Il reste encore des fiches <code class='fn__code'>${count}</code> à examiner, continuer ?",
|
||||
"whatsNewInSiYuan": "Quoi de neuf dans SiYuan",
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
{
|
||||
"ocrResult": "OCR 結果文本",
|
||||
"reOCR": "重新 OCR",
|
||||
"continueReview1": "繼續複習",
|
||||
"continueReview2": "還有 <code class='fn__code'>${count}</code> 張卡片待複習,是否繼續?",
|
||||
"whatsNewInSiYuan": "思源筆記最新變化",
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
{
|
||||
"ocrResult": "OCR 结果文本",
|
||||
"reOCR": "重新 OCR",
|
||||
"continueReview1": "继续复习",
|
||||
"continueReview2": "还有 <code class='fn__code'>${count}</code> 张卡片待复习,是否继续?",
|
||||
"whatsNewInSiYuan": "思源笔记最新变化",
|
||||
|
|
|
@ -593,7 +593,7 @@ export const imgMenu = (protyle: IProtyle, range: Range, assetElement: HTMLEleme
|
|||
label: "OCR",
|
||||
submenu: [{
|
||||
iconHTML: Constants.ZWSP,
|
||||
label: window.siyuan.languages.refresh,
|
||||
label: window.siyuan.languages.reOCR,
|
||||
click() {
|
||||
fetchPost("/api/asset/getImageOCRText", {
|
||||
path: imgElement.getAttribute("src"),
|
||||
|
@ -602,7 +602,7 @@ export const imgMenu = (protyle: IProtyle, range: Range, assetElement: HTMLEleme
|
|||
}
|
||||
}, {
|
||||
iconHTML: Constants.ZWSP,
|
||||
label: `<div class="fn__hr--small"></div><textarea data-type="ocr" rows="1" class="b3-text-field fn__size200" placeholder="${window.siyuan.languages.update}"></textarea><div class="fn__hr--small"></div>`,
|
||||
label: `<div class="fn__hr--small"></div><textarea data-type="ocr" rows="1" class="b3-text-field fn__size200" placeholder="${window.siyuan.languages.ocrResult}"></textarea><div class="fn__hr--small"></div>`,
|
||||
bind(element) {
|
||||
fetchPost("/api/asset/getImageOCRText", {
|
||||
path: imgElement.getAttribute("src"),
|
||||
|
|
Loading…
Add table
Reference in a new issue