Get the app directory via an absolute path instead of a relative one. #547

Merged
gyroninja merged 2 commits from master into master 2017-09-12 00:23:44 +02:00
2 changed files with 3 additions and 2 deletions

View file

@ -48,7 +48,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(
{

View file

@ -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,
});