From a2672482c976fb08a402ac830d22926e49e0f542 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Fri, 24 Oct 2014 12:50:23 +0100 Subject: [PATCH] Add dropdown for filtering translatable strings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The user can now choose between showing all strings, just those that haven’t been translated, or just those that have been translated. --- .../macros/translatableStringEditor.tid | 26 ++++++++++++++++++- .../tiddlywiki/translators/ui/editorView.tid | 3 +++ 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 plugins/tiddlywiki/translators/ui/editorView.tid diff --git a/plugins/tiddlywiki/translators/macros/translatableStringEditor.tid b/plugins/tiddlywiki/translators/macros/translatableStringEditor.tid index 46c7e86af..4907e849b 100644 --- a/plugins/tiddlywiki/translators/macros/translatableStringEditor.tid +++ b/plugins/tiddlywiki/translators/macros/translatableStringEditor.tid @@ -39,6 +39,22 @@ Delete translation \end +\define translatableStringEditorWrapperAll(tiddlerTitle) +<> +\end + +\define translatableStringEditorWrapperTranslated(tiddlerTitle) +<$list filter="[all[current]is[tiddler]]"> +<> + +\end + +\define translatableStringEditorWrapperNotTranslated(tiddlerTitle) +<$list filter="[all[current]!is[tiddler]]"> +<> + +\end + \define translatableStringEditorOuter()
@@ -47,6 +63,12 @@ Delete translation <$radio tiddler="$:/plugins/tiddlywiki/translators/editorTag" value="textarea"> Multi-line editors
<$radio tiddler="$:/plugins/tiddlywiki/translators/editorTag" value="input"> Single-line editors +<$select tiddler="$:/plugins/tiddlywiki/translators/editorView"> + + + + + @@ -60,9 +82,11 @@ Fields: $(editFieldsFilter)$   +<$set name="editorView" value={{$:/plugins/tiddlywiki/translators/editorView}}> <$list filter=<>> -<$macrocall $name="translatableStringEditorInner" tiddlerTitle=<>/> +<$macrocall $name=<> tiddlerTitle=<>/> +
\end diff --git a/plugins/tiddlywiki/translators/ui/editorView.tid b/plugins/tiddlywiki/translators/ui/editorView.tid new file mode 100644 index 000000000..5afd0d49b --- /dev/null +++ b/plugins/tiddlywiki/translators/ui/editorView.tid @@ -0,0 +1,3 @@ +title: $:/plugins/tiddlywiki/translators/editorView + +translatableStringEditorWrapperAll \ No newline at end of file