mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-29 11:02:28 +08:00
i18n: Translate sync messages
This commit is contained in:
parent
f8777b0de1
commit
bff9bedc44
@ -12,14 +12,15 @@ import syncOptions from "../../services/sync_options.js";
|
|||||||
import utils from "../../services/utils.js";
|
import utils from "../../services/utils.js";
|
||||||
import ws from "../../services/ws.js";
|
import ws from "../../services/ws.js";
|
||||||
import { Request } from 'express';
|
import { Request } from 'express';
|
||||||
import { EntityChange, EntityChangeRecord } from '../../services/entity_changes_interface.js';
|
import { EntityChange } from '../../services/entity_changes_interface.js';
|
||||||
import ValidationError from "../../errors/validation_error.js";
|
import ValidationError from "../../errors/validation_error.js";
|
||||||
import consistencyChecksService from "../../services/consistency_checks.js";
|
import consistencyChecksService from "../../services/consistency_checks.js";
|
||||||
|
import { t } from "i18next";
|
||||||
|
|
||||||
async function testSync() {
|
async function testSync() {
|
||||||
try {
|
try {
|
||||||
if (!syncOptions.isSyncSetup()) {
|
if (!syncOptions.isSyncSetup()) {
|
||||||
return { success: false, message: "Sync server host is not configured. Please configure sync first." };
|
return { success: false, message: t("test_sync.not-configured") };
|
||||||
}
|
}
|
||||||
|
|
||||||
await syncService.login();
|
await syncService.login();
|
||||||
@ -28,7 +29,7 @@ async function testSync() {
|
|||||||
// this is important in case when sync server has been just initialized
|
// this is important in case when sync server has been just initialized
|
||||||
syncService.sync();
|
syncService.sync();
|
||||||
|
|
||||||
return { success: true, message: "Sync server handshake has been successful, sync has been started." };
|
return { success: true, message: t("test_sync.successful") };
|
||||||
}
|
}
|
||||||
catch (e: any) {
|
catch (e: any) {
|
||||||
return {
|
return {
|
||||||
|
@ -188,5 +188,9 @@
|
|||||||
"theme_none": "No syntax highlighting",
|
"theme_none": "No syntax highlighting",
|
||||||
"theme_group_light": "Light themes",
|
"theme_group_light": "Light themes",
|
||||||
"theme_group_dark": "Dark themes"
|
"theme_group_dark": "Dark themes"
|
||||||
|
},
|
||||||
|
"test_sync": {
|
||||||
|
"not-configured": "Sync server host is not configured. Please configure sync first.",
|
||||||
|
"successful": "Sync server handshake has been successful, sync has been started."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -188,5 +188,9 @@
|
|||||||
"theme_none": "Fără evidențiere de sintaxă",
|
"theme_none": "Fără evidențiere de sintaxă",
|
||||||
"theme_group_dark": "Teme întunecate",
|
"theme_group_dark": "Teme întunecate",
|
||||||
"theme_group_light": "Teme luminoase"
|
"theme_group_light": "Teme luminoase"
|
||||||
|
},
|
||||||
|
"test_sync": {
|
||||||
|
"not-configured": "Calea către serverul de sincronizare nu este configurată. Configurați sincronizarea înainte.",
|
||||||
|
"successful": "Comunicarea cu serverul de sincronizare a avut loc cu succes, s-a început sincronizarea."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user