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.
print-window-tiddler
Jermolene 2014-10-24 12:50:23 +01:00
rodzic 39e37d5776
commit a2672482c9
2 zmienionych plików z 28 dodań i 1 usunięć

Wyświetl plik

@ -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)$
&nbsp;
</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

Wyświetl plik

@ -0,0 +1,3 @@
title: $:/plugins/tiddlywiki/translators/editorView
translatableStringEditorWrapperAll