mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2026-10-05 07:31:43 +00:00
Make draft title translatable (#8891)
* Make draft title translatable * Update change note * Improve number handling Now generates "Draft of '...' 2" instead of "Draft 2 of '...'" * Improve whitespace handling We no longer needs to add whitespace in languages. We now handle it in javascript. * Update language naming * Update zh-Hans translation * Update change note * Refactor logic to make it less complex Since we don't need to care about draft numbers, we can have two different templates for draft title with and without attribution. No need to trim the string now. Also, we can reuse the getSubstitutedText method * Update translators edition * fixup! Update translators edition * Switch to transclude and variable mechanism * Adapt translators to the new mechanism * Update change note * Further simplify the logic $tw.language.getString can already wikify translatable strings. No need for this.renderText
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
title: $:/changenotes/5.4.0/#8891
|
||||
description: Draft title internationalization
|
||||
release: 5.4.0
|
||||
tags: $:/tags/ChangeNote
|
||||
change-type: enhancement
|
||||
change-category: internal
|
||||
github-links: https://github.com/TiddlyWiki/TiddlyWiki5/pull/8891
|
||||
github-contributors: Leilei332
|
||||
|
||||
The title of the draft tiddler is now translatable. These new language strings are provided:
|
||||
|
||||
* `$:/language/Draft/Title` The template of the title of a draft tiddler without attribution. The `draft-title` variable represents the title of the new tiddler.
|
||||
* `$:/language/Draft/Attribution` The template of the title of a draft tiddler without attribution.
|
||||
|
||||
The translators plugin is also updated.
|
||||
Reference in New Issue
Block a user