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

First pass at an edition for translators working in the browser

The user interface needs some refinements but it shows the basic
principles.

The idea is that the translator would email their modified file, which
would then be merged into the core repo (some additional tools will be
helpful for this).

Fixes #984
This commit is contained in:
Jermolene 2014-10-22 14:14:24 +01:00
parent 1b620387dd
commit 5bb74319e1
19 changed files with 248 additions and 0 deletions

View File

@ -0,0 +1,7 @@
title: HelloThere
This edition of ~TiddlyWiki is for people who would like to create or update a translation for ~TiddlyWiki.
//It is currently in progress, and is not yet ready to be used in production//
See http://tiddlywiki.com for more details about ~TiddlyWiki.

View File

@ -0,0 +1,5 @@
title: $:/DefaultTiddlers
HelloThere
[[$:/Translators]]
[[$:/plugins/tiddlywiki/translators/readme]]

View File

@ -0,0 +1,25 @@
{
"plugins": [
"tiddlywiki/translators"
],
"languages": [
"en-US",
"en-GB",
"de-AT",
"de-DE",
"fr-FR",
"zh-Hans",
"zh-Hant",
"it-IT",
"ja-JP",
"ru-RU"
],
"themes": [
"tiddlywiki/vanilla",
"tiddlywiki/snowwhite"
],
"build": {
"index": [
"--rendertiddler","$:/core/save/all","index.html","text/plain"]
}
}

View File

@ -0,0 +1,19 @@
title: $:/Translators
\define allTheTranslatableTiddlerTitles()
[all[tiddlers+shadows]prefix[$:/language/]] [all[tiddlers+shadows]prefix[$:/config/NewJournal/]] [[GettingStarted]] [[$:/SiteTitle]] [[$:/SiteSubtitle]] +[sort[title]]
\end
\define allTheTranslatedTiddlerTitles()
[all[tiddlers]prefix[$:/language/]] [all[tiddlers]prefix[$:/config/NewJournal/]] [[GettingStarted]is[tiddler]] [[$:/SiteTitle]is[tiddler]] [[$:/SiteSubtitle]is[tiddler]] +[sort[title]]
\end
\define allTheNotTranslatedTiddlerTitles()
[all[tiddlers+shadows]!is[tiddler]prefix[$:/language/]] [all[tiddlers+shadows]!is[tiddler]prefix[$:/config/NewJournal/]] [[GettingStarted]!is[tiddler]] [[$:/SiteTitle]!is[tiddler]] [[$:/SiteSubtitle]!is[tiddler]] +[sort[title]]
\end
Number of translatable tiddlers: <$count filter=<<allTheTranslatableTiddlerTitles>>/>
Number of tiddlers translated so far: <$count filter=<<allTheTranslatedTiddlerTitles>>/>
Number of tiddlers not yet translated: <$count filter=<<allTheNotTranslatedTiddlerTitles>>/>
<<tabs "[all[tiddlers+shadows]tag[$:/tags/TranslationGroup]sort[caption]]" "$:/plugins/tiddlywiki/translators/ui/group/Miscellaneous" "$:/state/translatorsTab" "tc-vertical">>

View File

@ -0,0 +1,29 @@
title: $:/plugins/tiddlywiki/translators/macros/translatableStringEditor
tags: $:/tags/Macro
\define translatableStringEditor(editorTag:"input")
<div class="tc-translators-string-table">
<$count filter=<<translatableTiddlerTitles>>/> translatable tiddlers in this group
<$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>
</$list>
</div>
\end

View File

@ -0,0 +1,6 @@
{
"title": "$:/plugins/tiddlywiki/translators",
"description": "Tools to help translators of TiddlyWiki",
"author": "JeremyRuston",
"list": "readme"
}

View File

@ -0,0 +1,8 @@
title: $:/plugins/tiddlywiki/translators/readme
! Introduction
This plugin exposes a new system tiddler [[$:/Translators]] that presents a user interface for creating and maintaining translations.
! Quick Start

View File

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

View File

@ -0,0 +1,11 @@
title: $:/plugins/tiddlywiki/translators/ui/group/ControlPanel
caption: Control Panel
tags: $:/tags/TranslationGroup
\define translatableTiddlerTitles()
[all[tiddlers+shadows]prefix[$:/language/ControlPanel/]]
\end
[[Control Panel|$:/ControlPanel]].
<<translatableStringEditor>>

View File

@ -0,0 +1,12 @@
title: $:/plugins/tiddlywiki/translators/ui/group/Date
caption: Date
tags: $:/tags/TranslationGroup
\define translatableTiddlerTitles()
[all[tiddlers+shadows]prefix[$:/language/Date/]]
[all[tiddlers+shadows]prefix[$:/language/RelativeDate/]]
\end
Dates.
<<translatableStringEditor>>

View File

@ -0,0 +1,11 @@
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

@ -0,0 +1,11 @@
title: $:/plugins/tiddlywiki/translators/ui/group/EditTemplate
caption: Edit Template
tags: $:/tags/TranslationGroup
\define translatableTiddlerTitles()
[all[tiddlers+shadows]prefix[$:/language/EditTemplate/]]
\end
Edit template.
<<translatableStringEditor>>

View File

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

View File

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

View File

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

View File

@ -0,0 +1,27 @@
title: $:/plugins/tiddlywiki/translators/ui/group/Miscellaneous
caption: Miscellaneous
tags: $:/tags/TranslationGroup
\define translatableTiddlerTitles()
[all[tiddlers+shadows]prefix[$:/language/]]
-[all[tiddlers+shadows]prefix[$:/language/Buttons/]]
-[all[tiddlers+shadows]prefix[$:/language/ControlPanel/]]
-[all[tiddlers+shadows]prefix[$:/language/Date/]]
-[all[tiddlers+shadows]prefix[$:/language/Docs/]]
-[all[tiddlers+shadows]prefix[$:/language/EditTemplate/]]
-[all[tiddlers+shadows]prefix[$:/language/Filters/]]
-[all[tiddlers+shadows]prefix[$:/language/Help/]]
-[all[tiddlers+shadows]prefix[$:/language/Import/]]
-[all[tiddlers+shadows]prefix[$:/language/RelativeDate/]]
-[all[tiddlers+shadows]prefix[$:/language/Search/]]
-[all[tiddlers+shadows]prefix[$:/language/SideBar/]]
-[all[tiddlers+shadows]prefix[$:/language/TiddlerInfo/]]
[all[tiddlers+shadows]prefix[$:/config/NewJournal/]]
[[$:/SiteTitle]]
[[$:/SiteSubtitle]]
+[sort[title]]
\end
Miscellaneous translatable strings.
<<translatableStringEditor>>

View File

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

View File

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

View File

@ -0,0 +1,11 @@
title: $:/plugins/tiddlywiki/translators/ui/group/TiddlerInfo
caption: Tiddler Info
tags: $:/tags/TranslationGroup
\define translatableTiddlerTitles()
[all[tiddlers+shadows]prefix[$:/language/TiddlerInfo/]]
\end
Tiddler info panel.
<<translatableStringEditor>>