From 9323fbc8937330bf10ae2e580aeafd16af0acd8b Mon Sep 17 00:00:00 2001 From: pmario Date: Thu, 25 Jan 2024 22:23:16 +0100 Subject: [PATCH] improve procedure names and ControlPanel texts --- core/language/en-GB/ControlPanel.multids | 4 +-- .../features/DarkLightChangeActions.tid | 25 +++++++++---------- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/core/language/en-GB/ControlPanel.multids b/core/language/en-GB/ControlPanel.multids index fa4e7f001..154cf9f3d 100644 --- a/core/language/en-GB/ControlPanel.multids +++ b/core/language/en-GB/ControlPanel.multids @@ -57,8 +57,8 @@ LayoutSwitcher/Caption: Layout LoadedModules/Caption: Loaded Modules LoadedModules/Hint: These are the currently loaded tiddler modules linked to their source tiddlers. Any italicised modules lack a source tiddler, typically because they were setup during the boot process. Palette/Caption: Palette -Palette/Config/DefaultDark/Caption: Default Dark -Palette/Config/DefaultLight/Caption: Default Light +Palette/Config/DefaultDark/Caption: Dark palette +Palette/Config/DefaultLight/Caption: Light palette Palette/Config/Detection/Caption: Detect Browser Ligh/Dark Setting Palette/Editor/Clone/Caption: clone Palette/Editor/Clone/Prompt: It is recommended that you clone this shadow palette before editing it diff --git a/editions/tw5.com/tiddlers/features/DarkLightChangeActions.tid b/editions/tw5.com/tiddlers/features/DarkLightChangeActions.tid index 410586ff9..f2e1c4d13 100644 --- a/editions/tw5.com/tiddlers/features/DarkLightChangeActions.tid +++ b/editions/tw5.com/tiddlers/features/DarkLightChangeActions.tid @@ -4,9 +4,9 @@ tags: Features title: DarkLightChangeActions type: text/vnd.tiddlywiki -\procedure createLightDarkSwitcherTitle() _/startup/light-dark/detection +\procedure lightDarkSwitcherTitle() _/startup/light-dark/detection -\procedure startupLightDarkTemplate() +\procedure startupLightDarkActionTemplate() <$reveal type="match" stateTitle="$:/config/palette/enable-light-dark-detection" text="yes"> <$let default={{{ [match[yes]then[$:/config/palette/default-dark]else[$:/config/palette/default-light]] }}}> <$action-setfield $tiddler="$:/palette" text={{{ [get[text]] }}}/> @@ -15,19 +15,18 @@ type: text/vnd.tiddlywiki \end \procedure createLightDarkSwitcher() -<% if [!has[text]] %> +<% if [!has[text]] %> <$action-createtiddler - $basetitle=<> - text=<> - caption= "{{$:/language/ControlPanel/Palette/Config/Detection/Caption}}" - code-body= "yes" - tags= "$:/tags/DarkLightChangeActions" + $basetitle=<> + text=<> + caption= "{{$:/language/ControlPanel/Palette/Config/Detection/Caption}}" + code-body= "yes" + tags= "$:/tags/DarkLightChangeActions" /> -<$action-navigate $to=<>/> +<$action-navigate $to=<>/> <% else %> -<$action-navigate $to=<>/> +<$action-navigate $to=<>/> <% endif %> - \end <<.from-version "5.3.4">> Actions tagged <> are executed whenever the browser or OS dark / light setting is changed. @@ -53,7 +52,7 @@ The following variable is defined for all actions DarkLightChangeActions The following example defines the $:/palette tiddler based on the dark / light mode setting. Palettes are tagged: <> -- The tag-pill dropdown can be used to see all possible palette tiddlers. -<$button actions=<> >Create <> tiddler +<$button actions=<> >Create <> tiddler ``` title: _/startup/light-dark/detection @@ -62,4 +61,4 @@ code-body: yes tags: $:/tags/DarkLightChangeActions ``` -
<$transclude $variable="startupLightDarkTemplate" $mode=block $output="text/plain" $type="text/plain" />
\ No newline at end of file +
<$transclude $variable="startupLightDarkActionTemplate" $mode=block $output="text/plain" $type="text/plain" />
\ No newline at end of file