1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-23 10:07:19 +00:00

Move search result count logic out of translations

Also fixes a problem pointed out by @Evolena whereby the advanced
search counts hadn’t been adjusted to remove `$:/temp/advancedsearch`
from the search.
This commit is contained in:
Jermolene 2014-10-21 20:27:42 +01:00
parent 53d834c86b
commit ddc7495542
13 changed files with 52 additions and 34 deletions

View File

@ -2,14 +2,14 @@ title: $:/language/Search/
Filter/Caption: Filter
Filter/Hint: Search via a [[filter expression|http://tiddlywiki.com/static/Filters.html]]
Filter/Matches: //<small><$count filter={{$:/temp/advancedsearch}}/> matches</small>//
Matches: //<small><$count filter="[!is[system]search{$:/temp/search}]"/> matches</small>//
Filter/Matches: //<small><<resultCount>> matches</small>//
Matches: //<small><<resultCount>> matches</small>//
Shadows/Caption: Shadows
Shadows/Hint: Search for shadow tiddlers
Shadows/Matches: //<small><$count filter="[all[shadows]search{$:/temp/advancedsearch}]"/> matches</small>//
Shadows/Matches: //<small><<resultCount>> matches</small>//
Standard/Caption: Standard
Standard/Hint: Search for standard tiddlers
Standard/Matches: //<small><$count filter="[!is[system]search{$:/temp/advancedsearch}]"/> matches</small>//
Standard/Matches: //<small><<resultCount>> matches</small>//
System/Caption: System
System/Hint: Search for system tiddlers
System/Matches: //<small><$count filter="[is[system]search{$:/temp/advancedsearch}]"/> matches</small>//
System/Matches: //<small><<resultCount>> matches</small>//

View File

@ -21,8 +21,10 @@ caption: {{$:/language/Search/Filter/Caption}}
</$linkcatcher>
<$reveal state="$:/temp/advancedsearch" type="nomatch" text="">
<$set name="resultCount" value="""<$count filter={{$:/temp/advancedsearch}}/>""">
<div class="tc-search-results">
<<lingo Filter/Matches>>
<$list filter={{$:/temp/advancedsearch}} template="$:/core/ui/ListItemTemplate"/>
</div>
</$set>
</$reveal>

View File

@ -13,6 +13,8 @@ caption: {{$:/language/Search/Shadows/Caption}}
<$reveal state="$:/temp/advancedsearch" type="nomatch" text="">
<$set name="resultCount" value="""<$count filter="[all[shadows]search{$:/temp/advancedsearch}] -[[$:/temp/advancedsearch]]"/>""">
<div class="tc-search-results">
<<lingo Shadows/Matches>>
@ -21,6 +23,8 @@ caption: {{$:/language/Search/Shadows/Caption}}
</div>
</$set>
</$reveal>
<$reveal state="$:/temp/advancedsearch" type="match" text="">

View File

@ -13,6 +13,8 @@ caption: {{$:/language/Search/Standard/Caption}}
<$reveal state="$:/temp/advancedsearch" type="nomatch" text="">
<$set name="resultCount" value="""<$count filter="[!is[system]search{$:/temp/advancedsearch}] -[[$:/temp/advancedsearch]]"/>""">
<div class="tc-search-results">
<<lingo Standard/Matches>>
@ -21,6 +23,8 @@ caption: {{$:/language/Search/Standard/Caption}}
</div>
</$set>
</$reveal>
<$reveal state="$:/temp/advancedsearch" type="match" text="">

View File

@ -13,6 +13,8 @@ caption: {{$:/language/Search/System/Caption}}
<$reveal state="$:/temp/advancedsearch" type="nomatch" text="">
<$set name="resultCount" value="""<$count filter="[is[system]search{$:/temp/advancedsearch}] -[[$:/temp/advancedsearch]]"/>""">
<div class="tc-search-results">
<<lingo System/Matches>>
@ -21,6 +23,8 @@ caption: {{$:/language/Search/System/Caption}}
</div>
</$set>
</$reveal>
<$reveal state="$:/temp/advancedsearch" type="match" text="">

View File

@ -17,8 +17,12 @@ title: $:/core/ui/SideBarLists
<div class="tc-search-results">
<$set name="resultCount" value="""<$count filter="[!is[system]search{$:/temp/search}]"/>""">
{{$:/language/Search/Matches}}
</$set>
<$list filter="[!is[system]search{$:/temp/search}sort[title]limit[250]]" template="$:/core/ui/ListItemTemplate"/>
</div>

View File

@ -2,14 +2,14 @@ title: $:/language/Search/
Filter/Caption: Filter
Filter/Hint: Suche mit [["filter expression"|http://tiddlywiki.com/static/Filters.html]].
Filter/Matches: //<small><$count filter="[!is[system]search{$:/temp/search}]"/> Treffer</small>//
Matches: //<small><$count filter="[!is[system]search{$:/temp/search}]"/> Treffer</small>//
Filter/Matches: //<small><<resultCount>> Treffer</small>//
Matches: //<small><<resultCount>> Treffer</small>//
Shadows/Caption: Schatten
Shadows/Hint: Suche in Schatten-Tiddlern.
Shadows/Matches: //<small><$count filter="[all[shadows]search{$:/temp/advancedsearch}]"/> Treffer</small>//
Shadows/Matches: //<small><<resultCount>> Treffer</small>//
Standard/Caption: Standard
Standard/Hint: Suche in Standard-Tiddlern.
Standard/Matches: //<small><$count filter="[!is[system]search{$:/temp/advancedsearch}]"/> matches</small>//
Standard/Matches: //<small><<resultCount>> matches</small>//
System/Caption: System
System/Hint: Suche in System-Tiddlern.
System/Matches: //<small><$count filter="[is[system]search{$:/temp/advancedsearch}]"/> matches</small>//
System/Matches: //<small><<resultCount>> matches</small>//

View File

@ -2,15 +2,15 @@ title: $:/language/Search/
Filter/Caption: Filtres
Filter/Hint: Recherche via une combinaison de [[filtres|http://tiddlywiki.com/static/Filters.html]]
Filter/Matches: //<small><$count filter={{$:/temp/advancedsearch}}/> correspondances</small>//
Matches: //<small><$count filter="[!is[system]search{$:/temp/search}]"/> correspondances</small>//
Filter/Matches: //<small><<resultCount>> correspondances</small>//
Matches: //<small><<resultCount>> correspondances</small>//
Shadows/Caption: Shadows
Shadows/Hint: Recherche parmi les tiddlers //shadow//
Shadows/Matches: //<small><$count filter="[all[shadows]search{$:/temp/advancedsearch}]"/> correspondances</small>//
Shadows/Matches: //<small><<resultCount>> correspondances</small>//
Standard/Caption: Standard
Standard/Hint: Recherche parmi les tiddlers standard
Standard/Matches: //<small><$count filter="[!is[system]search{$:/temp/advancedsearch}]"/> correspondances</small>//
Standard/Matches: //<small><<resultCount>> correspondances</small>//
System/Caption: Système
System/Hint: Recherche parmi les tiddlers //système//
System/Matches: //<small><$count filter="[is[system]search{$:/temp/advancedsearch}]"/> correspondances</small>//
System/Matches: //<small><<resultCount>> correspondances</small>//

View File

@ -1,9 +1,9 @@
title: $:/language/Search/
Advanced/Matches: //<small><$count filter={{$:/temp/advancedsearch}}/> Corrispondenze</small>//
Advanced/Matches: //<small><<resultCount>> Corrispondenze</small>//
Filter/Caption: Filtro
Filter/Hint: Cerca attraverso un [[filtro|http://tiddlywiki.com/static/Filters.html]]
Matches: //<small><$count filter="[!is[system]search{$:/temp/search}]"/> Corrispondenze</small>//
Matches: //<small><<resultCount>> Corrispondenze</small>//
Shadows/Caption: Nascosti
Shadows/Hint: Cerca frammenti nascosti
System/Caption: Sistema

View File

@ -1,9 +1,9 @@
title: $:/language/Search/
Advanced/Matches: //<small><$count filter={{$:/temp/advancedsearch}}/> 件の一致</small>//
Advanced/Matches: //<small><<resultCount>> 件の一致</small>//
Filter/Caption: フィルター
Filter/Hint: [[フィルタの書式|http://tiddlywiki.com/static/Filters.html]] を参照
Matches: //<small><$count filter="[!is[system]search{$:/temp/search}]"/> 件の一致</small>//
Matches: //<small><<resultCount>> 件の一致</small>//
Shadows/Caption: 隠し
Shadows/Hint: 隠し tiddler を検索
System/Caption: システム

View File

@ -2,14 +2,14 @@ title: $:/language/Search/
Filter/Caption: Фильтр
Filter/Hint: Поиск с помощью [[фильтров|http://tiddlywiki.com/static/Filters.html]]
Filter/Matches: //<small><$count filter={{$:/temp/advancedsearch}}/> совпадений</small>//
Matches: //<small><$count filter="[!is[system]search{$:/temp/search}]"/> совпадений</small>//
Filter/Matches: //<small><<resultCount>> совпадений</small>//
Matches: //<small><<resultCount>> совпадений</small>//
Shadows/Caption: Встроенные
Shadows/Hint: Поиск встроенных заметок
Shadows/Matches: //<small><$count filter="[all[shadows]search{$:/temp/advancedsearch}]"/> совпадений</small>//
Shadows/Matches: //<small><<resultCount>> совпадений</small>//
Standard/Caption: Обычные
Standard/Hint: Поиск обычных заметок
Standard/Matches: //<small><$count filter="[!is[system]search{$:/temp/advancedsearch}]"/> совпадений</small>//
Standard/Matches: //<small><<resultCount>> совпадений</small>//
System/Caption: Системные
System/Hint: Поиск системных заметок
System/Matches: //<small><$count filter="[is[system]search{$:/temp/advancedsearch}]"/> совпадений</small>//
System/Matches: //<small><<resultCount>> совпадений</small>//

View File

@ -2,14 +2,14 @@ title: $:/language/Search/
Filter/Caption: 筛选
Filter/Hint: 以[[筛选表达式|http://tiddlywiki.com/static/Filters.html]]查找
Filter/Matches: //<small><$count filter={{$:/temp/advancedsearch}}/> 个条目符合条件</small>//
Matches: //<small><$count filter="[!is[system]search{$:/temp/search}]"/> 个条目符合条件</small>//
Filter/Matches: //<small><<resultCount>> 个条目符合条件</small>//
Matches: //<small><<resultCount>> 个条目符合条件</small>//
Shadows/Caption: 默认
Shadows/Hint: 查找默认条目
Shadows/Matches: //<small><$count filter="[all[shadows]search{$:/temp/advancedsearch}]"/> 个条目符合条件</small>//
Shadows/Matches: //<small><<resultCount>> 个条目符合条件</small>//
Standard/Caption: 标准
Standard/Hint: 查找一般条目
Standard/Matches: //<small><$count filter="[!is[system]search{$:/temp/advancedsearch}]"/> 个条目符合条件</small>//
Standard/Matches: //<small><<resultCount>> 个条目符合条件</small>//
System/Caption: 系统
System/Hint: 查找系统条目
System/Matches: //<small><$count filter="[is[system]search{$:/temp/advancedsearch}]"/> 个条目符合条件</small>//
System/Matches: //<small><<resultCount>> 个条目符合条件</small>//

View File

@ -2,14 +2,14 @@ title: $:/language/Search/
Filter/Caption: 篩選
Filter/Hint: 以[[篩選表達式|http://tiddlywiki.com/static/Filters.html]]搜尋
Filter/Matches: //<small><$count filter={{$:/temp/advancedsearch}}/> 個條目符合條件</small>//
Matches: //<small><$count filter="[!is[system]search{$:/temp/search}]"/> 個條目符合條件</small>//
Filter/Matches: //<small><<resultCount>> 個條目符合條件</small>//
Matches: //<small><<resultCount>> 個條目符合條件</small>//
Shadows/Caption: 預設
Shadows/Hint: 尋找預設條目
Shadows/Matches: //<small><$count filter="[all[shadows]search{$:/temp/advancedsearch}]"/> 個條目符合條件</small>//
Shadows/Matches: //<small><<resultCount>> 個條目符合條件</small>//
Standard/Caption: 標準
Standard/Hint: 尋找一般條目
Standard/Matches: //<small><$count filter="[!is[system]search{$:/temp/advancedsearch}]"/> 個條目符合條件</small>//
Standard/Matches: //<small><<resultCount>> 個條目符合條件</small>//
System/Caption: 系統
System/Hint: 尋找系統條目
System/Matches: //<small><$count filter="[is[system]search{$:/temp/advancedsearch}]"/> 個條目符合條件</small>//
System/Matches: //<small><<resultCount>> 個條目符合條件</small>//