1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-30 05:19:57 +00:00

Translator editon update (#8703)

* Translator editon update

Update for the translator editon, including:

* Changes to `--render` in `tiddlywiki.info`, and changes the command
  for generating `$:/languages/Docs/Types/` to replace strings with `_`
instead of using uri encoding.
* Update docs. The guide for changing `$:/core/readme` tiddler is wrong,
  so I removed it.

* Simplify templates and commands

* Add progress bar
This commit is contained in:
Leilei332 2024-10-29 20:07:12 +08:00 committed by GitHub
parent 561296db71
commit 40fca47974
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 57 additions and 51 deletions

View File

@ -13,7 +13,6 @@ Use this procedure if the language being submitted is not already present in the
# Copy the language files into the language folder
# Create a `plugin.info` file for the translation
# Create an appropriate flag image in `icon.tid`
# Change the title of the [[$:/core/readme]] tiddler to `$:/core/xx-XX/readme`
# Add the new language to tw5.com
# Submit a pull request

View File

@ -13,6 +13,7 @@
"de-DE",
"el-GR",
"en-US",
"en-PH",
"es-ES",
"fa-IR",
"fr-FR",
@ -44,32 +45,32 @@
],
"build": {
"index": [
"--rendertiddler","$:/core/save/all","index.html","text/plain"],
"--render","$:/core/save/all","index.html","text/plain"],
"output-files": [
"--rendertiddler","$:/plugins/tiddlywiki/translators/templates/Buttons.multids","language/Buttons.multids","text/plain",
"--rendertiddler","$:/plugins/tiddlywiki/translators/templates/ControlPanel.multids","language/ControlPanel.multids","text/plain",
"--rendertiddler","$:/plugins/tiddlywiki/translators/templates/CoreReadMe.tid","language/CoreReadMe.tid","text/plain",
"--rendertiddler","$:/plugins/tiddlywiki/translators/templates/Dates.multids","language/Dates.multids","text/plain",
"--rendertiddler","$:/plugins/tiddlywiki/translators/templates/EditTemplate.multids","language/EditTemplate.multids","text/plain",
"--rendertiddler","$:/plugins/tiddlywiki/translators/templates/Exporters.multids","language/Exporters.multids","text/plain",
"--rendertiddler","$:/plugins/tiddlywiki/translators/templates/Fields.multids","language/Fields.multids","text/plain",
"--rendertiddler","$:/plugins/tiddlywiki/translators/templates/Filters.multids","language/Filters.multids","text/plain",
"--rendertiddler","$:/plugins/tiddlywiki/translators/templates/GettingStarted.tid","language/GettingStarted.tid","text/plain",
"--rendertiddler","$:/plugins/tiddlywiki/translators/templates/Import.multids","language/Import.multids","text/plain",
"--rendertiddler","$:/plugins/tiddlywiki/translators/templates/Misc.multids","language/Misc.multids","text/plain",
"--rendertiddler","$:/plugins/tiddlywiki/translators/templates/ModuleTypes.multids","language/Docs/ModuleTypes.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/PaletteColours.multids","language/Docs/PaletteColours.multids","text/plain",
"--rendertiddler","$:/plugins/tiddlywiki/translators/templates/Search.multids","language/Search.multids","text/plain",
"--rendertiddler","$:/plugins/tiddlywiki/translators/templates/SideBar.multids","language/SideBar.multids","text/plain",
"--rendertiddler","$:/plugins/tiddlywiki/translators/templates/SiteSubtitle.tid","language/SiteSubtitle.tid","text/plain",
"--rendertiddler","$:/plugins/tiddlywiki/translators/templates/SiteTitle.tid","language/SiteTitle.tid","text/plain",
"--rendertiddler","$:/plugins/tiddlywiki/translators/templates/ThemeTweaks.multids","language/ThemeTweaks.multids","text/plain",
"--rendertiddler","$:/plugins/tiddlywiki/translators/templates/TiddlerInfo.multids","language/TiddlerInfo.multids","text/plain",
"--rendertiddlers","[prefix[$:/language/Docs/Types/]removeprefix[$:/language/Docs/Types/]]","$:/plugins/tiddlywiki/translators/templates/type-tid","language/Types","text/plain",".tid",
"--rendertiddlers","[prefix[$:/language/Help/]removeprefix[$:/language/Help/]]","$:/plugins/tiddlywiki/translators/templates/help-tid","language/Help","text/plain",".tid",
"--rendertiddlers","[prefix[$:/language/Modals/]removeprefix[$:/language/Modals/]]","$:/plugins/tiddlywiki/translators/templates/modal-tid","language/Modals","text/plain",".tid",
"--rendertiddlers","[prefix[$:/language/Snippets/]removeprefix[$:/language/Snippets/]]","$:/plugins/tiddlywiki/translators/templates/snippet-tid","language/Snippets","text/plain",".tid"]
"--render","$:/plugins/tiddlywiki/translators/templates/Buttons.multids","language/Buttons.multids","text/plain",
"--render","$:/plugins/tiddlywiki/translators/templates/ControlPanel.multids","language/ControlPanel.multids","text/plain",
"--render","$:/plugins/tiddlywiki/translators/templates/CoreReadMe.tid","language/CoreReadMe.tid","text/plain",
"--render","$:/plugins/tiddlywiki/translators/templates/Dates.multids","language/Dates.multids","text/plain",
"--render","$:/plugins/tiddlywiki/translators/templates/EditTemplate.multids","language/EditTemplate.multids","text/plain",
"--render","$:/plugins/tiddlywiki/translators/templates/Exporters.multids","language/Exporters.multids","text/plain",
"--render","$:/plugins/tiddlywiki/translators/templates/Fields.multids","language/Fields.multids","text/plain",
"--render","$:/plugins/tiddlywiki/translators/templates/Filters.multids","language/Filters.multids","text/plain",
"--render","$:/plugins/tiddlywiki/translators/templates/GettingStarted.tid","language/GettingStarted.tid","text/plain",
"--render","$:/plugins/tiddlywiki/translators/templates/Import.multids","language/Import.multids","text/plain",
"--render","$:/plugins/tiddlywiki/translators/templates/Misc.multids","language/Misc.multids","text/plain",
"--render","$:/plugins/tiddlywiki/translators/templates/ModuleTypes.multids","language/Docs/ModuleTypes.multids","text/plain",
"--render","$:/plugins/tiddlywiki/translators/templates/NewJournal.multids","language/NewJournal.multids","text/plain",
"--render","$:/plugins/tiddlywiki/translators/templates/Notifications.multids","language/Notifications.multids","text/plain",
"--render","$:/plugins/tiddlywiki/translators/templates/PaletteColours.multids","language/Docs/PaletteColours.multids","text/plain",
"--render","$:/plugins/tiddlywiki/translators/templates/Search.multids","language/Search.multids","text/plain",
"--render","$:/plugins/tiddlywiki/translators/templates/SideBar.multids","language/SideBar.multids","text/plain",
"--render","$:/plugins/tiddlywiki/translators/templates/SiteSubtitle.tid","language/SiteSubtitle.tid","text/plain",
"--render","$:/plugins/tiddlywiki/translators/templates/SiteTitle.tid","language/SiteTitle.tid","text/plain",
"--render","$:/plugins/tiddlywiki/translators/templates/ThemeTweaks.multids","language/ThemeTweaks.multids","text/plain",
"--render","$:/plugins/tiddlywiki/translators/templates/TiddlerInfo.multids","language/TiddlerInfo.multids","text/plain",
"--render","[prefix[$:/language/Docs/Types/]]","[removeprefix[$:/language/Docs/Types/]search-replace:g:regexp[/|\\\\],[_]addprefix[language/Types/]addsuffix[.tid]]","text/plain","$:/plugins/tiddlywiki/translators/templates/type-tid",
"--render","[prefix[$:/language/Help/]]","[removeprefix[$:/]addsuffix[.tid]]","text/plain","$:/plugins/tiddlywiki/translators/templates/help-tid",
"--render","[prefix[$:/language/Modals/]]","[removeprefix[$:/]addsuffix[.tid]]","text/plain","$:/plugins/tiddlywiki/translators/templates/modal-tid",
"--render","[prefix[$:/language/Snippets/]]","[removeprefix[$:/]addsuffix[.tid]]","text/plain","$:/plugins/tiddlywiki/translators/templates/snippet-tid"]
}
}

View File

@ -15,6 +15,12 @@ title: $:/Translators
Number of translated tiddlers: <$count filter=<<allTheTranslatedTiddlerTitles>>/> of <$count filter=<<allTheTranslatableTiddlerTitles>>/>
<$wikify name="max" text="""<$count filter=<<allTheTranslatableTiddlerTitles>>/>""">
<$wikify name="value" text="""<$count filter=<<allTheTranslatedTiddlerTitles>>/>""">
<progress max=<<max>> value=<<value>>/>
</$wikify>
</$wikify>
{{$:/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,9 +1,9 @@
title: $:/plugins/tiddlywiki/translators/templates/help-tid
\define generateTid(title)
title: $:/language/Help/$title$
description: <$text text={{$:/language/Help/$title$!!description}}/>
\procedure generateTid(title)
title: <<title>>
description: <$text text={{!!description}}/>
<$text text={{$:/language/Help/$title$}}/>
<$text text={{!!text}}/>
\end
<$macrocall $name="generateTid" title=<<currentTiddler>>/>
<$transclude $variable="generateTid" title=<<currentTiddler>>/>

View File

@ -1,12 +1,12 @@
title: $:/plugins/tiddlywiki/translators/templates/modal-tid
\define generateTid(title)
title: $:/language/Modals/$title$
type: <$text text={{$:/language/Modals/$title$!!type}}/>
subtitle: <$text text={{$:/language/Modals/$title$!!subtitle}}/>
footer: <$text text={{$:/language/Modals/$title$!!footer}}/>
help: <$text text={{$:/language/Modals/$title$!!help}}/>
\procedure generateTid(title)
title: <<title>>
type: <$text text={{!!type}}/>
subtitle: <$text text={{!!subtitle}}/>
footer: <$text text={{!!footer}}/>
help: <$text text={{!!help}}/>
<$text text={{$:/language/Modals/$title$}}/>
<$text text={{!!text}}/>
\end
<$macrocall $name="generateTid" title=<<currentTiddler>>/>
<$transclude $variable="generateTid" title=<<currentTiddler>>/>

View File

@ -1,10 +1,10 @@
title: $:/plugins/tiddlywiki/translators/templates/snippet-tid
\define generateTid(title)
title: $:/language/Snippets/$title$
\procedure generateTid(title)
title: <<title>>
tags: $:/tags/TextEditor/Snippet
caption: <$text text={{$:/language/Snippets/$title$!!caption}}/>
caption: <$text text={{!!caption}}/>
<$text text={{$:/language/Snippets/$title$}}/>
<$text text={{!!text}}/>
\end
<$macrocall $name="generateTid" title=<<currentTiddler>>/>
<$transclude $variable="generateTid" title=<<currentTiddler>>/>

View File

@ -1,10 +1,10 @@
title: $:/plugins/tiddlywiki/translators/templates/type-tid
\define generateTid(title)
title: $:/language/Docs/Types/$title$
description: <$text text={{$:/language/Docs/Types/$title$!!description}}/>
name: <$text text={{$:/language/Docs/Types/$title$!!name}}/>
group: <$text text={{$:/language/Docs/Types/$title$!!group}}/>
\procedure generateTid(title)
title: <<title>>
description: <$text text={{!!description}}/>
name: <$text text={{!!name}}/>
group: <$text text={{!!group}}/>
\end
<$macrocall $name="generateTid" title=<<currentTiddler>>/>
<$transclude $variable="generateTid" title=<<currentTiddler>>/>