Improvements to translators edition

More improvements for #984
This commit is contained in:
Jermolene
2014-10-24 11:18:37 +01:00
parent 485ffae366
commit 39e37d5776
26 changed files with 401 additions and 41 deletions

View File

@@ -16,4 +16,6 @@ Number of tiddlers translated so far: <$count filter=<<allTheTranslatedTiddlerTi
Number of tiddlers not yet translated: <$count filter=<<allTheNotTranslatedTiddlerTitles>>/>
{{$:/core/ui/PageTemplate/pagecontrols}}
<<tabs "[all[tiddlers+shadows]tag[$:/tags/TranslationGroup]sort[caption]]" "$:/plugins/tiddlywiki/translators/ui/group/Miscellaneous" "$:/state/translatorsTab" "tc-vertical">>

View File

@@ -1,29 +1,76 @@
title: $:/plugins/tiddlywiki/translators/macros/translatableStringEditor
tags: $:/tags/Macro
\define translatableStringEditor(editorTag:"input")
\define translatableStringEditorInner(tiddlerTitle)
<tr>
<td width="1px">
<$link><$list filter=<<shortenTitle>>><$text text=<<currentTiddler>>/></$list></$link>
</td>
<td width="100%">
<$list filter="""$(editFieldsFilter)$""" variable="editorField">
<$edit-text tag="$(editorTagName)$" field=<<editorField>> type="text" class="tc-edit-texteditor"/>
</$list>
</td>
<td width="1px">
<div class="tc-drop-down-wrapper">
<$button class="tc-btn-invisible" popup=<<qualify "$:/state/popup/translationInfo/$tiddlerTitle$">>>
{{$:/core/images/down-arrow}}
</$button>
<$reveal state=<<qualify "$:/state/popup/translationInfo/$tiddlerTitle$">> type="popup" position="belowleft" text="" default="">
<div class="tc-drop-down">
<p>
Original en-GB text:
</p>
<$list filter="""$(editFieldsFilter)$""" variable="editorField">
<p>
<textarea class="tc-edit-texteditor" readonly><$view tiddler="$:/core" subtiddler=<<currentTiddler>> field=<<editorField>>/>
</textarea>
</p>
</$list>
<p>
<$button message="tm-delete-tiddler" param=<<currentTiddler>>>
Delete translation
</$button>
</p>
</div>
</$reveal>
</div>
</td>
</tr>
\end
\define translatableStringEditorOuter()
<div class="tc-translators-string-table">
<$count filter=<<translatableTiddlerTitles>>/> translatable tiddlers in this group
//<$count filter=<<translatableTiddlerTitles>>/> translatable tiddlers in this group//
<$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>
<table>
<tbody>
<tr>
<th>
Title
</th>
<th>
Fields: $(editFieldsFilter)$
</th>
<th>
&nbsp;
</th>
</tr>
<$list filter=<<translatableTiddlerTitles>>>
<div>
<hr>
Title: <$link><$text text=<<currentTiddler>>/></$link>
<$edit-text tag="$editorTag$" type="text" class="tc-edit-texteditor"/>
Core en-GB text:
<textarea class="tc-edit-texteditor" readonly>
<$view tiddler="$:/core" subtiddler=<<currentTiddler>>/>
</textarea>
</div>
<$macrocall $name="translatableStringEditorInner" tiddlerTitle=<<currentTiddler>>/>
</$list>
</div>
</tbody>
</table>
\end
\define translatableStringEditor(editorTag:"input",editorFields:"text")
<$set name="editorTagName" value={{$:/plugins/tiddlywiki/translators/editorTag}}>
<$set name="editFieldsFilter" value="""$editorFields$""">
<<translatableStringEditorOuter>>
</$set>
</$set>
\end

View File

@@ -0,0 +1,105 @@
title: $:/plugins/tiddlywiki/translators/palette
name: Translators Colour Palette
description: A palette for the translators edition
tags: $:/tags/Palette
type: application/x-tiddler-dictionary
alert-background: #ffe476
alert-border: #b99e2f
alert-highlight: #881122
alert-muted-foreground: #b99e2f
background: #ffffff
blockquote-bar: <<colour muted-foreground>>
code-background: #f7f7f9
code-border: #e1e1e8
code-foreground: #dd1144
dirty-indicator: #ff0000
download-background: #34c734
download-foreground: <<colour background>>
dragger-background: <<colour foreground>>
dragger-foreground: <<colour background>>
dropdown-background: <<colour background>>
dropdown-border: <<colour muted-foreground>>
dropdown-tab-background-selected: #fff
dropdown-tab-background: #ececec
dropzone-background: rgba(0,200,0,0.7)
external-link-background-hover: inherit
external-link-background-visited: inherit
external-link-background: inherit
external-link-foreground-hover: inherit
external-link-foreground-visited: #0000aa
external-link-foreground: #0000ee
foreground: #333333
message-background: #ecf2ff
message-border: #cfd6e6
message-foreground: #547599
modal-backdrop: <<colour foreground>>
modal-background: <<colour background>>
modal-border: #999999
modal-footer-background: #f5f5f5
modal-footer-border: #dddddd
modal-header-border: #eeeeee
muted-foreground: #bbb
notification-background: #ffffdd
notification-border: #999999
page-background: #b9ceb8
pre-background: #f5f5f5
pre-border: #cccccc
primary: #5778d8
sidebar-button-foreground: <<colour foreground>>
sidebar-controls-foreground-hover: #000000
sidebar-controls-foreground: #aaaaaa
sidebar-foreground-shadow: rgba(255,255,255, 0.8)
sidebar-foreground: #acacac
sidebar-muted-foreground-hover: #444444
sidebar-muted-foreground: #c0c0c0
sidebar-tab-background-selected: #ececec
sidebar-tab-background: <<colour tab-background>>
sidebar-tab-border-selected: <<colour tab-border-selected>>
sidebar-tab-border: <<colour tab-border>>
sidebar-tab-divider: #e4e4e4
sidebar-tab-foreground-selected:
sidebar-tab-foreground: <<colour tab-foreground>>
sidebar-tiddler-link-foreground-hover: #444444
sidebar-tiddler-link-foreground: #999999
static-alert-foreground: #aaaaaa
tab-background-selected: #ffffff
tab-background: #d8d8d8
tab-border-selected: #d8d8d8
tab-border: #cccccc
tab-divider: #d8d8d8
tab-foreground-selected: <<colour tab-foreground>>
tab-foreground: #666666
table-border: #dddddd
table-footer-background: #a8a8a8
table-header-background: #f0f0f0
tag-background: #d5ad34
tag-foreground: #ffffff
tiddler-background: <<colour background>>
tiddler-border: <<colour background>>
tiddler-controls-foreground-hover: #888888
tiddler-controls-foreground-selected: #444444
tiddler-controls-foreground: #cccccc
tiddler-editor-background: #f8f8f8
tiddler-editor-border-image: #ffffff
tiddler-editor-border: #cccccc
tiddler-editor-fields-even: #e0e8e0
tiddler-editor-fields-odd: #f0f4f0
tiddler-info-background: #f8f8f8
tiddler-info-border: #dddddd
tiddler-info-tab-background: #f8f8f8
tiddler-link-background: <<colour background>>
tiddler-link-foreground: <<colour primary>>
tiddler-subtitle-foreground: #c0c0c0
tiddler-title-foreground: #182955
toolbar-new-button:
toolbar-options-button:
toolbar-save-button:
toolbar-info-button:
toolbar-edit-button:
toolbar-close-button:
toolbar-delete-button:
toolbar-cancel-button:
toolbar-done-button:
untagged-background: #999999
very-muted-foreground: #888888

View File

@@ -0,0 +1,15 @@
title: $:/plugins/tiddlywiki/translators/styles
tags: $:/tags/Stylesheet
.tc-translators-string-table table {
width: 100%;
}
.tc-translators-string-table .tc-btn-invisible {
width: 1em;
height: 2em;
}
.tc-translators-string-table .tc-drop-down {
min-width: 500px;
}

View File

@@ -0,0 +1,3 @@
title: $:/plugins/tiddlywiki/translators/editorTag
input

View File

@@ -5,7 +5,12 @@ tags: $:/tags/TranslationGroup
\define translatableTiddlerTitles()
[all[tiddlers+shadows]prefix[$:/language/Buttons/]]
\end
\define shortenTitle()
[all[current]removeprefix[$:/language/Buttons/]]
\end
Toolbar buttons.
! Buttons
Toolbar buttons. The ''/Caption'' tiddlers specify the text to be displayed on the button and the ''//Hint'' tiddlers specify the tooltip text.
<<translatableStringEditor>>

View File

@@ -5,6 +5,11 @@ tags: $:/tags/TranslationGroup
\define translatableTiddlerTitles()
[all[tiddlers+shadows]prefix[$:/language/ControlPanel/]]
\end
\define shortenTitle()
[all[current]removeprefix[$:/language/ControlPanel/]]
\end
! Control Panel
[[Control Panel|$:/ControlPanel]].

View File

@@ -6,7 +6,12 @@ tags: $:/tags/TranslationGroup
[all[tiddlers+shadows]prefix[$:/language/Date/]]
[all[tiddlers+shadows]prefix[$:/language/RelativeDate/]]
\end
\define shortenTitle()
[all[current]removeprefix[$:/language/Date/]] [all[current]removeprefix[$:/language/RelativeDate/]]
\end
Dates.
! Date
Absolute and relative dates.
<<translatableStringEditor>>

View File

@@ -1,11 +0,0 @@
title: $:/plugins/tiddlywiki/translators/ui/group/Docs
caption: Docs
tags: $:/tags/TranslationGroup
\define translatableTiddlerTitles()
[all[shadows+tiddlers]prefix[$:/language/Docs/]] GettingStarted
\end
Documentation tiddlers.
<<translatableStringEditor editorTag:"textarea">>

View File

@@ -5,7 +5,12 @@ tags: $:/tags/TranslationGroup
\define translatableTiddlerTitles()
[all[tiddlers+shadows]prefix[$:/language/EditTemplate/]]
\end
\define shortenTitle()
[all[current]removeprefix[$:/language/EditTemplate/]]
\end
Edit template.
! Edit Template
Strings used in the tiddler edit template.
<<translatableStringEditor>>

View File

@@ -0,0 +1,16 @@
title: $:/plugins/tiddlywiki/translators/ui/group/Docs/Fields
caption: Fields
tags: $:/tags/TranslationGroup
\define translatableTiddlerTitles()
[all[shadows+tiddlers]prefix[$:/language/Docs/Fields/]]
\end
\define shortenTitle()
[all[current]removeprefix[$:/language/Docs/Fields/]]
\end
! Fields
Descriptions of commonly used fields.
<<translatableStringEditor>>

View File

@@ -5,7 +5,12 @@ tags: $:/tags/TranslationGroup
\define translatableTiddlerTitles()
[all[tiddlers+shadows]prefix[$:/language/Filters/]]
\end
\define shortenTitle()
[all[current]removeprefix[$:/language/Filters/]]
\end
Filters.
! Filters
Translatable titles of the preconfigured filters available in [[advanced search|$:/AdvancedSearch]].
<<translatableStringEditor>>

View File

@@ -0,0 +1,16 @@
title: $:/plugins/tiddlywiki/translators/ui/group/GettingStarted
caption: Getting Started
tags: $:/tags/TranslationGroup
\define translatableTiddlerTitles()
GettingStarted
\end
\define shortenTitle()
[all[current]]
\end
! Getting Started
The GettingStarted tiddler that is displayed when an empty ~TiddlyWiki starts.
<<translatableStringEditor>>

View File

@@ -5,7 +5,12 @@ tags: $:/tags/TranslationGroup
\define translatableTiddlerTitles()
[all[tiddlers+shadows]prefix[$:/language/Help/]]
\end
\define shortenTitle()
[all[current]removeprefix[$:/language/Help/]]
\end
Help.
! Help
<<translatableStringEditor editorTag:"textarea">>
Help text for the ~TiddlyWiki commands available under Node.js.
<<translatableStringEditor editorFields:"text description">>

View File

@@ -5,6 +5,11 @@ tags: $:/tags/TranslationGroup
\define translatableTiddlerTitles()
[all[tiddlers+shadows]prefix[$:/language/Import/]]
\end
\define shortenTitle()
[all[current]removeprefix[$:/language/Import/]]
\end
! Import
Import mechanism.

View File

@@ -21,6 +21,11 @@ tags: $:/tags/TranslationGroup
[[$:/SiteSubtitle]]
+[sort[title]]
\end
\define shortenTitle()
[all[current]removeprefix[$:/language/]] [all[current]removeprefix[$:/config/]] [all[current]!prefix[$:/language/]!prefix[$:/config/]]
\end
! Miscellaneous
Miscellaneous translatable strings.

View File

@@ -0,0 +1,16 @@
title: $:/plugins/tiddlywiki/translators/ui/group/Docs/ModuleTypes
caption: Module Types
tags: $:/tags/TranslationGroup
\define translatableTiddlerTitles()
[all[shadows+tiddlers]prefix[$:/language/Docs/ModuleTypes/]]
\end
\define shortenTitle()
[all[current]removeprefix[$:/language/Docs/ModuleTypes/]]
\end
! Module Types
Module types. This is technical information that is probably not required in most translations.
<<translatableStringEditor>>

View File

@@ -0,0 +1,16 @@
title: $:/plugins/tiddlywiki/translators/ui/group/Docs/PaletteColours
caption: Palette Colours
tags: $:/tags/TranslationGroup
\define translatableTiddlerTitles()
[all[shadows+tiddlers]prefix[$:/language/Docs/PaletteColours/]]
\end
\define shortenTitle()
[all[current]removeprefix[$:/language/Docs/PaletteColours/]]
\end
! Palette Colours
Palette colours.
<<translatableStringEditor>>

View File

@@ -5,7 +5,12 @@ tags: $:/tags/TranslationGroup
\define translatableTiddlerTitles()
[all[tiddlers+shadows]prefix[$:/language/Search/]]
\end
\define shortenTitle()
[all[current]removeprefix[$:/language/Search/]]
\end
Search.
! Search
Search-related translatable strings.
<<translatableStringEditor>>

View File

@@ -5,7 +5,12 @@ tags: $:/tags/TranslationGroup
\define translatableTiddlerTitles()
[all[tiddlers+shadows]prefix[$:/language/SideBar/]]
\end
\define shortenTitle()
[all[current]removeprefix[$:/language/SideBar/]]
\end
Sidebar.
! Sidebar
Sidebar-related translatable strings.
<<translatableStringEditor>>

View File

@@ -5,6 +5,11 @@ tags: $:/tags/TranslationGroup
\define translatableTiddlerTitles()
[all[tiddlers+shadows]prefix[$:/language/TiddlerInfo/]]
\end
\define shortenTitle()
[all[current]removeprefix[$:/language/TiddlerInfo/]]
\end
! Tiddler Info
Tiddler info panel.

View File

@@ -0,0 +1,16 @@
title: $:/plugins/tiddlywiki/translators/ui/group/Docs/Types
caption: Types
tags: $:/tags/TranslationGroup
\define translatableTiddlerTitles()
[all[shadows+tiddlers]prefix[$:/language/Docs/Types/]]
\end
\define shortenTitle()
[all[current]removeprefix[$:/language/Docs/Types/]]
\end
! Types
Descriptions for each content type (as appears in the type dropdown in the tiddler editor).
<<translatableStringEditor editorFields:"description group">>