mirror of
https://github.com/zadam/trilium.git
synced 2025-11-06 21:36:05 +01:00
add translation for bulk action and script execute
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
import { t } from "../../services/i18n.js";
|
||||
import SpacedUpdate from "../../services/spaced_update.js";
|
||||
import AbstractBulkAction from "./abstract_bulk_action.js";
|
||||
|
||||
const TPL = `
|
||||
<tr>
|
||||
<td>
|
||||
Execute script:
|
||||
${t('execute_script.execute_script')}
|
||||
</td>
|
||||
<td>
|
||||
<input type="text"
|
||||
@@ -16,13 +17,13 @@ const TPL = `
|
||||
<div class="dropdown help-dropdown">
|
||||
<span class="bx bx-help-circle icon-action" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"></span>
|
||||
<div class="dropdown-menu dropdown-menu-right p-4">
|
||||
You can execute simple scripts on the matched notes.
|
||||
${t('execute_script.help_text')}
|
||||
|
||||
For example to append a string to a note's title, use this small script:
|
||||
${t('execute_script.example_1')}
|
||||
|
||||
<pre>note.title = note.title + ' - suffix';</pre>
|
||||
|
||||
More complex example would be deleting all matched note's attributes:
|
||||
${t('execute_script.example_2')}
|
||||
|
||||
<pre>for (const attr of note.getOwnedAttributes) { attr.markAsDeleted(); }</pre>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user