mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-30 05:19:57 +00:00
Revert #7821
See https://github.com/Jermolene/TiddlyWiki5/pull/7821#issuecomment-2176843674
This commit is contained in:
parent
6239384e7b
commit
4ca883fd9b
@ -1,24 +1,10 @@
|
||||
title: $:/core/macros/lingo
|
||||
tags: $:/tags/Global
|
||||
tags: $:/tags/Macro
|
||||
|
||||
<!-- Note that lingo-base should end with a trailing slash character -->
|
||||
\procedure lingo-base()
|
||||
\define lingo-base()
|
||||
$:/language/
|
||||
\end lingo-base
|
||||
\end
|
||||
|
||||
\procedure lingo(title,override-lingo-base)
|
||||
<!-- Lingo procedure -->
|
||||
<!-- Get the parse mode used to invoke this procedure -->
|
||||
<$parameters $parseMode="parseMode">
|
||||
<!-- Compute the lingo-base-->
|
||||
<$let active-lingo-base={{{ [<override-lingo-base>!match[]else<lingo-base>] }}}>
|
||||
<!-- First try the old school <active-lingo-base><title> format -->
|
||||
<$transclude $tiddler={{{ [<active-lingo-base>addsuffix<title>] }}} $mode=<<parseMode>>>
|
||||
<!-- If that didn't work, try the new <lingo-base><langcode>/<title> format -->
|
||||
<$let language-code={{{ [[$:/language]get[text]get[name]else[en-GB]] }}}>
|
||||
<$transclude $tiddler={{{ [<active-lingo-base>addsuffix<language-code>addsuffix[/]addsuffix<title>] }}} $mode=<<parseMode>>/>
|
||||
</$let>
|
||||
</$transclude>
|
||||
</$let>
|
||||
</$parameters>
|
||||
\end lingo
|
||||
\define lingo(title)
|
||||
{{$(lingo-base)$$title$}}
|
||||
\end
|
||||
|
@ -1,37 +1,16 @@
|
||||
caption: lingo
|
||||
created: 20150221154907000
|
||||
modified: 20231028123405895
|
||||
tags: Macros [[Core Macros]]
|
||||
modified: 20150221155706000
|
||||
title: lingo Macro
|
||||
type: text/vnd.tiddlywiki
|
||||
tags: Macros [[Core Macros]]
|
||||
caption: lingo
|
||||
|
||||
The <<.def lingo>> [[macro|Macros]] relates to the translation of ~TiddlyWiki's user interface into other languages. It returns a piece of text in the user's currently selected language.
|
||||
|
||||
Translatable text is supplied by:
|
||||
Translatable text is supplied by language plugins containing tiddlers with specific titles that start with `$:/language/`.
|
||||
|
||||
# Language plugins
|
||||
# Any l10n (localization) strings outside of the language plugins
|
||||
|
||||
!! Language plugins
|
||||
|
||||
You can directly pass title to `lingo` macro, when there is a language plugin containing a tiddler with such title that start with `$:/language/`.
|
||||
!! Parameters
|
||||
|
||||
;title
|
||||
: The title of the shadow tiddler that contains the text. The prefix `$:/language/` is added automatically
|
||||
|
||||
<<.macro-examples "lingo (for language plugin)">>
|
||||
|
||||
!! Any l10n strings
|
||||
|
||||
To translate any text that directly placed in user's wiki, instead of in a language plugin, you can set the `lingo-base` variable to teach <<.def lingo>> macro the place to look for.
|
||||
|
||||
!!! Parameters
|
||||
|
||||
;key
|
||||
: The last part of title of the tiddler that contains the text. The `<<lingo-base>>` prefix and current language name prefix is added automatically
|
||||
;lingo-base-fallback
|
||||
: Optional lingo-base when it is not possible to define `lingo-base` variable (for example, when using this macro in the caption field), you can set the lingo base by passing this parameter
|
||||
|
||||
<<.macro-examples "lingo (for custom base)">>
|
||||
|
||||
{{lingo Macro (file structure)}}
|
||||
<<.macro-examples "lingo">>
|
||||
|
@ -1,21 +0,0 @@
|
||||
created: 20231028120432257
|
||||
modified: 20240206113509050
|
||||
tags: [[lingo Macro]] [[Macro Examples]]
|
||||
title: lingo (for custom base) Macro (Examples)
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
\define lingo-base() lingo Macro (custom base examples)/
|
||||
|
||||
Given the `\define lingo-base() lingo Macro (custom base examples)/`, this example shows the localizaion key `ExampleKey` being translate to the text in [[lingo Macro (custom base examples)/en-GB/ExampleKey]]:
|
||||
|
||||
<$macrocall $name=".example" n="1" eg="""<<lingo ExampleKey>>"""/>
|
||||
|
||||
This example shows the `lingo-base` can be set as second parameter:
|
||||
|
||||
<$macrocall $name=".example" n="2" eg="""<<lingo ExampleKey "lingo Macro (custom base examples)/">>"""/>
|
||||
|
||||
When use lingo macro in a [[Inline Mode WikiText]] like [[list|Lists in WikiText]] or [[title|Headings in WikiText]], the parse mode will be inline, so translated text will be inlined too.
|
||||
|
||||
<$macrocall $name=".example" n="3" eg="""# <<lingo ExampleKey>>"""/>
|
||||
|
||||
<$macrocall $name=".example" n="4" eg="""!! <<lingo ExampleKey>>"""/>
|
@ -1,8 +0,0 @@
|
||||
created: 20231028120526948
|
||||
modified: 20240206113155142
|
||||
title: lingo Macro (custom base examples)/en-GB/ExampleKey
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
This is the translated text of key "~ExampleKey" under lingo-base `lingo Macro (custom base examples)/` (don't forget the tailing slash `/`)
|
||||
|
||||
And is multi-line, if it is translated in the block mode by default. (Become single line if set to inline mode.)
|
@ -1,73 +0,0 @@
|
||||
created: 20231028120432257
|
||||
modified: 20240206122408606
|
||||
tags: [[lingo Macro]] [[Macro Examples]]
|
||||
title: lingo Macro (file structure)
|
||||
|
||||
!! Example file structure for [[TiddlyWiki on Node.js]]
|
||||
|
||||
!!! Suggested file structure
|
||||
|
||||
When developing a plugin, you may want to organize your language files like this on the file system as [[MultiTiddlerFiles]]:
|
||||
|
||||
```tree
|
||||
├── language
|
||||
│ ├── en-GB
|
||||
│ │ ├── Translations.multids
|
||||
│ │ └── SomeLongText.tid
|
||||
│ └── zh-Hans
|
||||
│ ├── Translations.multids
|
||||
│ └── SomeLongText.tid
|
||||
├── other files
|
||||
└── plugin.info
|
||||
```
|
||||
|
||||
See [[$:/plugins/tiddlywiki/menubar/tree]] for an example.
|
||||
|
||||
!!! Define Multiple Translations in One Tiddler
|
||||
|
||||
And the content of `language/en-GB/Translations.multids` may looks like this:
|
||||
|
||||
```multids
|
||||
title: $:/plugins/yourName/pluginName/language/en-GB/
|
||||
|
||||
OpenInteractiveCard: Open Interactive Card
|
||||
OpenStaticCard: Open Static Card
|
||||
```
|
||||
|
||||
Later you can use it like:
|
||||
|
||||
```tid
|
||||
title: someTiddler
|
||||
caption: <<lingo OpenStaticCard "$:/plugins/yourName/pluginName/language/">>
|
||||
|
||||
\define lingo-base() $:/plugins/yourName/pluginName/language/
|
||||
\whitespace trim
|
||||
|
||||
<<lingo OpenInteractiveCard>>
|
||||
```
|
||||
|
||||
!!! Define Long Text in a regular Tiddler
|
||||
|
||||
You can also use a regular tiddler for long text, like `SomeLongText.tid` in the example above, to store a multi-paragraph long text:
|
||||
|
||||
```tid
|
||||
title: $:/plugins/yourName/pluginName/language/en-GB/SomeLongText
|
||||
|
||||
!!! SubTitle
|
||||
|
||||
This is a long text.
|
||||
```
|
||||
|
||||
Later you can use it like:
|
||||
|
||||
```tid
|
||||
title: someTiddler
|
||||
|
||||
\define lingo-base() $:/plugins/yourName/pluginName/language/
|
||||
|
||||
!! <<lingo "OpenInteractiveCard">>
|
||||
|
||||
<<lingo SomeLongText>>
|
||||
```
|
||||
|
||||
Note that lingo macro will use the [[parse mode|WikiText Parser Modes]] in the current position where this procedure is invoked.
|
@ -1,7 +1,7 @@
|
||||
created: 20150221151358000
|
||||
modified: 20150221160113000
|
||||
tags: [[lingo Macro]] [[Macro Examples]]
|
||||
title: lingo (for language plugin) Macro (Examples)
|
||||
title: lingo Macro (Examples)
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
This example shows the text used as the basis for the title of a newly created tiddler:
|
@ -3,13 +3,12 @@ tags: $:/tags/ControlPanel/Toolbars
|
||||
caption: Menu Bar
|
||||
|
||||
\define config-base() $:/config/plugins/menubar/MenuItems/Visibility/
|
||||
\define lingo-base() $:/plugins/tiddlywiki/menubar/language/
|
||||
|
||||
! <<lingo Config/Heading1>>
|
||||
! Menu Bar Configuration
|
||||
|
||||
!! <<lingo Config/MenuItems/Heading>>
|
||||
!! Menu Items
|
||||
|
||||
<<lingo Config/MenuItems/Description>>
|
||||
Select which menu items will be shown. You can also drag items to reorder them.
|
||||
|
||||
<$set name="tv-config-toolbar-icons" value="yes">
|
||||
|
||||
@ -21,18 +20,18 @@ caption: Menu Bar
|
||||
|
||||
</$set>
|
||||
|
||||
!! <<lingo Config/BreakpointPosition/Heading>>
|
||||
!! Breakpoint Position
|
||||
|
||||
<<lingo Config/BreakpointPosition/Description>>
|
||||
The breakpoint position between narrow and wide screens. Should include CSS units (eg. `400px`).
|
||||
|
||||
<$edit-text tiddler="$:/config/plugins/menubar/breakpoint" default="" tag="input"/>
|
||||
|
||||
!! <<lingo Config/ContentsTag/Heading>>
|
||||
!! Contents Tag
|
||||
|
||||
<<lingo Config/ContentsTag/Description>>
|
||||
The tag for the ~TableOfContents used in the Contents dropdown
|
||||
|
||||
<$edit-text tiddler="$:/config/plugins/menubar/TableOfContents/Tag" default="" tag="input"/>
|
||||
|
||||
!! <<lingo Config/MenuBarColours/Heading>>
|
||||
!! Menu Bar Colours
|
||||
|
||||
<<lingo Config/MenuBarColours/Description>>
|
||||
To change the colour of the menu bar, define the colours `menubar-foreground` and `menubar-background` in the currently selected palette
|
||||
|
@ -1,6 +1,6 @@
|
||||
title: $:/plugins/tiddlywiki/menubar/items/contents
|
||||
caption: <<lingo Items/TOC/Name $:/plugins/tiddlywiki/menubar/language/>>
|
||||
description: <<lingo Items/TOC/Description $:/plugins/tiddlywiki/menubar/language/>>
|
||||
caption: Contents
|
||||
description: Table of Contents
|
||||
is-dropdown: yes
|
||||
tags: $:/tags/MenuBar
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
title: $:/plugins/tiddlywiki/menubar/items/hamburger
|
||||
tags: $:/tags/MenuBar
|
||||
caption: <<lingo Items/Hamburger/Name $:/plugins/tiddlywiki/menubar/language/>>
|
||||
description: <<lingo Items/Hamburger/Description $:/plugins/tiddlywiki/menubar/language/>>
|
||||
caption: Hamburger
|
||||
description: Show the full menu bar on a narrow screen
|
||||
custom-menu-content: {{$:/plugins/tiddlywiki/menubar/items/hamburger}}
|
||||
show-when: narrow
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
title: $:/plugins/tiddlywiki/menubar/items/pagecontrols
|
||||
tags: $:/tags/MenuBar
|
||||
description: <<lingo Items/PageControls/Name $:/plugins/tiddlywiki/menubar/language/>>
|
||||
caption: <<lingo Items/PageControls/Name $:/plugins/tiddlywiki/menubar/language/>>
|
||||
description: Page controls from the sidebar
|
||||
caption: Page controls
|
||||
custom-menu-content: <$transclude tiddler="$:/plugins/tiddlywiki/menubar/items/pagecontrols" mode="inline"/>
|
||||
|
||||
\whitespace trim
|
||||
|
@ -1,7 +1,7 @@
|
||||
title: $:/plugins/tiddlywiki/menubar/items/search
|
||||
custom-menu-content: {{$:/plugins/tiddlywiki/menubar/items/search}}
|
||||
description: <<lingo Items/Search/Name $:/plugins/tiddlywiki/menubar/language/>>
|
||||
caption: <<lingo Items/Search/Name $:/plugins/tiddlywiki/menubar/language/>>
|
||||
description: Search
|
||||
caption: Search
|
||||
tags: $:/tags/MenuBar
|
||||
|
||||
\define cancel-search-actions()
|
||||
|
@ -1,7 +1,7 @@
|
||||
title: $:/plugins/tiddlywiki/menubar/items/server
|
||||
tags: $:/tags/MenuBar
|
||||
description: <<lingo Items/Server/Description $:/plugins/tiddlywiki/menubar/language/>>
|
||||
caption: <<lingo Items/Server/Name $:/plugins/tiddlywiki/menubar/language/>>
|
||||
description: Server options
|
||||
caption: Server
|
||||
custom-menu-content: <$transclude tiddler="$:/plugins/tiddlywiki/menubar/items/server" mode="inline"/>
|
||||
|
||||
<$list filter="[[$:/status/IsLoggedIn]get[text]else[no]match[yes]]" variable="ignore">
|
||||
|
@ -1,6 +1,6 @@
|
||||
title: $:/plugins/tiddlywiki/menubar/items/sidebar
|
||||
caption: <<lingo Items/Sidebar/Name $:/plugins/tiddlywiki/menubar/language/>>
|
||||
description: <<lingo Items/Sidebar/Name $:/plugins/tiddlywiki/menubar/language/>>
|
||||
caption: Sidebar
|
||||
description: Sidebar
|
||||
is-dropdown: yes
|
||||
tags: $:/tags/MenuBar
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
title: $:/plugins/tiddlywiki/menubar/items/topleftbar
|
||||
tags: $:/tags/MenuBar
|
||||
description: <<lingo Items/TopLeftBar/Description $:/plugins/tiddlywiki/menubar/language/>>
|
||||
caption: <<lingo Items/TopLeftBar/Name $:/plugins/tiddlywiki/menubar/language/>>
|
||||
description: Items from $:/tags/TopLeftBar
|
||||
caption: Legacy Top Left Bar
|
||||
custom-menu-content: <$transclude tiddler="$:/plugins/tiddlywiki/menubar/items/topleftbar" mode="inline"/>
|
||||
|
||||
<$list filter="[all[shadows+tiddlers]tag[$:/tags/TopLeftBar]!has[draft.of]]" variable="listItem" storyview="pop">
|
||||
|
@ -1,7 +1,7 @@
|
||||
title: $:/plugins/tiddlywiki/menubar/items/toprightbar
|
||||
tags: $:/tags/MenuBar
|
||||
description: <<lingo Items/TopRightBar/Description $:/plugins/tiddlywiki/menubar/language/>>
|
||||
caption: <<lingo Items/TopRightBar/Name $:/plugins/tiddlywiki/menubar/language/>>
|
||||
description: Items from $:/tags/TopRightBar
|
||||
caption: Legacy Top Right Bar
|
||||
custom-menu-content: <$transclude tiddler="$:/plugins/tiddlywiki/menubar/items/toprightbar" mode="inline"/>
|
||||
custom-menu-styles-wide: float: right;
|
||||
|
||||
|
@ -1,25 +0,0 @@
|
||||
title: $:/plugins/tiddlywiki/menubar/language/en-GB/
|
||||
|
||||
Config/Heading1: Menu Bar Configuration
|
||||
Config/MenuItems/Heading: Menu Items
|
||||
Config/MenuItems/Description: Select which menu items will be shown. You can also drag items to reorder them.
|
||||
Config/BreakpointPosition/Heading: Breakpoint Position
|
||||
Config/BreakpointPosition/Description: The breakpoint position between narrow and wide screens. Should include CSS units (eg. `400px`).
|
||||
Config/ContentsTag/Heading: Contents Tag
|
||||
Config/ContentsTag/Description: The tag for the ~TableOfContents used in the Contents dropdown
|
||||
Config/MenuBarColours/Heading: Menu Bar Colours
|
||||
Config/MenuBarColours/Description: To change the colour of the menu bar, define the colours `menubar-foreground` and `menubar-background` in the currently selected palette
|
||||
Items/TOC/Name: Contents
|
||||
Items/TOC/Description: Table of Contents
|
||||
Items/Hamburger/Name: Hamburger
|
||||
Items/Hamburger/Description: Show the full menu bar on a narrow screen
|
||||
Items/PageControls/Name: Page controls
|
||||
Items/PageControls/Description: Page controls from the sidebar
|
||||
Items/Search/Name: Search
|
||||
Items/Server/Name: Server
|
||||
Items/Server/Description: Server options
|
||||
Items/Sidebar/Name: Sidebar
|
||||
Items/TopLeftBar/Name: Legacy Top Left Bar
|
||||
Items/TopLeftBar/Description: Items from $:/tags/TopLeftBar
|
||||
Items/TopRightBar/Name: Legacy Top Right Bar
|
||||
Items/TopRightBar/Description: Items from $:/tags/TopRightBar
|
@ -1,30 +0,0 @@
|
||||
title: $:/plugins/tiddlywiki/menubar/language/en-GB/readme
|
||||
|
||||
!! Introduction
|
||||
|
||||
This plugin provides a menu bar with the following features:
|
||||
|
||||
* Menu items take the form of simple text links, dropdowns, or entirely custom content
|
||||
* Menu items can be individually enabled via the control panel
|
||||
* Responds to reduced screen width by abbreviating the menu items to a "hamburger" dropdown
|
||||
|
||||
!! Menu Item Tiddlers
|
||||
|
||||
Menu items are tagged <<tag $:/tags/MenuBar>>. The following fields are used by this plugin:
|
||||
|
||||
|!Field Name |!Purpose |
|
||||
|title |Each menu item must have a unique title (not shown to the user) |
|
||||
|description |Description for use in listings |
|
||||
|tags |Must contain `$:/tags/MenuBar` |
|
||||
|caption |The text that is displayed for the menu item. Avoid links, using `~` to suppress CamelCase links if required |
|
||||
|target |For simple link menu items specifies a tiddler title as the target of the link |
|
||||
|is-dropdown |Set to `yes` to indicate a dropdown menu item |
|
||||
|dropdown-position |Optional position for the dropdown (can be ''left'', ''above'', ''aboveleft'', ''aboveright'', ''right'', ''belowleft'', ''belowright'' or ''below'') |
|
||||
|text |For dropdown menu items, specifies the body of the dropdown |
|
||||
|custom-menu-content |Optional wikitext to be displayed in place of the caption |
|
||||
|custom-menu-styles-wide |Optional string of styles to be applied to menu item when the menubar is wide |
|
||||
|custom-menu-styles-narrow |Optional string of styles to be applied to menu item when the menubar is narrow |
|
||||
|
||||
Custom menu items should make sure that the clickable link or button is an immediate child, and not wrapped in another element.
|
||||
|
||||
Note that menu items can be pushed to the right of the menu bar setting the ''custom-menu-styles'' field to `float: right;`.
|
@ -1,25 +0,0 @@
|
||||
title: $:/plugins/tiddlywiki/menubar/language/zh-Hans/
|
||||
|
||||
Config/Heading1: 菜单栏配置
|
||||
Config/MenuItems/Heading: 菜单项
|
||||
Config/MenuItems/Description: 选择要显示的菜单项。您还可以通过拖动项目来重新排序。
|
||||
Config/BreakpointPosition/Heading: 响应式断点位置
|
||||
Config/BreakpointPosition/Description: 窄屏和宽屏之间的分界点位置。应包含 CSS 单位(如 `400px`)。
|
||||
Config/ContentsTag/Heading: 内容标签
|
||||
Config/ContentsTag/Description: 内容下拉菜单中使用的 TOC 目录标签
|
||||
Config/MenuBarColours/Heading: 菜单栏颜色
|
||||
Config/MenuBarColours/Description: 要更改菜单栏的颜色,请在当前选定的调色板中定义颜色 `menubar-foreground` 和 `menubar-background`。
|
||||
Items/TOC/Name: 内容
|
||||
Items/TOC/Description: 目录
|
||||
Items/Hamburger/Name: 抽屉
|
||||
Items/Hamburger/Description: 在窄屏幕上显示完整的菜单栏
|
||||
Items/PageControls/Name: 页面控件
|
||||
Items/PageControls/Description: 来自侧边栏的页面控件
|
||||
Items/Search/Name: 搜索
|
||||
Items/Server/Name: 服务器
|
||||
Items/Server/Description: 服务器选项
|
||||
Items/Sidebar/Name: 侧边栏
|
||||
Items/TopLeftBar/Name: 旧版左上角栏
|
||||
Items/TopLeftBar/Description: 来自 $:/tags/TopLeftBar 的项目
|
||||
Items/TopRightBar/Name: 旧版右上角栏
|
||||
Items/TopRightBar/Description: 来自 $:/tags/TopRightBar 的项目
|
@ -1,30 +0,0 @@
|
||||
title: $:/plugins/tiddlywiki/menubar/language/zh-Hans/readme
|
||||
|
||||
!! 简介
|
||||
|
||||
该插件提供的菜单栏具有以下功能:
|
||||
|
||||
* 菜单项的形式可以是简单的文本链接、下拉菜单或完全自定义的内容
|
||||
* 可通过控制面板单独启用菜单项
|
||||
* 通过将菜单项缩减为抽屉式导航(也叫"汉堡包"下拉菜单)来应对屏幕宽度减小的情况
|
||||
|
||||
!! 菜单项标记
|
||||
|
||||
菜单项被标记为 <<tag $:/tags/MenuBar>>。本插件使用以下字段:
|
||||
|
||||
|!字段名称 |!用途 |
|
||||
|title |每个菜单项必须有一个唯一的标题(不显示给用户)|
|
||||
|description |在列表中使用的描述 |
|
||||
|tags |必须包含 `$:/tags/MenuBar` |
|
||||
|caption |菜单项显示的文本。避免使用链接,必要时使用 `~` 来抑制 CamelCase 链接 |
|
||||
|target |对于简单链接菜单项,指定一个 tiddler 标题作为链接的目标 |
|
||||
|is-dropdown |设置为 `yes` 表示下拉菜单项 |
|
||||
|dropdown-position |下拉位置(可选 "左"、"上"、"左上" 等,需要使用英文 ''left'', ''above'', ''aboveleft'', ''aboveright'', ''right'', ''belowleft'', ''belowright'', ''below'') |
|
||||
|text |对于下拉菜单项,指定下拉菜单的正文 |
|
||||
|custom-menu-content |可选显示的维基文本,以代替标题 |
|
||||
|custom-menu-styles-wide |当菜单栏是宽模式时,应用于菜单项的样式字符串选项 |
|
||||
|custom-menu-styles-narrow |当菜单栏是窄模式时,应用于菜单项的样式的可选字符串 |
|
||||
|
||||
自定义菜单项应确保可点击链接或按钮是直接子元素,而不是包裹在其他元素中。
|
||||
|
||||
请注意,菜单项可以通过将 ''custom-menu-styles'' 字段设置为 `float: right;` 而推到菜单栏的右侧。
|
@ -1,5 +1,30 @@
|
||||
title: $:/plugins/tiddlywiki/menubar/readme
|
||||
|
||||
\define lingo-base() $:/plugins/tiddlywiki/menubar/language/
|
||||
!! Introduction
|
||||
|
||||
<<lingo readme>>
|
||||
This plugin provides a menu bar with the following features:
|
||||
|
||||
* Menu items take the form of simple text links, dropdowns, or entirely custom content
|
||||
* Menu items can be individually enabled via the control panel
|
||||
* Responds to reduced screen width by abbreviating the menu items to a "hamburger" dropdown
|
||||
|
||||
!! Menu Item Tiddlers
|
||||
|
||||
Menu items are tagged <<tag $:/tags/MenuBar>>. The following fields are used by this plugin:
|
||||
|
||||
|!Field Name |!Purpose |
|
||||
|title |Each menu item must have a unique title (not shown to the user) |
|
||||
|description |Description for use in listings |
|
||||
|tags |Must contain `$:/tags/MenuBar` |
|
||||
|caption |The text that is displayed for the menu item. Avoid links, using `~` to suppress CamelCase links if required |
|
||||
|target |For simple link menu items specifies a tiddler title as the target of the link |
|
||||
|is-dropdown |Set to `yes` to indicate a dropdown menu item |
|
||||
|dropdown-position |Optional position for the dropdown (can be ''left'', ''above'', ''aboveleft'', ''aboveright'', ''right'', ''belowleft'', ''belowright'' or ''below'') |
|
||||
|text |For dropdown menu items, specifies the body of the dropdown |
|
||||
|custom-menu-content |Optional wikitext to be displayed in place of the caption |
|
||||
|custom-menu-styles-wide |Optional string of styles to be applied to menu item when the menubar is wide |
|
||||
|custom-menu-styles-narrow |Optional string of styles to be applied to menu item when the menubar is narrow |
|
||||
|
||||
Custom menu items should make sure that the clickable link or button is an immediate child, and not wrapped in another element.
|
||||
|
||||
Note that menu items can be pushed to the right of the menu bar setting the ''custom-menu-styles'' field to `float: right;`.
|
||||
|
@ -1,4 +0,0 @@
|
||||
title: $:/plugins/tiddlywiki/menubar/tree
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
<<tree prefix:"$:/plugins/tiddlywiki/menubar/">>
|
@ -1,7 +1,16 @@
|
||||
title: GettingStarted
|
||||
tags: $:/tags/GettingStarted
|
||||
caption: <<lingo GettingStartedStep1 "$:/plugins/tiddlywiki/tiddlyweb/language/">>
|
||||
caption: Step 1<br>Syncing
|
||||
|
||||
\define lingo-base() $:/plugins/tiddlywiki/tiddlyweb/language/
|
||||
Welcome to ~TiddlyWiki and the ~TiddlyWiki community
|
||||
|
||||
<<lingo GettingStarted>>
|
||||
Visit https://tiddlywiki.com/ to find out more about ~TiddlyWiki and what it can do.
|
||||
|
||||
! Syncing Changes to the Server
|
||||
|
||||
Before you can start storing important information in ~TiddlyWiki it is important to make sure that your changes are being reliably saved by the server.
|
||||
|
||||
# Create a new tiddler using the {{$:/core/images/new-button}} button in the sidebar on the right
|
||||
# Click the {{$:/core/images/done-button}} button at the top right of the new tiddler
|
||||
# Check the ~TiddlyWiki command line for a message confirming the tiddler has been saved
|
||||
# Refresh the page in the browser to and verify that the new tiddler has been correctly saved
|
||||
|
@ -4,6 +4,4 @@ url: https://tiddlywiki.com/library/v5.1.23/index.html
|
||||
caption: {{$:/language/OfficialPluginLibrary}}
|
||||
enabled: no
|
||||
|
||||
\define lingo-base() $:/plugins/tiddlywiki/tiddlyweb/language/
|
||||
|
||||
<<lingo ConfigOfficialPluginLibrary>>
|
||||
The official plugin library is disabled when using the client-server configuration. Instead, plugins should be installed via the `tiddlywiki.info` file, as described [[here|https://tiddlywiki.com/#Installing%20a%20plugin%20from%20the%20plugin%20library]].
|
@ -1,14 +0,0 @@
|
||||
title: $:/plugins/tiddlywiki/tiddlyweb/language/en-GB/GettingStarted
|
||||
|
||||
Welcome to ~TiddlyWiki and the ~TiddlyWiki community
|
||||
|
||||
Visit https://tiddlywiki.com/ to find out more about ~TiddlyWiki and what it can do.
|
||||
|
||||
! Syncing Changes to the Server
|
||||
|
||||
Before you can start storing important information in ~TiddlyWiki it is important to make sure that your changes are being reliably saved by the server.
|
||||
|
||||
# Create a new tiddler using the {{$:/core/images/new-button}} button in the sidebar on the right
|
||||
# Click the {{$:/core/images/done-button}} button at the top right of the new tiddler
|
||||
# Check the ~TiddlyWiki command line for a message confirming the tiddler has been saved
|
||||
# Refresh the page in the browser to and verify that the new tiddler has been correctly saved
|
@ -1,12 +0,0 @@
|
||||
title: $:/plugins/tiddlywiki/tiddlyweb/language/en-GB/
|
||||
|
||||
ConfigOfficialPluginLibrary: The official plugin library is disabled when using the client-server configuration. Instead, plugins should be installed via the `tiddlywiki.info` file, as described [[here|https://tiddlywiki.com/#Installing%20official%20plugins%20on%20Node.js]].
|
||||
GettingStartedStep1: Step 1<br>Syncing
|
||||
CopySyncerLogs: Copy syncer logs to clipboard
|
||||
LoginAs: You are logged in<$reveal state="$:/status/UserName" type="nomatch" text="" default=""> as <strong><$text text={{$:/status/UserName}}/></strong></$reveal>
|
||||
Readonly: <$reveal state="$:/status/IsReadOnly" type="match" text="yes" default="no"> (read-only)</$reveal>
|
||||
Login: Login
|
||||
Logout: Logout
|
||||
SaveSnapshot: Save snapshot for offline use
|
||||
Refresh/Label: Refresh from server
|
||||
Refresh/Button: Get latest changes from the server
|
@ -1,7 +0,0 @@
|
||||
title: $:/plugins/tiddlywiki/tiddlyweb/language/en-GB/readme
|
||||
|
||||
This plugin runs in the browser to synchronise tiddler changes to and from a TiddlyWeb-compatible server (including TiddlyWiki 5 itself, running on Node.js). It is inert when run under Node.js. Disabling this plugin via the browser can not be undone via the browser since this plugin provides the mechanism to synchronize settings with the server.
|
||||
|
||||
Changes made while offline are saved in memory and automatically synchonised with the server when the connection is re-established. However, if the browser tab is closed or another URL is loaded, the in-memory changes will be lost. The [[https://tiddlywiki.com/#BrowserStorage Plugin]] may be added to provide temporary filesystem storage of tiddler changes made while offline and enable them to be synchronised with the server the next time the wiki is loaded in the same browser.
|
||||
|
||||
[[Source code|https://github.com/Jermolene/TiddlyWiki5/blob/master/plugins/tiddlywiki/tiddlyweb]]
|
@ -1,14 +0,0 @@
|
||||
title: $:/plugins/tiddlywiki/tiddlyweb/language/zh-Hans/GettingStarted
|
||||
|
||||
欢迎来到太微和太微社区
|
||||
|
||||
访问 https://tiddlywiki.com/ 了解太微的细节和了解它能做什么。
|
||||
|
||||
! 同步更改到服务器
|
||||
|
||||
在你开始在太微中存储重要信息之前,确保你的修改被服务器可靠地保存是非常重要的。
|
||||
|
||||
# 使用右侧边栏的 {{$:/core/images/new-button}} 按钮创建一个新条目
|
||||
# 点击新条目右上方的 {{$:/core/images/done-button}} 按钮
|
||||
# 检查太微命令行是否有确认条目已保存的信息
|
||||
# 刷新浏览器页面,确认新条目已正确保存
|
@ -1,12 +0,0 @@
|
||||
title: $:/plugins/tiddlywiki/tiddlyweb/language/zh-Hans/
|
||||
|
||||
ConfigOfficialPluginLibrary: 使用客户端-服务器配置时,官方插件库将被禁用。取而代之的是,应按照[[here|https://tiddlywiki.com/#Installing%20a%20plugin%20from%20the%20plugin%20library]]所述,通过 "tiddlywiki.info" 文件安装插件。
|
||||
GettingStartedStep1: 第一步<br>同步
|
||||
CopySyncerLogs: 将同步器日志复制到剪贴板
|
||||
LoginAs: 您目前已登录<$reveal state="$:/status/UserName" type="nomatch" text="" default="">为<strong><$text text={{$:/status/UserName}}/></strong></$reveal>
|
||||
Readonly: <$reveal state="$:/status/IsReadOnly" type="match" text="yes" default="no">(只读)</$reveal>
|
||||
Login: 登录
|
||||
Logout: 登出
|
||||
SaveSnapshot: 保存快照以供离线使用
|
||||
Refresh/Label: 从服务器刷新
|
||||
Refresh/Button: 从服务器获取最新变更
|
@ -1,7 +0,0 @@
|
||||
title: $:/plugins/tiddlywiki/tiddlyweb/language/zh-Hans/readme
|
||||
|
||||
该插件在浏览器中运行,用于双向同步更改的条目到与 TiddlyWeb 兼容的服务器上(包括在 Node.js 上运行的 TiddlyWiki 5 本身)。在 Node.js 上运行时,它是无法自救的:由于就是该插件提供了与服务器同步设置和插件的机制,因此通过浏览器禁用该插件后,是无法撤销对自己的禁用的。
|
||||
|
||||
离线时所作的更改会保存在内存中,并在重新建立连接时自动与服务器同步。不过,如果关闭浏览器标签页或加载另一个 URL,内存中的更改就会丢失。可以添加[[https://tiddlywiki.com/#BrowserStorage Plugin]],为离线时的条目更改提供临时文件系统存储,并使其在下次在同一浏览器中加载知识库时与服务器同步。
|
||||
|
||||
[[源代码|https://github.com/Jermolene/TiddlyWiki5/blob/master/plugins/tiddlywiki/tiddlyweb]]
|
@ -1,5 +1,7 @@
|
||||
title: $:/plugins/tiddlywiki/tiddlyweb/readme
|
||||
|
||||
\define lingo-base() $:/plugins/tiddlywiki/tiddlyweb/language/
|
||||
This plugin runs in the browser to synchronise tiddler changes to and from a TiddlyWeb-compatible server (including TiddlyWiki 5 itself, running on Node.js). It is inert when run under Node.js. Disabling this plugin via the browser can not be undone via the browser since this plugin provides the mechanism to synchronize settings with the server.
|
||||
|
||||
<<lingo readme>>
|
||||
Changes made while offline are saved in memory and automatically synchonised with the server when the connection is re-established. However, if the browser tab is closed or another URL is loaded, the in-memory changes will be lost. The [[https://tiddlywiki.com/#BrowserStorage Plugin]] may be added to provide temporary filesystem storage of tiddler changes made while offline and enable them to be synchronised with the server the next time the wiki is loaded in the same browser.
|
||||
|
||||
[[Source code|https://github.com/Jermolene/TiddlyWiki5/blob/master/plugins/tiddlywiki/tiddlyweb]]
|
||||
|
@ -1,8 +1,6 @@
|
||||
title: $:/plugins/tiddlywiki/tiddlyweb/syncer-actions/copy-logs
|
||||
tags: $:/tags/SyncerDropdown
|
||||
|
||||
\define lingo-base() $:/plugins/tiddlywiki/tiddlyweb/language/
|
||||
|
||||
<$button message="tm-copy-syncer-logs-to-clipboard" class="tc-btn-invisible">
|
||||
{{$:/core/images/copy-clipboard}} <<lingo CopySyncerLogs>>
|
||||
{{$:/core/images/copy-clipboard}} Copy syncer logs to clipboard
|
||||
</$button>
|
||||
|
@ -1,11 +1,9 @@
|
||||
title: $:/plugins/tiddlywiki/tiddlyweb/syncer-actions/login-status
|
||||
tags: $:/tags/SyncerDropdown
|
||||
|
||||
\define lingo-base() $:/plugins/tiddlywiki/tiddlyweb/language/
|
||||
|
||||
<$reveal state="$:/status/IsLoggedIn" type="match" text="yes">
|
||||
<div class="tc-drop-down-info">
|
||||
<<lingo LoginAs>><<lingo Readonly>>
|
||||
You are logged in<$reveal state="$:/status/UserName" type="nomatch" text="" default=""> as <strong><$text text={{$:/status/UserName}}/></strong></$reveal><$reveal state="$:/status/IsReadOnly" type="match" text="yes" default="no"> (read-only)</$reveal>
|
||||
</div>
|
||||
<hr/>
|
||||
</$reveal>
|
||||
|
@ -1,10 +1,8 @@
|
||||
title: $:/plugins/tiddlywiki/tiddlyweb/syncer-actions/login
|
||||
tags: $:/tags/SyncerDropdown
|
||||
|
||||
\define lingo-base() $:/plugins/tiddlywiki/tiddlyweb/language/
|
||||
|
||||
<$reveal state="$:/status/IsLoggedIn" type="nomatch" text="yes">
|
||||
<$button message="tm-login" class="tc-btn-invisible">
|
||||
{{$:/core/images/unlocked-padlock}} <<lingo Login>>
|
||||
{{$:/core/images/unlocked-padlock}} Login
|
||||
</$button>
|
||||
</$reveal>
|
||||
|
@ -1,10 +1,8 @@
|
||||
title: $:/plugins/tiddlywiki/tiddlyweb/syncer-actions/logout
|
||||
tags: $:/tags/SyncerDropdown
|
||||
|
||||
\define lingo-base() $:/plugins/tiddlywiki/tiddlyweb/language/
|
||||
|
||||
<$reveal state="$:/status/IsLoggedIn" type="match" text="yes">
|
||||
<$button message="tm-logout" class="tc-btn-invisible">
|
||||
{{$:/core/images/cancel-button}} <<lingo Logout>>
|
||||
{{$:/core/images/cancel-button}} Logout
|
||||
</$button>
|
||||
</$reveal>
|
||||
|
@ -1,17 +1,9 @@
|
||||
title: $:/plugins/tiddlywiki/tiddlyweb/syncer-actions/refresh
|
||||
tags: $:/tags/SyncerDropdown
|
||||
|
||||
\whitespace trim
|
||||
<$let lingo-base="$:/plugins/tiddlywiki/tiddlyweb/language/">
|
||||
<$wikify name=buttonText text="<<lingo Refresh/Button>>">
|
||||
<$wikify name=ariaLabel text="<<lingo Refresh/Label>>">
|
||||
<$reveal state="$:/status/IsLoggedIn" type="match" text="yes">
|
||||
<$button tooltip=<<ariaLabel>> aria-label=<<ariaLabel>> class="tc-btn-invisible">
|
||||
<$action-sendmessage $message="tm-server-refresh"/>
|
||||
{{$:/core/images/refresh-button}}
|
||||
<span class="tc-btn-text"><<buttonText>></span>
|
||||
</$button>
|
||||
</$reveal>
|
||||
</$wikify>
|
||||
</$wikify>
|
||||
</$let>
|
||||
<$reveal state="$:/status/IsLoggedIn" type="match" text="yes">
|
||||
<$button tooltip="Get latest changes from the server" aria-label="Refresh from server" class="tc-btn-invisible">
|
||||
<$action-sendmessage $message="tm-server-refresh"/>
|
||||
{{$:/core/images/refresh-button}}<span class="tc-btn-text"><$text text="Get latest changes from the server"/></span>
|
||||
</$button>
|
||||
</$reveal>
|
||||
|
@ -1,11 +1,9 @@
|
||||
title: $:/plugins/tiddlywiki/tiddlyweb/syncer-actions/save-snapshot
|
||||
tags: $:/tags/SyncerDropdown
|
||||
|
||||
\define lingo-base() $:/plugins/tiddlywiki/tiddlyweb/language/
|
||||
|
||||
<$button class="tc-btn-invisible">
|
||||
<$wikify name="site-title" text={{$:/config/SaveWikiButton/Filename}}>
|
||||
<$action-sendmessage $message="tm-download-file" $param={{$:/config/SaveWikiButton/Template}} filename=<<site-title>>/>
|
||||
</$wikify>
|
||||
{{$:/core/images/download-button}} <<lingo SaveSnapshot>>
|
||||
{{$:/core/images/download-button}} Save snapshot for offline use
|
||||
</$button>
|
||||
|
@ -1,4 +0,0 @@
|
||||
title: $:/plugins/tiddlywiki/tiddlyweb/tree
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
<<tree prefix:"$:/plugins/tiddlywiki/tiddlyweb/">>
|
Loading…
Reference in New Issue
Block a user