1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-23 10:07:19 +00:00

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

@ -1,7 +1,7 @@
title: HelloThere title: HelloThere
This edition of ~TiddlyWiki is for people who would like to create or update a translation for ~TiddlyWiki. This edition of ~TiddlyWiki is for people who would like to create or update a translation for ~TiddlyWiki. It makes it possible for translators to work interactively, avoiding using Node.js and ~GitHub.
//It is currently in progress, and is not yet ready to be used in production// * [[Instructions]]
See http://tiddlywiki.com for more details about ~TiddlyWiki. See http://tiddlywiki.com for more details about ~TiddlyWiki.

View File

@ -0,0 +1,58 @@
title: Instructions
! Overview
The tiddler [[$:/Translators]] provides a dashboard for creating, editing and reviewing translatable strings. It has the following parts:
* A summary of progress
* A copy of the page controls to make it easier to work with the sidebar hidden
* Editor tabs, splitting the translatable strings into groups. Within each tab:
** A title, description and tiddler count for the group
** Radio buttons to select between showing single line and multi-line editors. Some longer strings are easier to edit with the multi-line editors
** A table of each translatable tiddler in the group, each showing:
*** The link and title of the translatable tiddler. In most cases the title is abbreviated; click the link to open the tiddler directly to see the full title
*** An editor for the translatable text
*** A dropdown with:
**** The original en-GB text
**** A button to revert by deleting the translatable tiddler
Most translatable tiddlers consist of a single field. The "Types" and "Help" groups have multiple fields that must be translated. The heading of the editor table gives the names of the fields.
! Step by Step
# Make sure you know how to save changes with ~TiddlyWiki, as described on http://tiddlywiki.com/
# Visit http://tiddlywiki.com/editions/translators/index.html
# Click the ''Save changes'' button below to save a copy of the translators edition to your local hard drive. Name the copy `MyTranslation.html`
#* You may want to save the file into your Dropbox folder (or equivalent) to benefit from automatic backups
# Open the `MyTranslation.html` in your browser
# Translate a single string to make sure things are working:
## Select the ''Sidebar'' tab in [[$:/Translators]]
## Type new text for the item ''Open/Caption'' (the text shown as the caption of the "Open" tab in the sidebar)
## Open the sidebar to check that the translation appears correctly
## Save changes
# Repeat for the other translatable strings
# While working on your translation, remember to save changes and take backups regularly
! Submitting your Translation
When your translation reaches the point that it's useful to be shared with others you can submit it for inclusion in the TiddlyWiki core.
The easiest way to submit your translation is to publish the HTML file on Dropbox (as described on http://tiddlywiki.com/) and then post a link to the TiddlyWiki discussion group.
Alternatively, you can email the translation directly to Jeremy Ruston or Mario Pietsch.
! Translation Advice
Prioritise the groups to translate first. A translation can be useful without being 100% complete; just covering the main groups will cover most of the text seen by ordinary users:
* Buttons
* Control Panel
* Date
* Edit Template
* Getting Started
* Import
* Miscellaneous
* Search
* Sidebar
* Tiddler Info

View File

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

View File

@ -0,0 +1,3 @@
title: $:/state/sidebar
no

View File

@ -16,4 +16,6 @@ Number of tiddlers translated so far: <$count filter=<<allTheTranslatedTiddlerTi
Number of tiddlers not yet translated: <$count filter=<<allTheNotTranslatedTiddlerTitles>>/> 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">> <<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 title: $:/plugins/tiddlywiki/translators/macros/translatableStringEditor
tags: $:/tags/Macro 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"> <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>>> <$list filter=<<translatableTiddlerTitles>>>
<div> <$macrocall $name="translatableStringEditorInner" tiddlerTitle=<<currentTiddler>>/>
<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>
</$list> </$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 \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() \define translatableTiddlerTitles()
[all[tiddlers+shadows]prefix[$:/language/Buttons/]] [all[tiddlers+shadows]prefix[$:/language/Buttons/]]
\end \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>> <<translatableStringEditor>>

View File

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

View File

@ -6,7 +6,12 @@ tags: $:/tags/TranslationGroup
[all[tiddlers+shadows]prefix[$:/language/Date/]] [all[tiddlers+shadows]prefix[$:/language/Date/]]
[all[tiddlers+shadows]prefix[$:/language/RelativeDate/]] [all[tiddlers+shadows]prefix[$:/language/RelativeDate/]]
\end \end
\define shortenTitle()
[all[current]removeprefix[$:/language/Date/]] [all[current]removeprefix[$:/language/RelativeDate/]]
\end
Dates. ! Date
Absolute and relative dates.
<<translatableStringEditor>> <<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() \define translatableTiddlerTitles()
[all[tiddlers+shadows]prefix[$:/language/EditTemplate/]] [all[tiddlers+shadows]prefix[$:/language/EditTemplate/]]
\end \end
\define shortenTitle()
[all[current]removeprefix[$:/language/EditTemplate/]]
\end
Edit template. ! Edit Template
Strings used in the tiddler edit template.
<<translatableStringEditor>> <<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() \define translatableTiddlerTitles()
[all[tiddlers+shadows]prefix[$:/language/Filters/]] [all[tiddlers+shadows]prefix[$:/language/Filters/]]
\end \end
\define shortenTitle()
[all[current]removeprefix[$:/language/Filters/]]
\end
Filters. ! Filters
Translatable titles of the preconfigured filters available in [[advanced search|$:/AdvancedSearch]].
<<translatableStringEditor>> <<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() \define translatableTiddlerTitles()
[all[tiddlers+shadows]prefix[$:/language/Help/]] [all[tiddlers+shadows]prefix[$:/language/Help/]]
\end \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() \define translatableTiddlerTitles()
[all[tiddlers+shadows]prefix[$:/language/Import/]] [all[tiddlers+shadows]prefix[$:/language/Import/]]
\end \end
\define shortenTitle()
[all[current]removeprefix[$:/language/Import/]]
\end
! Import
Import mechanism. Import mechanism.

View File

@ -21,6 +21,11 @@ tags: $:/tags/TranslationGroup
[[$:/SiteSubtitle]] [[$:/SiteSubtitle]]
+[sort[title]] +[sort[title]]
\end \end
\define shortenTitle()
[all[current]removeprefix[$:/language/]] [all[current]removeprefix[$:/config/]] [all[current]!prefix[$:/language/]!prefix[$:/config/]]
\end
! Miscellaneous
Miscellaneous translatable strings. 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() \define translatableTiddlerTitles()
[all[tiddlers+shadows]prefix[$:/language/Search/]] [all[tiddlers+shadows]prefix[$:/language/Search/]]
\end \end
\define shortenTitle()
[all[current]removeprefix[$:/language/Search/]]
\end
Search. ! Search
Search-related translatable strings.
<<translatableStringEditor>> <<translatableStringEditor>>

View File

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

View File

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