feat: support more langs

* add translations for French, Spanish, and Italian
* change the wording for better understanding of this feature:
    - "import" to "restore"
    - "export" to "backup"
* rename functions to reflect these changes
This commit is contained in:
tetuaoro 2024-07-10 11:55:36 +02:00 committed by pheiduck
parent e3ee09b755
commit ce20bb7fcb
6 changed files with 58 additions and 44 deletions

View file

@ -319,15 +319,18 @@ Endpoint = ${WG_HOST}:${WG_CONFIG_PORT}`;
await this.saveConfig();
}
async uploadConfiguration(config) {
const _config = JSON.parse(config);
await this.__saveConfig(_config);
// force restart
async ___forceRestart() {
this.__configPromise = null;
await this.saveConfig();
}
async downloadConfiguration() {
async restoreConfiguration(config) {
const _config = JSON.parse(config);
await this.__saveConfig(_config);
await this.___forceRestart();
}
async backupConfiguration() {
const config = await this.getConfig();
return JSON.stringify(config, null, 2);
}