mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-10 20:09:57 +00:00
Make the default title created by excision translatable (#8500)
* Make the default title created by excision translatable * Use $tw.language.getString to get language string
This commit is contained in:
parent
fa423e508f
commit
98cd4a09b4
@ -133,6 +133,7 @@ Excise/Caption/Replace/Link: link
|
||||
Excise/Caption/Replace/Transclusion: transclusion
|
||||
Excise/Caption/Tag: Tag new tiddler with the title of this tiddler
|
||||
Excise/Caption/TiddlerExists: Warning: tiddler already exists
|
||||
Excise/DefaultTitle: New Excision
|
||||
Excise/Hint: Excise the selected text into a new tiddler
|
||||
Heading1/Caption: heading 1
|
||||
Heading1/Hint: Apply heading level 1 formatting to lines containing selection
|
||||
|
@ -14,11 +14,12 @@ Text editor operation to excise the selection to a new tiddler
|
||||
|
||||
exports["excise"] = function(event,operation) {
|
||||
var editTiddler = this.wiki.getTiddler(this.editTitle),
|
||||
editTiddlerTitle = this.editTitle;
|
||||
editTiddlerTitle = this.editTitle,
|
||||
excisionBaseTitle = $tw.language.getString("Buttons/Excise/DefaultTitle");
|
||||
if(editTiddler && editTiddler.fields["draft.of"]) {
|
||||
editTiddlerTitle = editTiddler.fields["draft.of"];
|
||||
}
|
||||
var excisionTitle = event.paramObject.title || this.wiki.generateNewTitle("New Excision");
|
||||
var excisionTitle = event.paramObject.title || this.wiki.generateNewTitle(excisionBaseTitle);
|
||||
this.wiki.addTiddler(new $tw.Tiddler(
|
||||
this.wiki.getCreationFields(),
|
||||
this.wiki.getModificationFields(),
|
||||
|
Loading…
Reference in New Issue
Block a user