mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-08-19 17:12:29 +08:00
i18n: Translate search note prefix
This commit is contained in:
parent
2324c9a13b
commit
391f518c01
@ -61,9 +61,9 @@ export default class SearchString extends AbstractSearchOption {
|
|||||||
|
|
||||||
await this.setAttribute('label', 'searchString', searchString);
|
await this.setAttribute('label', 'searchString', searchString);
|
||||||
|
|
||||||
if (this.note.title.startsWith('Search: ')) {
|
if (this.note.title.startsWith(t("search_string.search_prefix"))) {
|
||||||
await server.put(`notes/${this.note.noteId}/title`, {
|
await server.put(`notes/${this.note.noteId}/title`, {
|
||||||
title: `Search: ${searchString.length < 30 ? searchString : `${searchString.substr(0, 30)}…`}`
|
title: `${t("search_string.search_prefix")} ${searchString.length < 30 ? searchString : `${searchString.substr(0, 30)}…`}`
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
@ -896,7 +896,8 @@
|
|||||||
"label_rock_or_pop": "only one of the labels must be present",
|
"label_rock_or_pop": "only one of the labels must be present",
|
||||||
"label_year_comparison": "numerical comparison (also >, >=, <).",
|
"label_year_comparison": "numerical comparison (also >, >=, <).",
|
||||||
"label_date_created": "notes created in the last month",
|
"label_date_created": "notes created in the last month",
|
||||||
"error": "Search error: {{error}}"
|
"error": "Search error: {{error}}",
|
||||||
|
"search_prefix": "Search:"
|
||||||
},
|
},
|
||||||
"attachment_detail": {
|
"attachment_detail": {
|
||||||
"open_help_page": "Open help page on attachments",
|
"open_help_page": "Open help page on attachments",
|
||||||
|
@ -1094,7 +1094,8 @@
|
|||||||
"label_year_comparison": "comparații numerice (de asemenea >, >=, <).",
|
"label_year_comparison": "comparații numerice (de asemenea >, >=, <).",
|
||||||
"placeholder": "cuvinte cheie pentru căutarea în conținut, #etichetă = valoare...",
|
"placeholder": "cuvinte cheie pentru căutarea în conținut, #etichetă = valoare...",
|
||||||
"search_syntax": "Sintaxa de căutare",
|
"search_syntax": "Sintaxa de căutare",
|
||||||
"title_column": "Textul de căutat:"
|
"title_column": "Textul de căutat:",
|
||||||
|
"search_prefix": "Căutare:"
|
||||||
},
|
},
|
||||||
"shortcuts": {
|
"shortcuts": {
|
||||||
"action_name": "Denumirea acțiunii",
|
"action_name": "Denumirea acțiunii",
|
||||||
|
@ -8,6 +8,7 @@ import hoistedNoteService from "./hoisted_note.js";
|
|||||||
import searchService from "./search/services/search.js";
|
import searchService from "./search/services/search.js";
|
||||||
import SearchContext from "./search/search_context.js";
|
import SearchContext from "./search/search_context.js";
|
||||||
import hiddenSubtree from "./hidden_subtree.js";
|
import hiddenSubtree from "./hidden_subtree.js";
|
||||||
|
import { t } from "i18next";
|
||||||
const { LBTPL_NOTE_LAUNCHER, LBTPL_CUSTOM_WIDGET, LBTPL_SPACER, LBTPL_SCRIPT } = hiddenSubtree;
|
const { LBTPL_NOTE_LAUNCHER, LBTPL_CUSTOM_WIDGET, LBTPL_SPACER, LBTPL_SCRIPT } = hiddenSubtree;
|
||||||
|
|
||||||
function getInboxNote(date: string) {
|
function getInboxNote(date: string) {
|
||||||
@ -75,7 +76,7 @@ function saveSqlConsole(sqlConsoleNoteId: string) {
|
|||||||
function createSearchNote(searchString: string, ancestorNoteId: string) {
|
function createSearchNote(searchString: string, ancestorNoteId: string) {
|
||||||
const {note} = noteService.createNewNote({
|
const {note} = noteService.createNewNote({
|
||||||
parentNoteId: getMonthlyParentNoteId('_search', 'search'),
|
parentNoteId: getMonthlyParentNoteId('_search', 'search'),
|
||||||
title: `Search: ${searchString}`,
|
title: `${t("special_notes.search_prefix")} ${searchString}`,
|
||||||
content: "",
|
content: "",
|
||||||
type: 'search',
|
type: 'search',
|
||||||
mime: 'application/json'
|
mime: 'application/json'
|
||||||
|
@ -180,5 +180,8 @@
|
|||||||
"october": "October",
|
"october": "October",
|
||||||
"november": "November",
|
"november": "November",
|
||||||
"december": "December"
|
"december": "December"
|
||||||
|
},
|
||||||
|
"special_notes": {
|
||||||
|
"search_prefix": "Search:"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -180,5 +180,8 @@
|
|||||||
"october": "Octombrie",
|
"october": "Octombrie",
|
||||||
"november": "Noiembrie",
|
"november": "Noiembrie",
|
||||||
"december": "Decembrie"
|
"december": "Decembrie"
|
||||||
|
},
|
||||||
|
"special_notes": {
|
||||||
|
"search_prefix": "Căutare:"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user