diff --git a/app/appearance/langs/en_US.json b/app/appearance/langs/en_US.json index edb0a8579..b94572ec5 100644 --- a/app/appearance/langs/en_US.json +++ b/app/appearance/langs/en_US.json @@ -375,6 +375,7 @@ "aiBrainStorm": "Brainstorm", "aiFixGrammarSpell": "Fix grammar, spelling and typos", "aiCustomAction": "Custom action...", + "aiWriting": "AI writing", "database": "Database", "manage": "Manage", "spaceRepetition": "Spaced Repetition", diff --git a/app/appearance/langs/es_ES.json b/app/appearance/langs/es_ES.json index bdd9e93e1..3646eed20 100644 --- a/app/appearance/langs/es_ES.json +++ b/app/appearance/langs/es_ES.json @@ -135,7 +135,7 @@ "unchecked": "desmarcado", "percentChecked": "Porcentaje comprobado", "percentUnchecked": "Porcentaje no marcado", - "checkbox": "Casilla de verificación", + "checkbox": "Caja", "unsplit": "Desdividir", "unsplitAll": "Desdividir Todo", "resetCardTip": "¿Estás seguro de restablecer ${x} tarjetas?", @@ -375,6 +375,7 @@ "aiBrainStorm": "Lluvia de ideas", "aiFixGrammarSpell": "Corregir gramática, ortografía y errores tipográficos.", "aiCustomAction": "Acción personalizada...", + "aiWriting": "Escritura de IA", "database": "Base de datos", "manage": "Administrar", "spaceRepetition": "Repetición Espaciada", diff --git a/app/appearance/langs/fr_FR.json b/app/appearance/langs/fr_FR.json index 36ca9b5b6..e9c028a7a 100644 --- a/app/appearance/langs/fr_FR.json +++ b/app/appearance/langs/fr_FR.json @@ -135,7 +135,7 @@ "unchecked": "Décoché", "percentChecked": "Pourcentage vérifié", "percentUnchecked": "Pourcentage non coché", - "checkbox": "case à cocher", + "checkbox": "Case à cocher", "unsplit": "Unsplit", "unsplitAll": "Tout dédiviser", "resetCardTip": "Êtes-vous sûr de réinitialiser ${x} flashcards ?", @@ -375,6 +375,7 @@ "aiBrainStorm": "Remue-méninges", "aiFixGrammarSpell": "Correction de la grammaire, de l'orthographe et des fautes de frappe", "aiCustomAction": "Action personnalisée...", + "aiWriting": "Écriture de l'IA", "database": "Base de données", "manage": "Gérer", "spaceRepetition": "Répétition espacée", diff --git a/app/appearance/langs/ja_JP.json b/app/appearance/langs/ja_JP.json index ba338697e..b40d9ed1b 100644 --- a/app/appearance/langs/ja_JP.json +++ b/app/appearance/langs/ja_JP.json @@ -375,6 +375,7 @@ "aiBrainStorm": "ブレインストーミング", "aiFixGrammarSpell": "文法、スペル、誤字の修正", "aiCustomAction": "カスタムアクション...", + "aiWriting": "AIライティング", "database": "データベース", "manage": "管理", "spaceRepetition": "復習", diff --git a/app/appearance/langs/zh_CHT.json b/app/appearance/langs/zh_CHT.json index a264cd55c..9c09e5084 100644 --- a/app/appearance/langs/zh_CHT.json +++ b/app/appearance/langs/zh_CHT.json @@ -135,7 +135,7 @@ "unchecked": "未完成", "percentChecked": "已完成佔比", "percentUnchecked": "未完成佔比", - "checkbox": "勾選方塊", + "checkbox": "複選框", "unsplit": "取消分割畫面", "unsplitAll": "取消全部分螢幕", "resetCardTip": "確定重設 ${x} 張閃卡?", @@ -375,6 +375,7 @@ "aiBrainStorm": "頭腦風暴", "aiFixGrammarSpell": "修正語法、拼寫和錯別字", "aiCustomAction": "自定義操作...", + "aiWriting": "AI 編寫", "database": "數據庫", "manage": "管理", "spaceRepetition": "間隔重複", diff --git a/app/appearance/langs/zh_CN.json b/app/appearance/langs/zh_CN.json index 31d9807a1..dc9e03cf0 100644 --- a/app/appearance/langs/zh_CN.json +++ b/app/appearance/langs/zh_CN.json @@ -135,7 +135,7 @@ "unchecked": "未完成", "percentChecked": "已完成占比", "percentUnchecked": "未完成占比", - "checkbox": "勾选框", + "checkbox": "复选框", "unsplit": "取消分屏", "unsplitAll": "取消全部分屏", "resetCardTip": "确定重置 ${x} 张闪卡?", @@ -375,6 +375,7 @@ "aiBrainStorm": "头脑风暴", "aiFixGrammarSpell": "修正语法、拼写和错别字", "aiCustomAction": "自定义操作...", + "aiWriting": "AI 编写", "database": "数据库", "manage": "管理", "spaceRepetition": "间隔重复", diff --git a/app/src/ai/chat.ts b/app/src/ai/chat.ts index a2cd79345..d5ef80d2a 100644 --- a/app/src/ai/chat.ts +++ b/app/src/ai/chat.ts @@ -5,7 +5,7 @@ import {fillContent} from "./actions"; export const AIChat = (protyle: IProtyle, element: Element) => { const dialog = new Dialog({ - title: "AI Chat", + title: "✨ " + window.siyuan.languages.aiWriting, content: `
diff --git a/app/src/mobile/util/keyboardToolbar.ts b/app/src/mobile/util/keyboardToolbar.ts index 73ac08ced..c6a944cb1 100644 --- a/app/src/mobile/util/keyboardToolbar.ts +++ b/app/src/mobile/util/keyboardToolbar.ts @@ -213,7 +213,7 @@ const renderSlashMenu = (protyle: IProtyle, toolbarElement: Element) => { ${getSlashItem(Constants.ZWSP + 2, "iconImage", window.siyuan.languages.assets)} ${getSlashItem("((", "iconRef", window.siyuan.languages.ref, "true")} ${getSlashItem("{{", "iconSQL", window.siyuan.languages.blockEmbed, "true")} - ${getSlashItem(Constants.ZWSP + 5, "iconSparkles", "AI Chat")} + ${getSlashItem(Constants.ZWSP + 5, "iconSparkles", window.siyuan.languages.aiWriting)} ${getSlashItem('
', "iconDatabase", window.siyuan.languages.database, "true")} ${getSlashItem(Constants.ZWSP + 4, "iconFile", window.siyuan.languages.newSubDocRef)}
diff --git a/app/src/protyle/hint/extend.ts b/app/src/protyle/hint/extend.ts index b814a6732..073b5e4a6 100644 --- a/app/src/protyle/hint/extend.ts +++ b/app/src/protyle/hint/extend.ts @@ -43,9 +43,9 @@ export const hintSlash = (key: string, protyle: IProtyle) => { value: "{{", html: `
${window.siyuan.languages.blockEmbed}{{
`, }, { - filter: ["ai chat"], + filter: ["人工智能", "ai", "rgzn"], value: Constants.ZWSP + 5, - html: '
AI Chat
', + html: `
${window.siyuan.languages.aiWriting}
`, }, { filter: ["数据库", "视图", "shujuku", "shitu", "sjk", "st", "database", "view", "db"], value: '
', diff --git a/kernel/model/attribute_view.go b/kernel/model/attribute_view.go index 62075a389..9f0c1769b 100644 --- a/kernel/model/attribute_view.go +++ b/kernel/model/attribute_view.go @@ -651,7 +651,7 @@ func GetBlockAttributeViewKeys(blockID string) (ret []*BlockAttributeViewKeys) { } // 字段排序 - refreshAttrViewKeyIDs(attrView) + refreshAttrViewKeyIDs(attrView, true) sorts := map[string]int{} for i, k := range attrView.KeyIDs { sorts[k] = i @@ -2533,7 +2533,7 @@ func SortAttributeViewKey(avID, keyID, previousKeyID string) (err error) { return } - refreshAttrViewKeyIDs(attrView) + refreshAttrViewKeyIDs(attrView, false) var currentKeyID string var idx, previousIndex int @@ -2562,7 +2562,7 @@ func SortAttributeViewKey(avID, keyID, previousKeyID string) (err error) { return } -func refreshAttrViewKeyIDs(attrView *av.AttributeView) { +func refreshAttrViewKeyIDs(attrView *av.AttributeView, needSave bool) { // 订正 keyIDs 数据 existKeyIDs := map[string]bool{} @@ -2583,6 +2583,10 @@ func refreshAttrViewKeyIDs(attrView *av.AttributeView) { } } attrView.KeyIDs = tmp + + if needSave { + av.SaveAttributeView(attrView) + } } func (tx *Transaction) doAddAttrViewColumn(operation *Operation) (ret *TxErr) {