diff --git a/.github/workflows/ci-linux.yml b/.github/workflows/ci-linux.yml
index 66aba01b..e99908d2 100644
--- a/.github/workflows/ci-linux.yml
+++ b/.github/workflows/ci-linux.yml
@@ -10,7 +10,7 @@ on:
workflow_dispatch:
env:
- VNOTE_VER: 3.3.0
+ VNOTE_VER: 3.4.0
jobs:
build-linux:
diff --git a/.github/workflows/ci-macos.yml b/.github/workflows/ci-macos.yml
index e8791471..0148b2dd 100644
--- a/.github/workflows/ci-macos.yml
+++ b/.github/workflows/ci-macos.yml
@@ -10,7 +10,7 @@ on:
workflow_dispatch:
env:
- VNOTE_VER: 3.3.0
+ VNOTE_VER: 3.4.0
jobs:
build-linux:
diff --git a/.github/workflows/ci-win.yml b/.github/workflows/ci-win.yml
index 73ee8068..28632c1a 100644
--- a/.github/workflows/ci-win.yml
+++ b/.github/workflows/ci-win.yml
@@ -10,7 +10,7 @@ on:
workflow_dispatch:
env:
- VNOTE_VER: 3.3.0
+ VNOTE_VER: 3.4.0
jobs:
build:
diff --git a/changes.md b/changes.md
index 1f1f671a..451eea04 100644
--- a/changes.md
+++ b/changes.md
@@ -1,4 +1,12 @@
# Changes
+## v3.4.0
+* Support Snippet
+ * `Ctrl+G S` to insert a snippet
+ * `%snippet_name%` to insert a snippet (the legacy Magic Word)
+ * Snippet is supported in some dialogs (such as creating a new note)
+* Support note template (snippet is supported)
+* Remove `'` and `"` from auot-brackets
+
## v3.3.0
* Editor: support auto indent, auto list
* Support opening notes with external programs
diff --git a/src/data/core/translations/vnote_zh_CN.qm b/src/data/core/translations/vnote_zh_CN.qm
index 7f6b6abb..efbaf61d 100644
Binary files a/src/data/core/translations/vnote_zh_CN.qm and b/src/data/core/translations/vnote_zh_CN.qm differ
diff --git a/src/data/core/translations/vnote_zh_CN.ts b/src/data/core/translations/vnote_zh_CN.ts
index 2935d98f..db64c308 100644
--- a/src/data/core/translations/vnote_zh_CN.ts
+++ b/src/data/core/translations/vnote_zh_CN.ts
@@ -89,6 +89,25 @@
+
+ ViewWindow
+
+ Snippet applied: %1
+ 片段已应用: %1
+
+
+ Snippet (%1) not found
+ 无法找到片段 (%1)
+
+
+ Snippet not available
+ 没有可用片段
+
+
+ Select Snippet
+ 选择片段
+
+vnotex::AppearancePage
@@ -758,22 +777,22 @@
vnotex::FolderPropertiesDialog
-
+ Properties属性
-
+ Please specify a name for the folder.请为文件夹指定一个名字。
-
+ Name conflicts with existing folder.名字和已有文件夹冲突。
-
+ Failed to save folder (%1) in (%2) (%3).无法保存笔记本 (%2) 中的文件夹 (%1) (%3)。
@@ -867,37 +886,37 @@
vnotex::ImageInsertDialog
-
+ From:源:
-
+ &Browse浏览(&B)
-
+ Title:标题:
-
+ Alt text:替换文本:
-
+ Scaling width:缩放宽度:
-
+ Select Image To Insert选择图片插入
-
+ Images (*.png *.xpm *.jpg *.bmp *.gif *.svg *.webp);;All (*.*)图片 (*.png *.xpm *.jpg *.bmp *.gif *.svg *.webp);;全部文件 (*.*)
@@ -1046,6 +1065,14 @@
无法导入笔记本 (%1)。
+
+ vnotex::LineEditWithSnippet
+
+
+ Snippet is supported via "%name%"
+ 支持通过 "%名字%" 使用片段
+
+vnotex::LinkInsertDialog
@@ -1085,12 +1112,12 @@
文本
-
+ Clear清空
-
+ %n Item(s)%n 项
@@ -1100,22 +1127,27 @@
vnotex::MainWindow
-
+ Navigation导航
-
+ Outline大纲
-
+ Search搜索
-
+
+ Snippets
+ 片段
+
+
+ Location List位置列表
@@ -1124,23 +1156,23 @@
笔记本
-
+ Do you want to minimize %1 to system tray instead of quitting when closed?关闭时,是否将 %1 最小化到系统托盘而非退出?
-
+ You could change the option in Settings later.稍后可以在设置里面更改。
-
+ %1 is still running here.%1 仍然在此运行。
-
-
+
+ Global全局
@@ -1353,17 +1385,22 @@
+ %1 Home Page
+ %1 主页
+
+
+ Feedback And Discussions反馈和讨论
-
+ About关于
-
+ <h3>%1</h3>
<span>%2</span>
@@ -1372,7 +1409,7 @@
-
+ About Qt关于 Qt
@@ -1415,7 +1452,7 @@
vnotex::ManageNotebooksDialog
-
+ Close关闭
@@ -1424,7 +1461,7 @@
删除
-
+ Manage Notebooks管理笔记本
@@ -1433,49 +1470,54 @@
关闭笔记本 %1?
-
+ Delete (DANGER)删除(危险)
-
+
+ Please specify a name for the notebook.
+ 请为笔记本指定一个名字。
+
+
+ Close notebook (%1)?关闭笔记本 (%1)?
-
+ The notebook could be imported again later.稍后可以重新导入该笔记本。
-
+ Notebook location: %1笔记本路径: %1
-
+ Failed to close notebook (%1)无法关闭笔记本 (%1)
-
+ Delete notebook (%1) from disk?从磁盘中删除笔记本 (%1)?
-
+ CALM DOWN! CALM DOWN! CALM DOWN! It will delete all files belonging to this notebook from disk. It is dangerous since it will bypass system's recycle bin!冷静!冷静!冷静!这会从磁盘中删除该笔记本相关的全部文件。该操作会跳过系统的回收站,危险!
-
+ Notebook location: %1
Use the "Close" button if you just want to remove it from %2.笔记本位置: %1
如果仅要从 %2 中移除该该笔记本,请使用“关闭”按钮。
-
+ Failed to delete notebook (%1)无法删除笔记本 (%1)
@@ -1488,7 +1530,7 @@ Use the "Close" button if you just want to remove it from %2.
这会从磁盘中删除该笔记本相关的全部文件。该操作会跳过系统的回收站,危险!
-
+ There are unsaved changes to current notebook.当前笔记本有尚未保存的更改。
@@ -1603,22 +1645,22 @@ Use the "Close" button if you just want to remove it from %2.
解析为 Markodwn 并粘贴
-
+ Fetching images to local...正在获取图片到本地...
-
+ Abort终止
-
+ Fetch Images To Local获取图片到本地
-
+ Fetching image (%1)正在获取图片 (%1)
@@ -2007,22 +2049,22 @@ Use the "Close" button if you just want to remove it from %2.
vnotex::NewFolderDialog
-
+ New Folder新建文件夹
-
+ Please specify a name for the folder.请为文件夹指定一个名字。
-
+ Name conflicts with existing folder.名字和已有文件夹冲突。
-
+ Failed to create folder under (%1) in (%2) (%3).无法在笔记本 (%2) 中文件夹 (%1) 下创建文件夹 (%3)。
@@ -2030,70 +2072,94 @@ Use the "Close" button if you just want to remove it from %2.
vnotex::NewNoteDialog
-
+ New Note新建笔记
- Please specify a name for the note.
- 请为笔记指定一个名字。
+ 请为笔记指定一个名字。
-
+
+ Template:
+ 模板:
+
+
+
+ Manage
+ 管理
+
+
+
+ Please specify a valid name for the note.
+ 请为笔记指定一个有效名字。
+
+
+ Name conflicts with existing note.名字和已有笔记冲突。
-
+ Failed to create note under (%1) in (%2) (%3).无法在笔记本 (%2) 中文件夹 (%1) 下创建笔记 (%3)。
-
+ note笔记
+
+
+ None
+ 无
+
+
+
+ Failed to load template (%1) (%2).
+ 无法加载模板 (%1) (%2)。
+ vnotex::NewNotebookDialog
-
+ New Notebook新建笔记本
-
+ <br/>Both absolute and relative paths are supported. ~ and environment variable are not supported now.<br/>支持绝对路径和相对路径。~ 和环境变量暂时不支持。
-
+ Please specify a name for the notebook.请为笔记本指定一个名字。
-
+ Please specify a valid root folder for the notebook.请为笔记本指定一个有效的根文件夹。
-
+ Root folder of the notebook must be empty. If you want to import existing data, please try other operations.笔记本根文件夹必须为空。如果需要导入已有数据,请尝试其他操作。
-
+ Root folder should be a directory.根文件夹应该为一个目录。
-
+ There already exists a notebook (%1) with the same root folder.已经存在一个使用相同根文件夹的笔记本 (%1)。
-
+ Failed to create notebook in (%1) (%2).无法在 (%1) 创建笔记本 (%2)。
@@ -2131,35 +2197,58 @@ Use the "Close" button if you just want to remove it from %2.
无法在 (%1) 创建笔记本 (%2)。
+
+ vnotex::NewSnippetDialog
+
+
+ New Snippet
+ 新建片段
+
+
+
+ Failed to add snippet (%1) (%2).
+ 无法添加片段 (%1) (%2)。
+
+
+
+ Please specify a name for the snippet.
+ 请为片段指定一个名字。
+
+
+
+ Name conflicts with existing snippet.
+ 名字和已有片段冲突。
+
+vnotex::NodeInfoWidget
-
+ Notebook:笔记本:
-
+ Location:路径:
-
+ File type:文件类型:
-
+ Name:名字:
-
+ Created time:创建时间:
-
+ Modified time:修改时间:
@@ -2180,22 +2269,30 @@ Use the "Close" button if you just want to remove it from %2.
vnotex::NotePropertiesDialog
- Properties
- 属性
+ 属性
- Please specify a name for the note.
- 请为笔记指定一个名字。
+ 请为笔记指定一个名字。
-
+
+ %1 Properties
+ %1 属性
+
+
+
+ Please specify a valid name for the note.
+ 请为笔记指定一个有效名字。
+
+
+ Name conflicts with existing note.名字和已有笔记冲突。
-
+ Failed to save note (%1) in (%2) (%3).无法保存笔记本 (%2) 中的笔记 (%1) (%3)。
@@ -2218,96 +2315,96 @@ Use the "Close" button if you just want to remove it from %2.
该标题栏包含管理笔记本和笔记的按钮和菜单。
-
+ View查看
-
+ Toggle Recycle Bin Node显示/隐藏回收站节点
-
+ &Manage Notebooks管理笔记本(&M)
-
+ External Files外部文件
-
+ Show External Files显示外部文件
-
+ Import External Files When Activated激活时自动导入外部文件
-
-
+
+ Could not create folder within Recycle Bin.无法在回收站内创建文件夹。
-
-
+
+ Could not create note within Recycle Bin.无法在回收站内创建笔记。
-
+ Please first create a notebook to hold your data.请先创建一个笔记本来保存数据。
-
+ Select Files To Import选择文件导入
-
+ Failed to add file (%1) as node (%2).
无法添加文件 (%1) 为节点 (%2)。
-
+ View By Configuration按配置查看
-
+ View By Name按名字查看
-
+ View By Name (Reversed)按名字倒序查看
-
+ View By Created Time按创建时间查看
-
+ View By Created Time (Reversed)按创建时间倒序查看
-
+ View By Modified Time按修改时间查看
-
+ View By Modified Time (Reversed)按修改时间倒序查看
@@ -2315,130 +2412,130 @@ Use the "Close" button if you just want to remove it from %2.
vnotex::NotebookInfoWidget
-
+ Basic Information基本信息
-
+ Type:类型:
-
+ Name of notebook笔记本名字
-
+ Name:名字:
-
+ Icon:图标:
-
+ Description of notebook笔记本描述
-
+ Description:描述:
-
+ Root folder:根文件夹:
-
+ Type of notebook笔记本类型
-
+ Specify the type of notebook.<br/>指定笔记本类型。<br/>
-
-
-
-
+
+
+
+ <b>%1</b>: %2<br/><b>%1</b>: %2<br/>
-
+ Path of notebook root folder笔记本根文件夹路径
-
+ <b>Notebook Root Folder</b> is the folder containing all data of one notebook in %1.<b>笔记本根文件夹</b>是在 %1 中包含一个笔记本的全部数据。
-
+ Browse浏览
-
+ Select Notebook Root Folder选择笔记本根文件夹
-
+ Advanced Information高级信息
-
+ Configuration manager:配置管理器:
-
+ Version control:版本管理:
-
+ Backend:后端:
-
+ Configuration manager of notebook笔记本的配置管理器
-
+ Specify configruation manager of notebook.<br/>指定笔记本的配置管理器。<br/>
-
+ Version control of notebook笔记本的版本管理
-
+ Specify version control of notebook.<br/>指定笔记本的版本管理。<br/>
-
+ Backend of notebook笔记本后端
-
+ Specify backend of notebook.<br/>指定笔记本后端。<br/>
@@ -2614,12 +2711,12 @@ Use the "Close" button if you just want to remove it from %2.
修改时间
-
+ Invalid node (%1).无效的节点 (%1)。
-
+ Please check if the node exists on the disk.请检查该节点在磁盘上是否存在。
@@ -2734,17 +2831,17 @@ Use the "Close" button if you just want to remove it from %2.
文件不会被改动,仅仅是从笔记本索引中移除。
-
+ Open &With打开方式(&W)
-
+ System Default Program系统默认程序
-
+ Add External Program添加外部程序
@@ -2780,17 +2877,17 @@ Description: %3
vnotex::OutlineViewer
-
+ Decrease Expansion Level减小扩展层级
-
+ Increase Expansion Level增大扩展层级
-
+ Expansion level: %1扩展层级: %1
@@ -2798,33 +2895,38 @@ Description: %3
vnotex::QuickAccessPage
-
-
+
+ Quick Access快速访问
-
+ Flash Page灵犀页
-
+ Flash Page location (user could copy the path of one note and paste it here)灵犀页位置(用户可以复制笔记的路径并粘贴在此)
-
+ Flash Page:灵犀页:
-
+
+ Select Flash Page File
+ 选择灵犀页文件
+
+
+ Edit the files pinned to Quick Access (one file per line)编辑固定到快速访问的文件(一行一个文件)
-
+ Quick Access:快速访问:
@@ -3122,6 +3224,281 @@ Description: %3
输入以开始查找
+
+ vnotex::SnippetInfoWidget
+
+
+ Name:
+ 名字:
+
+
+
+ Description:
+ 描述:
+
+
+
+ Type:
+ 类型:
+
+
+
+ Shortcut:
+ 快捷键:
+
+
+
+ A mark in the snippet content indicating the cursor position after the application
+ 一个用于在片段内容中指定应用片段后光标位置的标记
+
+
+
+ Cursor mark:
+ 光标标记:
+
+
+
+ A mark in the snippet content that will be replaced with the selected text before the application
+ 一个用于在片段内容中指代应用片段前所选择文本的标记
+
+
+
+ Selection mark:
+ 选择标记:
+
+
+
+ Indent as first line
+ 与第一行同步缩进
+
+
+
+ Content:
+ 内容:
+
+
+
+ Text
+ 文本
+
+
+
+ Dynamic
+ 动态
+
+
+
+ None
+ 无
+
+
+
+ vnotex::SnippetMgr
+
+
+ the day as number without a leading zero (`1` to `31`)
+ 没有前导零的日期数字 (`1` 到 `31`)
+
+
+
+ the day as number with a leading zero (`01` to `31`)
+ 带前导零的日期数字 (`01` 到 `31`)
+
+
+
+ the abbreviated localized day name (e.g. `Mon` to `Sun`)
+ 缩写的本地化日期名字 (如 `一` 到 `日`)
+
+
+
+ the long localized day name (e.g. `Monday` to `Sunday`)
+ 本地化日期名字 (如 `星期一` 到 `星期日`)
+
+
+
+ the month as number without a leading zero (`1` to `12`)
+ 没有前导零的月份数字 (如 `1` 到 `12`)
+
+
+
+ the month as number with a leading zero (`01` to `12`)
+ 带前导零的月份数字 (`01` 到 `12`)
+
+
+
+ the abbreviated localized month name (e.g. `Jan` to `Dec`)
+ 缩写的本地化月份名字 (如 `一` 到 `十二`)
+
+
+
+ the long localized month name (e.g. `January` to `December`)
+ 本地化月份名字 (如 `一月` 到 `十二月`)
+
+
+
+ the year as two digit numbers (`00` to `99`)
+ 两位数的年份数字 (`00` 到 `99`)
+
+
+
+ the year as four digit numbers
+ 四位数的年份数字
+
+
+
+ the week number (`1` to `53`)
+ 星期数字 (`1` 到 `53`)
+
+
+
+ the hour without a leading zero (`0` to `23` even with AM/PM display)
+ 没有前导零的小时 (`0` 到 `23`)
+
+
+
+ the hour with a leading zero (`00` to `23` even with AM/PM display)
+ 带前导零的小时 (`00` 到 `23`)
+
+
+
+ the minute without a leading zero (`0` to `59`)
+ 没有前导零的分 (`0` 到 `59`)
+
+
+
+ the minute with a leading zero (`00` to `59`)
+ 带前导零的分 (`00` 到 `59`)
+
+
+
+ the second without a leading zero (`0` to `59`)
+ 没有前导零的秒 (`0` 到 `59`)
+
+
+
+ the second with a leading zero (`00` to `59`)
+ 带前导零的秒 (`00` 到 `59`)
+
+
+
+ date (`2021-02-24`)
+ 日期 (`2021-02-24`)
+
+
+
+ the abbreviated date (`20210224`)
+ 缩写的日期 (`20210224`)
+
+
+
+ time (`16:51:02`)
+ 时间 (`16:51:02`)
+
+
+
+ date and time (`2021-02-24_16:51:02`)
+ 日期时间 (`2021-02-24_16:51:02`)
+
+
+
+ name of current note
+ 当前笔记名字
+
+
+
+
+ [Value Not Available]
+ [没有可用值]
+
+
+
+ complete base name of current note
+ 当前笔记的完整基本名字
+
+
+
+ vnotex::SnippetPanel
+
+
+ New Snippet
+ 新建片段
+
+
+
+ Open Folder
+ 打开文件夹
+
+
+
+ %n Item(s)
+
+ %n 项
+
+
+
+
+ %1%2 [%3]
+ %1%2 [%3]
+
+
+
+ &Apply
+ 应用(&A)
+
+
+
+ &Delete
+ 删除(&D)
+
+
+
+ &Properties (Rename)
+ 属性(重命名)(&P)
+
+
+
+ Confirm Deletion
+ 确认删除
+
+
+
+ Delete these snippets permanently?
+ 永久删除这些片段?
+
+
+
+ Files will be deleted permanently and could not be found even in operating system's recycle bin.
+ 文件将会被永久删除,即使在操作系统的回收站中也无法找回。
+
+
+
+ Failed to remove snippet (%1) (%2).
+ 无法删除片段 (%1) (%2)。
+
+
+
+ vnotex::SnippetPropertiesDialog
+
+
+ %1 Properties
+ %1 属性
+
+
+
+ Please specify a name for the snippet.
+ 请为片段指定一个名字。
+
+
+
+ Name conflicts with existing snippet.
+ 名字和已有片段冲突。
+
+
+
+ Failed to update snippet (%1) (%2).
+ 无法更新片段 (%1) (%2)。
+
+vnotex::SortDialog
@@ -3552,6 +3929,11 @@ Description: %3
Locate Node定位节点
+
+
+ Pin To Quick Access
+ 固定到快速访问
+ vnotex::ViewWindow
@@ -3563,39 +3945,39 @@ Description: %3
-
-
+
+ [No Buffer][无缓冲区]
-
+ Save changes before closing note (%1)?关闭笔记 (%1) 前是否保存更改?
-
-
+
+ Note path (%1).笔记路径 (%1)。
-
+ Discard changes to note (%1)?放弃对笔记 (%1) 的更改?
-
+ Found backup file (%1) of file (%2). Do you want to recover from backup file?发现文件 (%2) 的备份文件 (%1)。是否要从备份文件中恢复?
-
+ 'Yes' to recover from backup file, 'No' to discard it, and 'Cancel' to exit.“是” 以从备份文件中恢复,“否” 以放弃该备份文件,“取消” 以退出。
-
+ It may be caused by crash while editing this file before.
File last modified time: %1
@@ -3606,32 +3988,32 @@ Backup file last modified time: %2
备份文件最后修改时间: %2
-
+ Drag And Drop Files To Attach拖拽文件以添加为附件
-
+ File is missing on disk (%1).文件在磁盘中丢失 (%1)。
-
+ Do you want to force to save the buffer to the file?是否强制保存缓冲区内容到文件?
-
+ The file may be deleted from outside. Please choose to save the buffer to a new file or just discard it.该文件可能已经被删除。请选择将缓冲区的内容保存为新文件或者放弃缓冲区。
-
+ File is changed from outside (%1).文件被更改 (%1)。
-
+ Do you want to save the buffer to the file to override, or discard the buffer?是否保存缓冲区覆盖到文件,或者放弃缓冲区?
@@ -3640,238 +4022,258 @@ Backup file last modified time: %2
是否用缓冲区的内容覆盖该文件?
-
+ The file is changed from outside. Please choose to save the buffer to the file or just discard the buffer and reload the file.该文件已经被更改。请选择保存缓冲区到该文件或者放弃缓冲区并重新加载文件。
-
+ This is a read-only note (%1), on which modification is not allowed.这是一个只读笔记 (%1),不支持修改。
-
+ Please save your changes to another note.请保存更改到另一个笔记。
-
+ Failed to save note (%1).无法保存笔记 (%1)。
-
+ Please check the file (%1) and try it again.请检查文件 (%1) 并重试。
-
+ Maybe the file is occupied by another service temporarily.可能该文件正在被第三方应用临时占用。
-
+ Zoomed: %1%缩放: %1%
-
+ Zoomed: %1%2缩放: %1%2
-
-
+
+ Pattern not found: %1无法找到模式: %1
-
+ Match found: %1/%2找到匹配: %1/%2
-
+ Replaced %n match(es)替换 %n 处匹配
-
+ Save保存
-
+ Edit编辑
-
+ Read阅读
-
+ Discard放弃
-
+ Heading标题
-
+ Heading 1标题1
-
+ Heading 2标题2
-
+ Heading 3标题3
-
+ Heading 4标题4
-
+ Heading 5标题5
-
+ Heading 6标题6
-
+ Clear清空
-
+ Bold粗体
-
+ Italic斜体
-
+ Strikethrough删除线
-
+ Unordered List无序列表
-
+ Ordered List有序列表
-
+ Todo List待办列表
-
+ Checked Todo List已完成待办列表
-
+ Code代码
-
+ Code Block代码块
-
+ Math数学公式
-
+ Math Block数学公式块
-
+ Quote引用块
-
+ Link链接
-
+ Image图片
-
+ Table表格
-
+ Mark标记
-
+ Attachments附件
-
+ Outline大纲
-
+ Find And Replace查找替换
-
+ Section Number小节序号
-
+ Follow Configuration跟随配置
-
+ Enabled启用
-
+ Disabled禁用
+
+
+ Snippet applied: %1
+ 片段已应用: %1
+
+
+
+ Snippet (%1) not found
+ 无法找到片段 (%1)
+
+
+
+ Snippet not available
+ 没有可用片段
+
+
+
+ Select Snippet
+ 选择片段
+ vnotex::WebViewExporter
diff --git a/src/data/core/vnotex.json b/src/data/core/vnotex.json
index 7c3aa83c..ccbaef69 100644
--- a/src/data/core/vnotex.json
+++ b/src/data/core/vnotex.json
@@ -3,7 +3,7 @@
"metadata" : {
"//comment": "When releasing new version, please go through the following configs to check if override is needed.",
"//Comment": "markdown_editor#override_viewer_resource",
- "version" : "3.3.0"
+ "version" : "3.4.0"
},
"core" : {
"theme" : "pure",
diff --git a/src/widgets/lineeditwithsnippet.cpp b/src/widgets/lineeditwithsnippet.cpp
index df0b0354..59dfa414 100644
--- a/src/widgets/lineeditwithsnippet.cpp
+++ b/src/widgets/lineeditwithsnippet.cpp
@@ -18,7 +18,7 @@ LineEditWithSnippet::LineEditWithSnippet(const QString &p_contents, QWidget *p_p
void LineEditWithSnippet::setTips()
{
- const auto tips = tr("Snippet is supported via %name%");
+ const auto tips = tr("Snippet is supported via \"%name%\"");
setToolTip(tips);
setPlaceholderText(tips);
}
diff --git a/src/widgets/textviewwindowhelper.h b/src/widgets/textviewwindowhelper.h
index 3b8c6933..dd21b403 100644
--- a/src/widgets/textviewwindowhelper.h
+++ b/src/widgets/textviewwindowhelper.h
@@ -200,7 +200,7 @@ namespace vnotex
p_win->m_editor->getTextEdit(),
SnippetMgr::generateOverrides(p_win->getBuffer()));
p_win->m_editor->enterInsertModeIfApplicable();
- p_win->showMessage(ViewWindow::tr("Snippet applied: %1").arg(p_name));
+ p_win->showMessage(vnotex::ViewWindow::tr("Snippet applied: %1").arg(p_name));
}
template
@@ -227,7 +227,7 @@ namespace vnotex
// Found one symbol under current cursor.
snippetName = match.captured(1);
if (!SnippetMgr::getInst().find(snippetName)) {
- p_win->showMessage(ViewWindow::tr("Snippet (%1) not found").arg(snippetName));
+ p_win->showMessage(vnotex::ViewWindow::tr("Snippet (%1) not found").arg(snippetName));
return;
}
@@ -254,7 +254,7 @@ namespace vnotex
{
const auto snippets = SnippetMgr::getInst().getSnippets();
if (snippets.isEmpty()) {
- p_win->showMessage(ViewWindow::tr("Snippet not available"));
+ p_win->showMessage(vnotex::ViewWindow::tr("Snippet not available"));
return QString();
}
@@ -267,7 +267,7 @@ namespace vnotex
}
// Ownership will be transferred to showFloatingWidget().
- auto selector = new QuickSelector(ViewWindow::tr("Select Snippet"),
+ auto selector = new QuickSelector(vnotex::ViewWindow::tr("Select Snippet"),
items,
true,
p_win);
diff --git a/src/widgets/toolbarhelper.cpp b/src/widgets/toolbarhelper.cpp
index 3dfece61..534c3a36 100644
--- a/src/widgets/toolbarhelper.cpp
+++ b/src/widgets/toolbarhelper.cpp
@@ -491,6 +491,12 @@ QToolBar *ToolBarHelper::setupSettingsToolBar(MainWindow *p_win, QToolBar *p_too
menu->addSeparator();
+ menu->addAction(MainWindow::tr("%1 Home Page").arg(qApp->applicationDisplayName()),
+ menu,
+ []() {
+ WidgetUtils::openUrlByDesktop(QUrl("https://vnotex.github.io/vnote"));
+ });
+
menu->addAction(MainWindow::tr("Feedback And Discussions"),
menu,
[]() {