mirror of
https://github.com/LBRYFoundation/lbry-desktop.git
synced 2025-08-23 17:47:24 +00:00
Fix locales path
This commit is contained in:
parent
29eb306934
commit
93d63865be
3 changed files with 7 additions and 3 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -12,6 +12,7 @@
|
||||||
/lbry-app
|
/lbry-app
|
||||||
/lbry-venv
|
/lbry-venv
|
||||||
/static/daemon/lbrynet*
|
/static/daemon/lbrynet*
|
||||||
|
/static/locales
|
||||||
/daemon/build
|
/daemon/build
|
||||||
/daemon/venv
|
/daemon/venv
|
||||||
/daemon/requirements.txt
|
/daemon/requirements.txt
|
||||||
|
|
|
@ -1,12 +1,15 @@
|
||||||
import store from "store.js";
|
import store from "store";
|
||||||
import { remote } from "electron";
|
import { remote } from "electron";
|
||||||
|
import path from "path";
|
||||||
|
|
||||||
const env = process.env.NODE_ENV || "production";
|
const env = process.env.NODE_ENV || "production";
|
||||||
const config = {
|
const config = {
|
||||||
...require(`./config/${env}`),
|
...require(`./config/${env}`),
|
||||||
};
|
};
|
||||||
const i18n = require("y18n")({
|
const i18n = require("y18n")({
|
||||||
directory: `${remote.app.getAppPath()}/locales`,
|
directory: path
|
||||||
|
.join(remote.app.getAppPath(), "/../static/locales")
|
||||||
|
.replace(/\\/g, "\\\\"),
|
||||||
updateFiles: false,
|
updateFiles: false,
|
||||||
locale: "en",
|
locale: "en",
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
const extract = require("i18n-extract");
|
const extract = require("i18n-extract");
|
||||||
const fs = require("fs");
|
const fs = require("fs");
|
||||||
|
|
||||||
const dir = `${__dirname}/../../dist/locales`;
|
const dir = `${__dirname}/../../static/locales`;
|
||||||
const path = `${dir}/en.json`;
|
const path = `${dir}/en.json`;
|
||||||
|
|
||||||
if (!fs.existsSync(dir)) {
|
if (!fs.existsSync(dir)) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue