mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-12-28 02:50:27 +00:00
Add dropdown for filtering translatable strings
The user can now choose between showing all strings, just those that haven’t been translated, or just those that have been translated.
This commit is contained in:
parent
39e37d5776
commit
a2672482c9
@ -39,6 +39,22 @@ Delete translation
|
||||
</tr>
|
||||
\end
|
||||
|
||||
\define translatableStringEditorWrapperAll(tiddlerTitle)
|
||||
<<translatableStringEditorInner "$tiddlerTitle$">>
|
||||
\end
|
||||
|
||||
\define translatableStringEditorWrapperTranslated(tiddlerTitle)
|
||||
<$list filter="[all[current]is[tiddler]]">
|
||||
<<translatableStringEditorInner "$tiddlerTitle$">>
|
||||
</$list>
|
||||
\end
|
||||
|
||||
\define translatableStringEditorWrapperNotTranslated(tiddlerTitle)
|
||||
<$list filter="[all[current]!is[tiddler]]">
|
||||
<<translatableStringEditorInner "$tiddlerTitle$">>
|
||||
</$list>
|
||||
\end
|
||||
|
||||
\define translatableStringEditorOuter()
|
||||
<div class="tc-translators-string-table">
|
||||
|
||||
@ -47,6 +63,12 @@ Delete translation
|
||||
<$radio tiddler="$:/plugins/tiddlywiki/translators/editorTag" value="textarea"> Multi-line editors</$radio><br>
|
||||
<$radio tiddler="$:/plugins/tiddlywiki/translators/editorTag" value="input"> Single-line editors</$radio>
|
||||
|
||||
<$select tiddler="$:/plugins/tiddlywiki/translators/editorView">
|
||||
<option value="translatableStringEditorWrapperAll">Show all strings</option>
|
||||
<option value="translatableStringEditorWrapperTranslated">Only show translated strings</option>
|
||||
<option value="translatableStringEditorWrapperNotTranslated">Only show strings that have not been translated</option>
|
||||
</$select>
|
||||
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
@ -60,9 +82,11 @@ Fields: $(editFieldsFilter)$
|
||||
|
||||
</th>
|
||||
</tr>
|
||||
<$set name="editorView" value={{$:/plugins/tiddlywiki/translators/editorView}}>
|
||||
<$list filter=<<translatableTiddlerTitles>>>
|
||||
<$macrocall $name="translatableStringEditorInner" tiddlerTitle=<<currentTiddler>>/>
|
||||
<$macrocall $name=<<editorView>> tiddlerTitle=<<currentTiddler>>/>
|
||||
</$list>
|
||||
</$set>
|
||||
</tbody>
|
||||
</table>
|
||||
\end
|
||||
|
3
plugins/tiddlywiki/translators/ui/editorView.tid
Normal file
3
plugins/tiddlywiki/translators/ui/editorView.tid
Normal file
@ -0,0 +1,3 @@
|
||||
title: $:/plugins/tiddlywiki/translators/editorView
|
||||
|
||||
translatableStringEditorWrapperAll
|
Loading…
Reference in New Issue
Block a user