Merge pull request #547 from gyroninja/master
Get the app directory via an absolute path instead of a relative one.
This commit is contained in:
commit
78db4b0671
2 changed files with 3 additions and 2 deletions
|
@ -48,7 +48,7 @@ export function doSetClientSetting(key, value) {
|
||||||
|
|
||||||
export function doDownloadLanguage(langFile) {
|
export function doDownloadLanguage(langFile) {
|
||||||
return function(dispatch, getState) {
|
return function(dispatch, getState) {
|
||||||
const destinationPath = `app/locales/${langFile}`;
|
const destinationPath = app.i18n.directory + "/" + langFile;
|
||||||
const language = langFile.replace(".json", "");
|
const language = langFile.replace(".json", "");
|
||||||
const req = http.get(
|
const req = http.get(
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import store from "store.js";
|
import store from "store.js";
|
||||||
import lbry from "./lbry.js";
|
import lbry from "./lbry.js";
|
||||||
|
import { remote } from "electron";
|
||||||
import * as settings from "constants/settings";
|
import * as settings from "constants/settings";
|
||||||
|
|
||||||
const env = ENV;
|
const env = ENV;
|
||||||
|
@ -10,7 +11,7 @@ const language = lbry.getClientSetting(settings.LANGUAGE)
|
||||||
? lbry.getClientSetting(settings.LANGUAGE)
|
? lbry.getClientSetting(settings.LANGUAGE)
|
||||||
: "en";
|
: "en";
|
||||||
const i18n = require("y18n")({
|
const i18n = require("y18n")({
|
||||||
directory: "app/locales",
|
directory: remote.app.getAppPath() + "/locales",
|
||||||
updateFiles: false,
|
updateFiles: false,
|
||||||
locale: language,
|
locale: language,
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue