Update localization files for backup destinations and API client credentials

- Changed references from E3 to S3 in Russian, Simplified Chinese, and Traditional Chinese localization files.
- Updated the corresponding keys and descriptions to reflect the change in backup destination protocols.
- Improved the Vite configuration to dynamically match locale files, simplifying the code for locale handling.
This commit is contained in:
shuaiplus
2026-04-30 15:03:05 +08:00
parent 9c5fbda374
commit 0c00114cc8
19 changed files with 1232 additions and 201 deletions
+9
View File
@@ -4,6 +4,14 @@ const vm = require('vm');
const localeDir = path.join(__dirname, '..', 'webapp', 'src', 'lib', 'i18n', 'locales');
const localeFiles = [
['en', 'en.ts', 'en', 'English'],
['zh-CN', 'zh-CN.ts', 'zhCN', 'Simplified Chinese'],
['zh-TW', 'zh-TW.ts', 'zhTW', 'Traditional Chinese'],
['ru', 'ru.ts', 'ru', 'Russian'],
['es', 'es.ts', 'es', 'Spanish'],
];
function readLocale(fileName, variableName) {
let code = fs.readFileSync(path.join(localeDir, fileName), 'utf8');
code = code
@@ -26,6 +34,7 @@ function writeLocale(fileName, variableName, table, header) {
}
module.exports = {
localeFiles,
localeDir,
readLocale,
writeLocale,