diff --git a/src/main/Application.js b/src/main/Application.js
index d9687e68f..094d64be7 100644
--- a/src/main/Application.js
+++ b/src/main/Application.js
@@ -17,6 +17,7 @@ import {
reduceTrackerString
} from '@shared/utils/tracker'
import logger from './core/Logger'
+import Context from './core/Context'
import ConfigManager from './core/ConfigManager'
import { setupLocaleManager } from './ui/Locale'
import Engine from './core/Engine'
@@ -32,7 +33,6 @@ import TouchBarManager from './ui/TouchBarManager'
import TrayManager from './ui/TrayManager'
import DockManager from './ui/DockManager'
import ThemeManager from './ui/ThemeManager'
-import { getSessionPath } from './utils'
export default class Application extends EventEmitter {
constructor () {
@@ -42,6 +42,8 @@ export default class Application extends EventEmitter {
}
init () {
+ this.initContext()
+
this.initConfigManager()
this.initLocaleManager()
@@ -83,6 +85,10 @@ export default class Application extends EventEmitter {
this.emit('application:initialized')
}
+ initContext () {
+ this.context = new Context()
+ }
+
initConfigManager () {
this.configListeners = {}
this.configManager = new ConfigManager()
@@ -644,7 +650,7 @@ export default class Application extends EventEmitter {
app.clearRecentDocuments()
- const sessionPath = this.configManager.getUserConfig('session-path') || getSessionPath()
+ const sessionPath = this.context.get('session-path')
setTimeout(() => {
unlink(sessionPath, function (err) {
logger.info('[Motrix] Removed the download seesion file:', err)
@@ -874,10 +880,12 @@ export default class Application extends EventEmitter {
ipcMain.handle('get-app-config', async () => {
const systemConfig = this.configManager.getSystemConfig()
const userConfig = this.configManager.getUserConfig()
+ const context = this.context.get()
const result = {
...systemConfig,
- ...userConfig
+ ...userConfig,
+ ...context
}
return result
})
diff --git a/src/main/core/ConfigManager.js b/src/main/core/ConfigManager.js
index 429d42c1e..3135dec49 100644
--- a/src/main/core/ConfigManager.js
+++ b/src/main/core/ConfigManager.js
@@ -4,8 +4,6 @@ import Store from 'electron-store'
import {
getDhtPath,
- getLogPath,
- getSessionPath,
getUserDownloadsPath,
getMaxConnectionPerServer
} from '../utils/index'
@@ -70,7 +68,7 @@ export default class ConfigManager {
'max-connection-per-server': getMaxConnectionPerServer(),
'max-download-limit': 0,
'max-overall-download-limit': 0,
- 'max-overall-upload-limit': '1M',
+ 'max-overall-upload-limit': 0,
'no-proxy': EMPTY_STRING,
'pause-metadata': false,
'pause': true,
@@ -113,14 +111,12 @@ export default class ConfigManager {
'last-check-update-time': 0,
'last-sync-tracker-time': 0,
'locale': app.getLocale(),
- 'log-path': getLogPath(),
'new-task-show-downloading': true,
'no-confirm-before-delete-task': false,
'open-at-login': false,
'protocols': { 'magnet': true, 'thunder': false },
'resume-all-when-app-launched': false,
'run-mode': APP_RUN_MODE.STANDARD,
- 'session-path': getSessionPath(),
'task-notification': true,
'theme': APP_THEME.AUTO,
'tracker-source': [
diff --git a/src/main/core/Context.js b/src/main/core/Context.js
index 39ea9ef18..99abd7019 100644
--- a/src/main/core/Context.js
+++ b/src/main/core/Context.js
@@ -1,3 +1,39 @@
+import logger from './Logger'
+import {
+ getEnginePath,
+ getAria2BinPath,
+ getAria2ConfPath,
+ getLogPath,
+ getSessionPath
+} from '../utils'
+
+const { platform, arch } = process
+
export default class Context {
+ constructor () {
+ this.init()
+ }
+
+ init () {
+ // The key of Context cannot be the same as that of userConfig and systemConfig.
+ this.context = {
+ platform: platform,
+ arch: arch,
+ 'log-path': getLogPath(),
+ 'session-path': getSessionPath(),
+ 'engine-path': getEnginePath(platform, arch),
+ 'aria2-bin-path': getAria2BinPath(platform, arch),
+ 'aria2-conf-path': getAria2ConfPath(platform, arch)
+ }
+
+ logger.info('[Motrix] Context.init===>', this.context)
+ }
+
+ get (key) {
+ if (typeof key === 'undefined') {
+ return this.context
+ }
+ return this.context[key]
+ }
}
diff --git a/src/main/core/Engine.js b/src/main/core/Engine.js
index e8d67847b..95008da72 100644
--- a/src/main/core/Engine.js
+++ b/src/main/core/Engine.js
@@ -1,15 +1,13 @@
-import { app } from 'electron'
import is from 'electron-is'
import { existsSync, writeFile, unlink } from 'fs'
-import { resolve, join } from 'path'
import { spawn } from 'child_process'
import logger from './Logger'
import { getI18n } from '../ui/Locale'
import {
- getEngineBin,
- getEngineArch,
getEnginePidPath,
+ getAria2BinPath,
+ getAria2ConfPath,
getSessionPath,
transformConfig
} from '../utils/index'
@@ -26,7 +24,6 @@ export default class Engine {
this.i18n = getI18n()
this.systemConfig = options.systemConfig
this.userConfig = options.userConfig
- this.basePath = this.getBasePath()
}
start () {
@@ -37,7 +34,7 @@ export default class Engine {
return
}
- const binPath = this.getBinPath()
+ const binPath = this.getEngineBinPath()
const args = this.getStartArgs()
this.instance = spawn(binPath, args, {
windowsHide: false,
@@ -84,13 +81,8 @@ export default class Engine {
})
}
- getBinPath () {
- const binName = getEngineBin(platform)
- if (!binName) {
- throw new Error(this.i18n.t('app.engine-damaged-message'))
- }
-
- const result = join(this.basePath, `/engine/${binName}`)
+ getEngineBinPath () {
+ const result = getAria2BinPath(platform, arch)
const binIsExist = existsSync(result)
if (!binIsExist) {
logger.error('[Motrix] engine bin is not exist:', result)
@@ -100,25 +92,10 @@ export default class Engine {
return result
}
- getBasePath () {
- const result = is.dev()
- ? this.getDevBasePath()
- : resolve(app.getAppPath(), '..')
-
- return result
- }
-
- getDevBasePath () {
- const ah = getEngineArch(platform, arch)
- const base = `../../../extra/${platform}/${ah}`
- const result = resolve(__dirname, base)
- return result
- }
-
getStartArgs () {
- const confPath = join(this.basePath, '/engine/aria2.conf')
+ const confPath = getAria2ConfPath(platform, arch)
- const sessionPath = this.userConfig['session-path'] || getSessionPath()
+ const sessionPath = getSessionPath()
const sessionIsExist = existsSync(sessionPath)
let result = [`--conf-path=${confPath}`, `--save-session=${sessionPath}`]
diff --git a/src/main/utils/index.js b/src/main/utils/index.js
index 79654b25e..ca71915d7 100644
--- a/src/main/utils/index.js
+++ b/src/main/utils/index.js
@@ -49,6 +49,33 @@ export function getEngineArch (platform, arch) {
return result
}
+export const getDevEnginePath = (platform, arch) => {
+ const ah = getEngineArch(platform, arch)
+ const base = `../../../extra/${platform}/${ah}/engine`
+ const result = resolve(__dirname, base)
+ return result
+}
+
+export const getProdEnginePath = () => {
+ return resolve(app.getAppPath(), '../engine')
+}
+
+export const getEnginePath = (platform, arch) => {
+ return is.dev() ? getDevEnginePath(platform, arch) : getProdEnginePath()
+}
+
+export const getAria2BinPath = (platform, arch) => {
+ const base = getEnginePath(platform, arch)
+ const binName = getEngineBin(platform)
+ const result = resolve(base, `./${binName}`)
+ return result
+}
+
+export const getAria2ConfPath = (platform, arch) => {
+ const base = getEnginePath(platform, arch)
+ return resolve(base, './aria2.conf')
+}
+
export function transformConfig (config) {
const result = []
for (const [k, v] of Object.entries(config)) {
diff --git a/src/renderer/components/Preference/Advanced.vue b/src/renderer/components/Preference/Advanced.vue
index 0fef1d018..68538dcb4 100644
--- a/src/renderer/components/Preference/Advanced.vue
+++ b/src/renderer/components/Preference/Advanced.vue
@@ -348,6 +348,16 @@
:label="`${$t('preferences.developer')}: `"
:label-width="formLabelWidth"
>
+
+ {{ $t('preferences.aria2-conf-path') }}
+
+
+
+
{{ $t('preferences.app-log-path') }}
@@ -520,6 +530,7 @@
},
...mapState('preference', {
config: state => state.config,
+ aria2ConfPath: state => state.config.aria2ConfPath,
logPath: state => state.config.logPath,
sessionPath: state => state.config.sessionPath
})
diff --git a/src/shared/locales/ar/preferences.js b/src/shared/locales/ar/preferences.js
index 372ddce9a..493a25f96 100644
--- a/src/shared/locales/ar/preferences.js
+++ b/src/shared/locales/ar/preferences.js
@@ -66,6 +66,7 @@ export default {
'developer': 'المطور',
'user-agent': 'User-Agent',
'mock-user-agent': 'وكيل مستخدم وهمي',
+ 'aria2-conf-path': 'مسار aria2.conf المدمج',
'app-log-path': 'مسار سجلات التطبيق',
'download-session-path': 'مسار التحميلات',
'session-reset': 'إعادة التحميل',
diff --git a/src/shared/locales/bg/preferences.js b/src/shared/locales/bg/preferences.js
index 257bb71d7..e3a6945f6 100644
--- a/src/shared/locales/bg/preferences.js
+++ b/src/shared/locales/bg/preferences.js
@@ -65,6 +65,7 @@ export default {
'rpc-secret-tips': 'Гледайте инструкцията RPC Secret',
'developer':'developer',
'Mock-user-agent':'оформление User-Agent',
+ 'aria2-conf-path': 'Вграден път за aria2.conf',
'app-log-path': 'път към дневника на приложението',
'download-session-path': 'качване на пътя на сесията',
'factory-reset': 'Настройки по подразбиране',
diff --git a/src/shared/locales/ca/preferences.js b/src/shared/locales/ca/preferences.js
index 09cc74efc..afc6f4164 100644
--- a/src/shared/locales/ca/preferences.js
+++ b/src/shared/locales/ca/preferences.js
@@ -66,6 +66,7 @@ export default {
'developer': 'Desenvolupador',
'user-agent': 'User-Agent',
'mock-user-agent': 'Mock User-Agent',
+ 'aria2-conf-path': 'Ruta incorporada per al fitxer aria2.conf',
'app-log-path': 'Ruta del log',
'download-session-path': 'Ruta de descàrrega de la sessió',
'factory-reset': 'Reseteig de fàbrica',
diff --git a/src/shared/locales/de/preferences.js b/src/shared/locales/de/preferences.js
index 83eeac71a..45b95c367 100644
--- a/src/shared/locales/de/preferences.js
+++ b/src/shared/locales/de/preferences.js
@@ -66,6 +66,7 @@ export default {
'developer': 'Entwickler',
'user-agent': 'User-Agent',
'mock-user-agent': 'User-Agent simulieren',
+ 'aria2-conf-path': 'Integrierter aria2.conf-Pfad',
'app-log-path': 'Appprotokollpfad',
'download-session-path': 'Downloadsitzungspfad',
'session-reset': 'Download-Session zurücksetzen',
diff --git a/src/shared/locales/el/preferences.js b/src/shared/locales/el/preferences.js
index 9fca32ddf..8e4392c86 100644
--- a/src/shared/locales/el/preferences.js
+++ b/src/shared/locales/el/preferences.js
@@ -66,6 +66,7 @@ export default {
'developer': 'Προγραμματιστής',
'user-agent': 'User-Agent',
'mock-user-agent': 'Πλαστό User-Agent',
+ 'aria2-conf-path': 'Ενσωματωμένη διαδρομή aria2.conf',
'app-log-path': 'Διαδρομή για το αρχείο log της εφαρμογής',
'download-session-path': 'Διαδρομή λήψεων για αυτή τη συνεδρία',
'factory-reset': 'Επαναφορά στις εργοστασιακές ρυθμίσεις',
diff --git a/src/shared/locales/en-US/preferences.js b/src/shared/locales/en-US/preferences.js
index 25e25c3da..3a99821cf 100644
--- a/src/shared/locales/en-US/preferences.js
+++ b/src/shared/locales/en-US/preferences.js
@@ -66,6 +66,7 @@ export default {
'developer': 'Developer',
'user-agent': 'User-Agent',
'mock-user-agent': 'Mock User-Agent',
+ 'aria2-conf-path': 'Built-in aria2.conf path',
'app-log-path': 'App log path',
'download-session-path': 'Download session path',
'session-reset': 'Reset download session',
diff --git a/src/shared/locales/es/preferences.js b/src/shared/locales/es/preferences.js
index 4c49029e8..61067a639 100644
--- a/src/shared/locales/es/preferences.js
+++ b/src/shared/locales/es/preferences.js
@@ -66,6 +66,7 @@ export default {
'developer': 'Desarrollador',
'user-agent': 'User-Agent',
'mock-user-agent': 'Falsear Agente de Usuario',
+ 'aria2-conf-path': 'Ruta incorporada de aria2.conf',
'app-log-path': 'Ruta del registro',
'download-session-path': 'Ruta de descarga de la sesión',
'factory-reset': 'Restauración de fábrica',
diff --git a/src/shared/locales/fa/preferences.js b/src/shared/locales/fa/preferences.js
index 4fc7523b4..a2c6f75e3 100644
--- a/src/shared/locales/fa/preferences.js
+++ b/src/shared/locales/fa/preferences.js
@@ -66,6 +66,7 @@ export default {
'developer': 'توسعهدهنده',
'user-agent': 'User-Agent',
'mock-user-agent': 'جعل عامل کاربر',
+ 'aria2-conf-path': 'مسیر aria2.conf درونی',
'app-log-path': 'مسیر گزارش برنامه',
'download-session-path': 'مسیر نشست بارگیری',
'session-reset': 'بازنشانی نشست بارگیری',
diff --git a/src/shared/locales/fr/preferences.js b/src/shared/locales/fr/preferences.js
index 2ad2efe5d..1dc1ee6e6 100644
--- a/src/shared/locales/fr/preferences.js
+++ b/src/shared/locales/fr/preferences.js
@@ -66,6 +66,7 @@ export default {
'developer': 'Développeur',
'user-agent': 'User-Agent',
'mock-user-agent': 'Mock User-Agent',
+ 'aria2-conf-path': 'Chemin intégré de aria2.conf',
'app-log-path': 'Chemin des logs',
'download-session-path': 'Chemin de la session de téléchargement',
'factory-reset': 'Réinitialisation',
diff --git a/src/shared/locales/hu/preferences.js b/src/shared/locales/hu/preferences.js
index 0b9b21e60..f0b2dc872 100644
--- a/src/shared/locales/hu/preferences.js
+++ b/src/shared/locales/hu/preferences.js
@@ -66,6 +66,7 @@ export default {
'developer': 'feljesztö',
'user-agent': 'User-Agent',
'mock-user-agent': 'User-Agent-t',
+ 'aria2-conf-path': 'Beépített aria2.conf útvonal',
'app-log-path': 'Alkalmazásnapló helye',
'download-session-path': 'Letöltés folyamat helye',
'factory-reset': 'Gyári viszaálitas',
diff --git a/src/shared/locales/id/preferences.js b/src/shared/locales/id/preferences.js
index 49705cf6f..8c051c3a6 100644
--- a/src/shared/locales/id/preferences.js
+++ b/src/shared/locales/id/preferences.js
@@ -66,6 +66,7 @@ export default {
'developer': 'Developer',
'user-agent': 'User-Agent',
'mock-user-agent': 'Mock User-Agent',
+ 'aria2-conf-path': 'Jalur aria2.conf Bawaan',
'app-log-path': 'Lokasi Log Aplikasi',
'download-session-path': 'Lokasi Session Unduhan',
'factory-reset': 'Reset Pabrik',
diff --git a/src/shared/locales/it/preferences.js b/src/shared/locales/it/preferences.js
index efe40faab..bbead317d 100644
--- a/src/shared/locales/it/preferences.js
+++ b/src/shared/locales/it/preferences.js
@@ -66,6 +66,7 @@ export default {
'developer': 'Sviluppatore',
'user-agent': 'User-Agent',
'mock-user-agent': 'Cambia User-Agent',
+ 'aria2-conf-path': 'Percorso incorporato di aria2.conf',
'app-log-path': 'Posizione log dell\'app',
'download-session-path': 'Posizione sessione di download',
'factory-reset': 'Reset di fabbrica',
diff --git a/src/shared/locales/ja/preferences.js b/src/shared/locales/ja/preferences.js
index b20fd7798..9759ff168 100644
--- a/src/shared/locales/ja/preferences.js
+++ b/src/shared/locales/ja/preferences.js
@@ -66,6 +66,7 @@ export default {
'developer': '開発者',
'user-agent': 'User-Agent',
'mock-user-agent': '偽装ユーザーエージェント(UA)',
+ 'aria2-conf-path': '組み込みの aria2.conf パス',
'app-log-path': 'ログディレクトリを適用',
'download-session-path': 'セッションパスをダウンロード',
'factory-reset': '初期設定に戻す',
diff --git a/src/shared/locales/ko/preferences.js b/src/shared/locales/ko/preferences.js
index 5443d36fe..d74588168 100644
--- a/src/shared/locales/ko/preferences.js
+++ b/src/shared/locales/ko/preferences.js
@@ -66,6 +66,7 @@ export default {
'developer': '개발자',
'user-agent': 'User-Agent',
'mock-user-agent': '모의 사용자 에이전트',
+ 'aria2-conf-path': '내장 된 aria2.conf 경로',
'app-log-path': '앱 로그 경로',
'download-session-path': '다운로드 세션 경로',
'session-reset': '다운로드 세션 초기화',
diff --git a/src/shared/locales/nb/preferences.js b/src/shared/locales/nb/preferences.js
index a16ab0700..580e10937 100644
--- a/src/shared/locales/nb/preferences.js
+++ b/src/shared/locales/nb/preferences.js
@@ -66,6 +66,7 @@ export default {
'developer': 'Utvikler',
'user-agent': 'User-Agent',
'mock-user-agent': 'Mock User-Agent',
+ 'aria2-conf-path': 'Innebygd aria2.conf-sti',
'app-log-path': 'Apploggbane',
'download-session-path': 'Last ned øktstien',
'session-reset': 'Tilbakestill nedlastingsøkten',
diff --git a/src/shared/locales/nl/preferences.js b/src/shared/locales/nl/preferences.js
index 8a5a4da6e..5ded69ea3 100644
--- a/src/shared/locales/nl/preferences.js
+++ b/src/shared/locales/nl/preferences.js
@@ -66,6 +66,7 @@ export default {
'developer': 'Ontwikkelaar',
'user-agent': 'User-Agent',
'mock-user-agent': 'User-Agent nabootsen',
+ 'aria2-conf-path': 'Ingebed pad voor aria2.conf',
'app-log-path': 'Applicatie log pad',
'download-session-path': 'Downloadsessie pad',
'session-reset': 'Reset download sessie',
diff --git a/src/shared/locales/pl/preferences.js b/src/shared/locales/pl/preferences.js
index 560c96158..463f37de2 100644
--- a/src/shared/locales/pl/preferences.js
+++ b/src/shared/locales/pl/preferences.js
@@ -66,6 +66,7 @@ export default {
'developer': 'Developer',
'user-agent': 'User-Agent',
'mock-user-agent': 'Udawaj user-agent\'a',
+ 'aria2-conf-path': 'Wbudowana ścieżka aria2.conf',
'app-log-path': 'Ścieżka logów',
'download-session-path': 'Ścieżka sesji pobranych',
'factory-reset': 'Przywróć domyślne ustawiania',
diff --git a/src/shared/locales/pt-BR/preferences.js b/src/shared/locales/pt-BR/preferences.js
index 84d4a7b27..505aee5ca 100644
--- a/src/shared/locales/pt-BR/preferences.js
+++ b/src/shared/locales/pt-BR/preferences.js
@@ -66,6 +66,7 @@ export default {
'developer': 'Desenvolverdor',
'user-agent': 'User-Agent',
'mock-user-agent': 'Mock User-Agent',
+ 'aria2-conf-path': 'Caminho de aria2.conf incorporado',
'app-log-path': 'Diretório de logs',
'download-session-path': 'Diretório da sessão de Downloads',
'factory-reset': 'Configurações de Fábrica',
diff --git a/src/shared/locales/ro/preferences.js b/src/shared/locales/ro/preferences.js
index 8994d0c6d..fbeb881f2 100644
--- a/src/shared/locales/ro/preferences.js
+++ b/src/shared/locales/ro/preferences.js
@@ -66,6 +66,7 @@ export default {
'developer': 'Dezvoltator',
'user-agent': 'User-Agent',
'mock-user-agent': 'Mock User-Agent',
+ 'aria2-conf-path': 'Calea aria2.conf încorporată',
'app-log-path': 'Calea jurnalului aplicației',
'download-session-path': 'Calea sesiunii de download',
'factory-reset': 'Resetare la setări din fabrică',
diff --git a/src/shared/locales/ru/preferences.js b/src/shared/locales/ru/preferences.js
index a3f9a4b35..262342dc1 100644
--- a/src/shared/locales/ru/preferences.js
+++ b/src/shared/locales/ru/preferences.js
@@ -66,6 +66,7 @@ export default {
'developer': 'Разработчик',
'user-agent': 'User-Agent',
'mock-user-agent': 'Макет User-Agent',
+ 'aria2-conf-path': 'Встроенный путь к aria2.conf',
'app-log-path': 'Путь к журналу приложения',
'download-session-path': 'Загрузить путь сессии',
'factory-reset': 'Настройки по умолчанию',
diff --git a/src/shared/locales/th/preferences.js b/src/shared/locales/th/preferences.js
index a0cc46605..899263b5c 100644
--- a/src/shared/locales/th/preferences.js
+++ b/src/shared/locales/th/preferences.js
@@ -66,6 +66,7 @@ export default {
'developer': 'นักพัฒนา',
'user-agent': 'User-Agent',
'mock-user-agent': 'จำลอง User-Agent',
+ 'aria2-conf-path': 'เส้นทาง aria2.conf ที่ฝังอยู่',
'app-log-path': 'เส้นทางบันทึกแอป',
'download-session-path': 'เส้นทางดาวน์โหลดเซสชัน',
'session-reset': 'รีเซ็ตเซสชั่นการดาวน์โหลด',
diff --git a/src/shared/locales/tr/preferences.js b/src/shared/locales/tr/preferences.js
index 59a1bdd6b..ed9288737 100644
--- a/src/shared/locales/tr/preferences.js
+++ b/src/shared/locales/tr/preferences.js
@@ -66,6 +66,7 @@ export default {
'developer': 'Geliştirici',
'user-agent': 'User-Agent',
'mock-user-agent': 'Sahte Kullanıcı Kimliği (User-Agent)',
+ 'aria2-conf-path': 'Dahili aria2.conf yolu',
'app-log-path': 'Uygulama log yolu',
'download-session-path': 'Oturum yolunu indir',
'factory-reset': 'Fabrika ayarlarına dön',
diff --git a/src/shared/locales/uk/preferences.js b/src/shared/locales/uk/preferences.js
index e870ffbfb..c583c92e8 100644
--- a/src/shared/locales/uk/preferences.js
+++ b/src/shared/locales/uk/preferences.js
@@ -66,6 +66,7 @@ export default {
'developer': 'Розробник',
'user-agent': 'User-Agent',
'mock-user-agent': 'Макет User-Agent',
+ 'aria2-conf-path': 'Вбудований шлях до aria2.conf',
'app-log-path': 'Шлях до журналу додатка',
'download-session-path': 'Завантажити шлях сесії',
'factory-reset': 'Налаштування за замовчуванням',
diff --git a/src/shared/locales/vi/preferences.js b/src/shared/locales/vi/preferences.js
index 62aa460e8..f1fd90a93 100644
--- a/src/shared/locales/vi/preferences.js
+++ b/src/shared/locales/vi/preferences.js
@@ -66,6 +66,7 @@ export default {
'developer': 'Lập trình viên',
'user-agent': 'User-Agent',
'mock-user-agent': 'Mock User-Agent',
+ 'aria2-conf-path': 'Đường dẫn aria2.conf tích hợp sẵn',
'app-log-path': 'Đường dẫn nhật ký ứng dụng',
'download-session-path': 'Đường dẫn phiên tải về',
'session-reset': 'Đặt lại phiên tải xuống',
diff --git a/src/shared/locales/zh-CN/preferences.js b/src/shared/locales/zh-CN/preferences.js
index 4a2981489..e5dbd6d6a 100644
--- a/src/shared/locales/zh-CN/preferences.js
+++ b/src/shared/locales/zh-CN/preferences.js
@@ -66,6 +66,7 @@ export default {
'developer': '开发者',
'user-agent': 'User-Agent',
'mock-user-agent': '模拟用户代理(UA)',
+ 'aria2-conf-path': '内置的 aria2.conf 路径',
'app-log-path': '应用日志路径',
'download-session-path': '下载会话路径',
'session-reset': '重置下载会话记录',
diff --git a/src/shared/locales/zh-TW/preferences.js b/src/shared/locales/zh-TW/preferences.js
index 6a8336911..81f2c6f24 100644
--- a/src/shared/locales/zh-TW/preferences.js
+++ b/src/shared/locales/zh-TW/preferences.js
@@ -66,6 +66,7 @@ export default {
'developer': '開發者',
'user-agent': 'User-Agent',
'mock-user-agent': '偽裝 User Agent',
+ 'aria2-conf-path': '內建的 aria2.conf 路徑',
'app-log-path': '應用程式記錄檔位置',
'download-session-path': '下載工作階段路徑',
'session-reset': '重設下載工作階段',