From 98cd4a09b4edd5e73107573e6cf075a4bb7a1cba Mon Sep 17 00:00:00 2001 From: Leilei332 Date: Tue, 27 Aug 2024 16:26:42 +0800 Subject: [PATCH 1/5] Make the default title created by excision translatable (#8500) * Make the default title created by excision translatable * Use $tw.language.getString to get language string --- core/language/en-GB/Buttons.multids | 1 + core/modules/editor/operations/text/excise.js | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/core/language/en-GB/Buttons.multids b/core/language/en-GB/Buttons.multids index 30f89eec7..2fa732fd9 100644 --- a/core/language/en-GB/Buttons.multids +++ b/core/language/en-GB/Buttons.multids @@ -133,6 +133,7 @@ Excise/Caption/Replace/Link: link Excise/Caption/Replace/Transclusion: transclusion Excise/Caption/Tag: Tag new tiddler with the title of this tiddler Excise/Caption/TiddlerExists: Warning: tiddler already exists +Excise/DefaultTitle: New Excision Excise/Hint: Excise the selected text into a new tiddler Heading1/Caption: heading 1 Heading1/Hint: Apply heading level 1 formatting to lines containing selection diff --git a/core/modules/editor/operations/text/excise.js b/core/modules/editor/operations/text/excise.js index ced771719..8cb3a8486 100644 --- a/core/modules/editor/operations/text/excise.js +++ b/core/modules/editor/operations/text/excise.js @@ -14,11 +14,12 @@ Text editor operation to excise the selection to a new tiddler exports["excise"] = function(event,operation) { var editTiddler = this.wiki.getTiddler(this.editTitle), - editTiddlerTitle = this.editTitle; + editTiddlerTitle = this.editTitle, + excisionBaseTitle = $tw.language.getString("Buttons/Excise/DefaultTitle"); if(editTiddler && editTiddler.fields["draft.of"]) { editTiddlerTitle = editTiddler.fields["draft.of"]; } - var excisionTitle = event.paramObject.title || this.wiki.generateNewTitle("New Excision"); + var excisionTitle = event.paramObject.title || this.wiki.generateNewTitle(excisionBaseTitle); this.wiki.addTiddler(new $tw.Tiddler( this.wiki.getCreationFields(), this.wiki.getModificationFields(), From fb9459a0ddf19e81e3ca76bf0d135b8f998d9033 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Tue, 27 Aug 2024 15:42:13 +0100 Subject: [PATCH 2/5] Fix since-version docs macro to make extra information optional --- editions/dev/tiddlers/system/version-macros.tid | 4 ++-- .../$__editions_tw5.com_version-macros.tid | 2 +- .../tw5.com/tiddlers/system/version-macros.tid | 14 ++++++++------ 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/editions/dev/tiddlers/system/version-macros.tid b/editions/dev/tiddlers/system/version-macros.tid index 0fb7dcf12..205ac37a3 100644 --- a/editions/dev/tiddlers/system/version-macros.tid +++ b/editions/dev/tiddlers/system/version-macros.tid @@ -9,6 +9,6 @@ type: text/vnd.tiddlywiki <$link to={{{ [<__version__>addprefix[Release ]] }}} class="doc-from-version">{{$:/core/images/warning}} New in: <$text text=<<__version__>>/> \end -\define .deprecated-since(version, superseded:"TODO-Link") -<$link to="Deprecated - What does it mean" class="doc-deprecated-version tc-btn-invisible">{{$:/core/images/warning}} Deprecated since: <$text text=<<__version__>>/> (see <$link to=<<__superseded__>>><$text text=<<__superseded__>>/>) +\define .deprecated-since(version, superseded:"") +<$link to="Deprecated - What does it mean" class="doc-deprecated-version tc-btn-invisible">{{$:/core/images/warning}} Deprecated from v<$text text=<<__version__>>/> <%if [<__superseded__>else[]!match[]] %>(see <$link to=<<__superseded__>>><$text text=<<__superseded__>>/>)<%endif%> \end diff --git a/editions/fr-FR/tiddlers/$__editions_tw5.com_version-macros.tid b/editions/fr-FR/tiddlers/$__editions_tw5.com_version-macros.tid index 873ad42ed..dd36a0979 100644 --- a/editions/fr-FR/tiddlers/$__editions_tw5.com_version-macros.tid +++ b/editions/fr-FR/tiddlers/$__editions_tw5.com_version-macros.tid @@ -9,7 +9,7 @@ type: text/vnd.tiddlywiki \end \define .deprecated-since(version, superseded:"TODO-Link") -<$button to="Deprecated - What does it mean" class="doc-deprecated-version tc-btn-invisible">{{$:/core/images/warning}} Obsolète depuis<<:>> $version$ . Utilisez [[$superseded$]] à la place +<$button to="Deprecated - What does it mean" class="doc-deprecated-version tc-btn-invisible">{{$:/core/images/warning}} Obsolète depuis<<:>> $version$ . <%if [<__superseded__>else[]!match[]] %>Utilisez [[$superseded$]] à la place<%endif%> \end
<$view field="text"/>
\ No newline at end of file diff --git a/editions/tw5.com/tiddlers/system/version-macros.tid b/editions/tw5.com/tiddlers/system/version-macros.tid index 55ef03687..c03f4237c 100644 --- a/editions/tw5.com/tiddlers/system/version-macros.tid +++ b/editions/tw5.com/tiddlers/system/version-macros.tid @@ -26,13 +26,15 @@ type: text/vnd.tiddlywiki <% endif %> \end -\procedure .deprecated-since(version, superseded:"TODO-Link") +\procedure .deprecated-since(version, superseded:"") <$link to="Deprecated - What does it mean" class="doc-deprecated-version tc-btn-invisible"> {{$:/core/images/warning}} - Deprecated since: - <$text text=<>/> + Deprecated from + v<$text text=<>/> - - (see <$link class="tc-tiny-gap-left" to=<>><$text text=<>/>) - +<%if [else[]!match[]] %> + + (see <$link class="tc-tiny-gap-left" to=<>><$text text=<>/>) + +<%endif%> \end From d3cea5d7308666639d7c8dcfb3ebcea990411fa8 Mon Sep 17 00:00:00 2001 From: Leilei332 Date: Tue, 27 Aug 2024 23:41:47 +0800 Subject: [PATCH 3/5] Further fix search outline (#8552) * Fix outline color not showing properly for dark palettes A further fix after #7317 * Tweak outline style for firefox --- themes/tiddlywiki/vanilla/base.tid | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/themes/tiddlywiki/vanilla/base.tid b/themes/tiddlywiki/vanilla/base.tid index a32a9d9e5..ff64ea23e 100644 --- a/themes/tiddlywiki/vanilla/base.tid +++ b/themes/tiddlywiki/vanilla/base.tid @@ -75,12 +75,16 @@ input[type="search"] { outline-offset: initial; } -button, textarea, input, select { - outline-color: <>; +button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { + outline: 2px solid <>; + outline-offset: -2px; + border-radius: 0.25em; } -:-moz-focusring { +button:-moz-focusring, input:-moz-focusring, textarea:-moz-focusring, select:-moz-focusring { outline: 2px solid <>; + outline-offset: -2px; + border-radius: 0.25em; } /* From c9f816fb5327ffc9e5118cb77ec2c0c0b1383277 Mon Sep 17 00:00:00 2001 From: Bram Chen Date: Wed, 28 Aug 2024 15:39:36 +0800 Subject: [PATCH 4/5] Update chinese language files (#8495) * Update chinese language files * Add chinese translations of control panel UI for social media cards * Update chinese language files * Add chinese translations for Excise/DefaultTitle * Update chinese language files * Improve Simplified Chinese translation for SocialCard/Hint --- languages/zh-Hans/Buttons.multids | 1 + languages/zh-Hans/ControlPanel.multids | 6 ++++++ languages/zh-Hant/Buttons.multids | 1 + languages/zh-Hant/ControlPanel.multids | 6 ++++++ 4 files changed, 14 insertions(+) diff --git a/languages/zh-Hans/Buttons.multids b/languages/zh-Hans/Buttons.multids index 87be34a82..ad7e4ad3b 100644 --- a/languages/zh-Hans/Buttons.multids +++ b/languages/zh-Hans/Buttons.multids @@ -133,6 +133,7 @@ Excise/Caption/Replace/Link: 链接 Excise/Caption/Replace/Transclusion: 嵌入 Excise/Caption/Tag: 将新条目的标签设为此条目的名称 Excise/Caption/TiddlerExists: 提醒:条目已经存在 +Excise/DefaultTitle: 新的剪切 Excise/Hint: 剪切所选文本到一个新条目 Heading1/Caption: 标题 1 Heading1/Hint: 套用标题级别 1 的格式于包含所选文本的列 diff --git a/languages/zh-Hans/ControlPanel.multids b/languages/zh-Hans/ControlPanel.multids index 33bc5e9ce..53d244b3f 100644 --- a/languages/zh-Hans/ControlPanel.multids +++ b/languages/zh-Hans/ControlPanel.multids @@ -199,6 +199,12 @@ Settings/TitleLinks/Caption: 条目标题 Settings/TitleLinks/Hint: 可选地显示条目标题为链接 Settings/TitleLinks/No/Description: 不显示条目标题为链接 Settings/TitleLinks/Yes/Description: 显示条目标题为链接 +SocialCard/Caption: 社交媒体卡 +SocialCard/Domain/Prompt: 显示链接的网域名称(例如 ''tiddlywiki.com'') +SocialCard/Hint: 社交和消息服务使用此信息来显示在线托管时指向此 TiddlyWiki 的链接的预览卡 +SocialCard/PreviewUrl/Prompt: 用于预览此 TiddlyWiki 图像的完整网址 +SocialCard/PreviewUrl/Preview: 预览图像: +SocialCard/Url/Prompt: 此 TiddlyWiki 的完整网址 StoryTiddler/Caption: 故事条目 StoryTiddler/Hint: 此规则级联用于动态选择模板,以便在故事河中显示条目。 StoryView/Caption: 视图模式 diff --git a/languages/zh-Hant/Buttons.multids b/languages/zh-Hant/Buttons.multids index c17974998..1a4c69de1 100644 --- a/languages/zh-Hant/Buttons.multids +++ b/languages/zh-Hant/Buttons.multids @@ -133,6 +133,7 @@ Excise/Caption/Replace/Link: 鏈接 Excise/Caption/Replace/Transclusion: 嵌入 Excise/Caption/Tag: 將新條目的標籤設為此條目的名稱 Excise/Caption/TiddlerExists: 警示:條目已經存在 +Excise/DefaultTitle: 新的剪切 Excise/Hint: 剪切所選文字到一個新條目 Heading1/Caption: 標題 1 Heading1/Hint: 套用標題級別 1 的格式於包含所選文字的列 diff --git a/languages/zh-Hant/ControlPanel.multids b/languages/zh-Hant/ControlPanel.multids index 853ca98d5..37e4a9e81 100644 --- a/languages/zh-Hant/ControlPanel.multids +++ b/languages/zh-Hant/ControlPanel.multids @@ -199,6 +199,12 @@ Settings/TitleLinks/Caption: 條目標題 Settings/TitleLinks/Hint: 可選地顯示條目標題為鏈接 Settings/TitleLinks/No/Description: 不顯示條目標題為鏈接 Settings/TitleLinks/Yes/Description: 顯示條目標題為鏈接 +SocialCard/Caption: 社交媒體卡 +SocialCard/Domain/Prompt: 顯示連結的網域名稱(例如 ''tiddlywiki.com'') +SocialCard/Hint: 社交和訊息服務使用此資訊來顯示線上託管時指向此 TiddlyWiki 的連結的預覽卡 +SocialCard/PreviewUrl/Prompt: 用於預覽此 TiddlyWiki 圖像的完整網址 +SocialCard/PreviewUrl/Preview: 預覽圖像: +SocialCard/Url/Prompt: 此 TiddlyWiki 的完整網址 StoryTiddler/Caption: 故事條目 StoryTiddler/Hint: 此規則級聯用於動態選擇範本,以便在故事河中顯示條目。 StoryView/Caption: 檢視模式 From 6b13614a6a9237d876a326f58357b25f0319554b Mon Sep 17 00:00:00 2001 From: Leilei332 Date: Wed, 28 Aug 2024 22:24:56 +0800 Subject: [PATCH 5/5] Fix duplicated search result in advanced search (#8485) * Fix multiple search result in advanced search * Use $list-empty widget --- core/ui/AdvancedSearch/Standard.tid | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/ui/AdvancedSearch/Standard.tid b/core/ui/AdvancedSearch/Standard.tid index 424d7917f..c0a2ebe3d 100644 --- a/core/ui/AdvancedSearch/Standard.tid +++ b/core/ui/AdvancedSearch/Standard.tid @@ -58,15 +58,15 @@ caption: {{$:/language/Search/Standard/Caption}} configTiddler={{{ [[$:/state/advancedsearch/standard/currentTab]!is[missing]get[text]] ~[{$:/config/SearchResults/Default}] }}} searchListState="$:/temp/advancedsearch/selected-item"> <$list filter="[all[shadows+tiddlers]tag[$:/tags/SearchResults]!has[draft.of]butfirst[]limit[1]]"> +<$list-empty> +<$list filter='[all[shadows+tiddlers]tag[$:/tags/SearchResults]!has[draft.of]]'><$transclude mode="block"/> + <$macrocall $name="tabs" tabsList="[all[shadows+tiddlers]tag[$:/tags/SearchResults]!has[draft.of]]" default={{$:/config/SearchResults/Default}} actions="<$action-setfield $tiddler='$:/state/advancedsearch/standard/currentTab' text=<>/>" explicitState="$:/state/tab/search-results/advancedsearch" /> -<$list filter="[all[shadows+tiddlers]tag[$:/tags/SearchResults]!has[draft.of]butfirst[]limit[1]] :else[[]]"> -<$list filter="[all[shadows+tiddlers]tag[$:/tags/SearchResults]!has[draft.of]]"><$transclude mode="block"/> -