diff --git a/ui/js/actions/settings.js b/ui/js/actions/settings.js index 7038fd284..195a42ece 100644 --- a/ui/js/actions/settings.js +++ b/ui/js/actions/settings.js @@ -4,6 +4,7 @@ import batchActions from "util/batchActions"; import lbry from "lbry"; import fs from "fs"; import http from "http"; +import { remote } from "electron"; export function doFetchDaemonSettings() { return function(dispatch, getState) { @@ -48,7 +49,7 @@ export function doSetClientSetting(key, value) { export function doDownloadLanguage(langFile) { return function(dispatch, getState) { - const destinationPath = `app/locales/${langFile}`; + const destinationPath = app.i18n.directory + "/" + langFile; const language = langFile.replace(".json", ""); const req = http.get( { diff --git a/ui/js/app.js b/ui/js/app.js index ecbb5f83c..0aa908904 100644 --- a/ui/js/app.js +++ b/ui/js/app.js @@ -1,5 +1,6 @@ import store from "store.js"; import lbry from "./lbry.js"; +import { remote } from "electron"; import * as settings from "constants/settings"; const env = ENV; @@ -10,7 +11,7 @@ const language = lbry.getClientSetting(settings.LANGUAGE) ? lbry.getClientSetting(settings.LANGUAGE) : "en"; const i18n = require("y18n")({ - directory: "app/locales", + directory: remote.app.getAppPath() + "/locales", updateFiles: false, locale: language, });