mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-09-19 02:10:04 +08:00
add translation for toc.js
This commit is contained in:
parent
7dfe6f276e
commit
5e2d1bc124
@ -13,7 +13,7 @@
|
|||||||
* to the wrong heading (although what "right" means in those cases is not
|
* to the wrong heading (although what "right" means in those cases is not
|
||||||
* clear), but it won't crash.
|
* clear), but it won't crash.
|
||||||
*/
|
*/
|
||||||
|
import { t } from "../services/i18n.js";
|
||||||
import attributeService from "../services/attributes.js";
|
import attributeService from "../services/attributes.js";
|
||||||
import RightPanelWidget from "./right_panel_widget.js";
|
import RightPanelWidget from "./right_panel_widget.js";
|
||||||
import options from "../services/options.js";
|
import options from "../services/options.js";
|
||||||
@ -55,14 +55,14 @@ const TPL = `<div class="toc-widget">
|
|||||||
|
|
||||||
export default class TocWidget extends RightPanelWidget {
|
export default class TocWidget extends RightPanelWidget {
|
||||||
get widgetTitle() {
|
get widgetTitle() {
|
||||||
return "Table of Contents";
|
return t("toc.table_of_contents");
|
||||||
}
|
}
|
||||||
|
|
||||||
get widgetButtons() {
|
get widgetButtons() {
|
||||||
return [
|
return [
|
||||||
new OnClickButtonWidget()
|
new OnClickButtonWidget()
|
||||||
.icon("bx-cog")
|
.icon("bx-cog")
|
||||||
.title("Options")
|
.title(t("toc.options"))
|
||||||
.titlePlacement("left")
|
.titlePlacement("left")
|
||||||
.onClick(() => appContext.tabManager.openContextWithNote('_optionsTextNotes', {activate: true}))
|
.onClick(() => appContext.tabManager.openContextWithNote('_optionsTextNotes', {activate: true}))
|
||||||
.class("icon-action"),
|
.class("icon-action"),
|
||||||
|
@ -1410,5 +1410,9 @@
|
|||||||
"close_all_tabs": "关闭所有标签页",
|
"close_all_tabs": "关闭所有标签页",
|
||||||
"move_tab_to_new_window": "将此标签页移动到新窗口",
|
"move_tab_to_new_window": "将此标签页移动到新窗口",
|
||||||
"new_tab": "新标签页"
|
"new_tab": "新标签页"
|
||||||
|
},
|
||||||
|
"toc": {
|
||||||
|
"table_of_contents": "目录",
|
||||||
|
"options": "选项"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1410,5 +1410,9 @@
|
|||||||
"close_all_tabs": "Close all tabs",
|
"close_all_tabs": "Close all tabs",
|
||||||
"move_tab_to_new_window": "Move this tab to a new window",
|
"move_tab_to_new_window": "Move this tab to a new window",
|
||||||
"new_tab": "New tab"
|
"new_tab": "New tab"
|
||||||
|
},
|
||||||
|
"toc": {
|
||||||
|
"table_of_contents": "Table of Contents",
|
||||||
|
"options": "Options"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user