title: $:/plugins/tiddlywiki/translators/macros/translatableStringEditor
tags: $:/tags/Macro
\define translatableStringEditorInner(tiddlerTitle)
<$link><$list filter=<>><$text text=<>/>$list>$link>
|
<$list filter="""$(editFieldsFilter)$""" variable="editorField">
<$edit-text tag="$(editorTagName)$" field=<> type="text" class="tc-edit-texteditor" minHeight="10px"/>
$list>
<$reveal state="$:/state/showEnglishText" type=match text="show" tag="p">
Default text:
<$view tiddler="$:/core" subtiddler=<> field=<>/>
$reveal>
|
<$button class="tc-btn-invisible" popup=< >>
{{$:/core/images/down-arrow}}
$button>
<$reveal state=<> type="popup" position="belowleft" positionAllowNegative="yes" text="" default="">
Original en-GB text:
<$list filter="""$(editFieldsFilter)$""" variable="editorField">
$list>
<$button message="tm-delete-tiddler" param=<>>
Delete translation
$button>
$reveal>
|
\end
\define translatableStringEditorWrapperAll(tiddlerTitle)
<>
\end
\define translatableStringEditorWrapperTranslated(tiddlerTitle)
<$list filter="[all[current]is[tiddler]]">
<>
$list>
\end
\define translatableStringEditorWrapperNotTranslated(tiddlerTitle)
<$list filter="[all[current]!is[tiddler]]">
<>
$list>
\end
\define translatableStringEditorOuter()
//<$count filter=<
>/> translatable tiddlers in this group//
<$checkbox tiddler="$:/state/showEnglishText" field="text" checked="show" unchecked="hide" default="hide"> Show the default text below editor field$checkbox>
<$radio tiddler="$:/plugins/tiddlywiki/translators/editorTag" value="textarea"> Multi-line editors$radio>
<$radio tiddler="$:/plugins/tiddlywiki/translators/editorTag" value="input"> Single-line editors$radio>
<$select tiddler="$:/plugins/tiddlywiki/translators/editorView">
$select>
Title
|
Fields: $(editFieldsFilter)$
|
|
<$set name="editorView" value={{$:/plugins/tiddlywiki/translators/editorView}}>
<$list filter=<>>
<$macrocall $name=<> tiddlerTitle=<>/>
$list>
$set>
\end
\define translatableStringEditor(editorTag:"input",editorFields:"text")
<$set name="editorTagName" value={{$:/plugins/tiddlywiki/translators/editorTag}}>
<$set name="editFieldsFilter" value="""$editorFields$""">
<>
$set>
$set>
\end