i18n: Translate sync messages

This commit is contained in:
Elian Doran 2024-11-02 15:43:16 +02:00
parent f8777b0de1
commit bff9bedc44
No known key found for this signature in database
3 changed files with 12 additions and 3 deletions

View File

@ -12,14 +12,15 @@ import syncOptions from "../../services/sync_options.js";
import utils from "../../services/utils.js";
import ws from "../../services/ws.js";
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 consistencyChecksService from "../../services/consistency_checks.js";
import { t } from "i18next";
async function testSync() {
try {
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();
@ -28,7 +29,7 @@ async function testSync() {
// this is important in case when sync server has been just initialized
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) {
return {

View File

@ -188,5 +188,9 @@
"theme_none": "No syntax highlighting",
"theme_group_light": "Light 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."
}
}

View File

@ -188,5 +188,9 @@
"theme_none": "Fără evidențiere de sintaxă",
"theme_group_dark": "Teme întunecate",
"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."
}
}