From 7fe8c4c4a1c666f8fcb178e0109cd9e138e2da56 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Wed, 29 Oct 2014 10:57:48 +0000 Subject: [PATCH] Fixes for translators edition/plugin * Added support for translating the core readme * Fixed problem with `Misc.multids` rendering shadow tiddlers * Fixed problem with single tiddler files rendering shadow tiddlers --- editions/translators/tiddlywiki.info | 1 + .../tiddlywiki/translators/Translators.tid | 9 ++++-- .../output-file-templates/CoreReadMe.tid.tid | 3 ++ .../output-file-templates/Misc.multids.tid | 30 +++++++++---------- .../tiddlywiki/translators/templates/tid.tid | 2 +- .../translators/ui/group/Miscellaneous.tid | 1 + 6 files changed, 27 insertions(+), 19 deletions(-) create mode 100644 plugins/tiddlywiki/translators/output-file-templates/CoreReadMe.tid.tid diff --git a/editions/translators/tiddlywiki.info b/editions/translators/tiddlywiki.info index c47394be1..01048eebb 100644 --- a/editions/translators/tiddlywiki.info +++ b/editions/translators/tiddlywiki.info @@ -36,6 +36,7 @@ "--rendertiddler","$:/plugins/tiddlywiki/translators/templates/TiddlerInfo.multids","language/TiddlerInfo.multids","text/plain", "--rendertiddler","$:/plugins/tiddlywiki/translators/templates/NewJournal.multids","language/NewJournal.multids","text/plain", "--rendertiddler","$:/plugins/tiddlywiki/translators/templates/Notifications.multids","language/Notifications.multids","text/plain", + "--rendertiddler","$:/plugins/tiddlywiki/translators/templates/CoreReadMe.tid","language/CoreReadMe.tid","text/plain", "--rendertiddler","$:/plugins/tiddlywiki/translators/templates/GettingStarted.tid","language/GettingStarted.tid","text/plain", "--rendertiddler","$:/plugins/tiddlywiki/translators/templates/SiteTitle.tid","language/SiteTitle.tid","text/plain", "--rendertiddler","$:/plugins/tiddlywiki/translators/templates/SiteSubtitle.tid","language/SiteSubtitle.tid","text/plain", diff --git a/plugins/tiddlywiki/translators/Translators.tid b/plugins/tiddlywiki/translators/Translators.tid index 0b6507d2d..9143a79d0 100644 --- a/plugins/tiddlywiki/translators/Translators.tid +++ b/plugins/tiddlywiki/translators/Translators.tid @@ -1,13 +1,16 @@ title: $:/Translators \define allTheTranslatableTiddlerTitles() -[all[tiddlers+shadows]prefix[$:/language/]] [all[tiddlers+shadows]prefix[$:/config/NewJournal/]] [[GettingStarted]] [[$:/SiteTitle]] [[$:/SiteSubtitle]] +[sort[title]] +[all[tiddlers+shadows]prefix[$:/language/]] [all[tiddlers+shadows]prefix[$:/config/NewJournal/]] [[GettingStarted]] [[$:/SiteTitle]] [[$:/SiteSubtitle]] +[[$:/core/readme]] +[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]] +[all[tiddlers]prefix[$:/language/]] [all[tiddlers]prefix[$:/config/NewJournal/]] [[GettingStarted]is[tiddler]] [[$:/SiteTitle]is[tiddler]] [[$:/SiteSubtitle]is[tiddler]] +[[$:/core/readme]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]] +[all[tiddlers+shadows]!is[tiddler]prefix[$:/language/]] [all[tiddlers+shadows]!is[tiddler]prefix[$:/config/NewJournal/]] [[GettingStarted]!is[tiddler]] [[$:/SiteTitle]!is[tiddler]] [[$:/SiteSubtitle]!is[tiddler]] +[[$:/core/readme]!is[tiddler]] +[sort[title]] \end Number of translated tiddlers: <$count filter=<>/> of <$count filter=<>/> diff --git a/plugins/tiddlywiki/translators/output-file-templates/CoreReadMe.tid.tid b/plugins/tiddlywiki/translators/output-file-templates/CoreReadMe.tid.tid new file mode 100644 index 000000000..3a5898280 --- /dev/null +++ b/plugins/tiddlywiki/translators/output-file-templates/CoreReadMe.tid.tid @@ -0,0 +1,3 @@ +title: $:/plugins/tiddlywiki/translators/templates/CoreReadMe.tid + +{{$:/core/readme||$:/plugins/tiddlywiki/translators/templates/tid}} \ No newline at end of file diff --git a/plugins/tiddlywiki/translators/output-file-templates/Misc.multids.tid b/plugins/tiddlywiki/translators/output-file-templates/Misc.multids.tid index 6e903f849..ed19066d1 100644 --- a/plugins/tiddlywiki/translators/output-file-templates/Misc.multids.tid +++ b/plugins/tiddlywiki/translators/output-file-templates/Misc.multids.tid @@ -1,18 +1,18 @@ title: $:/plugins/tiddlywiki/translators/templates/Misc.multids -{{[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/Modals/]] --[all[tiddlers+shadows]prefix[$:/language/Notifications/]] --[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]prefix[$:/language/]] +-[all[tiddlers]prefix[$:/language/Buttons/]] +-[all[tiddlers]prefix[$:/language/ControlPanel/]] +-[all[tiddlers]prefix[$:/language/Date/]] +-[all[tiddlers]prefix[$:/language/Docs/]] +-[all[tiddlers]prefix[$:/language/EditTemplate/]] +-[all[tiddlers]prefix[$:/language/Filters/]] +-[all[tiddlers]prefix[$:/language/Help/]] +-[all[tiddlers]prefix[$:/language/Import/]] +-[all[tiddlers]prefix[$:/language/Modals/]] +-[all[tiddlers]prefix[$:/language/Notifications/]] +-[all[tiddlers]prefix[$:/language/RelativeDate/]] +-[all[tiddlers]prefix[$:/language/Search/]] +-[all[tiddlers]prefix[$:/language/SideBar/]] +-[all[tiddlers]prefix[$:/language/TiddlerInfo/]] +[sort[title]]||$:/plugins/tiddlywiki/translators/templates/filtered-multids}} \ No newline at end of file diff --git a/plugins/tiddlywiki/translators/templates/tid.tid b/plugins/tiddlywiki/translators/templates/tid.tid index 155fe9bc5..7fde58ac4 100644 --- a/plugins/tiddlywiki/translators/templates/tid.tid +++ b/plugins/tiddlywiki/translators/templates/tid.tid @@ -3,6 +3,6 @@ title: $:/plugins/tiddlywiki/translators/templates/tid \define generateTid(title) title: $title$ -<$transclude tiddler="""$title$"""/> +<$list filter="""[[$title$]is[tiddler]]"""><$transclude tiddler="""$title$"""/> \end <$macrocall $name="generateTid" title=<>/> \ No newline at end of file diff --git a/plugins/tiddlywiki/translators/ui/group/Miscellaneous.tid b/plugins/tiddlywiki/translators/ui/group/Miscellaneous.tid index 189ac7932..a43153193 100644 --- a/plugins/tiddlywiki/translators/ui/group/Miscellaneous.tid +++ b/plugins/tiddlywiki/translators/ui/group/Miscellaneous.tid @@ -19,6 +19,7 @@ tags: $:/tags/TranslationGroup [all[tiddlers+shadows]prefix[$:/config/NewJournal/]] [[$:/SiteTitle]] [[$:/SiteSubtitle]] +[[$:/core/readme]] +[sort[title]] \end \define shortenTitle()