fix(hidden_subtree): unable to change language

This commit is contained in:
Elian Doran 2025-07-28 20:02:46 +03:00
parent 055e11174d
commit 9d03d52f28
No known key found for this signature in database
6 changed files with 22 additions and 5 deletions

View File

@ -220,7 +220,6 @@
"go-to-next-note-title": "跳转到下一条笔记",
"new-note-title": "新建笔记",
"search-notes-title": "搜索笔记",
"jump-to-note-title": "",
"calendar-title": "日历",
"recent-changes-title": "最近更改",
"bookmarks-title": "书签",

View File

@ -212,7 +212,6 @@
"go-to-next-note-title": "Zur nächsten Notiz gehen",
"new-note-title": "Neue Notiz",
"search-notes-title": "Notizen durchsuchen",
"jump-to-note-title": "",
"calendar-title": "Kalender",
"recent-changes-title": "neue Änderungen",
"bookmarks-title": "Lesezeichen",

View File

@ -229,7 +229,6 @@
"go-to-next-note-title": "Ir a nota siguiente",
"new-note-title": "Nueva nota",
"search-notes-title": "Buscar notas",
"jump-to-note-title": "",
"calendar-title": "Calendario",
"recent-changes-title": "Cambios recientes",
"bookmarks-title": "Marcadores",

View File

@ -216,7 +216,6 @@
"go-to-next-note-title": "Aller à la note suivante",
"new-note-title": "Nouvelle note",
"search-notes-title": "Rechercher des notes",
"jump-to-note-title": "",
"calendar-title": "Calendrier",
"recent-changes-title": "Modifications récentes",
"bookmarks-title": "Signets",

View File

@ -209,7 +209,6 @@
"etapi-title": "ETAPI",
"go-to-previous-note-title": "Mergi la notița anterioară",
"images-title": "Imagini",
"jump-to-note-title": "",
"launch-bar-title": "Bară de lansare",
"new-note-title": "Notiță nouă",
"note-launcher-title": "Lansator de notițe",

View File

@ -4,6 +4,9 @@ import hiddenSubtreeService from "./hidden_subtree.js";
import sql_init from "./sql_init.js";
import branches from "./branches.js";
import becca from "../becca/becca.js";
import { LOCALES } from "@triliumnext/commons";
import { changeLanguage } from "./i18n.js";
import { deferred } from "./utils.js";
describe("Hidden Subtree", () => {
describe("Launcher movement persistence", () => {
@ -79,5 +82,24 @@ describe("Hidden Subtree", () => {
expect(updatedJumpToNote).toBeDefined();
expect(updatedJumpToNote?.title).not.toBe("Renamed");
});
it("can restore names in all languages", async () => {
const done = deferred<void>();
cls.wrap(async () => {
for (const locale of LOCALES) {
if (locale.contentOnly) {
continue;
}
try {
await changeLanguage(locale.id);
} catch (error) {
done.reject(error);
}
}
done.resolve();
})();
await done;
});
});
});